mirror of
https://github.com/lumapu/ahoy.git
synced 2025-07-17 00:15:15 +02:00
0.8.17
* possible fix of NRF with opendtufusion (without ETH) * small fix in heuristics (if conditions made assignment not comparisson)
This commit is contained in:
parent
240be8cd98
commit
c71377011b
4 changed files with 9 additions and 11 deletions
|
@ -1,5 +1,9 @@
|
|||
# Development Changes
|
||||
|
||||
## 0.8.17 - 2023-12-10
|
||||
* possible fix of NRF with opendtufusion (without ETH)
|
||||
* small fix in heuristics (if conditions made assignment not comparisson)
|
||||
|
||||
## 0.8.16 - 2023-12-09
|
||||
* fix crash if NRF is not enabled
|
||||
* updated heuristic #1080 #1259
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//-------------------------------------
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 8
|
||||
#define VERSION_PATCH 16
|
||||
#define VERSION_PATCH 17
|
||||
|
||||
//-------------------------------------
|
||||
typedef struct {
|
||||
|
|
|
@ -41,7 +41,7 @@ class Heuristic {
|
|||
if(ih->testPeriodFailCnt > RF_TEST_PERIOD_MAX_FAIL_CNT) {
|
||||
// try round robbin another chan and see if it works even better
|
||||
ih->testChId = (ih->testChId + 1) % RF_MAX_CHANNEL_ID;
|
||||
if(ih->testChId = ih->txRfChId)
|
||||
if(ih->testChId == ih->txRfChId)
|
||||
ih->testChId = (ih->testChId + 1) % RF_MAX_CHANNEL_ID;
|
||||
|
||||
// give it a fair chance but remember old status in case of immediate fail
|
||||
|
|
|
@ -46,11 +46,6 @@ class HmRadio : public Radio {
|
|||
void setup(bool *serialDebug, bool *privacyMode, bool *printWholeTrace, uint8_t irq = IRQ_PIN, uint8_t ce = CE_PIN, uint8_t cs = CS_PIN, uint8_t sclk = SCLK_PIN, uint8_t mosi = MOSI_PIN, uint8_t miso = MISO_PIN) {
|
||||
DPRINTLN(DBG_VERBOSE, F("hmRadio.h:setup"));
|
||||
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(ETHERNET)
|
||||
// replace object
|
||||
mNrfHal.init(mosi, miso, sclk, cs, ce);
|
||||
mNrf24.reset(new RF24(&mNrfHal));
|
||||
#endif
|
||||
pinMode(irq, INPUT_PULLUP);
|
||||
|
||||
mSerialDebug = serialDebug;
|
||||
|
@ -72,7 +67,8 @@ class HmRadio : public Radio {
|
|||
|
||||
#ifdef ESP32
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(ETHERNET)
|
||||
//
|
||||
mNrfHal.init(mosi, miso, sclk, cs, ce);
|
||||
mNrf24.reset(new RF24(&mNrfHal));
|
||||
#else
|
||||
#if CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
|
||||
mSpi.reset(new SPIClass(HSPI));
|
||||
|
@ -87,7 +83,7 @@ class HmRadio : public Radio {
|
|||
mSpi->begin();
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32S3)
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(ETHERNET)
|
||||
mNrf24->begin();
|
||||
#else
|
||||
mNrf24->begin(mSpi.get(), ce, cs);
|
||||
|
@ -127,8 +123,6 @@ class HmRadio : public Radio {
|
|||
mNrf24->flush_tx(); // empty TX FIFO
|
||||
|
||||
// start listening
|
||||
//mNrf24->setChannel(23);
|
||||
//mRxChIdx = 0;
|
||||
mNrf24->setChannel(mRfChLst[mRxChIdx]);
|
||||
mNrf24->startListening();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue