From 6b9d6b33b37c0c9cb0721db7c8220ab88462ddb8 Mon Sep 17 00:00:00 2001 From: cyberman54 Date: Mon, 22 Mar 2021 21:40:24 +0100 Subject: [PATCH] add reset after rcommand 09 02 --- README.md | 4 ++-- src/rcommand.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index eb47ccfa..1cd859c4 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/src/rcommand.cpp b/src/rcommand.cpp index e4b009b3..af0f38b7 100644 --- a/src/rcommand.cpp +++ b/src/rcommand.cpp @@ -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");