X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fpython%2FComponents%2FSystemInfo.py;h=f9c4065fa951e2f5d2d595b52bc0775b2b896843;hp=a3b83fd99f3d8181a4687933c2f5041568916d59;hb=db34d7e342d82f9767045de76b791fee2357bbc4;hpb=19308fde806b13a2fbfbe10aaadbaa4a46d35185 diff --git a/lib/python/Components/SystemInfo.py b/lib/python/Components/SystemInfo.py index a3b83fd..f9c4065 100644 --- a/lib/python/Components/SystemInfo.py +++ b/lib/python/Components/SystemInfo.py @@ -1 +1,31 @@ -SystemInfo = { } \ No newline at end of file +from enigma import eDVBResourceManager +from Tools.Directories import fileExists +from Tools.HardwareInfo import HardwareInfo + +SystemInfo = { } + +#FIXMEE... +def getNumVideoDecoders(): + idx = 0 + 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") +SystemInfo["DeepstandbySupport"] = HardwareInfo().get_device_name() != "dm800"