Example #1
0
    def __scan_start(self, isCal=False):
        if self.isNewScan and self.__save_warn(Warn.SCAN):
            return False

        if not self.threadScan:
            self.__set_control_state(False)
            samples = calc_samples(self.settings.dwell)
            if self.isNewScan:
                self.spectrum.clear()
                self.locations.clear()
                self.graph.clear_plots()

                self.isNewScan = False
                self.status.set_info("", level=None)
                self.scanInfo.set_from_settings(self.settings)
                self.scanInfo.time = format_iso_time(time.time())
                self.scanInfo.lat = None
                self.scanInfo.lon = None
                self.scanInfo.desc = ""

            self.stopAtEnd = False
            self.stopScan = False
            self.threadScan = ThreadScan(self, self.sdr, self.settings, self.settings.indexRtl, samples, isCal)
            self.filename = "Scan {0:.1f}-{1:.1f}MHz".format(self.settings.start, self.settings.stop)
            self.graph.set_plot_title()

            self.__start_gps()

            return True
Example #2
0
    def __scan_start(self, isCal=False):
        if self.settings.mode == Mode.SINGLE:
            if self.__save_warn(Warn.SCAN):
                return False

        if not self.threadScan:
            self.__set_control_state(False)
            samples = calc_samples(self.settings.dwell)
            self.status.set_info('')
            self.scanInfo.setFromSettings(self.settings)
            time = datetime.datetime.utcnow().replace(microsecond=0)
            self.scanInfo.time = time.isoformat() + "Z"
            self.scanInfo.lat = None
            self.scanInfo.lon = None
            self.scanInfo.desc = ''
            self.stopAtEnd = False
            self.stopScan = False
            self.threadScan = ThreadScan(self, self.sdr, self.settings,
                                         self.settings.indexRtl, samples, isCal)
            self.filename = "Scan {0:.1f}-{1:.1f}MHz".format(self.settings.start,
                                                            self.settings.stop)
            self.graph.set_plot_title()

            if self.settings.gps:
                if self.threadLocation and self.threadLocation.isAlive():
                    self.threadLocation.stop()
                    self.threadLocation.join()
                device = self.settings.devicesGps[self.settings.indexGps]
                self.threadLocation = ThreadLocation(self, device)

            return True
Example #3
0
    def start_scan(self, isCal=False):
        if self.settings.mode == Mode.SINGLE:
            if self.save_warn(Warn.SCAN):
                return False

        self.devices = self.refresh_devices()
        if(len(self.devices) == 0):
            wx.MessageBox('No devices found',
                          'Error', wx.OK | wx.ICON_ERROR)
            return

        if self.settings.start >= self.settings.stop:
            wx.MessageBox('Stop frequency must be greater that start',
                          'Warning', wx.OK | wx.ICON_WARNING)
            return

        if not self.threadScan or not self.threadScan.isAlive():
            self.set_control_state(False)
            samples = calc_samples(self.settings.dwell)
            self.spectrum.clear()
            self.status.set_info('')
            self.pendingScan = False
            self.scanInfo.setFromSettings(self.settings)

            self.threadScan = ThreadScan(self, self.settings,
                                         self.settings.index, samples, isCal)
            self.filename = "Scan {0:.1f}-{1:.1f}MHz".format(self.settings.start,
                                                            self.settings.stop)
            return True
    def __scan_start(self, isCal=False):
        if self.isNewScan and self.__save_warn(Warn.SCAN):
            return False

        if not self.threadScan:
            self.__set_control_state(False)
            samples = calc_samples(self.settings.dwell)
            if self.isNewScan:
                self.spectrum.clear()
                self.locations.clear()
                self.graph.clear_plots()

                self.isNewScan = False
                self.status.set_info('', level=None)
                self.scanInfo.set_from_settings(self.settings)
                self.scanInfo.time = format_iso_time(time.time())
                self.scanInfo.lat = None
                self.scanInfo.lon = None
                self.scanInfo.desc = ''

            self.stopAtEnd = False
            self.stopScan = False
            self.threadScan = ThreadScan(self, self.sdr, self.settings,
                                         self.settings.indexRtl, samples,
                                         isCal)
            self.filename = "Scan {0:.1f}-{1:.1f}MHz".format(
                self.settings.start, self.settings.stop)
            self.graph.set_plot_title()

            self.__start_gps()

            return True
Example #5
0
    def start_scan(self, isCal=False):
        if self.settings.mode == Mode.SINGLE:
            if self.save_warn(Warn.SCAN):
                return False

        if not self.threadScan:
            self.set_control_state(False)
            samples = calc_samples(self.settings.dwell)
            self.status.set_info("")
            self.scanInfo.setFromSettings(self.settings)
            time = datetime.datetime.utcnow().replace(microsecond=0)
            self.scanInfo.time = time.isoformat() + "Z"
            self.scanInfo.lat = None
            self.scanInfo.lon = None
            self.scanInfo.desc = ""
            self.stopAtEnd = False
            self.stopScan = False
            self.threadScan = ThreadScan(self, self.sdr, self.settings, self.settings.index, samples, isCal)
            self.filename = "Scan {0:.1f}-{1:.1f}MHz".format(self.settings.start, self.settings.stop)
            self.graph.set_plot_title()
            return True