Example #1
0
    def deactivate(self):
        Logger().trace("MerlinOrionPlugin.deactivate()")

        # Stop the thread
        self._stopThread()

        AbstractAxisPlugin.deactivate(self)
Example #2
0
 def shutdown(self):
     Logger().trace("ClaussAxis.shutdown()")
     self.stop()
     if self._config["PARK_ENABLE"]:
         self._hardware.drive(float(self._config["PARK_POSITION"]), self.__getSpeed())
     AbstractHardwarePlugin.shutdown(self)
     AbstractAxisPlugin.shutdown(self)
Example #3
0
 def configure(self):
     AbstractAxisPlugin.configure(self)
     AbstractHardwarePlugin.configure(self)
     if self._config['OVERWRITE_ENCODER_FULL_CIRCLE']:
         self._hardware.overwriteEncoderFullCircle(self._config['ENCODER_FULL_CIRCLE'])
     else:
         self._hardware.useFirmwareEncoderFullCircle()
Example #4
0
 def _defineConfig(self):
     AbstractAxisPlugin._defineConfig(self)
     AbstractHardwarePlugin._defineConfig(self)
     self._addConfigKey('_alternateDrive', 'ALTERNATE_DRIVE', default=DEFAULT_ALTERNATE_DRIVE)
     self._addConfigKey('_alternateDrive', 'ALTERNATE_DRIVE_ANGLE', default=DEFAULT_ALTERNATE_DRIVE_ANGLE)
     self._addConfigKey('_inertiaAngle', 'INERTIA_ANGLE', default=DEFAULT_INERTIA_ANGLE)
     self._addConfigKey('_overwriteEncoderFullCircle', 'OVERWRITE_ENCODER_FULL_CIRCLE', default=DEFAULT_OVERWRITE_ENCODER_FULL_CIRCLE)
     self._addConfigKey('_encoderFullCircle', 'ENCODER_FULL_CIRCLE', default=DEFAULT_ENCODER_FULL_CIRCLE)
Example #5
0
    def shutdown(self):
        Logger().trace("MerlinOrionAxis.shutdown()")
        self.stop()
        AbstractHardwarePlugin.shutdown(self)
        AbstractAxisPlugin.shutdown(self)

        # Disconnect Spy update signal
        self.disconnect(Spy(), QtCore.SIGNAL("update"), self.__onPositionUpdate)
Example #6
0
 def shutdown(self):
     Logger().trace("ClaussAxis.shutdown()")
     self.stop()
     if self._config['PARK_ENABLE']:
         self._hardware.drive(float(self._config['PARK_POSITION']),
                              self.__getSpeed())
     AbstractHardwarePlugin.shutdown(self)
     AbstractAxisPlugin.shutdown(self)
 def _init(self):
     AbstractAxisPlugin._init(self)
     self.__pos = 0.
     self.__jog = False
     self.__drive = False
     self.__setpoint = None
     self.__dir = None
     self.__time = None
     self.__run = False
Example #8
0
 def _init(self):
     AbstractAxisPlugin._init(self)
     self.__pos = 0.
     self.__jog = False
     self.__drive = False
     self.__setpoint = None
     self.__dir = None
     self.__time = None
     self.__run = False
Example #9
0
 def _init(self):
     Logger().trace("MerlinOrionAxis._init()")
     AbstractHardwarePlugin._init(self)
     AbstractAxisPlugin._init(self)
     self._hardware = MerlinOrionHardware()
     self.__run = False
     self.__driveEvent = threading.Event()
     self.__setPoint = None
     self.__currentPos = None
