DynISF: notify about fallback to SMB
This commit is contained in:
parent
866aaa25f6
commit
c73829faa8
2 changed files with 13 additions and 0 deletions
|
@ -237,6 +237,18 @@ open class OpenAPSSMBPlugin @Inject constructor(
|
|||
tddLast4H = tddCalculator.calculateDaily(-4, 0)?.totalAmount
|
||||
tddLast8to4H = tddCalculator.calculateDaily(-8, -4)?.totalAmount
|
||||
|
||||
if (tdd1D == null || tdd7D == null || tddLast4H == null || tddLast8to4H == null || tddLast24H == null) {
|
||||
inputConstraints.copyReasons(
|
||||
Constraint(false).also {
|
||||
it.set(aapsLogger, false, rh.gs(R.string.fallback_smb_no_tdd), this)
|
||||
}
|
||||
)
|
||||
inputConstraints.copyReasons(
|
||||
Constraint(false).apply { set(aapsLogger, true, "tdd1D=$tdd1D tdd7D=$tdd7D tddLast4H=$tddLast4H tddLast8to4H=$tddLast8to4H tddLast24H=$tddLast24H", this) }
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
provideDetermineBasalAdapter().also { determineBasalAdapterSMBJS ->
|
||||
determineBasalAdapterSMBJS.setData(
|
||||
profile, maxIob, maxBasal, minBg, maxBg, targetBg,
|
||||
|
|
|
@ -148,6 +148,7 @@
|
|||
<string name="loop_smb_set_by_pump_label">SMB set by pump</string>
|
||||
<string name="loop_open_mode_min_change">Minimal request change [%]</string>
|
||||
<string name="loop_open_mode_min_change_summary" formatted="false">Open Loop will popup new change request only if change is bigger than this value in %. Default value is 20%</string>
|
||||
<string name="fallback_smb_no_tdd">Fallback to SMB. Not enough TDD data.</string>
|
||||
|
||||
|
||||
</resources>
|
Loading…
Reference in a new issue