aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/SystemInfo.py
diff options
context:
space:
mode:
authorFraxinas <andreas.frisch@multimedia-labs.de>2009-05-27 11:36:01 +0200
committerFraxinas <andreas.frisch@multimedia-labs.de>2009-05-27 11:36:01 +0200
commit51e789a04f758941668b095fd8b051db2ce58281 (patch)
tree2880f280e7f1006f7df12508e3b871c54442d304 /lib/python/Components/SystemInfo.py
parent8e60bdc64c73787b8e7955a6a99ad5afe4a071ef (diff)
parent26a9b45a2a0e746739b8fa2ef339dbd716257a0c (diff)
downloadenigma2-51e789a04f758941668b095fd8b051db2ce58281.tar.gz
enigma2-51e789a04f758941668b095fd8b051db2ce58281.zip
Merge branch 'master' of fraxinas@git.opendreambox.org:/git/enigma2
Diffstat (limited to 'lib/python/Components/SystemInfo.py')
-rw-r--r--lib/python/Components/SystemInfo.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/python/Components/SystemInfo.py b/lib/python/Components/SystemInfo.py
index d074c414..d2b405a2 100644
--- a/lib/python/Components/SystemInfo.py
+++ b/lib/python/Components/SystemInfo.py
@@ -1,10 +1,10 @@
from enigma import eDVBResourceManager
+from Tools.Directories import fileExists
SystemInfo = { }
#FIXMEE...
def getNumVideoDecoders():
- from Tools.Directories import fileExists
idx = 0
while fileExists("/dev/dvb/adapter0/video%d"%(idx), 'f'):
idx += 1
@@ -12,3 +12,18 @@ def getNumVideoDecoders():
SystemInfo["NumVideoDecoders"] = getNumVideoDecoders()
SystemInfo["CanMeasureFrontendInputPower"] = eDVBResourceManager.getInstance().canMeasureFrontendInputPower()
+
+
+def countFrontpanelLEDs():
+ leds = 0
+ if fileExists("/proc/stb/fp/led_set_pattern"):
+ leds += 1
+
+ while fileExists("/proc/stb/fp/led%d_pattern" % leds):
+ leds += 1
+
+ return leds
+
+SystemInfo["NumFrontpanelLEDs"] = countFrontpanelLEDs()
+SystemInfo["FrontpanelDisplay"] = fileExists("/dev/dbox/oled0") or fileExists("/dev/dbox/lcd0")
+SystemInfo["FrontpanelDisplayGrayscale"] = fileExists("/dev/dbox/oled0")