Example #10
0
 def _defineConfig(self):
     AbstractAxisPlugin._defineConfig(self)
     AbstractHardwarePlugin._defineConfig(self)
     self._addConfigKey('_speed', 'SPEED', default=DEFAULT_SPEED[self.capacity])
     self._addConfigKey('_acceleration', 'ACCEL', default=DEFAULT_ACCEL[self.capacity])
     self._addConfigKey('_channel', 'CHANNEL', default=DEFAULT_CHANNEL[self.capacity])
     self._addConfigKey('_direction', 'DIRECTION', default=DEFAULT_DIRECTION[self.capacity])
     self._addConfigKey('_angle1ms', 'ANGLE_1MS', default=DEFAULT_ANGLE_1MS[self.capacity])
     self._addConfigKey('_neutralPos', 'NEUTRAL_POSITION', default=DEFAULT_NEUTRAL_POSITION[self.capacity])
     self._addConfigKey('_additionalDelay', 'ADDITIONAL_DELAY', default=DEFAULT_ADDITIONAL_DELAY)
Example #11
0
 def _defineConfig(self):
     AbstractAxisPlugin._defineConfig(self)
     AbstractHardwarePlugin._defineConfig(self)
     self._addConfigKey('_speedSlow', 'SPEED_SLOW', default=DEFAULT_SPEED_SLOW)
     self._addConfigKey('_speedNormal', 'SPEED_NORMAL', default=DEFAULT_SPEED_NORMAL)
     self._addConfigKey('_speedFast', 'SPEED_FAST', default=DEFAULT_SPEED_FAST)
     self._addConfigKey('_parkPosition', 'PARK_POSITION', default=DEFAULT_PARK_POSITION)
     if self.capacity == 'yawAxis':
         self._addConfigKey('_parkEnable', 'PARK_ENABLE', default=False)
     else:
         self._addConfigKey('_parkEnable', 'PARK_ENABLE', default=True)
Example #12
0
 def _defineConfig(self):
     AbstractAxisPlugin._defineConfig(self)
     AbstractHardwarePlugin._defineConfig(self)
     self._addConfigKey("_speedSlow", "SPEED_SLOW", default=DEFAULT_SPEED_SLOW)
     self._addConfigKey("_speedNormal", "SPEED_NORMAL", default=DEFAULT_SPEED_NORMAL)
     self._addConfigKey("_speedFast", "SPEED_FAST", default=DEFAULT_SPEED_FAST)
     self._addConfigKey("_parkPosition", "PARK_POSITION", default=DEFAULT_PARK_POSITION)
     if self.capacity == "yawAxis":
         self._addConfigKey("_parkEnable", "PARK_ENABLE", default=False)
     else:
         self._addConfigKey("_parkEnable", "PARK_ENABLE", default=True)
Example #13
0
    def _checkLimits(self, position):
        """ Check if the position can be reached.

        First check if the position in degres is in the user limits
        (done in parent class), then check if the servo can mechanically
        reach the position.
        """
        AbstractAxisPlugin._checkLimits(self, position)
        value = self.__angleToServo(position)
        if not VALUE_MIN <= value <= VALUE_MAX:
            raise HardwareError("Servo limit reached: %.2f not in [%d-%d]" % (value, VALUE_MIN, VALUE_MAX))
Example #14
0
    def _checkLimits(self, position):
        """ Check if the position can be reached.

        First check if the position in degres is in the user limits
        (done in parent class), then check if the servo can mechanically
        reach the position.
        """
        AbstractAxisPlugin._checkLimits(self, position)
        value = self.__angleToServo(position)
        if not VALUE_MIN <= value <= VALUE_MAX:
            raise HardwareError("Servo limit reached: %.2f not in [%d-%d]" %
                                (value, VALUE_MIN, VALUE_MAX))
