mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2025-12-05 20:40:25 -08:00
Compensate for NimBLE memory leak
This commit is contained in:
@@ -8912,7 +8912,11 @@ void WiFiScan::main(uint32_t currentTime)
|
||||
channelHop();
|
||||
}
|
||||
}
|
||||
else if (currentScanMode == BT_SCAN_FLOCK) {
|
||||
else if ((currentScanMode == BT_SCAN_FLOCK) ||
|
||||
(currentScanMode == BT_SCAN_WAR_DRIVE) ||
|
||||
(currentScanMode == BT_SCAN_WAR_DRIVE_CONT) ||
|
||||
(currentScanMode == BT_SCAN_FLIPPER) ||
|
||||
(currentScanMode == BT_SCAN_AIRTAG)) {
|
||||
if (currentTime - initTime >= 5000) {
|
||||
initTime = millis();
|
||||
#ifdef HAS_BT
|
||||
@@ -8957,6 +8961,13 @@ void WiFiScan::main(uint32_t currentTime)
|
||||
if (currentTime - initTime >= this->channel_hop_delay * 500) {
|
||||
initTime = millis();
|
||||
|
||||
#ifdef HAS_BT
|
||||
pBLEScan->stop();
|
||||
delay(5);
|
||||
pBLEScan->clearResults();
|
||||
pBLEScan->start(0, scanCompleteCB, false);
|
||||
#endif
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.tft.fillRect(0,
|
||||
(STATUS_BAR_WIDTH * 2) + 1 + EXT_BUTTON_WIDTH,
|
||||
@@ -9004,6 +9015,15 @@ void WiFiScan::main(uint32_t currentTime)
|
||||
else if ((currentScanMode == WIFI_SCAN_CHAN_ANALYZER) ||
|
||||
(currentScanMode == BT_SCAN_ANALYZER)) {
|
||||
this->channelAnalyzerLoop(currentTime);
|
||||
|
||||
if (currentScanMode == BT_SCAN_ANALYZER) {
|
||||
#ifdef HAS_BT
|
||||
pBLEScan->stop();
|
||||
delay(5);
|
||||
pBLEScan->clearResults();
|
||||
pBLEScan->start(0, scanCompleteCB, false);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else if (currentScanMode == WIFI_SCAN_CHAN_ACT) {
|
||||
this->channelActivityLoop(currentTime);
|
||||
|
||||
Reference in New Issue
Block a user