Disable loop when selected basal rate is not 1.

This commit is contained in:
Johannes Mockenhaupt 2017-11-08 14:28:02 +01:00
parent dd98d9f7ae
commit cda621f32b
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
2 changed files with 4 additions and 3 deletions

View file

@ -798,7 +798,7 @@
<string name="combo_pump_bolus_verification_failed">Bolus delivery verification failed. The pump history will be read again on the next loop run or when refreshing from the Combo page. Please check and bolus again if needed.</string> <string name="combo_pump_bolus_verification_failed">Bolus delivery verification failed. The pump history will be read again on the next loop run or when refreshing from the Combo page. Please check and bolus again if needed.</string>
<string name="combo_pump_unsupported_operation">Requested operation not supported by pump</string> <string name="combo_pump_unsupported_operation">Requested operation not supported by pump</string>
<string name="combo_bolus_bolus_delivery_failed">Bolus delivery failed. A (partial) bolus might have been delivered. Attempting to update history from pump. Please check the Combo page and bolus again as needed.</string> <string name="combo_bolus_bolus_delivery_failed">Bolus delivery failed. A (partial) bolus might have been delivered. Attempting to update history from pump. Please check the Combo page and bolus again as needed.</string>
<string name="combo_force_disabled">Unsafe usage: extended or multiwave boluses have been delivered within the last 6 hours. Loop mode has been disabled until 6 hours after the last unsupported bolus. Only normal boluses are supported in loop mode.</string> <string name="combo_force_disabled">Unsafe usage: extended or multiwave boluses have been delivered within the last 6 hours or the selected basal rate is not 1. Loop mode has been disabled until 6 hours after the last unsupported bolus or basal rate profile. Only normal boluses are supported in loop mode with basal rate profile 1.</string>
<string name="bolus_frequency_exceeded">A bolus with the same amount was requested within the last minute. For safety reasons this is disallowed.</string> <string name="bolus_frequency_exceeded">A bolus with the same amount was requested within the last minute. For safety reasons this is disallowed.</string>
</resources> </resources>

View file

@ -442,8 +442,9 @@ public class RuffyScripter implements RuffyCommands {
if (menuType == MenuType.MAIN_MENU) { if (menuType == MenuType.MAIN_MENU) {
Double tbrPercentage = (Double) menu.getAttribute(MenuAttribute.TBR); Double tbrPercentage = (Double) menu.getAttribute(MenuAttribute.TBR);
BolusType bolusType = (BolusType) menu.getAttribute(MenuAttribute.BOLUS_TYPE); BolusType bolusType = (BolusType) menu.getAttribute(MenuAttribute.BOLUS_TYPE);
if (bolusType != null && bolusType != BolusType.NORMAL) { Integer activeBasalRate = (Integer) menu.getAttribute(MenuAttribute.BASAL_SELECTED);
// unsupported Extended/Multiwave bolus running
if (bolusType != null && bolusType != BolusType.NORMAL || !activeBasalRate.equals(1)) {
state.unsafeUsageDetected = true; state.unsafeUsageDetected = true;
} else if (tbrPercentage != 100) { } else if (tbrPercentage != 100) {
state.tbrActive = true; state.tbrActive = true;