Remove warning if pump time is off.
This commit is contained in:
parent
7b88ec9e93
commit
f9867c69fb
4 changed files with 0 additions and 26 deletions
|
@ -346,15 +346,6 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ensure time and date(!) are current; connect triggers a notification on mismatch
|
|
||||||
/* menu not supported by ruffy v1
|
|
||||||
if (!pump.initialized) {
|
|
||||||
if (!runCommand("Updating pump clock", 2, ruffyScripter::setDateAndTime).success) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
// read basal profile into cache and update pump profile if needed
|
// read basal profile into cache and update pump profile if needed
|
||||||
if (!pump.initialized) {
|
if (!pump.initialized) {
|
||||||
CommandResult readBasalResult = runCommand("Reading basal profile", 2, ruffyScripter::readBasalProfile);
|
CommandResult readBasalResult = runCommand("Reading basal profile", 2, ruffyScripter::readBasalProfile);
|
||||||
|
@ -764,18 +755,6 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
|
||||||
|
|
||||||
checkAndResolveTbrMismatch(preCheckResult.state);
|
checkAndResolveTbrMismatch(preCheckResult.state);
|
||||||
|
|
||||||
// raise notification if clock is off (setting clock is not supported by ruffy)
|
|
||||||
if (preCheckResult.state.pumpTimeMinutesOfDay != 0) {
|
|
||||||
Date now = new Date();
|
|
||||||
int minutesOfDayNow = now.getHours() * 60 + now.getMinutes();
|
|
||||||
if ((Math.abs(preCheckResult.state.pumpTimeMinutesOfDay - minutesOfDayNow) > 3)) {
|
|
||||||
Notification notification = new Notification(Notification.COMBO_PUMP_ALARM, MainApp.sResources.getString(R.string.combo_notification_check_time_date), Notification.NORMAL);
|
|
||||||
MainApp.bus().post(new EventNewNotification(notification));
|
|
||||||
// setting date time isn't supported by ruffy v1, a warning is issue during connect if clock is off
|
|
||||||
// runCommand("Updating pump clock", 2, ruffyScripter::setDateAndTime);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -813,7 +813,6 @@
|
||||||
<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 the pump and treatments tabs 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 the pump and treatments tabs and bolus again as needed.</string>
|
||||||
<string name="combo_force_disabled_notification">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 set to low-suspend only 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="combo_force_disabled_notification">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 set to low-suspend only 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="combo_notification_check_time_date">Check pump time and date</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>
|
||||||
<string name="combo_pump_connected_now">Now</string>
|
<string name="combo_pump_connected_now">Now</string>
|
||||||
<string name="combo_activity_reading_pump_history">Reading pump history</string>
|
<string name="combo_activity_reading_pump_history">Reading pump history</string>
|
||||||
|
|
|
@ -4,8 +4,6 @@ package de.jotomo.ruffy.spi;
|
||||||
public class PumpState {
|
public class PumpState {
|
||||||
/** Time the state was captured. This is NOT the pump's time! */
|
/** Time the state was captured. This is NOT the pump's time! */
|
||||||
public long timestamp;
|
public long timestamp;
|
||||||
/** The time displayed on the main menu */
|
|
||||||
public long pumpTimeMinutesOfDay;
|
|
||||||
public String menu = null;
|
public String menu = null;
|
||||||
public boolean suspended;
|
public boolean suspended;
|
||||||
|
|
||||||
|
|
|
@ -523,8 +523,6 @@ public class RuffyScripter implements RuffyCommands {
|
||||||
state.tbrRemainingDuration = durationMenuTime.getHour() * 60 + durationMenuTime.getMinute();
|
state.tbrRemainingDuration = durationMenuTime.getHour() * 60 + durationMenuTime.getMinute();
|
||||||
state.tbrRate = ((double) menu.getAttribute(MenuAttribute.BASAL_RATE));
|
state.tbrRate = ((double) menu.getAttribute(MenuAttribute.BASAL_RATE));
|
||||||
}
|
}
|
||||||
MenuTime time = (MenuTime) menu.getAttribute(MenuAttribute.TIME);
|
|
||||||
state.pumpTimeMinutesOfDay = time.getHour() * 60 + time.getMinute();
|
|
||||||
state.batteryState = ((int) menu.getAttribute(MenuAttribute.BATTERY_STATE));
|
state.batteryState = ((int) menu.getAttribute(MenuAttribute.BATTERY_STATE));
|
||||||
state.insulinState = ((int) menu.getAttribute(MenuAttribute.INSULIN_STATE));
|
state.insulinState = ((int) menu.getAttribute(MenuAttribute.INSULIN_STATE));
|
||||||
} else if (menuType == MenuType.WARNING_OR_ERROR) {
|
} else if (menuType == MenuType.WARNING_OR_ERROR) {
|
||||||
|
|
Loading…
Reference in a new issue