From ac7b0ac1f7a2c6de69a0d6fb70ccf08a817fcefa Mon Sep 17 00:00:00 2001 From: torlando-tech Date: Sun, 22 Feb 2026 21:46:35 -0500 Subject: [PATCH] Remove debug heartbeat and loop_count from BLE interface loop Cleanup after BLE stability debugging - the Serial.printf heartbeat and loop_count were temporary instrumentation no longer needed. Co-Authored-By: Claude Opus 4.6 --- lib/ble_interface/BLEInterface.cpp | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/lib/ble_interface/BLEInterface.cpp b/lib/ble_interface/BLEInterface.cpp index e37b12cc..259daef1 100644 --- a/lib/ble_interface/BLEInterface.cpp +++ b/lib/ble_interface/BLEInterface.cpp @@ -137,23 +137,8 @@ void BLEInterface::stop() { void BLEInterface::loop() { static double last_loop_log = 0; static bool local_mac_set = false; - static uint32_t loop_count = 0; double now = Utilities::OS::time(); - loop_count++; - // Direct serial heartbeat every 10s - static uint32_t last_hb = 0; - uint32_t now_ms = millis(); - if (now_ms - last_hb >= 10000) { - last_hb = now_ms; - Serial.printf("[BLE] loops=%u online=%d scanning=%d connected=%d peers=%d heap=%u\n", - loop_count, (int)_online, - (int)(_platform && _platform->isScanning()), - (int)_peer_manager.connectedCount(), - (int)_peer_manager.getAllPeers().size(), - ESP.getFreeHeap()); - } - // Lazy init: set local MAC once NimBLE has a valid random address if (!local_mac_set && _platform) { auto addr = _platform->getLocalAddress();