From 9d22f242e8387ee78afde4d13511bb4721cbed63 Mon Sep 17 00:00:00 2001 From: Florian <1technophile@users.noreply.github.com> Date: Sat, 22 Aug 2020 20:45:39 -0500 Subject: [PATCH] [BLE] Callback leads to memory decrease correction (#740) and library update --- main/ZgatewayBT.ino | 3 ++- platformio.ini | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/main/ZgatewayBT.ino b/main/ZgatewayBT.ino index e18041d..56397a0 100644 --- a/main/ZgatewayBT.ino +++ b/main/ZgatewayBT.ino @@ -480,7 +480,8 @@ void BLEscan() { Log.notice(F("Scan begin" CR)); BLEDevice::init(""); BLEScan* pBLEScan = BLEDevice::getScan(); //create new scan - pBLEScan->setAdvertisedDeviceCallbacks(new MyAdvertisedDeviceCallbacks()); + MyAdvertisedDeviceCallbacks myCallbacks; + pBLEScan->setAdvertisedDeviceCallbacks(&myCallbacks); pBLEScan->setActiveScan(true); //active scan uses more power, but get results faster BLEScanResults foundDevices = pBLEScan->start(Scan_duration / 1000, false); scanCount++; diff --git a/platformio.ini b/platformio.ini index 69524d9..9a663a3 100644 --- a/platformio.ini +++ b/platformio.ini @@ -73,7 +73,7 @@ arduinolog = https://github.com/1technophile/Arduino-Log.git#d13cd80 pubsubclient = PubSubClient@2.8 rc-switch = https://github.com/1technophile/rc-switch.git#385a7e0 newremoteswitch = https://github.com/1technophile/NewRemoteSwitch.git#8eb980e -ble = https://github.com/h2zero/NimBLE-Arduino.git#e53bbf9 +ble = https://github.com/h2zero/NimBLE-Arduino.git#1.0.0 irremoteesp = IRremoteESP8266@2.7.7 irremote = https://github.com/z3t0/Arduino-IRremote.git#1c08a37 lora = https://github.com/sandeepmistry/arduino-LoRa.git#f4a1d27