Repository navigation
Report a reset fault the way a reset pod does - #32
Conversation
A reset fault reported the fault time, total delivered, bolus remaining and minutes since activation like any other fault, so OmnipodKit took it for a fault with a known time and never ran its reset handling. In 45 reset statuses from real pods (DASH, Omnipod 5 and Eros) the fault time is always zero ($FFFF on Eros), delivered and bolus not delivered are zero, and minutes active restarts at the reset. The simulator now reports those after a reset fault, while keeping its own delivery books, with the bolus stopped at the fault.
|
The list of values for that are known reset pod faults in IsResetFault() is incorrect. The correct list for reset pod faults can be found in the Reset Faults section of the PDM-Ref-Codes wiki document here. The missing reset fault codes are 0x1E, 0x36, 0x4F. Also 0xAA is listed as a reset fault, but I'm guessing that this was probably a guess based on its name which came from Insulet enum names ( Based on the reset faults it looked at, Claude concludes that the fault time will be In my two O5 0x34 reset pod faults, the bolus not delivered word was $0000 , but in my O5 0x22 reset pod fault the bolus not delivered word was $07FF (as Claude had found). We probably should add code to OmnipodKit's DetailedStatus decoder to test for this impossible bolusNotDelivered value and map it to 0. This is assuming the safest case where any interrupted bolus would be counted as fully delivered (unless it ends up being limited by the fault time in the improved interrupted bolus handling during pod faults now in OmnipodKit). |
…e FFFF The reset faults are the ones in the openomni PDM-Ref-Codes wiki: 0x1E, 0x36 and 0x4F are added, and 0xAA is dropped because no 0xAA status has been seen to show it resets the pod. Omnipod 5 reset faults have reported both 0000 and FFFF as the fault time. The simulator uses FFFF for an Omnipod 5 and 0000 for a DASH, so OmnipodKit gets exercised with both.
# Conflicts: # README.md # pkg/pod/state_test.go
|
Thanks Joe. Done in 9170c0e:
I also corrected the PR description, which said Mapping the |
|
The updates all good to me. I'll handle updating OmnipodKit to deal with a potential |
itsmojo
left a comment
There was a problem hiding this comment.
LGTM! It might be nice to add a comment to IsResetFault() stating that this list of known reset faults was taken from https://github.com/openaps/openomni/wiki/PDM-Ref-Codes#Reset-Faults.
A reset fault reported its fault time, total delivered, bolus remaining and minutes since activation like any other fault. OmnipodKit treats a fault that has a fault time as a non-reset fault, so testing a reset fault on the simulator ran the wrong path. For example, a 0x10 during a bolus reported fault time
0012, 2.75 U not delivered and 89 pulses delivered.What real pods report
45 reset-fault detailed statuses from field reports (0x10, 0x12, 0x22, 0x34, 0xD6 and 0xD7, from DASH, Omnipod 5 and Eros) all show:
0000on DASH,FFFFon Eros, and either on Omnipod 5 (Joe has seen both).07FF(0x3FF in the 10-bit field).Change
SetFaultwith a reset code: records when the reset happened and sets the fault time to0000on a DASH andFFFFon an Omnipod 5, so OmnipodKit sees both. A non-reset code, or clearing the fault, forgets the reset.The
0x3FFsigil for 0x22 isn't simulated, since real pods show it inconsistently.Testing
go test ./...passes, including new state tests: a reset fault's marshaled status, an Omnipod 5 reset fault'sFFFFfault time, the reset-code list, and a non-reset fault keeping its time and counters.