mirror of
https://github.com/colonelpanichacks/flock-you.git
synced 2026-06-14 16:03:33 -07:00
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.
This commit is contained in:
+3
-3
@@ -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();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user