def __gain_slider(_=None): # gain slider callback gain = __GUI_DICT['gain_slider'].val # Update text to match slider __GUI_DICT['gain_text'].eventson = False __GUI_DICT['gain_text'].set_val(gain) __GUI_DICT['gain_text'].eventson = True # Set gain for camera spincam.set_gain(gain)
def __gain_text(_=None): # gain text callback gain_text = __GUI_DICT['gain_text'].text if not gain_text: return gain = float(gain_text) # Update slider to match text __GUI_DICT['gain_slider'].eventson = False __GUI_DICT['gain_slider'].set_val(gain) __GUI_DICT['gain_slider'].eventson = True # Set gain for camera spincam.set_gain(gain)
def __init_gain(gain): # gain text callback # Set gain for camera print('Initializing Gain to ' + str(gain)) spincam.set_gain(gain)