diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2008-01-27 21:15:12 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2008-01-27 21:15:12 +0000 |
| commit | 852a85d2b60b06bfcc505c08492a015db331cfe9 (patch) | |
| tree | 2037e8cc93f2d9d9c77234e7e4eb3a4730b2fc0c /lib/python/Screens | |
| parent | cdda2f82a6097a8459767fe827796b86f6b02d70 (diff) | |
| download | enigma2-852a85d2b60b06bfcc505c08492a015db331cfe9.tar.gz enigma2-852a85d2b60b06bfcc505c08492a015db331cfe9.zip | |
display hex values unsigned
Diffstat (limited to 'lib/python/Screens')
| -rw-r--r-- | lib/python/Screens/ServiceInfo.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/python/Screens/ServiceInfo.py b/lib/python/Screens/ServiceInfo.py index 7bd8aa98..00adc74d 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_unsinged(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) |
