コード例 #1
0
ファイル: __init__.py プロジェクト: zogtrog/FabScanPi-Server
    def __init__(self):
        self.config = Config.instance()
        self.settings = Settings.instance()

        self.camera = None
        self._image_processor = ImageProcessor(self.config, self.settings)
        self.camera = FSCamera()
        self.serial_connection = FSSerialCom()

        self.turntable = Turntable(self.serial_connection)

        self.laser = Laser(self.serial_connection)
        self.led = Led(self.serial_connection)

        self.laser.off()
        self.led.off()
        self.turntable.stop_turning()
        self.turntable.disable_motors()
コード例 #2
0
    def __init__(self, config, settings, imageprocessor):

        self.config = config
        self.settings = settings

        self._logger = logging.getLogger(__name__)
        self._settings_mode_is_off = True
        self.camera = None
        self._image_processor = imageprocessor
        self.camera = FSCamera()
        self.serial_connection = FSSerialCom()

        self.turntable = Turntable(serial_object=self.serial_connection)
        self.laser = Laser(self.serial_connection)
        self.led = Led(self.serial_connection)

        self._logger.debug("Reset FabScanPi HAT...")
        self.laser.off(laser=0)
        #self.laser.off(laser=1)
        self.led.off()
        self.turntable.stop_turning()
        self._logger.debug("Hardware controller initialized...")