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

Don't offer initial calibration for G7 #3193

Merged
merged 2 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public NavDrawerBuilder(final Context context) {
}
} else { //If there haven't been two initial calibrations
if (BgReading.isDataSuitableForDoubleCalibration() || Ob1G5CollectionService.isG5WantingInitialCalibration()) {
if (FirmwareCapability.isTransmitterRawIncapable(getTransmitterID()) && last_two_bgReadings.size() > 1) { //A Firefly G6 after third reading
if ((FirmwareCapability.isTransmitterRawIncapable(getTransmitterID()) && last_two_bgReadings.size() > 1) || FirmwareCapability.isDeviceG7(getTransmitterID()) ) { //A Firefly G6 after third reading or a G7
this.nav_drawer_options.add(context.getString(R.string.add_calibration));
this.nav_drawer_intents.add(new Intent(context, AddCalibration.class));
} else { //G5 or non-Firefly G6 or Firefly G6 in no-code mode, after warm-up before initial calibration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ static boolean isFirmwarePreemptiveRestartCapable(final String version) {
return isFirmwareRawCapable(version); // hang off this for now as they are currently the same
}

static boolean isG7Firmware(final String version) {
return KNOWN_ALT_FIRMWARES.contains(version);
}

public static boolean isTransmitterPredictiveCapable(final String tx_id) {
return isG6Firmware(getRawFirmwareVersionString(tx_id));
}
Expand All @@ -98,6 +102,10 @@ public static boolean isTransmitterStandardFirefly(final String tx_id) { // Fire
return false;
}

public static boolean isDeviceG7(final String tx_id) {
return isG7Firmware(getRawFirmwareVersionString(tx_id));
}

public static boolean isTransmitterG5(final String tx_id) {
return isG5Firmware(getRawFirmwareVersionString(tx_id));
}
Expand Down
Loading