From e1493861d34034f141b90c97ff7d918dabb26a4d Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Tue, 28 Aug 2007 17:58:53 +0000 Subject: [PATCH] use source/converter for tuner data add db display --- .../Plugins/SystemPlugins/Satfinder/plugin.py | 81 +++++++++---------- 1 file changed, 37 insertions(+), 44 deletions(-) diff --git a/lib/python/Plugins/SystemPlugins/Satfinder/plugin.py b/lib/python/Plugins/SystemPlugins/Satfinder/plugin.py index eb20b464..6d177e4c 100644 --- a/lib/python/Plugins/SystemPlugins/Satfinder/plugin.py +++ b/lib/python/Plugins/SystemPlugins/Satfinder/plugin.py @@ -7,7 +7,7 @@ from Screens.MessageBox import MessageBox from Plugins.Plugin import PluginDescriptor from Components.Label import Label -from Components.TunerInfo import TunerInfo +from Components.Sources.FrontendStatus import FrontendStatus from Components.ActionMap import ActionMap from Components.NimManager import nimmanager, getConfigSatlist from Components.MenuList import MenuList @@ -43,17 +43,40 @@ class Satfinder(ScanSetup): - - - - - - - - - - - + + + + + + + SNRdB + + + SNR + + + AGC + + + BER + + + SNR + + + AGC + + + BER + + + LOCK + + + + LOCK + Invert + """ def openFrontend(self): @@ -76,8 +99,7 @@ class Satfinder(ScanSetup): self.initcomplete = False self.feid = feid self.oldref = None - self.frontendStatus = { } - + if not self.openFrontend(): self.oldref = session.nav.getCurrentlyPlayingServiceReference() session.nav.stopService() # try to disable foreground service @@ -90,39 +112,10 @@ class Satfinder(ScanSetup): ScanSetup.__init__(self, session) self.tuner = Tuner(self.frontend) - - self["snr"] = Label() - self["agc"] = Label() - self["ber"] = Label() - self["lock"] = Label() - self["snr_percentage"] = TunerInfo(TunerInfo.SNR_PERCENTAGE, statusDict = self.frontendStatus) - self["agc_percentage"] = TunerInfo(TunerInfo.AGC_PERCENTAGE, statusDict = self.frontendStatus) - self["ber_value"] = TunerInfo(TunerInfo.BER_VALUE, statusDict = self.frontendStatus) - self["snr_bar"] = TunerInfo(TunerInfo.SNR_BAR, statusDict = self.frontendStatus) - self["agc_bar"] = TunerInfo(TunerInfo.AGC_BAR, statusDict = self.frontendStatus) - self["ber_bar"] = TunerInfo(TunerInfo.BER_BAR, statusDict = self.frontendStatus) - self["lock_state"] = TunerInfo(TunerInfo.LOCK_STATE, statusDict = self.frontendStatus) - self["introduction"].setText("") - - self.statusTimer = eTimer() - self.statusTimer.timeout.get().append(self.updateStatus) - self.statusTimer.start(50, False) + self["Frontend"] = FrontendStatus(frontend_source = self.frontend, update_interval = 100) self.initcomplete = True - def updateStatus(self): - if self.frontend: - self.frontend.getFrontendStatus(self.frontendStatus) - else: - self.frontendStatus.clear() - self["snr_percentage"].update() - self["agc_percentage"].update() - self["ber_value"].update() - self["snr_bar"].update() - self["agc_bar"].update() - self["ber_bar"].update() - self["lock_state"].update() - def createSetup(self): self.typeOfTuningEntry = None self.satEntry = None -- 2.30.2