This commit is contained in:
2021-02-12 23:28:13 +01:00
parent 3d54b9ee09
commit 13dd2b718f
3 changed files with 5 additions and 1 deletions

View File

@ -111,7 +111,7 @@ void eepromSpiTxCpltCallback(SPI_HandleTypeDef *hspi) {
}
static void eepromHourlyUpdateDeviceStats(void *handle) {
void eepromHourlyUpdateDeviceStats(void *handle) {
deviceStats.s.totalRunningHours += 1;
logMsg("eeHUDS, about to write updated device stats");

View File

@ -1,5 +1,6 @@
#include <cmdHelper.h>
#include <logger.h>
#include <PontCoopScheduler.h>
#include <eeprom.h>
@ -29,6 +30,7 @@ static bool globalStatsCmd(uint8_t argc, char **args) {
static bool resetStatsCmd(uint8_t argc, char **args) {
t_deviceStats *deviceStats = getGlobalDeviceStats();
deviceStats->totalWatchdogResets = 0;
schAdd(eepromHourlyUpdateDeviceStats, NULL, 1, 0);
return true;
}