mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2025-12-12 07:40:58 -08:00
Ensure async wardrive
This commit is contained in:
@@ -2499,6 +2499,7 @@ void WiFiScan::StopScan(uint8_t scan_mode)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
this->shutdownBLE();
|
this->shutdownBLE();
|
||||||
|
this->ble_scanning = false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4426,7 +4427,12 @@ void WiFiScan::executeWarDrive() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (scan_status == WIFI_SCAN_FAILED) {
|
else if (scan_status == WIFI_SCAN_FAILED) {
|
||||||
Serial.println("WiFi scan failed to start");
|
Serial.println("WiFi scan failed to start. Restarting...");
|
||||||
|
this->wifi_initialized = true;
|
||||||
|
this->shutdownWiFi();
|
||||||
|
this->startWardriverWiFi();
|
||||||
|
this->wifi_initialized = true;
|
||||||
|
delay(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*#ifndef HAS_DUAL_BAND
|
/*#ifndef HAS_DUAL_BAND
|
||||||
@@ -4507,15 +4513,15 @@ void WiFiScan::executeWarDrive() {
|
|||||||
buffer_obj.append(wardrive_line);
|
buffer_obj.append(wardrive_line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Free up that memory, you sexy devil
|
||||||
|
WiFi.scanDelete();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*#ifndef HAS_DUAL_BAND
|
/*#ifndef HAS_DUAL_BAND
|
||||||
this->channelHop();
|
this->channelHop();
|
||||||
#endif*/
|
#endif*/
|
||||||
|
|
||||||
// Free up that memory, you sexy devil
|
|
||||||
WiFi.scanDelete();
|
|
||||||
|
|
||||||
if (!this->ble_scanning)
|
if (!this->ble_scanning)
|
||||||
WiFi.scanNetworks(true, true, false, 80);
|
WiFi.scanNetworks(true, true, false, 80);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user