Add pref to disable all pump comm alerts.
(cherry picked from commit f074a5b)
This commit is contained in:
parent
516a8c044b
commit
a76fbefee8
|
@ -137,7 +137,8 @@ public class ComboPlugin implements PluginBase, PumpInterface {
|
|||
while (true) {
|
||||
Command localLastCmd = pump.lastCmd;
|
||||
CommandResult localLastCmdResult = pump.lastCmdResult;
|
||||
if (localLastCmdResult != null && !localLastCmdResult.success) {
|
||||
if (!SP.getBoolean(R.string.combo_disable_alerts, false) &&
|
||||
localLastCmdResult != null && !localLastCmdResult.success) {
|
||||
long now = System.currentTimeMillis();
|
||||
long fiveMinutesSinceLastAlarm = lastAlarmTime + (5 * 60 * 1000) + (15 * 1000);
|
||||
boolean loopEnabled = ConfigBuilderPlugin.getActiveLoop() != null;
|
||||
|
|
|
@ -727,5 +727,8 @@
|
|||
<string name="combo_enable_experimental_split_bolus_summary">Splits boluses into 2 U parts and waits around 45 after each to slow down bolus delivery.</string>
|
||||
<string name="combo_enable_experimental_bolus_summary">Enables the in-development bolus with progress report and cancel option.</string>
|
||||
<string name="combo_enable_experimental_features_summary">Unlocks experimental features which are in development and might be broken entirely.</string>
|
||||
<string name="key_combo_disable_alerts">combo_disable_alerts</string>
|
||||
<string name="combo_disable_alerts">Disable all alerts</string>
|
||||
<string name="combo_disable_alerts_summary">Ignore all errors encountered while communicating with the pump.</string>
|
||||
</resources>
|
||||
|
||||
|
|
|
@ -38,6 +38,12 @@
|
|||
android:numeric="decimal"
|
||||
android:dialogMessage="@string/combo_experimental_reject_tbr_changes_below_delta_summary"/>
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_combo_disable_alerts"
|
||||
android:title="@string/combo_disable_alerts"
|
||||
android:summary="@string/combo_disable_alerts_summary"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
Loading…
Reference in a new issue