add restart reason to sysinfo page

This commit is contained in:
technyon
2023-02-05 15:03:09 +01:00
parent d72970e46b
commit b3c5a93666
9 changed files with 104 additions and 17 deletions

View File

@@ -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);
}
}
}