Skip to content

Commit

Permalink
Merge pull request #3193 from Navid200/Navid_2023_11_15
Browse files Browse the repository at this point in the history
Don't offer initial calibration for G7
  • Loading branch information
jamorham authored Nov 28, 2023
2 parents 5f93de7 + 63dd202 commit 3dcca01
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
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

0 comments on commit 3dcca01

Please sign in to comment.