Document corner-cases when bolusing fails.
This commit is contained in:
parent
f09464e5d6
commit
197c116c0b
|
@ -14,7 +14,9 @@
|
|||
- [ ] notification must also appear on smartwatch
|
||||
- [ ] An error during bolus must yield an error in AAPS
|
||||
- [ ] An error during bolus must yield a notification on a smartwatch
|
||||
- [ ] Bolusing e.g. 4 U if reservoir has only 2 U must yield a usable error
|
||||
- [ ] Test bolusing a bolus bigger than what's left in the reservoir. A message to check what
|
||||
was actually delivered must appear (this is a corner-case where when practically can't
|
||||
check what was actually delivered).
|
||||
- [ ] Pressing a button on the pump before bolus delivery started must be handled gracefully
|
||||
- [ ] Same as above, but moving pump out of range
|
||||
- [ ] Pressing a button on the pump after bolus delivery has started must be handled
|
||||
|
|
|
@ -130,7 +130,19 @@ public class BolusCommand extends BaseCommand {
|
|||
scripter.confirmAlert(PumpWarningCodes.BATTERY_LOW, 2000);
|
||||
result.forwardedWarnings.add(PumpWarningCodes.BATTERY_LOW);
|
||||
} else {
|
||||
throw new CommandException("Pump is showing exotic warning: " + warningCode);
|
||||
// all other warnings or errors;
|
||||
// An occlusion error can also occur during bolus. To read the partially delivered
|
||||
// bolus, we'd have to first confirm the error. But an (occlusion) **error** shall not
|
||||
// be confirmed and potentially be swallowed by a bug or shaky comms, so we let
|
||||
// the pump be noisy (which the user will have to interact with anyway).
|
||||
// Thus, this method will terminate with an exception and display an error message.
|
||||
// Ideally, sometime after the user has dealt with the situation, the partially
|
||||
// delivered bolus should be read. However, ready history is tricky at this point.
|
||||
// Also: with an occlusion, the amount of insulin active is in question.
|
||||
// It would be safer to assume the delivered bolus results in IOB, but there's
|
||||
// only so much we can do at this point, so the user shall take over here and
|
||||
// add a bolus record as and if needed.
|
||||
throw new CommandException("Pump is showing exotic warning/error: " + warningOrErrorCode);
|
||||
}
|
||||
}
|
||||
if (bolusRemaining != null && !Objects.equals(bolusRemaining, lastBolusReported)) {
|
||||
|
|
Loading…
Reference in a new issue