fix issuing another SMB is one is currently running

This commit is contained in:
Milos Kozak 2019-07-31 14:56:30 +02:00
parent a2852e4a1c
commit 8290d5a954

View file

@ -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);
} }