fix issuing another SMB is one is currently running
This commit is contained in:
parent
a2852e4a1c
commit
8290d5a954
|
@ -192,7 +192,7 @@ public class CommandQueue {
|
||||||
Command.CommandType type = detailedBolusInfo.isSMB ? Command.CommandType.SMB_BOLUS : Command.CommandType.BOLUS;
|
Command.CommandType type = detailedBolusInfo.isSMB ? Command.CommandType.SMB_BOLUS : Command.CommandType.BOLUS;
|
||||||
|
|
||||||
if (type == Command.CommandType.SMB_BOLUS) {
|
if (type == Command.CommandType.SMB_BOLUS) {
|
||||||
if (isRunning(Command.CommandType.BOLUS) || bolusInQueue()) {
|
if (isRunning(Command.CommandType.BOLUS) || isRunning(Command.CommandType.SMB_BOLUS) || bolusInQueue()) {
|
||||||
if (L.isEnabled(L.PUMPQUEUE))
|
if (L.isEnabled(L.PUMPQUEUE))
|
||||||
log.debug("Rejecting SMB since a bolus is queue/running");
|
log.debug("Rejecting SMB since a bolus is queue/running");
|
||||||
return false;
|
return false;
|
||||||
|
@ -202,6 +202,7 @@ public class CommandQueue {
|
||||||
log.debug("Rejecting bolus, another bolus was issued since request time");
|
log.debug("Rejecting bolus, another bolus was issued since request time");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
removeAll(Command.CommandType.SMB_BOLUS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue