Ejemplo n.º 1
0
def __exposure_slider(_=None):
    # Exposure slider callback
    global __EXPOSURE_MAX
    global __EXPOSURE_MIN
    exposure = __GUI_DICT['exposure_slider'].val

    # Update text to match slider
    __GUI_DICT['exposure_text'].eventson = False
    __GUI_DICT['exposure_text'].set_val(exposure)
    __GUI_DICT['exposure_text'].eventson = True

    # Set exposure for cameras
    exposure = min(__EXPOSURE_MAX, exposure)
    exposure = max(__EXPOSURE_MIN, exposure)
    spincam.set_exposure(exposure)
Ejemplo n.º 2
0
def __exposure_text(_=None):
    # Exposure text callback
    global __EXPOSURE_MAX
    global __EXPOSURE_MIN

    exposure_text = __GUI_DICT['exposure_text'].text
    if not exposure_text:
        return

    exposure = float(exposure_text)

    # Update slider to match text
    __GUI_DICT['exposure_slider'].eventson = False
    __GUI_DICT['exposure_slider'].set_val(exposure)
    __GUI_DICT['exposure_slider'].eventson = True

    # Set exposure for cameras
    exposure = min(__EXPOSURE_MAX, exposure)
    exposure = max(__EXPOSURE_MIN, exposure)
    spincam.set_exposure(exposure)