-
Notifications
You must be signed in to change notification settings - Fork 514
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
Fix the dexcom share in Trio #282
Conversation
The PR allows to fecth BG of Dexcom share as a CGM as well as to fetch BG of Dexcom share with the Dexcom G6 CGM. The PR changes the logic of the CGM for all CGM based on Loop submodules (PluginSource).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested:
Builds to Xcode simulator ✅
Received data when configured as CGM ✅
Received data when used with fake G6 ✅
Without having a full understanding of the code changes, this looks good to me!
Going to test on G7 |
SummarySuccess - works with phone locked so long as pump has a heartbeat. Configuration
Testing
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approve based off testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not close the issue for G7, Only for G6 it does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM based on testing. I did not review code, but did notice no linting occurred when building (only Package.resolve was changed)
Tested in a simulator phone using Dexcom Share as the cgm source. Took a couple minutes before it was backfilled, but then it backfilled 6 readings (30 minutes). After that, the simulator populated readings within 2 seconds of the readings appearing on my real phone in the Dexcom G6 app.
Details for following tests:
Device: iPhone 14 Pro Max
OS: iOS 17.5.1
Pump: Omnipod Eros + OrangeLink
CGM: Anubis + Dexcom G6 app, Transmitter & Share credentials added in Trio
Trio: This PR built on top of the current dev
(MikePlante1@00881fa)
I tried to test backfilling by sticking my phone in the microwave for one cycle, leaving my phone on the other side of the office, or disabling bluetooth... all of which did cause a missed reading, but when the next reading was populated in the G6 app, the G6 app never backfilled the missed reading, which means I couldn't test backfilling G6 in Trio.
So then I tried closing all the apps on my phone, including Trio, but kept the G6 app running. The missed readings (in Trio, as G6 app did not have any missing readings) were populated as soon as Trio was opened and a loop cycle was triggered immediately. When this happens too close to the next cgm reading, the loop cycle is skipped for the next cgm reading as a loop cycle was completed too recently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this target alpha instead of dev?
The base branch was changed.
I changed the base branch, which apparently dismisses all previous reviews… Can you resolve the change request? I can’t do that it seems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
I should have just approved again because only change was the base branch.
- I seem to be incapable of doing that (did a successful test again)
Test details
- started with latest alpha, commit d7a730c with rPi attached to phone
- applied the patch
- selected Dexcom Share
- set Closed Loop to enabled
- locked the phone and set timer to 15 minutes
- unlocked phone to green loop with several adjustments to tempbasal while locked.
Merging with three approvals |
The PR allows to fetch BG of Dexcom share as a CGM as well as to fetch BG of Dexcom share with the Dexcom G6 CGM.
The PR updates the logic of the CGM fetch for all CGM based on Loop submodules (PluginSource).
Test requirements
1. - IOS Simulator - Add Dexcom Share CGM
2. - Iphone 8 - Add G6 CGM
3. - iphone 15 - Add G6 CGM with G6 sensor
Need to be tested with Libre and Dexcom G7. Both implement the fetchIfNeeded function with noData response.