Skip to content

Commit

Permalink
0.8.25
Browse files Browse the repository at this point in the history
* RX channel ID starts with fixed value #1277
* fix static IP for Ethernet
  • Loading branch information
lumapu committed Dec 17, 2023
1 parent 78b603e commit d62b530
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 16 deletions.
4 changes: 4 additions & 0 deletions src/CHANGES.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
5 changes: 0 additions & 5 deletions src/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
16 changes: 7 additions & 9 deletions src/eth/ahoyeth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
}


Expand Down Expand Up @@ -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 ) )
Expand Down
2 changes: 1 addition & 1 deletion src/hm/hmRadio.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class HmRadio : public Radio {
startMicros = micros();
}
// not finished but time is over
mRxChIdx = (mRxChIdx + 1) % RF_CHANNELS;
mRxChIdx = 1;

return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit d62b530

Please sign in to comment.