add reset after rcommand 09 02

This commit is contained in:
cyberman54 2021-03-22 21:40:24 +01:00
parent 0e62683cdf
commit 6b9d6b33b3
2 changed files with 4 additions and 3 deletions

View File

@ -437,8 +437,8 @@ Send for example `8386` as Downlink on Port 2 to get battery status and time/dat
0x09 reset functions (send this command UNconfirmed only to avoid boot loops!)
0 = restart device (coldstart)
1 = reset MAC counter to zero
2 = reset device to factory settings
1 = zeroize MAC counter
2 = reset device to factory settings and restart device
3 = flush send queues
4 = restart device (warmstart)
8 = reboot device to maintenance mode (local web server)

View File

@ -20,8 +20,9 @@ void set_reset(uint8_t val[]) {
reset_counters(); // clear macs
break;
case 2: // reset device to factory settings
ESP_LOGI(TAG, "Remote command: reset device to factory settings");
ESP_LOGI(TAG, "Remote command: reset device to factory settings and restart");
eraseConfig();
do_reset(false);
break;
case 3: // reset send queues
ESP_LOGI(TAG, "Remote command: flush send queue");