From 42a7a6f84fb11726dc31a0c5456fe03e7d11ff35 Mon Sep 17 00:00:00 2001 From: Doug Borg Date: Sun, 8 Feb 2026 14:16:53 -0700 Subject: [PATCH] Fix heartbeat timer leak for low-confidence detections, bump method buffer Low-confidence mac_prefix_mfr hits no longer update fyLastDetTime/fyLastHB, preventing them from keeping the heartbeat alive after a high-confidence device leaves range. Bump FYDetection::method from 24 to 32 bytes so "mac_prefix_soundthinking" (23 chars) has headroom. --- src/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 6ce4b03..5a235dc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -133,7 +133,7 @@ struct FYDetection { char mac[18]; char name[48]; int rssi; - char method[24]; + char method[32]; unsigned long firstSeen; unsigned long lastSeen; int count; @@ -508,9 +508,9 @@ class FYBLECallbacks : public NimBLEAdvertisedDeviceCallbacks { } if (highConfidence) { fyDeviceInRange = true; + fyLastDetTime = millis(); + fyLastHB = millis(); } - fyLastDetTime = millis(); - fyLastHB = millis(); } } };