X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fpython%2FComponents%2FSystemInfo.py;h=d2b405a287734b81539589445d20eaea7fbbe587;hb=13c4d4b662a1ff4b2545ccc125b61c47ee4c38a3;hp=f33a8552991fd2eed842ca7c7fa4d590556e54be;hpb=9f9398866adac30930d3d485e03d7810309461a9;p=vuplus_dvbapp diff --git a/lib/python/Components/SystemInfo.py b/lib/python/Components/SystemInfo.py index f33a855..d2b405a 100644 --- a/lib/python/Components/SystemInfo.py +++ b/lib/python/Components/SystemInfo.py @@ -1,10 +1,29 @@ +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), 'w'): + while fileExists("/dev/dvb/adapter0/video%d"%(idx), 'f'): idx += 1 + return idx 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")