X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/c7a7c847e336cc9d46fe8b4b52f21ced036a8c4f..29595f9e351b8d7b4f77b0a9885209d45929d2b1:/lib/python/Components/TunerInfo.py diff --git a/lib/python/Components/TunerInfo.py b/lib/python/Components/TunerInfo.py index f841832c..490b9bef 100644 --- a/lib/python/Components/TunerInfo.py +++ b/lib/python/Components/TunerInfo.py @@ -1,6 +1,6 @@ from GUIComponent import GUIComponent -from enigma import eLabel, eSlider, iFrontendStatusInformation +from enigma import eLabel, eSlider, iFrontendInformation from math import log @@ -74,27 +74,27 @@ class TunerInfo(GUIComponent): if self.servicefkt is not None: service = self.servicefkt() if service is not None: - feinfo = service.frontendStatusInfo() + feinfo = service.frontendInfo() if feinfo is not None: if what == self.SNR: - return feinfo.getFrontendInfo(iFrontendStatusInformation.signalPower) + return feinfo.getFrontendInfo(iFrontendInformation.signalPower) elif what == self.AGC: - return feinfo.getFrontendInfo(iFrontendStatusInformation.signalQuality) + return feinfo.getFrontendInfo(iFrontendInformation.signalQuality) elif what == self.BER: - return feinfo.getFrontendInfo(iFrontendStatusInformation.bitErrorRate) + return feinfo.getFrontendInfo(iFrontendInformation.bitErrorRate) elif what == self.LOCK: - return feinfo.getFrontendInfo(iFrontendStatusInformation.LockState) + return feinfo.getFrontendInfo(iFrontendInformation.lockState) elif self.frontendfkt is not None: frontend = self.frontendfkt() - if what == self.SNR: - return frontend.readFrontendData(iFrontendStatusInformation.signalPower) - elif what == self.AGC: - return frontend.readFrontendData(iFrontendStatusInformation.signalQuality) - elif what == self.BER: - return frontend.readFrontendData(iFrontendStatusInformation.bitErrorRate) - elif what == self.LOCK: - return frontend.readFrontendData(iFrontendStatusInformation.LockState) - + if frontend: + if what == self.SNR: + return frontend.readFrontendData(iFrontendInformation.signalPower) + elif what == self.AGC: + return frontend.readFrontendData(iFrontendInformation.signalQuality) + elif what == self.BER: + return frontend.readFrontendData(iFrontendInformation.bitErrorRate) + elif what == self.LOCK: + return frontend.readFrontendData(iFrontendInformation.lockState) return 0 def createWidget(self, parent): @@ -105,16 +105,8 @@ class TunerInfo(GUIComponent): self.g.setRange(0, 100) return self.g - def GUIcreate(self, parent): - self.instance = self.createWidget(parent) + def postWidgetCreate(self, instance): if self.message is not None: - self.instance.setText(self.message) + instance.setText(self.message) elif self.value is not None: - self.instance.setValue(self.value) - - def GUIdelete(self): - self.removeWidget(self.instance) - self.instance = None - - def removeWidget(self, instance): - pass \ No newline at end of file + instance.setValue(self.value)