Browse Source

0.8.17

* possible fix of NRF with opendtufusion (without ETH)
* small fix in heuristics (if conditions made assignment not comparisson)
pull/1262/head
lumapu 1 year ago
parent
commit
c71377011b
  1. 4
      src/CHANGES.md
  2. 2
      src/defines.h
  3. 2
      src/hm/Heuristic.h
  4. 12
      src/hm/hmRadio.h

4
src/CHANGES.md

@ -1,5 +1,9 @@
# Development Changes # 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 ## 0.8.16 - 2023-12-09
* fix crash if NRF is not enabled * fix crash if NRF is not enabled
* updated heuristic #1080 #1259 * updated heuristic #1080 #1259

2
src/defines.h

@ -13,7 +13,7 @@
//------------------------------------- //-------------------------------------
#define VERSION_MAJOR 0 #define VERSION_MAJOR 0
#define VERSION_MINOR 8 #define VERSION_MINOR 8
#define VERSION_PATCH 16 #define VERSION_PATCH 17
//------------------------------------- //-------------------------------------
typedef struct { typedef struct {

2
src/hm/Heuristic.h

@ -41,7 +41,7 @@ class Heuristic {
if(ih->testPeriodFailCnt > RF_TEST_PERIOD_MAX_FAIL_CNT) { if(ih->testPeriodFailCnt > RF_TEST_PERIOD_MAX_FAIL_CNT) {
// try round robbin another chan and see if it works even better // try round robbin another chan and see if it works even better
ih->testChId = (ih->testChId + 1) % RF_MAX_CHANNEL_ID; 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; ih->testChId = (ih->testChId + 1) % RF_MAX_CHANNEL_ID;
// give it a fair chance but remember old status in case of immediate fail // give it a fair chance but remember old status in case of immediate fail

12
src/hm/hmRadio.h

@ -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) { 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")); 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); pinMode(irq, INPUT_PULLUP);
mSerialDebug = serialDebug; mSerialDebug = serialDebug;
@ -72,7 +67,8 @@ class HmRadio : public Radio {
#ifdef ESP32 #ifdef ESP32
#if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(ETHERNET) #if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(ETHERNET)
// mNrfHal.init(mosi, miso, sclk, cs, ce);
mNrf24.reset(new RF24(&mNrfHal));
#else #else
#if CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 #if CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
mSpi.reset(new SPIClass(HSPI)); mSpi.reset(new SPIClass(HSPI));
@ -87,7 +83,7 @@ class HmRadio : public Radio {
mSpi->begin(); mSpi->begin();
#endif #endif
#if defined(CONFIG_IDF_TARGET_ESP32S3) #if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(ETHERNET)
mNrf24->begin(); mNrf24->begin();
#else #else
mNrf24->begin(mSpi.get(), ce, cs); mNrf24->begin(mSpi.get(), ce, cs);
@ -127,8 +123,6 @@ class HmRadio : public Radio {
mNrf24->flush_tx(); // empty TX FIFO mNrf24->flush_tx(); // empty TX FIFO
// start listening // start listening
//mNrf24->setChannel(23);
//mRxChIdx = 0;
mNrf24->setChannel(mRfChLst[mRxChIdx]); mNrf24->setChannel(mRfChLst[mRxChIdx]);
mNrf24->startListening(); mNrf24->startListening();

Loading…
Cancel
Save