add restart reason to sysinfo page
This commit is contained in:
6
main.cpp
6
main.cpp
@@ -12,6 +12,7 @@
|
||||
#include "Gpio.h"
|
||||
#include "Logger.h"
|
||||
#include "Config.h"
|
||||
#include "RestartReason.h"
|
||||
|
||||
Network* network = nullptr;
|
||||
NetworkLock* networkLock = nullptr;
|
||||
@@ -28,6 +29,9 @@ bool lockEnabled = false;
|
||||
bool openerEnabled = false;
|
||||
unsigned long restartTs = (2^32) - 5 * 60000;
|
||||
|
||||
RTC_NOINIT_ATTR int restartReason;
|
||||
RTC_NOINIT_ATTR uint64_t restartReasonValid;
|
||||
|
||||
void networkTask(void *pvParameters)
|
||||
{
|
||||
while(true)
|
||||
@@ -92,7 +96,7 @@ void checkMillisTask(void *pvParameters)
|
||||
{
|
||||
Log->println(F("Restart timer expired, restarting device."));
|
||||
delay(200);
|
||||
ESP.restart();
|
||||
restartEsp(RestartReason::RestartTimer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user