-
Notifications
You must be signed in to change notification settings - Fork 345
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
Only store CGM address to user defaults when app is set as "Active CGM", and fix typo in "CGM" #398
base: bjorn
Are you sure you want to change the base?
Conversation
The intention with this commit is to avoid having the app set as "inactive CGM" (setActiveCGM = off) to store the wrong CGM transmitter address to shared user defaults, which will break the Heartbeat mechanism for FreeAPS X. This is in the context of using two instances of xdrip4iOS when running overlapping sensor sessions with Anubis G6. I am not sure if this will work as intended, but at least it builds. |
there is already an option "Suppress Loop Share" in the developer settings,
|
Oh, I didn’t realise, thanks! Then this should probably be tied to the “Set as active CGM” setting then. Suppress loop share = off when active CGM is on, suppress loop share = on when active CGM is off? |
yes it would be better to set suppressLoopShare accordingly |
…lts if the app is set as Active CGM" This reverts commit 87d56c3.
case .setActiveCGM: UserDefaults.standard.suppressLoopShare = !isOn
@JohanDegraeve , I think I have set suppressLooppShare correctly now, please see bjornoleh@951a454 |
This change removes the risk of accidentally breaking the heartbeat mechanism by opening the wrong app. But it is still required to force close and reopen the app to guarantee that the transmitter address is written to shared user defaults ( the last opened app will write its transmitter address upon start). Would it be possible to force the current app to write the transmitter address when we switch on SetActiveCGM, without a restar of the app? |
No description provided.