From 910dd44389ea5b00a1e09cbdf4ae7a041e6ee2b5 Mon Sep 17 00:00:00 2001 From: fabik111 Date: Wed, 4 Sep 2024 16:18:56 +0200 Subject: [PATCH] clear advertising data when BLE end is called --- src/local/BLELocalDevice.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/local/BLELocalDevice.cpp b/src/local/BLELocalDevice.cpp index 1d1036be..5792353f 100644 --- a/src/local/BLELocalDevice.cpp +++ b/src/local/BLELocalDevice.cpp @@ -224,7 +224,9 @@ void BLELocalDevice::end() digitalWrite(NINA_RESETN, LOW); #elif defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION) || defined(ARDUINO_GIGA) || defined(ARDUINO_OPTA) digitalWrite(BT_REG_ON, LOW); -#endif +#endif + _advertisingData.clear(); + _scanResponseData.clear(); } void BLELocalDevice::poll()