-
Notifications
You must be signed in to change notification settings - Fork 645
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
Extra messages exchanged with Omnipod #265
Comments
Summary
Configuration
MethodExamine the response to each command in the rPi DASH simulator. For each command, there is an 0x1d message returned from the pod.
It is important to minimize communications with the pods to limit the load on the battery of the pod. The PumpManager in the Omnipod code is smart enough decide whether to get a status before starting to bolus or before setting a TempBasal. If it is sure it knows the state of the pod, it skips the extra getStatus. (Note the difference in the Loop vs Trio+Mod test - last row). Manual CommandsMake a table of standard manual commands for the pod (keep closed loop disabled)
Diagnostic CommandsDifferent table mostly because each one gets a special response from the pod.
Modification made to the Trio codeNote: commenting out the code breaks another part of the app - handling pod state following a bolus is no longer handled correctly
This works as desired to remove the extra getStatus commands being issued to the pod, but is not the correct solution. For the Trio+Mod column in the table Manual Commands, this is the modification applied to the code:
|
SummaryThere was a suggestion in the discord chat of just deleting the updateStatus function in APSManager.swift (this would have the same result as commenting out the two lines as was done in the prior test.) Neither of the options (removing the function or commenting out lines in the function) is an appropriate solution, as shown in the testing below. The function should be updated to get the status of the Pod from OmniXXX without triggering an extra set of communications with the pod. Testing:Test the way Trio works nowI returned Trio to the original state, alpha, commit 217d1d6 I tested the case of trying to bolus while already bolusing.
I tested the case of trying to bolus after canceling the earlier bolus (which would otherwise still in progress)
Test total removal of updateStatus callNow just comment out the one line:
So updateStatus needs to be there but it should not require the pod to be queried. This information is available in the pump manager. Tagging @avouspierre and @itsmojo |
I think This is because if the Reporter observer is prematurely removed then the cancel completion will not be observed. APSManager seoarately observes CancelBolus and then will remove the bolusReporter so there is no reason to include I tested this in Mock and Cancel Bolus succeeds. I also commented outt getting status updates. Could you see if you get the same results, @marionbarker by applying patch or I could do a PR? |
This did not solve the problem. I'll post more details soon. |
This issue may be related to UI : Bolus Progress Wheel Persisting After Bolus Completed |
This was fixed with the merge of #353 |
Describe the bug
The number of messages exchanged for the same actions with Trio is greater than with Loop. The extra exchanges with Trio appear to be getStatus followed by status response. These should not require a lot of power, but some people are complaining of pod faults with Trio. Extra messages can mean more battery drain and thus increase the likelihood of faults.
Attach a Log
I will add some specific comparisons in a comment. I specifically observed this when looking at a suspend resume action. I will evaluate additional actions when preparing my comment.
To Reproduce
Steps to reproduce the behavior:
I will include the specific steps when I add some specific comparisons in a comment.
Expected behavior
The number of messages and message types exchanged between the phone and the pod were carefully adjusted during Loop development to be as small as possible while doing the required task.
(There was some relaxation of this design with the advent of BLE communications, but most of the efficiencies have been reinstated for Loop and the OmniBLE/Kit submodules.)
Screenshots
N/A
Setup Information (please complete the following information):
Smartphone:
N/A
Pump:
CGM:
N/A
Trio Version:
The explicit version / commit numbers will be listed in the comment with the comparisons
Technical Details
@itsmojo suggests that the extra get status calls observed when suspending and resuming in Trio come from the
self.updateStatus()
call inclearBolusReporter()
inFreeAPS/Sources/APS/APSManager.swift
. He wants to reserve his focus for the OmniBLE/Kit submodules, so is turning analysis of extra messages over to the Trio developers.Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: