fix WIFICOUNTER=0 guru failure (issue #481)

This commit is contained in:
Verkehrsrot 2019-11-11 15:22:55 +01:00
parent 39c68d7d7f
commit f2821fe3b4

View File

@ -364,16 +364,15 @@ void setup() {
// start wifi in monitor mode and start channel rotation timer // start wifi in monitor mode and start channel rotation timer
ESP_LOGI(TAG, "Starting Wifi..."); ESP_LOGI(TAG, "Starting Wifi...");
wifi_sniffer_init(); wifi_sniffer_init();
#else
// switch off wifi
esp_wifi_deinit();
#endif
// initialize salt value using esp_random() called by random() in // initialize salt value using esp_random() called by random() in
// arduino-esp32 core. Note: do this *after* wifi has started, since // arduino-esp32 core. Note: do this *after* wifi has started, since
// function gets it's seed from RF noise // function gets it's seed from RF noise
get_salt(); // get new 16bit for salting hashes 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 // start state machine
ESP_LOGI(TAG, "Starting Interrupt Handler..."); ESP_LOGI(TAG, "Starting Interrupt Handler...");