rcommand.cpp: delay before restart
This commit is contained in:
parent
8d2aeaca9f
commit
96783826d8
@ -29,7 +29,7 @@ description = Paxcounter is a proof-of-concept ESP32 device for metering passeng
|
||||
|
||||
[common]
|
||||
; for release_version use max. 10 chars total, use any decimal format like "a.b.c"
|
||||
release_version = 1.6.62
|
||||
release_version = 1.6.63
|
||||
; DEBUG LEVEL: For production run set to 0, otherwise device will leak RAM while running!
|
||||
; 0=None, 1=Error, 2=Warn, 3=Info, 4=Debug, 5=Verbose
|
||||
debug_level = 0
|
||||
@ -46,7 +46,7 @@ lib_deps_all =
|
||||
lib_deps_lora =
|
||||
; MCCI LoRaWAN LMIC library@^2.2.2
|
||||
lib_deps_display =
|
||||
U8g2@>=2.23.16
|
||||
U8g2@>=2.25.0
|
||||
lib_deps_rgbled =
|
||||
SmartLeds@>=1.1.3
|
||||
lib_deps_gps =
|
||||
|
@ -8,7 +8,10 @@ static const char TAG[] = "main";
|
||||
// helper function
|
||||
void do_reset() {
|
||||
ESP_LOGI(TAG, "Remote command: restart device");
|
||||
if (irqHandlerTask != NULL)
|
||||
vTaskDelete(irqHandlerTask);
|
||||
LMIC_shutdown();
|
||||
vTaskDelay(3000 / portTICK_PERIOD_MS);
|
||||
esp_restart();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user