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