mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-28 02:11:40 +00:00
integrated resulotion list into FE and BE
This commit is contained in:
@@ -122,8 +122,8 @@ class SettingsManager(metaclass=Singleton):
|
||||
if "exposure" in dic:
|
||||
self.usb_cameras[camera_name].setExposureManual(dic["exposure"])
|
||||
|
||||
if "video_mode" in dic:
|
||||
self.usb_cameras[camera_name].setVideoMode(dic["video_mode"])
|
||||
if "resolution" in dic:
|
||||
self.usb_cameras[camera_name].setVideoMode(self.usb_cameras[camera_name].enumerateVideoModes()[int(dic["resolution"])])
|
||||
|
||||
# Access methods
|
||||
|
||||
@@ -133,6 +133,17 @@ class SettingsManager(metaclass=Singleton):
|
||||
|
||||
raise NoCameraConnectedException()
|
||||
|
||||
def get_resolution_list(self):
|
||||
if self.general_settings["curr_camera"]:
|
||||
str_list = []
|
||||
for val in self.usb_cameras[self.general_settings["curr_camera"]].enumerateVideoModes():
|
||||
str_list.append("{width} X {height} at {fps} fps".format(width=str(val.width),
|
||||
height=str(val.height), fps=str(val.fps)))
|
||||
|
||||
return str_list
|
||||
|
||||
raise NoCameraConnectedException()
|
||||
|
||||
def get_curr_cam(self):
|
||||
if self.general_settings["curr_camera"]:
|
||||
return self.cams[self.general_settings["curr_camera"]]
|
||||
|
||||
Reference in New Issue
Block a user