Fix units in Automation TT Action

This commit is contained in:
Philoul 2020-06-26 09:28:12 +02:00
parent 0b0b4fc637
commit 5f02a1cc84

View file

@ -4,14 +4,18 @@ import android.widget.LinearLayout
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.Constants
import info.nightscout.androidaps.R
import info.nightscout.androidaps.interfaces.ProfileFunction
import info.nightscout.androidaps.utils.NumberPicker
import java.text.DecimalFormat
import javax.inject.Inject
class InputTempTarget(injector: HasAndroidInjector) : Element(injector) {
var units = Constants.MGDL
var value = 0.0
@Inject lateinit var profileFunction: ProfileFunction
init {
units = profileFunction.getUnits()
value = if (units == Constants.MMOL) 6.0 else 110.0
}