-
Notifications
You must be signed in to change notification settings - Fork 689
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
Pump/CGM state reverts on phone restart #231
Comments
It looks like the LoopKit/Loop#1702 fix is not imported to Trio. Trio imports https://github.com/LoopKit/LoopKit but not https://github.com/LoopKit/Loop where the fix to this is implemented. Some of the Trio corresponding code to LoopKit/Loop lives under https://github.com/nightscout/Trio/tree/dev/FreeAPS/Sources/APS, so Loop's fix needs to be merged into Trio's code, such as Loopkit/Loop/Managers/DeviceDataManager.swift, |
@avouspierre had hinted on Discord that these changes were already imported to FAX and in turn to iAPS, so also Trio. I only recorded the issue here. I also thought this was still present in iAPS/Trio. Quoting, as of 23/05/2024
If you can take a deeper look at this @kskandis and really compare the plist configs for Trio, please do 🙏 |
Yes, I would have thought, too, but when I looked at your link to the merged PR I saw that it was code in Loop! I will take a deeper look. |
Yes, actually his changes are indeed implemented in Trio with [this commit - see FetchGlucoseManager.swift](47fa017) on Mar 17th for CGM and PR #15! However, pumpManager still uses UserDefaults in DeviceDataManager.swift. So the pumpManager code needs to be updated similar to how CGM was implemented to use PersistentProperty instead of UserDefaults. Also, for existing users, the "legacyPumpManagerRawValue UserDefaults" should be cleared similar to Loop#1702 UserDefaults+Loop and DeviceDataManager. |
Oh, sorry, I missed your DM. I've read it now. I also made a patch not realizing you did! I will DM you it. It is very similar to yours with some diffs ... |
https://github.com/dnzxy/Trio/tree/pump-loss-fix-migration Work being done in the above branch |
Should this be closed? I believe it was fixed with #277 |
Fix the healthKit sync when stopped before the end nightscout#231 Fix the 0U basal in healthKit nightscout#149
Describe the bug
Upon phone restart, the app seldom reverts to old device state for CGM or pump, thus losing device connection. For pods this inherently leads to loss of device and need for replacement. This looks a lot like an old Loop bug is still present in Trio, but that mustn’t be the case as changes were migrated to FreeAPS and Trio in the past.
Screenshots
screenshots by user @Sjoerd-Bo3 showing loss of pod connection and pairing info in bluetooth settings
Setup Information (please complete the following information):
Additional context
Loop had a very similar issue, if not this issue, and the fix to this issue was moving device state info from UserDefaults to binary file (plist). See LoopKit/Loop#1702
The text was updated successfully, but these errors were encountered: