def state_cb(state, motor=motor, **kw): movable = Utils.get_movable_state_and_position(motor) if movable: signals.motor_state_callback(movable[motor], **kw) else: logging.getLogger('HWR').exception("Could not call state callback for %s" % motor)
def state_cb(state, motor=motor, **kw): movable = utils.get_movable_state_and_position(motor) if movable: signals.motor_state_callback(movable[motor], **kw) else: logging.getLogger("MX3.HWR").exception( "Could not call state callback for %s" % motor)
def state_cb(state, motor=motor, **kw): movable = utils.get_movable_state_and_position(motor) if movable: # TODO check if there is a bug in get_state of expoerter motor ? movable[motor]["state"] = state.value signals.motor_state_callback(movable[motor], **kw) else: logging.getLogger("MX3.HWR").exception( "Could not call state callback for %s" % motor)
def light_state_cb(state, actuator_name=actuator_name, **kw): movable = utils.get_movable_state_and_position(actuator_name) signals.motor_state_callback(movable[actuator_name], **kw) signals.motor_state_callback(movable[actuator_name + "Switch"], **kw) signals.motor_position_callback(movable[actuator_name + "Switch"])
def state_cb(state, motor=motor, **kw): movable = Utils.get_movable_state_and_position(motor) signals.motor_state_callback(movable[motor], **kw) signals.motor_state_callback(movable[motor + "Switch"], **kw)