mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-22 01:11:40 +00:00
BE saving selected video mode for camera
resolution var needs to be an outer pipline value and not change on pipline changes
This commit is contained in:
@@ -123,6 +123,13 @@ class SettingsManager(metaclass=Singleton):
|
||||
self.usb_cameras[camera_name].setExposureManual(dic["exposure"])
|
||||
|
||||
if "resolution" in dic:
|
||||
video_mode: VideoMode = self.usb_cameras[camera_name].enumerateVideoModes()[int(dic["resolution"])]
|
||||
self.cams[camera_name]["video_mode"] = {
|
||||
"fps": video_mode.fps,
|
||||
"width": video_mode.width,
|
||||
"height": video_mode.height,
|
||||
"pixel_format": str(video_mode.pixelFormat).split('.')[1]
|
||||
}
|
||||
self.usb_cameras[camera_name].setVideoMode(self.usb_cameras[camera_name].enumerateVideoModes()[int(dic["resolution"])])
|
||||
|
||||
# Access methods
|
||||
|
||||
Reference in New Issue
Block a user