From f1b8049d3735b3f6544e84817e9c7d3bca474d5e Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 8 Dec 2008 15:50:30 +0100 Subject: remove agc --- lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py b/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py index d67a97cb..c8aa2718 100644 --- a/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py +++ b/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py @@ -28,16 +28,13 @@ class PositionerSetup(Screen): - - + - - + - - + @@ -87,14 +84,11 @@ class PositionerSetup(Screen): self.createSetup() 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) @@ -330,10 +324,8 @@ class PositionerSetup(Screen): if self.frontend: self.frontend.getFrontendStatus(self.frontendStatus) 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() transponderdata = self.tuner.getTransponderData() -- cgit v1.2.3 From 50182c33fbbd4845ceb81afa7a5cbf263c929412 Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 9 Dec 2008 15:59:34 +0100 Subject: add SNRdB to TunerInfo --- lib/python/Components/TunerInfo.py | 40 +++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Components/TunerInfo.py b/lib/python/Components/TunerInfo.py index d8b4d064..39f54c0b 100644 --- a/lib/python/Components/TunerInfo.py +++ b/lib/python/Components/TunerInfo.py @@ -10,13 +10,14 @@ class TunerInfo(GUIComponent): BER = 2 LOCK = 3 SNR_PERCENTAGE = 0 - AGC_PERCENTAGE = 1 - BER_VALUE = 2 - SNR_BAR = 3 - AGC_BAR = 4 - BER_BAR = 5 - LOCK_STATE = 6 - SYNC_STATE = 7 + SNR_DB = 1 + AGC_PERCENTAGE = 2 + BER_VALUE = 3 + SNR_BAR = 4 + AGC_BAR = 5 + BER_BAR = 6 + LOCK_STATE = 7 + SYNC_STATE = 8 def __init__(self, type, servicefkt = None, frontendfkt = None, statusDict = None): GUIComponent.__init__(self) @@ -47,7 +48,9 @@ class TunerInfo(GUIComponent): return val*100/65535 def update(self): - if self.type == self.SNR_PERCENTAGE or self.type == self.SNR_BAR: + if self.type == self.SNR_DB: + value = self.getValue(self.SNR_DB) + elif self.type == self.SNR_PERCENTAGE or self.type == self.SNR_BAR: value = self.getValue(self.SNR) * 100 / 65536 elif self.type == self.AGC_PERCENTAGE or self.type == self.AGC_BAR: value = self.getValue(self.AGC) * 100 / 65536 @@ -55,8 +58,13 @@ class TunerInfo(GUIComponent): value = self.getValue(self.BER) elif self.type == self.LOCK_STATE: value = self.getValue(self.LOCK) - - if self.type == self.SNR_PERCENTAGE or self.type == self.AGC_PERCENTAGE: + + if self.type == self.SNR_DB: + if value != 0x12345678: + self.setText("%3.02f dB" % (value / 100.0)) + else: + self.setText("") + elif self.type == self.SNR_PERCENTAGE or self.type == self.AGC_PERCENTAGE: self.setText("%d%%" % (value)) elif self.type == self.BER_VALUE: self.setText("%d" % (value)) @@ -72,7 +80,9 @@ class TunerInfo(GUIComponent): def getValue(self, what): if self.statusDict: - if what == self.SNR: + if what == self.SNR_DB: + return self.statusDict.get("tuner_signal_quality_db", 0x12345678) + elif what == self.SNR: return self.statusDict.get("tuner_signal_quality", 0) elif what == self.AGC: return self.statusDict.get("tuner_signal_power", 0) @@ -85,7 +95,9 @@ class TunerInfo(GUIComponent): if service is not None: feinfo = service.frontendInfo() if feinfo is not None: - if what == self.SNR: + if what == self.SNR_DB: + return feinfo.getFrontendInfo(iFrontendInformation.signalQualitydB) + elif what == self.SNR: return feinfo.getFrontendInfo(iFrontendInformation.signalQuality) elif what == self.AGC: return feinfo.getFrontendInfo(iFrontendInformation.signalPower) @@ -96,7 +108,9 @@ class TunerInfo(GUIComponent): elif self.frontendfkt: frontend = self.frontendfkt() if frontend: - if what == self.SNR: + if what == self.SNR_DB: + return frontend.readFrontendData(iFrontendInformation.signalQualitydB) + elif what == self.SNR: return frontend.readFrontendData(iFrontendInformation.signalQuality) elif what == self.AGC: return frontend.readFrontendData(iFrontendInformation.signalPower) -- cgit v1.2.3 From 75df7af9707fe12227d7a0b5873e9c57c3a6fc6e Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 9 Dec 2008 15:59:56 +0100 Subject: remove unneeded skin (already in skin_default.xml) --- .../Plugins/SystemPlugins/Satfinder/plugin.py | 40 ---------------------- 1 file changed, 40 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Plugins/SystemPlugins/Satfinder/plugin.py b/lib/python/Plugins/SystemPlugins/Satfinder/plugin.py index 74568855..064ac673 100644 --- a/lib/python/Plugins/SystemPlugins/Satfinder/plugin.py +++ b/lib/python/Plugins/SystemPlugins/Satfinder/plugin.py @@ -39,46 +39,6 @@ class Tuner: self.frontend.tune(self.lastparm) class Satfinder(ScanSetup): - skin = """ - - - - - - - - - - SNRdB - - - SNR - - - AGC - - - BER - - - SNR - - - AGC - - - BER - - - LOCK - - - - LOCK - Invert - - """ - def openFrontend(self): res_mgr = eDVBResourceManager.getInstance() if res_mgr: -- cgit v1.2.3 From bb349d44c5c3e963d25f31c085e92407d2c2b0a9 Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 9 Dec 2008 16:00:18 +0100 Subject: also show SNR in dB in PositionerSetup --- .../SystemPlugins/PositionerSetup/plugin.py | 36 ++++++++++------------ 1 file changed, 16 insertions(+), 20 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py b/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py index c8aa2718..928d72a6 100644 --- a/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py +++ b/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py @@ -26,19 +26,20 @@ class PositionerSetup(Screen): - - - - - - + + + + + + + - - + + - - - + + + @@ -78,24 +79,18 @@ class PositionerSetup(Screen): self["yellow"] = self.yellow self.blue = Label("") self["blue"] = self.blue - + self.list = [] self["list"] = ConfigList(self.list) self.createSetup() - - self["snr"] = Label() - self["ber"] = Label() - self["lock"] = Label() + + self["snr_db"] = TunerInfo(TunerInfo.SNR_DB, statusDict = self.frontendStatus) self["snr_percentage"] = TunerInfo(TunerInfo.SNR_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["ber_bar"] = TunerInfo(TunerInfo.BER_BAR, statusDict = self.frontendStatus) self["lock_state"] = TunerInfo(TunerInfo.LOCK_STATE, statusDict = self.frontendStatus) - self["frequency"] = Label() - self["symbolrate"] = Label() - self["fec"] = Label() - self["frequency_value"] = Label("") self["symbolrate_value"] = Label("") self["fec_value"] = Label("") @@ -323,6 +318,7 @@ class PositionerSetup(Screen): def updateStatus(self): if self.frontend: self.frontend.getFrontendStatus(self.frontendStatus) + self["snr_db"].update() self["snr_percentage"].update() self["ber_value"].update() self["snr_bar"].update() -- cgit v1.2.3