Example #15
0
 def _defineConfig(self):
     AbstractAxisPlugin._defineConfig(self)
     AbstractHardwarePlugin._defineConfig(self)
     self._addConfigKey('_speedSlow',
                        'SPEED_SLOW',
                        default=DEFAULT_SPEED_SLOW)
     self._addConfigKey('_speedNormal',
                        'SPEED_NORMAL',
                        default=DEFAULT_SPEED_NORMAL)
     self._addConfigKey('_speedFast',
                        'SPEED_FAST',
                        default=DEFAULT_SPEED_FAST)
     self._addConfigKey('_parkPosition',
                        'PARK_POSITION',
                        default=DEFAULT_PARK_POSITION)
     if self.capacity == 'yawAxis':
         self._addConfigKey('_parkEnable', 'PARK_ENABLE', default=False)
     else:
         self._addConfigKey('_parkEnable', 'PARK_ENABLE', default=True)
Example #16
0
 def _defineConfig(self):
     AbstractAxisPlugin._defineConfig(self)
     AbstractHardwarePlugin._defineConfig(self)
     self._addConfigKey('_speed',
                        'SPEED',
                        default=DEFAULT_SPEED[self.capacity])
     self._addConfigKey('_acceleration',
                        'ACCEL',
                        default=DEFAULT_ACCEL[self.capacity])
     self._addConfigKey('_channel',
                        'CHANNEL',
                        default=DEFAULT_CHANNEL[self.capacity])
     self._addConfigKey('_direction',
                        'DIRECTION',
                        default=DEFAULT_DIRECTION[self.capacity])
     self._addConfigKey('_angle1ms',
                        'ANGLE_1MS',
                        default=DEFAULT_ANGLE_1MS[self.capacity])
     self._addConfigKey('_neutralPos',
                        'NEUTRAL_POSITION',
                        default=DEFAULT_NEUTRAL_POSITION[self.capacity])
     self._addConfigKey('_additionalDelay',
                        'ADDITIONAL_DELAY',
                        default=DEFAULT_ADDITIONAL_DELAY)
Example #17
0
 def _defineConfig(self):
     AbstractAxisPlugin._defineConfig(self)
     self._addConfigKey('_speed', 'SPEED', default=DEFAULT_SPEED)
Example #18
0
    def activate(self):
        Logger().trace("MerlinOrionPlugin.activate()")
        AbstractAxisPlugin.activate(self)

        # Start the thread
        self.start()
Example #19
0
 def shutdown(self):
     Logger().trace("OwlAxis.shutdown()")
     self.stop()
     AbstractHardwarePlugin.shutdown(self)
     AbstractAxisPlugin.shutdown(self)
Example #20
0
 def _defineConfig(self):
     AbstractAxisPlugin._defineConfig(self)
     AbstractHardwarePlugin._defineConfig(self)
Example #21
0
 def shutdown(self):
     Logger().trace("OwlAxis.shutdown()")
     self.stop()
     AbstractHardwarePlugin.shutdown(self)
     AbstractAxisPlugin.shutdown(self)
Example #22
0
 def shutdown(self):
     Logger().trace("PanoduinoAxis.shutdown()")
     self.stop()
     self._hardware.shutdown()
     AbstractHardwarePlugin.shutdown(self)
     AbstractAxisPlugin.shutdown(self)
Example #23
0
 def _init(self):
     Logger().trace("ClaussAxis._init()")
     AbstractHardwarePlugin._init(self)
     AbstractAxisPlugin._init(self)
     self._hardware = ClaussHardware()
Example #24
0
 def _init(self):
     Logger().trace("ClaussAxis._init()")
     AbstractHardwarePlugin._init(self)
     AbstractAxisPlugin._init(self)
     self._hardware = ClaussHardware()
Example #25
0
 def __init__(self, *args, **kwargs):
     AbstractAxisPlugin.__init__(self, *args, **kwargs)
     QtCore.QThread.__init__(self)
Example #26
0
 def _defineConfig(self):
     AbstractAxisPlugin._defineConfig(self)
     self._addConfigKey('_speed', 'SPEED', default=DEFAULT_SPEED)
