Browse Source

0.8.25

* RX channel ID starts with fixed value #1277
* fix static IP for Ethernet
pull/1277/head
lumapu 1 year ago
parent
commit
d62b53019a
  1. 4
      src/CHANGES.md
  2. 5
      src/app.cpp
  3. 16
      src/eth/ahoyeth.cpp
  4. 2
      src/hm/hmRadio.h
  5. 2
      src/platformio.ini

4
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

5
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)

16
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 ) )

2
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;
}

2
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

Loading…
Cancel
Save