Abort reading all pump data if history read fails.

(cherry picked from commit 9f679bc)
This commit is contained in:
Johannes Mockenhaupt 2017-11-26 12:38:41 +01:00
parent 9ce57e7076
commit b46165e52a
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -1025,11 +1025,14 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
}
void readAllPumpData() {
readHistory(new PumpHistoryRequest()
boolean readHistorySuccess = readHistory(new PumpHistoryRequest()
.bolusHistory(pump.lastHistoryBolusTime)
.tbrHistory(pump.lastHistoryTbrTime)
.pumpErrorHistory(PumpHistoryRequest.FULL)
.tddHistory(PumpHistoryRequest.FULL));
if (!readHistorySuccess) {
return;
}
CommandResult reservoirResult = runCommand("Checking reservoir level", 2,
ruffyScripter::readReservoirLevelAndLastBolus);