Change way of checking operating mode during bolus delivery
This commit is contained in:
parent
0b1e181662
commit
a8a182dc9d
1 changed files with 2 additions and 1 deletions
|
@ -538,8 +538,9 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con
|
||||||
detailedBolusInfo.pumpId = insightBolusID.id;
|
detailedBolusInfo.pumpId = insightBolusID.id;
|
||||||
TreatmentsPlugin.getPlugin().addToHistoryTreatment(detailedBolusInfo, true);
|
TreatmentsPlugin.getPlugin().addToHistoryTreatment(detailedBolusInfo, true);
|
||||||
while (true) {
|
while (true) {
|
||||||
fetchStatus();
|
OperatingMode operatingMode = connectionService.requestMessage(new GetOperatingModeMessage()).await().getOperatingMode();
|
||||||
if (operatingMode != OperatingMode.STARTED) break;
|
if (operatingMode != OperatingMode.STARTED) break;
|
||||||
|
List<ActiveBolus> activeBoluses = connectionService.requestMessage(new GetActiveBolusesMessage()).await().getActiveBoluses();
|
||||||
ActiveBolus activeBolus = null;
|
ActiveBolus activeBolus = null;
|
||||||
for (ActiveBolus bolus : activeBoluses) {
|
for (ActiveBolus bolus : activeBoluses) {
|
||||||
if (bolus.getBolusID() == bolusID) {
|
if (bolus.getBolusID() == bolusID) {
|
||||||
|
|
Loading…
Reference in a new issue