Skip to content

Commit

Permalink
Merge pull request #3113 from Navid200/Navid_2023_10_04
Browse files Browse the repository at this point in the history
Offer to hard reset Mod TX
  • Loading branch information
jamorham authored Oct 6, 2023
2 parents 39370ed + d83296d commit 4b5964e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static void updateAge(final String transmitterId, final int dexTimeStamp,
if (dexTimeStamp < 1) {
UserError.Log.e(TAG, "Invalid dex timestamp in updateAge: " + dexTimeStamp);
if (dexTimeStamp == 0 && absolute) {
if (FirmwareCapability.isTransmitterRawIncapable(getTransmitterID())) { // Firefly, which cannot be hard reset
if (FirmwareCapability.isTransmitterStandardFirefly(getTransmitterID())) { // Firefly, which cannot be hard reset
UserError.Log.e(TAG, "Your transmitter clock has stopped or never started.");
} else {
DexResetHelper.offer("Your transmitter clock has stopped or never started. Do you want to hard reset it?");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ public static boolean isTransmitterModified(final String tx_id) {
return false;
}

public static boolean isTransmitterStandardFirefly(final String tx_id) { // Firefly that has not been modified
if (!isTransmitterModified(tx_id) && isTransmitterRawIncapable(tx_id)) {
return true;
}
return false;
}

public static boolean isTransmitterG5(final String tx_id) {
return isG5Firmware(getRawFirmwareVersionString(tx_id));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ public static boolean doGetData(Ob1G5CollectionService parent, RxBleConnection c
if (session_start.isFubar()) {
final long tk = DexTimeKeeper.getDexTime(getTransmitterID(), tsl());
if (tk > 0) {
if (FirmwareCapability.isTransmitterRawIncapable(getTransmitterID())) {// Firefly, which cannot be hard reset
if (FirmwareCapability.isTransmitterStandardFirefly(getTransmitterID())) {// Firefly, which cannot be hard reset
UserError.Log.e(TAG, "Unusual session start failure");
} else {
DexResetHelper.offer("Unusual session start failure, is transmitter crashed? Try Hard Reset?");
Expand Down

0 comments on commit 4b5964e

Please sign in to comment.