Add command Reset 99 to reset bootcount to zero

Add command Reset 99 to reset bootcount to zero (#684, #6351)
This commit is contained in:
Theo Arends 2019-09-05 12:32:28 +02:00
parent d1ca5d1bde
commit db44b058e2
2 changed files with 5 additions and 0 deletions

View File

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

View File

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