This commit is contained in:
Milos Kozak 2022-05-02 23:06:52 +02:00
commit bb8c799c6f
2 changed files with 3 additions and 10 deletions

View file

@ -37,7 +37,7 @@ class SafetyPlugin @Inject constructor(
private val constraintChecker: ConstraintChecker,
private val openAPSAMAPlugin: OpenAPSAMAPlugin,
private val openAPSSMBPlugin: OpenAPSSMBPlugin,
private val OpenAPSSMBDynamicISFPlugin: OpenAPSSMBDynamicISFPlugin,
private val openAPSSMBDynamicISFPlugin: OpenAPSSMBDynamicISFPlugin,
private val sensitivityOref1Plugin: SensitivityOref1Plugin,
private val activePlugin: ActivePlugin,
private val hardLimits: HardLimits,
@ -190,12 +190,12 @@ class SafetyPlugin @Inject constructor(
override fun applyMaxIOBConstraints(maxIob: Constraint<Double>): Constraint<Double> {
val apsMode = sp.getString(R.string.key_aps_mode, "open")
val maxIobPref: Double = if (openAPSSMBPlugin.isEnabled() || OpenAPSSMBDynamicISFPlugin.isEnabled()) sp.getDouble(R.string.key_openapssmb_max_iob, 3.0) else sp.getDouble(R.string
val maxIobPref: Double = if (openAPSSMBPlugin.isEnabled() || openAPSSMBDynamicISFPlugin.isEnabled()) sp.getDouble(R.string.key_openapssmb_max_iob, 3.0) else sp.getDouble(R.string
.key_openapsma_max_iob, 1.5)
maxIob.setIfSmaller(aapsLogger, maxIobPref, rh.gs(R.string.limitingiob, maxIobPref, rh.gs(R.string.maxvalueinpreferences)), this)
if (openAPSAMAPlugin.isEnabled()) maxIob.setIfSmaller(aapsLogger, hardLimits.maxIobAMA(), rh.gs(R.string.limitingiob, hardLimits.maxIobAMA(), rh.gs(R.string.hardlimit)), this)
if (openAPSSMBPlugin.isEnabled()) maxIob.setIfSmaller(aapsLogger, hardLimits.maxIobSMB(), rh.gs(R.string.limitingiob, hardLimits.maxIobSMB(), rh.gs(R.string.hardlimit)), this)
if (OpenAPSSMBDynamicISFPlugin.isEnabled()) maxIob.setIfSmaller(aapsLogger, hardLimits.maxIobSMB(), rh.gs(R.string.limitingiob, hardLimits.maxIobSMB(), rh.gs(R.string.hardlimit)), this)
if (openAPSSMBDynamicISFPlugin.isEnabled()) maxIob.setIfSmaller(aapsLogger, hardLimits.maxIobSMB(), rh.gs(R.string.limitingiob, hardLimits.maxIobSMB(), rh.gs(R.string.hardlimit)), this)
if (apsMode == "lgs") maxIob.setIfSmaller(aapsLogger, HardLimits.MAX_IOB_LGS, rh.gs(R.string.limitingiob, HardLimits.MAX_IOB_LGS, rh.gs(R.string.lowglucosesuspend)), this)
return maxIob
}

View file

@ -552,7 +552,6 @@
android:label="@string/menu_settings" />
<activity
android:name=".interaction.actions.WizardActivity"
android:exported="true"
android:label="@string/menu_wizard" />
<activity
android:name=".interaction.menus.FillMenuActivity"
@ -562,11 +561,9 @@
android:label="@string/menu_status" />
<activity
android:name=".interaction.actions.TreatmentActivity"
android:exported="true"
android:label="@string/menu_treatment" />
<activity
android:name=".interaction.actions.BolusActivity"
android:exported="true"
android:label="@string/action_insulin" />
<activity
android:name=".interaction.actions.ProfileSwitchActivity"
@ -577,19 +574,15 @@
android:launchMode="singleInstance" />
<activity
android:name=".interaction.actions.FillActivity"
android:exported="true"
android:label="@string/menu_prime_fill" />
<activity
android:name=".interaction.actions.ECarbActivity"
android:exported="true"
android:label="@string/action_ecarbs" />
<activity
android:name=".interaction.actions.CarbActivity"
android:exported="true"
android:label="@string/action_carbs" />
<activity
android:name=".interaction.actions.TempTargetActivity"
android:exported="true"
android:label="@string/menu_tempt" />
<activity