diff --git a/src/lib/LQCALC/LQCALC.h b/src/lib/LQCALC/LQCALC.h index 7f0f258c07..c859ff31f9 100644 --- a/src/lib/LQCALC/LQCALC.h +++ b/src/lib/LQCALC/LQCALC.h @@ -6,6 +6,11 @@ template class LQCALC { public: + LQCALC(void) + { + reset100(); + } + /* Set the bit for the current period to true and update the running LQ */ void add() { diff --git a/src/src/rx_main.cpp b/src/src/rx_main.cpp index f6ce3d17d9..0a9ea158e0 100644 --- a/src/src/rx_main.cpp +++ b/src/src/rx_main.cpp @@ -353,9 +353,6 @@ void SetRFLinkRate(uint8_t index, bool bindMode) // Set speed of RF link OtaUpdateSerializers(smWideOr8ch, ModParams->PayloadLength); MspReceiver.setMaxPackageIndex(ELRS_MSP_MAX_PACKAGES); TelemetrySender.setMaxPackageIndex(OtaIsFullRes ? ELRS8_TELEMETRY_MAX_PACKAGES : ELRS4_TELEMETRY_MAX_PACKAGES); - // Always start a new packet rate at 100% LQ - LQCalc.reset100(); - LQCalcDVDA.reset100(); // Wait for (11/10) 110% of time it takes to cycle through all freqs in FHSS table (in ms) cycleInterval = ((uint32_t)11U * FHSSgetChannelCount() * ModParams->FHSShopInterval * interval) / (10U * 1000U); @@ -1507,8 +1504,8 @@ static void cycleRfMode(unsigned long now) LastSyncPacket = now; // reset this variable SendLinkStatstoFCForcedSends = 2; SetRFLinkRate(scanIndex % RATE_MAX, false); // switch between rates - LQCalc.reset(); - LQCalcDVDA.reset(); + LQCalc.reset100(); + LQCalcDVDA.reset100(); // Display the current air rate to the user as an indicator something is happening scanIndex++; Radio.RXnb(); diff --git a/src/src/tx_main.cpp b/src/src/tx_main.cpp index ad76217569..84f0935458 100644 --- a/src/src/tx_main.cpp +++ b/src/src/tx_main.cpp @@ -394,8 +394,6 @@ void SetRFLinkRate(uint8_t index) // Set speed of RF link OtaUpdateSerializers(newSwitchMode, ModParams->PayloadLength); MspSender.setMaxPackageIndex(ELRS_MSP_MAX_PACKAGES); TelemetryReceiver.setMaxPackageIndex(OtaIsFullRes ? ELRS8_TELEMETRY_MAX_PACKAGES : ELRS4_TELEMETRY_MAX_PACKAGES); - // Always start a new packet rate at 100% LQ - LQCalc.reset100(); ExpressLRS_currAirRate_Modparams = ModParams; ExpressLRS_currAirRate_RFperfParams = RFperf;