From f2821fe3b4a166b41e6236c7a344125d5bb9c277 Mon Sep 17 00:00:00 2001 From: Verkehrsrot Date: Mon, 11 Nov 2019 15:22:55 +0100 Subject: [PATCH] fix WIFICOUNTER=0 guru failure (issue #481) --- src/main.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index bf41a823..f1452fb1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -364,16 +364,15 @@ void setup() { // start wifi in monitor mode and start channel rotation timer ESP_LOGI(TAG, "Starting Wifi..."); wifi_sniffer_init(); +#else + // switch off wifi + esp_wifi_deinit(); +#endif + // initialize salt value using esp_random() called by random() in // arduino-esp32 core. Note: do this *after* wifi has started, since // function gets it's seed from RF noise get_salt(); // get new 16bit for salting hashes -#else - // switch off wifi - WiFi.mode(WIFI_OFF); - esp_wifi_stop(); - esp_wifi_deinit(); -#endif // start state machine ESP_LOGI(TAG, "Starting Interrupt Handler...");