def __fps_slider(_=None): # fps slider callback framerate = __GUI_DICT['fps_slider'].val # Update text to match slider __GUI_DICT['fps_text'].eventson = False __GUI_DICT['fps_text'].set_val(framerate) __GUI_DICT['fps_text'].eventson = True # Set fps for camera framerate = min(__FPS_MAX, framerate) framerate = max(__FPS_MIN, framerate) spincam.set_frame_rate(framerate) fr = spincam.get_frame_rate() print('Frame Rate is set to ' + str(fr))
def __fps_text(_=None): # fps text callback fps_text = __GUI_DICT['fps_text'].text if not fps_text: return framerate = float(fps_text) # Update slider to match text __GUI_DICT['fps_slider'].eventson = False __GUI_DICT['fps_slider'].set_val(framerate) __GUI_DICT['fps_slider'].eventson = True # Set fps for camera framerate = min(__FPS_MAX, framerate) framerate = max(__FPS_MIN, framerate) spincam.set_frame_rate(framerate) fr = spincam.get_frame_rate() print('Frame Rate is set to ' + str(fr))