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 <noreply@anthropic.com>
This commit is contained in:
torlando-tech
2026-02-22 21:46:35 -05:00
parent 869963c33c
commit ac7b0ac1f7

View File

@@ -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();