Skip to content

Commit

Permalink
fix night
Browse files Browse the repository at this point in the history
  • Loading branch information
MateoLostanlen committed Jan 29, 2025
1 parent d5ea9e6 commit 12785b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyroengine/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,12 @@ async def night_mode(self) -> bool:
camera.move_camera("ToPos", idx=int(next_pos_id), speed=50)
if frame is not None:
if not is_day_time(None, frame, "ir"):
return True
return False
else:
frame = camera.capture()
if frame is not None:
if not is_day_time(None, frame, "ir"):
return True
return False
except Exception as e:
logger.exception(f"Error during image capture from camera {cam_id}: {e}")
return True
Expand Down

0 comments on commit 12785b0

Please sign in to comment.