From 3d54b9ee099f98ed5f814361870d55057f6617a1 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Fri, 12 Feb 2021 23:20:40 +0100 Subject: [PATCH] reset stats --- cube/User/Src/regularCmds.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cube/User/Src/regularCmds.c b/cube/User/Src/regularCmds.c index a8e5bc2..4797b3c 100644 --- a/cube/User/Src/regularCmds.c +++ b/cube/User/Src/regularCmds.c @@ -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 } };