mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-05 12:11:39 +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
|
||||
|
||||
## 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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 ) )
|
||||
|
|
|
@ -138,7 +138,7 @@ class HmRadio : public Radio {
|
|||
startMicros = micros();
|
||||
}
|
||||
// not finished but time is over
|
||||
mRxChIdx = (mRxChIdx + 1) % RF_CHANNELS;
|
||||
mRxChIdx = 1;
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -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…
Add table
Add a link
Reference in a new issue