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 G7 hard reset #3238

Merged
merged 3 commits into from
Dec 23, 2023
Merged

Conversation

Navid200
Copy link
Collaborator

My PR (#3113) 2 months ago improved the logic.
But, it was not future-proof.
Now, with G7 added, it may offer to hard reset a G7.

This PR changes the logic from negative to positive. There are two outcomes:
1- G7 will not be offered a hard reset.
2- In the future, any new devices added, by default will not be offered a hard reset.

Of course if we add a new device in the future that can be hard reset, we will still need to change this to make it complete. But, there is no way to predict the future. However, I would say it is more likely that future devices will not be hard reset capable.

} else {
if (FirmwareCapability.isTransmitterG5(getTransmitterID()) || FirmwareCapability.isTransmitterTimeTravelCapable(getTransmitterID()) || FirmwareCapability.isTransmitterModified(getTransmitterID())) { // Devices that can be hard reset only
DexResetHelper.offer("Your transmitter clock has stopped or never started. Do you want to hard reset it?");
} else { // Everything else - future devices will be here. If a future device can be hard reset, they should be added to the true (other) side.
Copy link
Collaborator

Choose a reason for hiding this comment

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

The if and else clauses both seem to be the same, is this correct?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm sorry about that and thanks.

Corrected now

@jamorham jamorham merged commit 38ecc6c into NightscoutFoundation:master Dec 23, 2023
1 check passed
@Navid200 Navid200 deleted the Navid_2023_12_13 branch December 24, 2023 03:35
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