Skip to content

Commit

Permalink
Update exposure time and focus mode
Browse files Browse the repository at this point in the history
  • Loading branch information
xeonqq authored May 3, 2024
1 parent 50ff8d5 commit 57459f9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import threading

from picamera2 import Picamera2
from libcamera import controls

from src.os_utils import generate_recording_postfix
from .abc import ILed as Led
Expand Down Expand Up @@ -117,8 +118,9 @@ def main():
video_config = camera.create_video_configuration(main_stream, lores_stream, encode="main")
camera.configure(video_config)
fps = 20.0
camera.set_controls({"FrameRate": fps, "ExposureTime": 20000})

camera.set_controls({"FrameRate": fps, "ExposureTime": 10000})
camera.set_controls({"AfMode":controls.AfModeEnum.Continuous})

#metadata = camera.capture_metadata()
#framerate = 1000000 / metadata["FrameDuration"]
#logging.debug("configure camera done, fps: {}".format(framerate))
Expand Down

0 comments on commit 57459f9

Please sign in to comment.