Пример #1
0
class UrsaMinorUsbShutter(AbstractHardwarePlugin, ShutterPlugin):
    """
    """
    def _init(self):
        Logger().trace("UrsaMinorUsbShutter._init()")
        AbstractHardwarePlugin._init(self)
        ShutterPlugin._init(self)
        self._hardware = UrsaMinorUsbHardware()

    def _defineConfig(self):
        Logger().trace("UrsaMinorUsbShutter._defineConfig()")
        AbstractHardwarePlugin._defineConfig(self)
        ShutterPlugin._defineConfig(self)
        self._addConfigKey('_triggerLine', 'TRIGGER_LINE', default=DEFAULT_TRIGGER_LINE)
        self._addConfigKey('_triggerLineInverted', 'TRIGGER_LINE_INVERTED', default=DEFAULT_TRIGGER_LINE_INVERTED)

    def configure(self):
        self._hardware.setTriggerLine(self._config['TRIGGER_LINE'])
        self._hardware.setTriggerLineInverted(self._config['TRIGGER_LINE_INVERTED'])

    def _triggerOnShutter(self):
        """ Set the shutter on.
        """
        self._hardware.setOutput(True)

    def _triggerOffShutter(self):
        """ Set the shutter off.
        """
        self._hardware.setOutput(False)

    def init(self):
        AbstractHardwarePlugin.init(self)
        self.configure()
Пример #2
0
class UrsaMinorUsbShutter(AbstractHardwarePlugin, ShutterPlugin):
    """
    """
    def _init(self):
        Logger().trace("UrsaMinorUsbShutter._init()")
        AbstractHardwarePlugin._init(self)
        ShutterPlugin._init(self)
        self._hardware = UrsaMinorUsbHardware()

    def _defineConfig(self):
        Logger().trace("UrsaMinorUsbShutter._defineConfig()")
        AbstractHardwarePlugin._defineConfig(self)
        ShutterPlugin._defineConfig(self)
        self._addConfigKey('_triggerLine',
                           'TRIGGER_LINE',
                           default=DEFAULT_TRIGGER_LINE)
        self._addConfigKey('_triggerLineInverted',
                           'TRIGGER_LINE_INVERTED',
                           default=DEFAULT_TRIGGER_LINE_INVERTED)

    def configure(self):
        self._hardware.setTriggerLine(self._config['TRIGGER_LINE'])
        self._hardware.setTriggerLineInverted(
            self._config['TRIGGER_LINE_INVERTED'])

    def _triggerOnShutter(self):
        """ Set the shutter on.
        """
        self._hardware.setOutput(True)

    def _triggerOffShutter(self):
        """ Set the shutter off.
        """
        self._hardware.setOutput(False)

    def init(self):
        AbstractHardwarePlugin.init(self)
        self.configure()
Пример #3
0
 def _init(self):
     Logger().trace("UrsaMinorUsbShutter._init()")
     AbstractHardwarePlugin._init(self)
     ShutterPlugin._init(self)
     self._hardware = UrsaMinorUsbHardware()
Пример #4
0
 def _init(self):
     Logger().trace("UrsaMinorUsbShutter._init()")
     AbstractHardwarePlugin._init(self)
     ShutterPlugin._init(self)
     self._hardware = UrsaMinorUsbHardware()