proper reaction to pump error

This commit is contained in:
Milos Kozak 2016-12-24 14:53:37 +01:00
parent 2b0c74c56f
commit 5c506faa65

View file

@ -31,10 +31,6 @@ public class MsgError extends MessageBase {
break;
case 5: // Occlusion
errorString = MainApp.sResources.getString(R.string.occlusion);
EventOverviewBolusProgress bolusingEvent = EventOverviewBolusProgress.getInstance();
MsgBolusStop.stopped = true;
bolusingEvent.status = errorString;
MainApp.bus().post(bolusingEvent);
break;
case 7: // Low Battery
errorString = MainApp.sResources.getString(R.string.lowbattery);
@ -43,6 +39,13 @@ public class MsgError extends MessageBase {
errorString = MainApp.sResources.getString(R.string.batterydischarged);
break;
}
if (errorCode < 8) { // bolus delivering stopped
EventOverviewBolusProgress bolusingEvent = EventOverviewBolusProgress.getInstance();
MsgBolusStop.stopped = true;
bolusingEvent.status = errorString;
MainApp.bus().post(bolusingEvent);
}
if (Config.logDanaMessageDetail)
log.debug("Error detected: " + errorString);
MainApp.getConfigBuilder().uploadError(errorString);