mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-08 21:51:38 +02:00
0.8.25
* RX channel ID starts with fixed value #1277 * fix static IP for Ethernet
This commit is contained in:
parent
78b603e373
commit
d62b53019a
5 changed files with 13 additions and 16 deletions
|
@ -1,5 +1,9 @@
|
||||||
# Development Changes
|
# 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
|
## 0.8.24 - 2023-12-16
|
||||||
* fix NRF communication for opendtufusion ethernet variant
|
* fix NRF communication for opendtufusion ethernet variant
|
||||||
|
|
||||||
|
|
|
@ -40,11 +40,7 @@ void app::setup() {
|
||||||
#endif
|
#endif
|
||||||
#ifdef ETHERNET
|
#ifdef ETHERNET
|
||||||
delay(1000);
|
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); });
|
mEth.setup(mConfig, &mTimestamp, [this](bool gotIp) { this->onNetwork(gotIp); }, [this](bool gotTime) { this->onNtpUpdate(gotTime); });
|
||||||
DBGPRINTLN(F("done..."));
|
|
||||||
DSERIAL.flush();
|
|
||||||
#endif // ETHERNET
|
#endif // ETHERNET
|
||||||
|
|
||||||
#if !defined(ETHERNET)
|
#if !defined(ETHERNET)
|
||||||
|
@ -149,7 +145,6 @@ void app::regularTickers(void) {
|
||||||
#if !defined(ETHERNET)
|
#if !defined(ETHERNET)
|
||||||
//everySec([this]() { mImprov.tickSerial(); }, "impro");
|
//everySec([this]() { mImprov.tickSerial(); }, "impro");
|
||||||
#endif
|
#endif
|
||||||
// every([this]() { mPayload.simulation();}, 15, "simul");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(ETHERNET)
|
#if defined(ETHERNET)
|
||||||
|
|
|
@ -26,12 +26,16 @@ void ahoyeth::setup(settings_t *config, uint32_t *utcTimestamp, OnNetworkCB onNe
|
||||||
mOnNetworkCB = onNetworkCB;
|
mOnNetworkCB = onNetworkCB;
|
||||||
mOnTimeCB = onTimeCB;
|
mOnTimeCB = onTimeCB;
|
||||||
|
|
||||||
DPRINTLN(DBG_INFO, F("[ETH]: Register for events..."));
|
|
||||||
Serial.flush();
|
Serial.flush();
|
||||||
WiFi.onEvent([this](WiFiEvent_t event, arduino_event_info_t info) -> void { this->onEthernetEvent(event, info); });
|
WiFi.onEvent([this](WiFiEvent_t event, arduino_event_info_t info) -> void { this->onEthernetEvent(event, info); });
|
||||||
|
|
||||||
DPRINTLN(DBG_INFO, F("[ETH]: begin..."));
|
|
||||||
Serial.flush();
|
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) {
|
if(mConfig->sys.ip.ip[0] != 0) {
|
||||||
IPAddress ip(mConfig->sys.ip.ip);
|
IPAddress ip(mConfig->sys.ip.ip);
|
||||||
IPAddress mask(mConfig->sys.ip.mask);
|
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))
|
if(!ETH.config(ip, gateway, mask, dns1, dns2))
|
||||||
DPRINTLN(DBG_ERROR, F("failed to set static IP!"));
|
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"));
|
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..."));
|
AWS_LOG(F("[ETH]: Got event..."));
|
||||||
switch (event) {
|
switch (event) {
|
||||||
#if ( ( defined(ESP_ARDUINO_VERSION_MAJOR) && (ESP_ARDUINO_VERSION_MAJOR >= 2) ) && ( ARDUINO_ESP32_GIT_VER != 0x46d5afb1 ) )
|
#if ( ( defined(ESP_ARDUINO_VERSION_MAJOR) && (ESP_ARDUINO_VERSION_MAJOR >= 2) ) && ( ARDUINO_ESP32_GIT_VER != 0x46d5afb1 ) )
|
||||||
|
|
|
@ -138,7 +138,7 @@ class HmRadio : public Radio {
|
||||||
startMicros = micros();
|
startMicros = micros();
|
||||||
}
|
}
|
||||||
// not finished but time is over
|
// not finished but time is over
|
||||||
mRxChIdx = (mRxChIdx + 1) % RF_CHANNELS;
|
mRxChIdx = 1;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -185,7 +185,7 @@ build_flags = ${env.build_flags}
|
||||||
-DDEF_LED1=17
|
-DDEF_LED1=17
|
||||||
-DLED_ACTIVE_HIGH
|
-DLED_ACTIVE_HIGH
|
||||||
-DARDUINO_USB_MODE=1
|
-DARDUINO_USB_MODE=1
|
||||||
#-DARDUINO_USB_CDC_ON_BOOT=1
|
-DARDUINO_USB_CDC_ON_BOOT=1
|
||||||
monitor_filters =
|
monitor_filters =
|
||||||
esp32_exception_decoder, colorize
|
esp32_exception_decoder, colorize
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue