当前位置: 首页>>代码示例>>Python>>正文


Python abstractHardwarePlugin.AbstractHardwarePlugin类代码示例

本文整理汇总了Python中papywizard.plugins.abstractHardwarePlugin.AbstractHardwarePlugin的典型用法代码示例。如果您正苦于以下问题:Python AbstractHardwarePlugin类的具体用法?Python AbstractHardwarePlugin怎么用?Python AbstractHardwarePlugin使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了AbstractHardwarePlugin类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _defineConfig

 def _defineConfig(self):
     AbstractHardwarePlugin._defineConfig(self)
     ShutterPlugin._defineConfig(self)
     self._addConfigKey('_focus', 'FOCUS_ENABLE', default=DEFAULT_FOCUS_ENABLE)
     self._addConfigKey('_focus_time', 'FOCUS_TIME', default=DEFAULT_FOCUS_TIME)
     self._addConfigKey('_dual', 'DUAL_ENABLE' , default=DEFAULT_DUAL_ENABLE)
     self._addConfigKey('_dual_time', 'DUAL_TIME', default=DEFAULT_DUAL_TIME)
开发者ID:BCoulange,项目名称:papypourad,代码行数:7,代码来源:claussPlugins.py

示例2: establishConnection

    def establishConnection(self):  # Move to hardware?
        """ Establish the connection.

        The SIN-11 device used to control the Pixorb axis needs to be
        initialised before any command can be sent to the axis controllers.
        """
        AbstractHardwarePlugin.establishConnection(self)
        Logger().trace("AbstractPixOrbHardware.establishConnection()")
        if not AbstractPixOrbHardware.__initSIN11:
            try:
                answer = ""
                self._driver.empty()

                # Ask the SIN-11 to scan online controllers
                self._driver.write('&')  # Add '\n' if ethernet driver?
                self._driver.setTimeout(SIN11_INIT_TIMEOUT)  # Sin-11 takes several seconds to answer
                c = ''
                while c != '\r':
                    c = self._driver.read(1)
                    if c in ('#', '?'):
                        self._driver.read(2)  # Read last CRLF
                        Logger().debug("AbstractPixOrbHardware.establishConnection(): SIN-11 '&' answer=%s" % answer)
                        raise HardwareError("Can't init SIN-11")
                    else:
                        answer += c
                answer = answer.strip()  # Remove final CRLF
                Logger().debug("AbstractPixOrbHardware.establishConnection(): SIN-11 '&' answer=%s" % answer)
                AbstractPixOrbHardware.__initSIN11 = True
                self._driver.setTimeout(ConfigManager().getFloat('Plugins/HARDWARE_COM_TIMEOUT'))
            except:
                self._connected = False
                raise
开发者ID:bingostar89,项目名称:Papywizard,代码行数:32,代码来源:pixOrbPlugins.py

示例3: _defineConfig

 def _defineConfig(self):
     Logger().trace("UrsaMinorBt2Shutter._defineConfig()")
     AbstractHardwarePlugin._defineConfig(self)
     ShutterPlugin._defineConfig(self)
     self._addConfigKey('_focus', 'FOCUS_ENABLE', default=DEFAULT_FOCUS_ENABLE)
     self._addConfigKey('_focusPulse', 'FOCUS_PULSE_WIDTH', default=DEFAULT_FOCUS_PULSE_WIDTH)
     self._addConfigKey('_maintainFocus', 'FOCUS_MAINTAIN', default=DEFAULT_FOCUS_MAINTAIN)
开发者ID:BCoulange,项目名称:papypourad,代码行数:7,代码来源:ursaMinorBt2Plugins.py

示例4: configure

 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()
开发者ID:bingostar89,项目名称:Papywizard,代码行数:7,代码来源:merlinOrionPlugins.py

示例5: shutdown

 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)
开发者ID:bingostar89,项目名称:Papywizard,代码行数:7,代码来源:claussPlugins.py

示例6: _defineConfig

 def _defineConfig(self):
     AbstractHardwarePlugin._defineConfig(self)
     ShutterPlugin._defineConfig(self)
     self._addConfigKey("_focus", "FOCUS_ENABLE", default=DEFAULT_FOCUS_ENABLE)
     self._addConfigKey("_focus_time", "FOCUS_TIME", default=DEFAULT_FOCUS_TIME)
     self._addConfigKey("_dual", "DUAL_ENABLE", default=DEFAULT_DUAL_ENABLE)
     self._addConfigKey("_dual_time", "DUAL_TIME", default=DEFAULT_DUAL_TIME)
开发者ID:bingostar89,项目名称:Papywizard,代码行数:7,代码来源:claussPlugins.py

示例7: _defineConfig

 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)
开发者ID:bingostar89,项目名称:Papywizard,代码行数:8,代码来源:merlinOrionPlugins.py

示例8: shutdown

    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)
开发者ID:bingostar89,项目名称:Papywizard,代码行数:8,代码来源:merlinOrionPlugins.py

示例9: _init

 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
开发者ID:bingostar89,项目名称:Papywizard,代码行数:9,代码来源:merlinOrionPlugins.py

示例10: init

    def init(self):
        Logger().trace("MerlinOrionAxis.init()")
        self._hardware.setAxis(AXIS_TABLE[self.capacity]),
        AbstractHardwarePlugin.init(self)
        if self._config['OVERWRITE_ENCODER_FULL_CIRCLE']:
            self._hardware.overwriteEncoderFullCircle(self._config['ENCODER_FULL_CIRCLE'])

        # Connect Spy update signal
        self.connect(Spy(), QtCore.SIGNAL("update"), self.__onPositionUpdate, QtCore.Qt.BlockingQueuedConnection)
开发者ID:bingostar89,项目名称:Papywizard,代码行数:9,代码来源:merlinOrionPlugins.py

示例11: _defineConfig

 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)
开发者ID:BCoulange,项目名称:papypourad,代码行数:10,代码来源:panoduinoPlugins.py

示例12: init

 def init(self):
     Logger().trace("PanoduinoShutter.init()")
     self._hardware.setAxis(self._config['CHANNEL']),
     AbstractHardwarePlugin.init(self)
开发者ID:BCoulange,项目名称:papypourad,代码行数:4,代码来源:panoduinoPlugins.py

示例13: __init__

 def __init__(self, *args, **kwargs):
     """
     """
     AbstractHardwarePlugin.__init__(self, *args, **kwargs)
     ShutterPlugin.__init__(self, *args, **kwargs)
开发者ID:bingostar89,项目名称:Papywizard,代码行数:5,代码来源:merlinOrionPlugins.py

示例14: init

 def init(self):
     AbstractHardwarePlugin.init(self)
     self.configure()
开发者ID:BCoulange,项目名称:papypourad,代码行数:3,代码来源:ursaMinorUsbPlugins.py

示例15: shutdown

 def shutdown(self):
     Logger().trace("PanoduinoShutter.shutdown()")
     self._triggerOffShutter()
     self._hardware.shutdown()
     AbstractHardwarePlugin.shutdown(self)
     ShutterPlugin.shutdown(self)
开发者ID:BCoulange,项目名称:papypourad,代码行数:6,代码来源:panoduinoPlugins.py


注:本文中的papywizard.plugins.abstractHardwarePlugin.AbstractHardwarePlugin类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。