X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fpython%2FComponents%2FSystemInfo.py;h=d66437eb88a4ae2486c4c2eb125ebd6161d62d3d;hp=844c9544a1fae4965bb6f31db8821ae2247a89a5;hb=0fee8bdaa26f854460b63475c91f1f2cf762594b;hpb=6f461023bf90fd89dd96a8463b5cdeb2f3fd0feb diff --git a/lib/python/Components/SystemInfo.py b/lib/python/Components/SystemInfo.py old mode 100644 new mode 100755 index 844c954..d66437e --- a/lib/python/Components/SystemInfo.py +++ b/lib/python/Components/SystemInfo.py @@ -1,11 +1,46 @@ +from enigma import eDVBResourceManager, eDVBCIInterfaces +from Tools.Directories import fileExists, fileCheck +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" +SystemInfo["HdmiInSupport"] = HardwareInfo().get_vu_device_name() in ("ultimo4k", "uno4kse", "duo4k") +SystemInfo["WOWLSupport"] = HardwareInfo().get_vu_device_name() in ("ultimo4k", "duo4k") +SystemInfo["ScrambledPlayback"] = "PVR" in open("/proc/stb/tsmux/ci0_input_choices").read() +SystemInfo["FastChannelChange"] = fileExists("/proc/stb/frontend/fbc/fcc") +SystemInfo["MiniTV"] = fileExists("/proc/stb/lcd/live_enable") +SystemInfo["DisableUsbRecord"] = HardwareInfo().get_vu_device_name() in ("solo4k", "uno4kse", "zero4k", "duo4k") +SystemInfo["DefaultAniSpeed"] = HardwareInfo().get_vu_device_name() in ("uno4k", "uno4kse", "zero4k", "duo4k") and 25 or 20 +SystemInfo["DefaultFullHDSkin"] = HardwareInfo().get_vu_device_name() in ("solo4k", "ultimo4k", "uno4k", "uno4kse", "zero4k", "duo4k") +SystemInfo["PVRSupport"] = HardwareInfo().get_vu_device_name() not in ["solose", "zero", "uno4k"] + +SystemInfo["CommonInterface"] = eDVBCIInterfaces.getInstance().getNumOfSlots() +SystemInfo["CommonInterfaceCIDelay"] = fileCheck("/proc/stb/tsmux/rmx_delay") +for cislot in range (0, SystemInfo["CommonInterface"]): + SystemInfo["CI%dSupportsHighBitrates" % cislot] = fileCheck("/proc/stb/tsmux/ci%d_tsclk" % cislot) + SystemInfo["CI%dRelevantPidsRoutingSupport" % cislot] = fileCheck("/proc/stb/tsmux/ci%d_relevant_pids_routing" % cislot)