File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -183,18 +183,19 @@ def get(self, control_name: str):
183183 def get_format (self ) -> None :
184184 try :
185185 curr_format = self .controller .get_format ()
186- except FileNotFoundError :
187- CameraInfo .logger .fatal (f"Camera { self .identifier } disconnected. Cannot read information." )
186+ self .valid_frame_rates = {
187+ round (1 / float (i )): i
188+ for i in self .controller .get_available_frame_intervals (* curr_format )
189+ }
188190
189- self .valid_frame_rates = {
190- round (1 / float (i )): i
191- for i in self .controller .get_available_frame_intervals (* curr_format )
192- }
191+ self .frame_rate = round (1 / float (self .controller .get_frame_interval ()))
193192
194- self .frame_rate = round (1 / float (self .controller .get_frame_interval ()))
193+ self .color_format = curr_format [0 ].description
194+ self .resolution : tuple [int , int ] = (curr_format [1 ].width , curr_format [1 ].height )
195+
196+ except FileNotFoundError :
197+ CameraInfo .logger .fatal (f"Camera { self .identifier } disconnected. Cannot read information." )
195198
196- self .color_format = curr_format [0 ].description
197- self .resolution : tuple [int , int ] = (curr_format [1 ].width , curr_format [1 ].height )
198199
199200 def export_configs (self ) -> dict [str : int | str | float | bool ]:
200201 self .get_format ()
You can’t perform that action at this time.
0 commit comments