mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-18 17:14:26 +03:00
only store the last 10 speeds like score history
This commit is contained in:
parent
8d74e7b3ae
commit
eaf362b424
@ -209,6 +209,9 @@ class TrackedObject:
|
||||
)
|
||||
|
||||
if self.active:
|
||||
# only keep the last 10 speeds
|
||||
if len(self.speed_history) > 10:
|
||||
self.speed_history = self.speed_history[-10:]
|
||||
self.speed_history.append(self.current_estimated_speed)
|
||||
self.average_estimated_speed = sum(self.speed_history) / len(
|
||||
self.speed_history
|
||||
|
||||
Loading…
Reference in New Issue
Block a user