Merge pull request #2776 from Philoul/AutomationTempTargetMmol
Fix mmol units in automation Temp Target Action
This commit is contained in:
commit
d04cf567b8
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue