X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/dc739ce501302d5fb1df5e7b4999525318c67e71..15171632716c0734526eefc55e3d0601be177b45:/lib/python/Screens/ServiceInfo.py diff --git a/lib/python/Screens/ServiceInfo.py b/lib/python/Screens/ServiceInfo.py index 7bd8aa98..4606f883 100644 --- a/lib/python/Screens/ServiceInfo.py +++ b/lib/python/Screens/ServiceInfo.py @@ -14,6 +14,9 @@ TYPE_VALUE_DEC = 2 TYPE_VALUE_HEX_DEC = 3 TYPE_SLIDER = 4 +def to_unsigned(x): + return x & 0xFFFFFFFF + def ServiceInfoListEntry(a, b, valueType=TYPE_TEXT, param=4): res = [ ] @@ -23,11 +26,11 @@ def ServiceInfoListEntry(a, b, valueType=TYPE_TEXT, param=4): print "b:", b if type(b) is not str: if valueType == TYPE_VALUE_HEX: - b = ("0x%0" + str(param) + "x") % b + b = ("0x%0" + str(param) + "x") % to_unsigned(b) elif valueType == TYPE_VALUE_DEC: b = str(b) elif valueType == TYPE_VALUE_HEX_DEC: - b = ("0x%0" + str(param) + "x (%dd)") % (b, b) + b = ("0x%0" + str(param) + "x (%dd)") % (to_unsigned(b), b) else: b = str(b) @@ -129,16 +132,17 @@ class ServiceInfo(Screen): else: if self.transponder_info: conv = { "type" : _("Transponder Type"), + "system" : _("System"), + "modulation" : _("Modulation"), + "orbital position" : _("Orbital Position"), "frequency" : _("Frequency"), "symbolrate" : _("Symbolrate"), - "orbital position" : _("Orbital Position"), - "inversion" : _("Inversion"), - "fec inner" : _("FEC"), - "modulation" : _("Modulation"), + "bandwidth" : _("Bandwidth"), "polarization" : _("Polarization"), + "inversion" : _("Inversion"), + "pilot" : _("Pilot"), "roll off" : _("Rolloff"), - "system" : _("System"), - "bandwidth" : _("Bandwidth"), + "fec inner" : _("FEC"), "code rate lp" : _("Coderate LP"), "code rate hp" : _("Coderate HP"), "constellation" : _("Constellation"), @@ -187,7 +191,9 @@ class ServiceInfo(Screen): ("Symbolrate", frontendData["symbol_rate"], TYPE_VALUE_DEC), ("Polarization", frontendData["polarization"], TYPE_TEXT), ("Inversion", frontendData["inversion"], TYPE_TEXT), - ("FEC inner", frontendData["fec_inner"], TYPE_TEXT)) + ("FEC inner", frontendData["fec_inner"], TYPE_TEXT), + ("Pilot", frontendData.get("pilot", None), TYPE_TEXT), + ("Rolloff", frontendData.get("rolloff", None), TYPE_TEXT)) elif frontendData["tuner_type"] == "DVB-C": return (("NIM", ['A', 'B', 'C', 'D'][frontendData["tuner_number"]], TYPE_TEXT), ("Type", frontendData["tuner_type"], TYPE_TEXT), @@ -214,6 +220,8 @@ class ServiceInfo(Screen): tlist = [ ] for item in Labels: + if item[1] is None: + continue; value = item[1] if len(item) < 4: tlist.append(ServiceInfoListEntry(item[0]+":", value, item[2]))