Repository navigation
Fault 0x31 on a bolus sent while a bolus is running - #38
Merged
Merged
Conversation
A real pod faults with 0x31 (049, insulin delivery command error) when it gets a bolus while one is running. It takes neither the new bolus nor its sequence number: in a field report, a third prime sent during a cannula insertion bolus faulted the pod, whose detailed status kept the previous program's sequence number and that bolus's undelivered pulses. The simulator now does the same, so a phone that sends a bolus during a bolus sees the fault it would see with a real pod.
marionbarker
approved these changes
Nov 30, 2026
marionbarker
left a comment
There was a problem hiding this comment.
Approve with a positive Claude review and a test build on an rPi.
Reconnected the updated rPi to an existing instance of OS-AID running the rPi.
- connects fine after fresh build
- deactivate worked as expected
- pair/prime/insert worked as expected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A bolus sent while a bolus is running now faults the simulated pod with 0x31 (049, insulin delivery command error), as a real pod does.
In a DASH field report, the phone sent a third prime 15 s into a cannula insertion bolus, and the pod faulted with 0x31. Its detailed status kept the sequence number of the previous program, not the one that faulted it. It also reported that previous bolus's 37 undelivered pulses as bolus not delivered. So the simulator takes neither the new bolus nor its sequence number, and
SetFaultstops the running bolus the way it does for any fault.Tested end to end in the iOS Simulator with OmnipodKit
dev(plus next-dev's e60e0ab, so the Simulator talks to the pod) and the pod setup failure from loopandlearn/OmnipodKit#228:crashNextCommandafter processing).New tests:
TestABolusWhileABolusIsRunningFaults0x31, andTestABolusAfterTheLastOneEndedIsTakenfor the case without a fault.go test ./pkg/...passes.