diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2009-05-25 01:37:44 +0200 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2009-05-25 01:37:44 +0200 |
| commit | 28a0e997d1d28a6d057ede5e8de70f26ceed0e8e (patch) | |
| tree | 6a0a85ea0d2b8251a38f06da1c39217eaa16d055 /lib/python/Components/SystemInfo.py | |
| parent | c5bb99fa2019da12a8fbaa1766189af520b9e79a (diff) | |
| download | enigma2-28a0e997d1d28a6d057ede5e8de70f26ceed0e8e.tar.gz enigma2-28a0e997d1d28a6d057ede5e8de70f26ceed0e8e.zip | |
Fix frontpanel support for DM8000,
modified behaviour on hardware with single frontpanel led (disabled in standby)
Diffstat (limited to 'lib/python/Components/SystemInfo.py')
| -rw-r--r-- | lib/python/Components/SystemInfo.py | 17 |
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") |
