Compare commits

...

2 Commits

Author SHA1 Message Date
ryzendigo
1d51a60fa8
Merge 8edf4ce298 into 8fc1e97df5 2026-04-22 22:31:36 +01:00
ryzendigo
8edf4ce298 fix: mismatched time sources break birdseye idle heartbeat
The idle heartbeat check in BirdsEyeOutputProcess.update() compares
time.monotonic() (seconds since an arbitrary point, typically boot)
against last_output_time which is set from datetime.datetime.now().timestamp()
(Unix epoch seconds).

These are completely different time bases. The subtraction produces a
large negative number, so the idle heartbeat condition can never be
satisfied. This means birdseye stops sending frames when all cameras
go idle, instead of continuing at the configured idle_heartbeat_fps.

Use datetime.datetime.now().timestamp() consistently for both the
heartbeat check and the output time tracking.
2026-03-16 14:29:16 +08:00

View File

@ -874,7 +874,7 @@ class Birdseye:
coordinates = self.birdseye_manager.get_camera_coordinates() coordinates = self.birdseye_manager.get_camera_coordinates()
self.requestor.send_data(UPDATE_BIRDSEYE_LAYOUT, coordinates) self.requestor.send_data(UPDATE_BIRDSEYE_LAYOUT, coordinates)
if self._idle_interval: if self._idle_interval:
now = time.monotonic() now = datetime.datetime.now().timestamp()
is_idle = len(self.birdseye_manager.camera_layout) == 0 is_idle = len(self.birdseye_manager.camera_layout) == 0
if ( if (
is_idle is_idle