From db44b058e2b80f38d5faceef5bbfe6361d1f4efb Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Thu, 5 Sep 2019 12:32:28 +0200 Subject: [PATCH] Add command Reset 99 to reset bootcount to zero Add command Reset 99 to reset bootcount to zero (#684, #6351) --- sonoff/_changelog.ino | 1 + sonoff/support_command.ino | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index 22b29098b..4de80cebe 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -1,6 +1,7 @@ /*********************************************************************************************\ * 6.6.0.10 20190905 * Redesign Tuya support by Shantur Rathore (#6353) + * Add command Reset 99 to reset bootcount to zero (#684, #6351) * * 6.6.0.9 20190828 * Change theoretical baudrate range to 300..19660500 bps in 300 increments (#6294) diff --git a/sonoff/support_command.ino b/sonoff/support_command.ino index 41b4cfe1d..a1bedea89 100644 --- a/sonoff/support_command.ino +++ b/sonoff/support_command.ino @@ -1269,6 +1269,10 @@ void CmndReset(void) restart_flag = 210 + XdrvMailbox.payload; Response_P(PSTR("{\"" D_CMND_RESET "\":\"" D_JSON_ERASE ", " D_JSON_RESET_AND_RESTARTING "\"}")); break; + case 99: + Settings.bootcount = 0; + ResponseCmndDone(); + break; default: ResponseCmndChar(D_JSON_ONE_TO_RESET); }