* fix HMS / HMT startup
* added `flush_rx` to NRF on TX
* start with heuristics set to `0`
* added warning for WiFi channel 12-14 (ESP8266 only) #1381
This commit is contained in:
lumapu 2024-01-29 21:51:49 +01:00
parent 6b305651af
commit 163a9e485e
13 changed files with 78 additions and 19 deletions

View file

@ -1,5 +1,5 @@
//-----------------------------------------------------------------------------
// 2023 Ahoy, https://github.com/lumpapu/ahoy
// 2024 Ahoy, https://github.com/lumpapu/ahoy
// Creative Commons - http://creativecommons.org/licenses/by-nc-sa/4.0/deed
//-----------------------------------------------------------------------------
@ -14,7 +14,22 @@
class HeuristicInv {
public:
HeuristicInv() {
memset(txRfQuality, -6, RF_MAX_CHANNEL_ID);
clear();
}
void clear() {
memset(txRfQuality, 0, RF_MAX_CHANNEL_ID);
txRfChId = 0;
lastBestTxChId = 0;
testPeriodSendCnt = 0;
testPeriodFailCnt = 0;
testChId = 0;
saveOldTestQuality = -6;
lastRxFragments = 0;
}
bool isTxAtMax(void) const {
return (RF_MAX_QUALITY == txRfQuality[txRfChId]);
}
public: