示例#1
0
        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)
示例#2
0
        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)
示例#3
0
        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)
示例#4
0
 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"])
示例#5
0
 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)
示例#6
0
 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)