Skip to content
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

No battery options for G7 #3295

Merged
merged 4 commits into from
Mar 10, 2024

Conversation

Navid200
Copy link
Collaborator

Since we don't want to offer the option to customize the battery warning level for G7, this PR removes the setting.

The title of the category has been updated to exclude G7.

It has been tested with G6 and G7.

Der-Schubi added a commit to Der-Schubi/xDrip that referenced this pull request Feb 8, 2024
Merge remote-tracking branch 'Navid200/Navid_2024_01_05' into schubi
@Navid200
Copy link
Collaborator Author

Using the new best collector G7 setting.

The logic is negative. But, that's OK.
It is very unlikely if a new Dexcom device comes along in the future, we would want to allow user to edit the battery trigger levels anyway.

Tested after the latest update with G7 and G6 and looks good.
The following shows what you see for a G7.

Before After
Screenshot_20240221-102938 Screenshot_20240221-102855

@@ -1731,6 +1732,12 @@ public boolean onPreferenceChange(Preference preference, Object newValue) {
}
}

if (getBestCollectorHardwareName().equals("G7")) { // Remove battery options, from G5/G6/Dex1/G7 Debug Settings, if we are using G7 or One+
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really good idea to wrap this with a try{} catch{} pair and log at wtf level if an exception is generated, otherwise future changes to preferences structure can cause crashes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, thanks. It will be done.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@Navid200
Copy link
Collaborator Author

Navid200 commented Mar 5, 2024

After the last edit of adding try, exception, the following is the extent of the tests I performed:

On Android 8, selected Dex as hardware data source.
Enabled G6.
Entered an 8-character transmitter ID. The battery option was present.
Changed the number of characters in transmitter ID to 4. The battery option was still present! it turns out you need to go to home screen and select settings again to update. Then, the battery option was gone.

Changed the number of characters back to 6. The battery option was still missing. Again, I needed to go to home screen and go to settings again and then, the battery option was gone.

I don't think this is a problem.
We always ask users to go to the system status page and wait for pairing after entering the transmitter ID. The user will have to go from home screen to the system status page. So, in real use, there should never be a problem.

@jamorham jamorham merged commit bedcb2e into NightscoutFoundation:master Mar 10, 2024
1 check passed
@Navid200
Copy link
Collaborator Author

Thanks

@Navid200 Navid200 deleted the Navid_2024_01_05 branch May 11, 2024 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants