-
Notifications
You must be signed in to change notification settings - Fork 45
Fix handling of comms error on resume & all pod DeliveryStatus cases #123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. |
+ Remove unneeded & redundant didSend() & didReceive() message logging + Improved and additional PodState debugDescription display for insulin values + Improved pod suspend testing when updating delivery status + Update suspended, bolusing, tempBasalRunning, extendedBolusRunning definitions for better efficency and clarity using @dnzxy suggestion on OmniBLE PR LoopKit#123 + Use supportedTempBasalRates var for better OmniKit consistency
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