From fbc2bf383824da61f95794744bdbc5414951b9ba Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 23 Dec 2025 13:48:19 -0600 Subject: [PATCH] Update src/nimble/NimbleBluetooth.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/nimble/NimbleBluetooth.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/nimble/NimbleBluetooth.cpp b/src/nimble/NimbleBluetooth.cpp index 629929612..9704053d2 100644 --- a/src/nimble/NimbleBluetooth.cpp +++ b/src/nimble/NimbleBluetooth.cpp @@ -45,6 +45,10 @@ constexpr uint16_t kPreferredBleTxTimeUs = (kPreferredBleTxOctets + 14) * 8; #ifdef ARCH_ESP32 // Credit: https://github.com/h2zero/NimBLE-Arduino/issues/740#issuecomment-2539923656 +// Note: Despite the name, this function is invoked on every device boot (from setup()). +// It performs a routine startup check on the stored NimBLE bond data and deletes bonds +// only if a mismatch or migration condition is detected. It is not a one-time hook that +// runs only when the NimBLE version changes. static void deleteBondsIfNimBLEVersionChanged() { esp_err_t err = nvs_flash_init();