Repository navigation
Remove unneeded reference to release RL's when switching pump types - #108
Conversation
Test SummaryThe purpose of this test is to ensure no regression. Make sure that Pod Keep Alive continues to work as expected. A separate test will be performed to show this fixes the problem it is supposed to fix. We know that the pod keep alive was not perfect before and it behaves about as well as it did. Configuration 1Apply this to Trio dev branch using OmnipodKit code from this PR with SE 2nd gen phone running iOS 18 which is connected to an actual DASH pod. Configuration 2Apply this to Loop next-dev branch (by applying the patch to the OmnipodKit loop-next-dev branch) on same SE phone. Configure Loop next-dev to use an rPi DASH pod simulator. Test Cases:To avoid RileyLink cross talk. Do the tests on these two configurations at different times. Make sure Silent Pod and Pod Keep Alive (PKA) behave nominally
Test with Configuration 1Test on 2026-07-15. Silent Pod Test
PKA - Silent Tune 20:55: Enable PKA using Silent Tune, lock phone and hear the heartbeat sound PKA - RileyLink Device 21:23 Connect to one of three devices
21:29 configure for EmaLink and leave it on for at least 10 minutes then check the log for duration next morning (2026-07016) - issue log from Trio - parse the log:
To confirm that it is just that RileyLink (which is not reporting that it is connected), switch to JPM slim case which show a solid connection icon. Let it run for a while and issue the log.txt file again.
Test with Configuration 2While collecting data with Trio in the backgound for test 1, go on and build Loop next-dev on the same phone. Need to take a break. Set up for silent tune and let both Loop (Silent Tune) and Trio (EmaLink) run in PKA mode overnight. 2026-07-16
|
Test SummaryThe purpose of this test is to demonstrate the problem being addressed by this PR is indeed fixed. Reproduce the problemThis only needs to be done once. On SE 3rd gen phone running Loop next-dev without the code in this PR.
Now delete the pump and add back a Minimed
Demonstrate the SolutionBuild Loop next-dev onto the same phone using the code in this PR applied to loop-next-dev branch of OmnipodKit Add in Minimed
Add All Omnipod Types
Add in Minimed
|
marionbarker
left a comment
There was a problem hiding this comment.
Approve from code review and test.
Problem Description
Fixes problems noted in this Discord post for where RileyLinks were not available when switching from Omnipod to Medtronic.
https://discord.com/channels/1020905149037813862/1239983260663283712/1524109946902417469
The fundamental problem was that the code used to sync the pump view when a timed Silence Pod mode automatically reverts back to being disabled was leaving a reference which preventing the RL's from being released. This was better done by removing the callback sync method that was (incorrectly) used and updating the silence pod state in the existing podStateDidUpdate() delegate callback function.
The other reported problem was being able to get OmnipodKit in a mode where the pump view title said
Omnipod DASHwith the view showing RileyLink Devices that should only appear when the podType uses RileyLinks (aka it is an Eros). A potential cause for something like this occurring is having a separate OmniUICoordinator.podType variable from the truth held in OmniPumpManagerState held in OmniPumpManager. Was unable to reproduce this problem either before or after eliminating the podType variable duplicated in OmniUICoordinator, but it seemed like a safer & better way to go and it eliminates a possible cause of inconsistent state.How to Reproduce
From a fresh start of Loop/Trio, select Add Pump -> All Omnipod Types -> Omnipod Classic and select a RileyLink. Then cancel out of the Pair view, note the RileyLink(s) listed (they can be enabled or not) and select Switch pump type. Then either do either an Add Pump for a Minimed or even an Omnipod Classic (again) and note that no RileyLink(s) will be available in the RileyLink Setup view. Even if a new RL is powered up when in this mode, it will still not be seen in the RileyLink Setup view. To recover, a restart of the OS app is needed to get any RileyLinks to appear when setting up either the Minimed or Omnipod Classic pumps. Note that this problem is independent of whether or not a RileyLink is enabled and connected.
Implementation Notes
With this PR, the RileyLinks will not be held when switching pump types away from Omnipod Classic as expected. Note that any previously connected RL's will continue to have their connected LED active when switching away from Omnipod Classic, but it doesn't prevent this RL from being listed as an available RL selection in the RileyLink Setup view for the added pump. While this behavior could be improved in a future PR to RileyLinkKit &/or OmnipodKit that automatically turns off the RL connected LED when switching pump types using RL's, this is the long standing behavior of the RL code with both MinimedKit and OmniKit.