diff --git a/src/CHANGES.md b/src/CHANGES.md index 6364a7e7f..a4805fd8a 100644 --- a/src/CHANGES.md +++ b/src/CHANGES.md @@ -1,5 +1,9 @@ # Development Changes +## 0.8.25 - 2023-12-17 +* RX channel ID starts with fixed value #1277 +* fix static IP for Ethernet + ## 0.8.24 - 2023-12-16 * fix NRF communication for opendtufusion ethernet variant diff --git a/src/app.cpp b/src/app.cpp index d670c6969..05ca55634 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -40,11 +40,7 @@ void app::setup() { #endif #ifdef ETHERNET delay(1000); - DPRINT(DBG_INFO, F("mEth setup...")); - DSERIAL.flush(); mEth.setup(mConfig, &mTimestamp, [this](bool gotIp) { this->onNetwork(gotIp); }, [this](bool gotTime) { this->onNtpUpdate(gotTime); }); - DBGPRINTLN(F("done...")); - DSERIAL.flush(); #endif // ETHERNET #if !defined(ETHERNET) @@ -149,7 +145,6 @@ void app::regularTickers(void) { #if !defined(ETHERNET) //everySec([this]() { mImprov.tickSerial(); }, "impro"); #endif - // every([this]() { mPayload.simulation();}, 15, "simul"); } #if defined(ETHERNET) diff --git a/src/eth/ahoyeth.cpp b/src/eth/ahoyeth.cpp index be114cf1b..2226fce67 100644 --- a/src/eth/ahoyeth.cpp +++ b/src/eth/ahoyeth.cpp @@ -26,12 +26,16 @@ void ahoyeth::setup(settings_t *config, uint32_t *utcTimestamp, OnNetworkCB onNe mOnNetworkCB = onNetworkCB; mOnTimeCB = onTimeCB; - DPRINTLN(DBG_INFO, F("[ETH]: Register for events...")); Serial.flush(); WiFi.onEvent([this](WiFiEvent_t event, arduino_event_info_t info) -> void { this->onEthernetEvent(event, info); }); - DPRINTLN(DBG_INFO, F("[ETH]: begin...")); Serial.flush(); + #if defined(CONFIG_IDF_TARGET_ESP32S3) + mEthSpi.begin(DEF_ETH_MISO_PIN, DEF_ETH_MOSI_PIN, DEF_ETH_SCK_PIN, DEF_ETH_CS_PIN, DEF_ETH_IRQ_PIN, DEF_ETH_RST_PIN); + #else + ETH.begin(DEF_ETH_MISO_PIN, DEF_ETH_MOSI_PIN, DEF_ETH_SCK_PIN, DEF_ETH_CS_PIN, DEF_ETH_IRQ_PIN, ETH_SPI_CLOCK_MHZ, ETH_SPI_HOST); + #endif + if(mConfig->sys.ip.ip[0] != 0) { IPAddress ip(mConfig->sys.ip.ip); IPAddress mask(mConfig->sys.ip.mask); @@ -41,11 +45,6 @@ void ahoyeth::setup(settings_t *config, uint32_t *utcTimestamp, OnNetworkCB onNe if(!ETH.config(ip, gateway, mask, dns1, dns2)) DPRINTLN(DBG_ERROR, F("failed to set static IP!")); } - #if defined(CONFIG_IDF_TARGET_ESP32S3) - mEthSpi.begin(DEF_ETH_MISO_PIN, DEF_ETH_MOSI_PIN, DEF_ETH_SCK_PIN, DEF_ETH_CS_PIN, DEF_ETH_IRQ_PIN, DEF_ETH_RST_PIN); - #else - ETH.begin(DEF_ETH_MISO_PIN, DEF_ETH_MOSI_PIN, DEF_ETH_SCK_PIN, DEF_ETH_CS_PIN, DEF_ETH_IRQ_PIN, ETH_SPI_CLOCK_MHZ, ETH_SPI_HOST); - #endif } @@ -130,8 +129,7 @@ void ahoyeth::welcome(String ip, String mode) { DBGPRINTLN(F("--------------------------------\n")); } -void ahoyeth::onEthernetEvent(WiFiEvent_t event, arduino_event_info_t info) -{ +void ahoyeth::onEthernetEvent(WiFiEvent_t event, arduino_event_info_t info) { AWS_LOG(F("[ETH]: Got event...")); switch (event) { #if ( ( defined(ESP_ARDUINO_VERSION_MAJOR) && (ESP_ARDUINO_VERSION_MAJOR >= 2) ) && ( ARDUINO_ESP32_GIT_VER != 0x46d5afb1 ) ) diff --git a/src/hm/hmRadio.h b/src/hm/hmRadio.h index d0387aa4a..4fe3ea580 100644 --- a/src/hm/hmRadio.h +++ b/src/hm/hmRadio.h @@ -138,7 +138,7 @@ class HmRadio : public Radio { startMicros = micros(); } // not finished but time is over - mRxChIdx = (mRxChIdx + 1) % RF_CHANNELS; + mRxChIdx = 1; return; } diff --git a/src/platformio.ini b/src/platformio.ini index 54b63a22a..43fd7dddf 100644 --- a/src/platformio.ini +++ b/src/platformio.ini @@ -185,7 +185,7 @@ build_flags = ${env.build_flags} -DDEF_LED1=17 -DLED_ACTIVE_HIGH -DARDUINO_USB_MODE=1 - #-DARDUINO_USB_CDC_ON_BOOT=1 + -DARDUINO_USB_CDC_ON_BOOT=1 monitor_filters = esp32_exception_decoder, colorize