reset stats

This commit is contained in:
Wolfgang Hottgenroth 2021-02-12 23:20:40 +01:00
parent d90c29536f
commit 3d54b9ee09
Signed by: wn
GPG Key ID: E49AF3B9EF6DD469

View File

@ -26,6 +26,11 @@ static bool globalStatsCmd(uint8_t argc, char **args) {
return true;
}
static bool resetStatsCmd(uint8_t argc, char **args) {
t_deviceStats *deviceStats = getGlobalDeviceStats();
deviceStats->totalWatchdogResets = 0;
return true;
}
const cmd_t COMMANDS[] = {
@ -33,6 +38,10 @@ const cmd_t COMMANDS[] = {
.help = \
"stats .......................... Show the device statistics\n\r"
},
{ .name = "resetStats", .cmdFunc = resetStatsCmd,
.help = \
"resetStats ..................... Reset the device statistics\n\r"
},
{ .name = "END_OF_CMDS", .help = "",.cmdFunc = NULL }
};