當前位置: 首頁>>代碼示例>>Python>>正文


Python Collector.get_actual_temperature方法代碼示例

本文整理匯總了Python中collector.Collector.get_actual_temperature方法的典型用法代碼示例。如果您正苦於以下問題:Python Collector.get_actual_temperature方法的具體用法?Python Collector.get_actual_temperature怎麽用?Python Collector.get_actual_temperature使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在collector.Collector的用法示例。


在下文中一共展示了Collector.get_actual_temperature方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: MainWindow

# 需要導入模塊: from collector import Collector [as 別名]
# 或者: from collector.Collector import get_actual_temperature [as 別名]

#.........這裏部分代碼省略.........

        self.pcieWidget.framelength.valueChanged.connect(self.collector.setReflectogrammLength)

        self.measuretimer = self.startTimer(1000)
        #self.FOL2timer = self.startTimer(self.usbWidget.FOL2_period.value())

        self.pcieWidget.framelength.valueChanged.connect(self.change_scan_time)
        self.pcieWidget.framecount.valueChanged.connect(self.change_scan_time)
        self.DILTScannerWidget.nsteps.valueChanged.connect(self.change_scan_time)

        self.change_scan_time()

        self.showMaximized()
        self.plotsOnly = False
        self.plotsFreezed = False

        self.DILTScannerWidget.nsteps.valueChanged.connect(self.collector.setSpectraLength)
        self.DIL_Tscanner.scanPositionChanged.connect(self.DILTScannerWidget.position.setNum)
        self.scannerWidget.nsteps.valueChanged.connect(self.collector.setSpectraLength)
        self.PFGITscanner.scanPositionChanged.connect(self.scannerWidget.position.setNum)
        self.scannerWidget.dtChanged.connect(self.maximizer.set_dt)
        self.scannerWidget.bottom.valueChanged.connect(
            self.maximizer.set_bottom)
        self.otherWidget.work.toggled.connect(self.on_work)

    def on_work(self, val):
        if not val:
            self.status = "idle"
        else:
            self.status = "waiting"


    def on_wait(self, data):
        t, T1, T2 = self.collector.get_actual_temperature(2 * EXT_STAB_TIME)
        targets = [self.state.settings["USB"]["T1set"],
                   self.state.settings["USB"]["T2set"]]
        if logic.check_stability(t, [T1, T2], targets, EXT_STAB_TIME):
            self.status = "searching"
            self.state.update("PCIE", ("framecount", 200))
            print "Searching"
            middle = (self.state.settings["TimeScanner"]["top"] +
                      self.state.settings["TimeScanner"]["bottom"]) / 2
            self.state.update("USB", ("PFGI_TscanAmp", middle))
            setter = lambda x: self.state.update("USB", ("DIL_T", x))
            dt = INT_STAB_RATE * SEARCH_STEP / 3
            logic.init_search(SEARCH_BOT, SEARCH_TOP, SEARCH_STEP,
                              dt, setter)

    def on_scan(self, pcie_dev_response):
        self.collector.appendDragonResponse(pcie_dev_response)
        submatrix_to_process = None
        if self.laserscanner == "DILT":
            self.collector.appendOnChipTemperature(
                self.DIL_Tscanner.scan_position)
            self.DIL_Tscanner.scan()
            self.collector.setNextIndex(self.DIL_Tscanner.pos)
            if self.DIL_Tscanner.top_reached:
                self.startDownScan.emit()
            elif self.DIL_Tscanner.bottom_reached:
                self.startUpScan.emit()
            if (self.DIL_Tscanner.top_reached or
                self.DIL_Tscanner.bottom_reached):
                submatrix_to_process = self.DIL_Tscanner.lastsubmatrix
        if self.laserscanner == "PFGIT":
            self.collector.appendOnChipTemperature(
                self.PFGITscanner.scan_position)
開發者ID:budylin,項目名稱:pybotdr,代碼行數:70,代碼來源:mainwindow.py


注:本文中的collector.Collector.get_actual_temperature方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。