@@ -204,19 +204,29 @@ def configure_widget_range(self):
204204 0.01 for low mode.
205205
206206 """
207- self .laser_min = self .configuration_controller .remote_focus_dict ["hardware" ]["min" ]
208- self .laser_max = self .configuration_controller .remote_focus_dict ["hardware" ]["max" ]
209-
210- precision = int (self .configuration_controller .remote_focus_dict ["hardware" ].get ("precision" , 0 ))
211- increment = int (self .configuration_controller .remote_focus_dict ["hardware" ].get ("step" , 0 ))
207+ self .laser_min = self .configuration_controller .remote_focus_dict ["hardware" ][
208+ "min"
209+ ]
210+ self .laser_max = self .configuration_controller .remote_focus_dict ["hardware" ][
211+ "max"
212+ ]
213+
214+ precision = int (
215+ self .configuration_controller .remote_focus_dict ["hardware" ].get (
216+ "precision" , 0
217+ )
218+ )
219+ increment = int (
220+ self .configuration_controller .remote_focus_dict ["hardware" ].get ("step" , 0 )
221+ )
212222 if precision == 0 :
213223 precision = - 4 if self .laser_max < 1 else - 3
214224 elif precision > 0 :
215- precision = - precision
225+ precision = - precision
216226 if increment == 0 :
217227 increment = 0.0001 if self .laser_max < 1 else 0.001
218228 elif increment < 0 :
219- increment = - increment
229+ increment = - increment
220230
221231 # set ranges of value for those lasers
222232 for laser in self .lasers :
@@ -435,7 +445,7 @@ def func_laser(*args):
435445 # tell parent controller (the device)
436446 if self .event_id :
437447 self .view .popup .after_cancel (self .event_id )
438-
448+
439449 try :
440450 value = float (variable_value )
441451 except ValueError :
@@ -473,7 +483,7 @@ def update_waveform_parameters(self, *args, **wargs):
473483 """
474484 if not self .update_waveform_parameters_flag :
475485 return
476-
486+
477487 if self .event_id :
478488 self .view .popup .after_cancel (self .event_id )
479489 # Get the values from the widgets.
@@ -595,18 +605,21 @@ def func_galvo(*args):
595605 # change any galvo parameters as one event
596606 if self .event_id :
597607 self .view .popup .after_cancel (self .event_id )
598-
608+
599609 try :
600610 value = float (variable_value )
601611 except ValueError :
602612 return
603- if value < self .galvo_min [galvo_name ] or value > self .galvo_max [galvo_name ]:
613+ if "Freq" not in widget_name and (
614+ value < self .galvo_min [galvo_name ]
615+ or value > self .galvo_max [galvo_name ]
616+ ):
604617 return
605618 self .galvo_setting [galvo_name ][self .resolution ][self .mag ][
606619 parameter
607620 ] = variable_value
608621 logger .debug (f"Galvo parameter { parameter } changed: { variable_value } " )
609-
622+
610623 self .event_id = self .view .popup .after (
611624 500 ,
612625 lambda : self .parent_controller .execute ("update_setting" , "galvo" ),
0 commit comments