Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes it much easier to establish connectivity to a G7.
A G7 that loses connection goes into Rapid Reconnect mode after 15 minutes. In this mode, it transmits each reading 5 times at 1-minute intervals. If xDrip is attempting to connect for the very first time to this G7, it could pair on any of those 5 transmissions. But, only one of those 5 is on the once-every-5-minute time grid. The other 4 are not.
After there is a pairing, G7 stops Rapid Reconnect immediately and only transmits once every 5 minutes.
If xDrip pairs on any of the 4 transmissions that are not on the once-every-5-minute grid, the xDrip anticipate routine will set it to wake up in 5 minutes when there will be no transmission from G7.
If the user waits patiently for several read cycles for xDrip to enable always scan mode, it will eventually discover the correct time grid assuming it does it before G7 goes back into Rapid Reconnect again.
The problem is that many users will intervene thinking that something is wrong. So, they restart the phone or restart collector etc. Sometimes, these will succeed. Sometimes, they won't.
I wrote this hoping to help: #3813
The problem is that you cannot expect everyone to read all the guides.
This PR ensures connectivity taking into account everything that could possibly go wrong.
Testing details to be added soon.