def expose(
        self,
        imagePath='',
        expTime=3,
        binning=1,
        fastReadout=True,
        posX=0,
        posY=0,
        width=1,
        height=1,
    ):
        """

        :return: success
        """

        if not self.deviceConnected:
            return False

        worker = Worker(self.workerExpose,
                        imagePath=imagePath,
                        expTime=expTime,
                        binning=binning,
                        fastReadout=fastReadout,
                        posX=posX,
                        posY=posY,
                        width=width,
                        height=height)
        # worker.signals.result.connect(self.emitStatus)
        self.threadPool.start(worker)
        return True
Beispiel #2
0
    def getClearOutside(self, url=''):
        """
        getClearOutside initiates the worker thread to get the web data fetched

        :param url:
        :return:
        """
        worker = Worker(self.getWebDataWorker, url)
        worker.signals.result.connect(self.updateClearOutsideGui)
        self.threadPool.start(worker)
Beispiel #3
0
    def startPollStatus(self):
        """
        startPollStatus starts a thread every 1 second for polling.

        :return: success
        """
        worker = Worker(self.pollStatus)
        self.threadPool.start(worker)

        return True
Beispiel #4
0
    def startCommunication(self):
        """
        startCommunication starts cycling of the polling.

        :return: True for connecting to server
        """

        worker = Worker(self.getInitialConfig)
        worker.signals.finished.connect(self.startTimer)
        self.threadPool.start(worker)

        return True
    def pollData(self):
        """

        :return: success
        """

        if not self.deviceConnected:
            return False

        worker = Worker(self.workerPollData)
        self.threadPool.start(worker)
        return True
Beispiel #6
0
    def getOpenWeatherMapData(self, url=''):
        """
        getOpenWeatherMapData initiates the worker thread to get the web data fetched

        :param url:
        :return: true for test purpose
        """

        worker = Worker(self.getOpenWeatherMapDataWorker, url)
        worker.signals.result.connect(self.updateOpenWeatherMapDataWorker)
        self.threadPool.start(worker)

        return True
    def loadSatelliteSource(self):
        """
        loadSatelliteSource selects from a drop down list of possible satellite data sources
        on the web and once selected downloads the data. depending of the setting of reload
        is true setting, it takes an already loaded file from local disk.
        after loading or opening the source file, it updates the satellite list in the list
        view widget for the selection of satellites.

        :return: success
        """

        worker = Worker(self.loadSatelliteSourceWorker)
        worker.signals.result.connect(self.setupSatelliteGui)
        self.threadPool.start(worker)

        return True
Beispiel #8
0
    def stopCommunication(self):
        """
        stopCommunication stops cycling of the server.

        :return: true for test purpose
        """

        self.stopTimer()
        self.deviceConnected = False
        self.serverConnected = False
        self.client.signals.deviceDisconnected.emit(f'{self.name}')
        self.client.signals.serverDisconnected.emit({f'{self.name}': 0})
        self.app.message.emit(f'Alpaca device remove:[{self.name}]', 0)

        worker = Worker(self.client.connected, Connected=False)
        self.threadPool.start(worker)

        return True