Skip to content

Commit

Permalink
Update birdseye.py - fix formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
supercoder-dev committed Jun 13, 2024
1 parent ae532a4 commit 9c49441
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions frigate/output/birdseye.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,9 @@ def __init__(
self.canvas = Canvas(width, height, config.birdseye.layout.scaling_factor)
self.stop_event = stop_event
self.inactivity_threshold = config.birdseye.inactivity_threshold
self.min_display_duration = config.birdseye.min_display_duration # New parameter
self.min_display_duration = (
config.birdseye.min_display_duration
)# New parameter

if config.birdseye.layout.max_cameras:
self.last_refresh_time = 0
Expand Down Expand Up @@ -449,7 +451,10 @@ def update_frame(self):
reset_layout = True

# Ensure the current camera has been displayed for at least min_display_duration seconds
if len(self.active_cameras) == 1 and now - self.last_camera_switch_time < self.min_display_duration:
if (
len(self.active_cameras) == 1
and now - self.last_camera_switch_time < self.min_display_duration
):
reset_layout = False

# reset the layout if it needs to be different
Expand Down

0 comments on commit 9c49441

Please sign in to comment.