Example #27
0
 def configure(self):
     Logger().trace("PanoduinoAxis.configure()")
     AbstractAxisPlugin.configure(self)
     self._hardware.setAxis(self._config['CHANNEL'])
     self._hardware.configure(self._config['SPEED'], self._config['ACCEL'])
Example #28
0
 def shutdown(self):
     Logger().trace("PanoduinoAxis.shutdown()")
     self.stop()
     self._hardware.shutdown()
     AbstractHardwarePlugin.shutdown(self)
     AbstractAxisPlugin.shutdown(self)
Example #29
0
 def _defineConfig(self):
     AbstractAxisPlugin._defineConfig(self)
     AbstractHardwarePlugin._defineConfig(self)
Example #30
0
 def _init(self):
     Logger().trace("OwlAxis._init()")
     AbstractHardwarePlugin._init(self)
     AbstractAxisPlugin._init(self)
     self._hardware = OwlHardware()
Example #31
0
 def configure(self):
     Logger().trace("PanoduinoAxis.configure()")
     AbstractAxisPlugin.configure(self)
     self._hardware.setAxis(self._config['CHANNEL'])
     self._hardware.configure(self._config['SPEED'], self._config['ACCEL'])
Example #32
0
 def _init(self):
     Logger().trace("PixOrbAxis._init()")
     AbstractPixOrbHardware._init(self)
     AbstractAxisPlugin._init(self)
     self._hardware = PixOrbHardware()
Example #33
0
 def _init(self):
     Logger().trace("OwlAxis._init()")
     AbstractHardwarePlugin._init(self)
     AbstractAxisPlugin._init(self)
     self._hardware = OwlHardware()
Example #34
0
 def _defineConfig(self):
     AbstractAxisPlugin._defineConfig(self)
     AbstractHardwarePlugin._defineConfig(self)
     self._addConfigKey('_speedIndex', 'SPEED_INDEX', default=DEFAULT_SPEED_INDEX)
     self._addConfigKey('_axisWithBreak', 'AXIS_WITH_BREAK', default=DEFAULT_AXIS_WITH_BREAK)
     self._addConfigKey('_axisAccuracy', 'AXIS_ACCURACY', default=DEFAULT_AXIS_ACCURACY)
Example #35
0
 def __init__(self, *args, **kwargs):
     AbstractHardwarePlugin.__init__(self, *args, **kwargs)  # Only 1?
     AbstractAxisPlugin.__init__(self, *args, **kwargs)
     QtCore.QThread.__init__(self)
Example #36
0
 def shutdown(self):
     Logger().trace("PixOrbAxis.shutdown()")
     self.stop()
     AbstractAxisPlugin.shutdown(self)
 def _init(self):
     Logger().trace("GigaPanBotAxis._init()")
     AbstractHardwarePlugin._init(self)
     AbstractAxisPlugin._init(self)
     self._hardware = GigaPanBotHardware()
Example #38
0
 def configure(self):
     Logger().trace("PixOrbAxis.configure()")
     AbstractAxisPlugin.configure(self)
     self._hardware.configure(self._config['SPEED_INDEX'])
Example #39
0
 def __init__(self, *args, **kwargs):
     AbstractAxisPlugin.__init__(self, *args, **kwargs)
     QtCore.QThread.__init__(self)
Example #40
0
 def _init(self):
     Logger().trace("PanoduinoAxis._init()")
     AbstractHardwarePlugin._init(self)
     AbstractAxisPlugin._init(self)
     self._hardware = PololuMicroMaestroHardware()
Example #41
0
 def _init(self):
     Logger().trace("GigaPanBotAxis._init()")
     AbstractHardwarePlugin._init(self)
     AbstractAxisPlugin._init(self)
     self._hardware = GigaPanBotHardware()
Example #42
0
 def _init(self):
     Logger().trace("PanoduinoAxis._init()")
     AbstractHardwarePlugin._init(self)
     AbstractAxisPlugin._init(self)
     self._hardware = PololuMicroMaestroHardware()