Skip to content

Commit

Permalink
Fix issue #64, where the tx and rx frequencies may be off by 100Hz be…
Browse files Browse the repository at this point in the history
…cause of an off-by-one error in string processing.
  • Loading branch information
VanceVagell committed Oct 27, 2024
1 parent 6e15624 commit c3b755a
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ void loop() {
paramsStr += String((char *)paramPartsBuffer);
paramBytesMissing--;
}
float freqTxFloat = paramsStr.substring(0, 8).toFloat();
float freqRxFloat = paramsStr.substring(7, 15).toFloat();
float freqTxFloat = paramsStr.substring(0, 7).toFloat();
float freqRxFloat = paramsStr.substring(7, 14).toFloat();
int toneInt = paramsStr.substring(14, 16).toInt();
int squelchInt = paramsStr.substring(16, 17).toInt();

Expand Down Expand Up @@ -347,8 +347,6 @@ void loop() {
int toneInt = paramsStr.substring(14, 16).toInt();
int squelchInt = paramsStr.substring(16, 17).toInt();

// Serial.println("PARAMS: " + paramsStr.substring(0, 16) + " freqTxFloat: " + String(freqTxFloat) + " freqRxFloat: " + String(freqRxFloat) + " toneInt: " + String(toneInt));

tuneTo(freqTxFloat, freqRxFloat, toneInt, squelchInt);
}
break;
Expand Down

0 comments on commit c3b755a

Please sign in to comment.