mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-30 17:26:12 +02:00
parent
119cd8cdad
commit
780d690e20
3 changed files with 14 additions and 31 deletions
|
@ -5,6 +5,7 @@
|
||||||
* fix view of grid profile #1365
|
* fix view of grid profile #1365
|
||||||
* fix webUI translation #1346
|
* fix webUI translation #1346
|
||||||
* fix protection mask #1352
|
* fix protection mask #1352
|
||||||
|
* merge PR: Add Watchdog for ESP32 #1367
|
||||||
|
|
||||||
## 0.8.57 - 2024-01-15
|
## 0.8.57 - 2024-01-15
|
||||||
* merge PR: fix immediate clearing of display after sunset #1364
|
* merge PR: fix immediate clearing of display after sunset #1364
|
||||||
|
|
42
src/app.cpp
42
src/app.cpp
|
@ -9,6 +9,10 @@
|
||||||
|
|
||||||
#define WDT_TIMEOUT_SECONDS 8 // Watchdog Timeout 8s
|
#define WDT_TIMEOUT_SECONDS 8 // Watchdog Timeout 8s
|
||||||
|
|
||||||
|
#if !defined(ESP32)
|
||||||
|
void esp_task_wdt_reset() {}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
app::app() : ah::Scheduler {} {}
|
app::app() : ah::Scheduler {} {}
|
||||||
|
@ -38,9 +42,7 @@ void app::setup() {
|
||||||
else
|
else
|
||||||
DBGPRINTLN(F("false"));
|
DBGPRINTLN(F("false"));
|
||||||
|
|
||||||
#if defined(ESP32)
|
esp_task_wdt_reset();
|
||||||
esp_task_wdt_reset();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if(mConfig->nrf.enabled) {
|
if(mConfig->nrf.enabled) {
|
||||||
mNrfRadio.setup(&mConfig->serial.debug, &mConfig->serial.privacyLog, &mConfig->serial.printWholeTrace, mConfig->nrf.pinIrq, mConfig->nrf.pinCe, mConfig->nrf.pinCs, mConfig->nrf.pinSclk, mConfig->nrf.pinMosi, mConfig->nrf.pinMiso);
|
mNrfRadio.setup(&mConfig->serial.debug, &mConfig->serial.privacyLog, &mConfig->serial.printWholeTrace, mConfig->nrf.pinIrq, mConfig->nrf.pinCe, mConfig->nrf.pinCs, mConfig->nrf.pinSclk, mConfig->nrf.pinMosi, mConfig->nrf.pinMiso);
|
||||||
|
@ -62,9 +64,7 @@ void app::setup() {
|
||||||
#endif
|
#endif
|
||||||
#endif /* defined(ETHERNET) */
|
#endif /* defined(ETHERNET) */
|
||||||
|
|
||||||
#if defined(ESP32)
|
esp_task_wdt_reset();
|
||||||
esp_task_wdt_reset();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
mCommunication.setup(&mTimestamp, &mConfig->serial.debug, &mConfig->serial.privacyLog, &mConfig->serial.printWholeTrace, &mConfig->inst.gapMs);
|
mCommunication.setup(&mTimestamp, &mConfig->serial.debug, &mConfig->serial.privacyLog, &mConfig->serial.printWholeTrace, &mConfig->inst.gapMs);
|
||||||
mCommunication.addPayloadListener(std::bind(&app::payloadEventListener, this, std::placeholders::_1, std::placeholders::_2));
|
mCommunication.addPayloadListener(std::bind(&app::payloadEventListener, this, std::placeholders::_1, std::placeholders::_2));
|
||||||
|
@ -81,9 +81,7 @@ void app::setup() {
|
||||||
DPRINTLN(DBG_WARN, F("WARNING! your NRF24 module can't be reached, check the wiring"));
|
DPRINTLN(DBG_WARN, F("WARNING! your NRF24 module can't be reached, check the wiring"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(ESP32)
|
esp_task_wdt_reset();
|
||||||
esp_task_wdt_reset();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// when WiFi is in client mode, then enable mqtt broker
|
// when WiFi is in client mode, then enable mqtt broker
|
||||||
#if !defined(AP_ONLY)
|
#if !defined(AP_ONLY)
|
||||||
|
@ -98,19 +96,13 @@ void app::setup() {
|
||||||
#endif
|
#endif
|
||||||
setupLed();
|
setupLed();
|
||||||
|
|
||||||
#if defined(ESP32)
|
esp_task_wdt_reset();
|
||||||
esp_task_wdt_reset();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
mWeb.setup(this, &mSys, mConfig);
|
mWeb.setup(this, &mSys, mConfig);
|
||||||
mWeb.setProtection(strlen(mConfig->sys.adminPwd) != 0);
|
mWeb.setProtection(strlen(mConfig->sys.adminPwd) != 0);
|
||||||
|
|
||||||
mApi.setup(this, &mSys, mWeb.getWebSrvPtr(), mConfig);
|
mApi.setup(this, &mSys, mWeb.getWebSrvPtr(), mConfig);
|
||||||
|
|
||||||
#if defined(ESP32)
|
|
||||||
esp_task_wdt_reset();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef ENABLE_SYSLOG
|
#ifdef ENABLE_SYSLOG
|
||||||
mDbgSyslog.setup(mConfig); // be sure to init after mWeb.setup (webSerial uses also debug callback)
|
mDbgSyslog.setup(mConfig); // be sure to init after mWeb.setup (webSerial uses also debug callback)
|
||||||
#endif
|
#endif
|
||||||
|
@ -124,9 +116,7 @@ void app::setup() {
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ESP32)
|
esp_task_wdt_reset();
|
||||||
esp_task_wdt_reset();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(ENABLE_HISTORY)
|
#if defined(ENABLE_HISTORY)
|
||||||
mHistory.setup(this, &mSys, mConfig, &mTimestamp);
|
mHistory.setup(this, &mSys, mConfig, &mTimestamp);
|
||||||
|
@ -134,10 +124,6 @@ void app::setup() {
|
||||||
|
|
||||||
mPubSerial.setup(mConfig, &mSys, &mTimestamp);
|
mPubSerial.setup(mConfig, &mSys, &mTimestamp);
|
||||||
|
|
||||||
#if defined(ESP32)
|
|
||||||
esp_task_wdt_reset();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(ETHERNET)
|
#if !defined(ETHERNET)
|
||||||
//mImprov.setup(this, mConfig->sys.deviceName, mVersion);
|
//mImprov.setup(this, mConfig->sys.deviceName, mVersion);
|
||||||
#endif
|
#endif
|
||||||
|
@ -149,14 +135,14 @@ void app::setup() {
|
||||||
});
|
});
|
||||||
#endif /*ENABLE_SIMULATOR*/
|
#endif /*ENABLE_SIMULATOR*/
|
||||||
|
|
||||||
|
|
||||||
|
esp_task_wdt_reset();
|
||||||
regularTickers();
|
regularTickers();
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void app::loop(void) {
|
void app::loop(void) {
|
||||||
#if defined(ESP32)
|
esp_task_wdt_reset();
|
||||||
esp_task_wdt_reset();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if(mConfig->nrf.enabled)
|
if(mConfig->nrf.enabled)
|
||||||
mNrfRadio.loop();
|
mNrfRadio.loop();
|
||||||
|
@ -165,10 +151,6 @@ void app::loop(void) {
|
||||||
mCmtRadio.loop();
|
mCmtRadio.loop();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ESP32)
|
|
||||||
esp_task_wdt_reset();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ah::Scheduler::loop();
|
ah::Scheduler::loop();
|
||||||
mCommunication.loop();
|
mCommunication.loop();
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
#define VERSION_MAJOR 0
|
#define VERSION_MAJOR 0
|
||||||
#define VERSION_MINOR 8
|
#define VERSION_MINOR 8
|
||||||
#define VERSION_PATCH 57
|
#define VERSION_PATCH 58
|
||||||
|
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue