Minor fixes.
This commit is contained in:
parent
256bb09775
commit
d155616c0b
|
@ -632,6 +632,13 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
|
|||
return new PumpEnactResult().success(false).enacted(true)
|
||||
.comment(MainApp.gs(R.string.combo_error_updating_treatment_record));
|
||||
|
||||
// check pump bolus record has a sane timestamp
|
||||
long now = System.currentTimeMillis();
|
||||
if (lastPumpBolus.timestamp < now - 10 * 60 * 1000 || lastPumpBolus.timestamp > now + 10 * 60 * 1000) {
|
||||
Notification notification = new Notification(Notification.COMBO_PUMP_ALARM, MainApp.gs(R.string.combo_suspious_bolus_time), Notification.URGENT);
|
||||
MainApp.bus().post(new EventNewNotification(notification));
|
||||
}
|
||||
|
||||
// update `recentBoluses` so the bolus was just delivered won't be detected as a new
|
||||
// bolus that has been delivered on the pump
|
||||
recentBoluses = postBolusStateResult.history.bolusHistory;
|
||||
|
@ -646,13 +653,6 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
|
|||
lastPumpBolus.amount, detailedBolusInfo.insulin));
|
||||
}
|
||||
|
||||
// check pump bolus record has a sane timestamp
|
||||
long now = System.currentTimeMillis();
|
||||
if (lastPumpBolus.timestamp < now - 10 * 60 * 1000 || lastPumpBolus.timestamp > now + 10 * 60 * 1000) {
|
||||
Notification notification = new Notification(Notification.COMBO_PUMP_ALARM, MainApp.gs(R.string.combo_suspious_bolus_time), Notification.URGENT);
|
||||
MainApp.bus().post(new EventNewNotification(notification));
|
||||
}
|
||||
|
||||
// full bolus was delivered successfully
|
||||
return new PumpEnactResult()
|
||||
.success(true)
|
||||
|
|
|
@ -792,6 +792,6 @@
|
|||
<string name="zerovalueinprofile">Ungültiges Profil: %s</string>
|
||||
<string name="hoursago">vor %.1f h</string>
|
||||
<string name="combo_high_temp_rejected_due_to_pump_history_changes">Es wurde keine hohe TBR gesetzt, da nach der Berechnung Boluseinträge in der Pumpenhistorik gefunden wurden.</string>
|
||||
<string name="combo_check_date">Der letzte Bolus liegt mehr als 24 Stunden zurück oder liegt in der Zukunft. Prüfe bitte das Datum auf der Uhr.</string>
|
||||
<string name="combo_check_date">Der letzte Bolus liegt mehr als 24 Stunden zurück oder liegt in der Zukunft. Prüfe bitte das Datum auf der Pumpe.</string>
|
||||
<string name="combo_suspious_bolus_time">Zeit/Datum des abgegebenen Boluses auf der Pumpe erscheint falsch, IOB ist wahrscheinlich nicht korrekt. Bitte prüfe Zeit/Datum der Pumpe.</string>
|
||||
</resources>
|
||||
|
|
Loading…
Reference in a new issue