Fix handling of comms error on resume & all pod DeliveryStatus cases#123
Conversation
|
I'm not sure how to reproduce the failure. I built the I have now installed this version on my real Loop phone with a DASH pod. I will continue to monitor the behavior. |
|
This LGTM and should be good to go. Side note: All these Example: // current implementation
public var bolusing: Bool {
return self == .bolusInProgress || self == .bolusAndTempBasal || self == .extendedBolusRunning || self == .extendedBolusAndTempBasal || self == .priming || self == .extendedBolusWhileSuspended
}
// suggestion
public var bolusing: Bool {
let bolusingStates: Set<DeliveryStatus> = [
.bolusInProgress,
.bolusAndTempBasal,
.extendedBolusRunning,
.extendedBolusAndTempBasal,
.priming,
.extendedBolusWhileSuspended
]
return bolusingStates.contains(self)
}However, this totally is personal preference and not necessary. PR is 100% good as-is. |
|
While testing another feature in Trio, Trio got into a state where it thought the rPI DASH had resumed delivery when it was still suspended. This was using the dev branch of OmniBLE (commit 91abd9a). See details below. See nightscout/Trio#277 (comment) for the testing associated with this circumstance: Repeat the information here: OmniBLE Test for OmniBLE PR 125While running the DASH testing for Trio to first suspend and then resume:
That tests involved some Medtronic tests as well as DASH. Shorten the log file to be just the pod portion, then parse the file: |
|
Thank you for your review and your proposed more readable method for the boolean statements. In the future, if we ever combine the code for OmniBLE and OmniKit into a single sub-module, improvements like this will certainly be considered. |
This PR uses code changes from @itsmojo to address Trio Issue 244: Critical Pod Fault 049 (0x31) Error When Resuming Insulin Delivery
See also Loop Issue 2121: Bug Report: Eros Pod Fault of 0x31 (-049), specifically this comment