X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/6f461023bf90fd89dd96a8463b5cdeb2f3fd0feb..0cc396a9dd3478a71b7a0bff4f5a6fdfbc52f22d:/lib/python/Components/SystemInfo.py diff --git a/lib/python/Components/SystemInfo.py b/lib/python/Components/SystemInfo.py index 844c9544..f9c4065f 100644 --- a/lib/python/Components/SystemInfo.py +++ b/lib/python/Components/SystemInfo.py @@ -1,11 +1,31 @@ +from enigma import eDVBResourceManager +from Tools.Directories import fileExists +from Tools.HardwareInfo import HardwareInfo + 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") +SystemInfo["DeepstandbySupport"] = HardwareInfo().get_device_name() != "dm800"