diff options
| author | Fraxinas <andreas.frisch@multimedia-labs.de> | 2009-05-27 11:36:01 +0200 |
|---|---|---|
| committer | Fraxinas <andreas.frisch@multimedia-labs.de> | 2009-05-27 11:36:01 +0200 |
| commit | 51e789a04f758941668b095fd8b051db2ce58281 (patch) | |
| tree | 2880f280e7f1006f7df12508e3b871c54442d304 /lib/python/Screens | |
| parent | 8e60bdc64c73787b8e7955a6a99ad5afe4a071ef (diff) | |
| parent | 26a9b45a2a0e746739b8fa2ef339dbd716257a0c (diff) | |
| download | enigma2-51e789a04f758941668b095fd8b051db2ce58281.tar.gz enigma2-51e789a04f758941668b095fd8b051db2ce58281.zip | |
Merge branch 'master' of fraxinas@git.opendreambox.org:/git/enigma2
Diffstat (limited to 'lib/python/Screens')
| -rw-r--r-- | lib/python/Screens/SessionGlobals.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/python/Screens/SessionGlobals.py b/lib/python/Screens/SessionGlobals.py index f2d56154..18d71d39 100644 --- a/lib/python/Screens/SessionGlobals.py +++ b/lib/python/Screens/SessionGlobals.py @@ -22,6 +22,9 @@ class SessionGlobals(Screen): self["TunerInfo"] = TunerInfo() self["RecordState"] = RecordState(session) self["Standby"] = Boolean(fixed = False) + + from Components.SystemInfo import SystemInfo + combine = Combine(func = lambda s: {(False, False): 0, (False, True): 1, (True, False): 2, (True, True): 3}[(s[0].boolean, s[1].boolean)]) combine.connect(self["Standby"]) combine.connect(self["RecordState"]) @@ -33,9 +36,14 @@ class SessionGlobals(Screen): # false true on off off # true true blnk off blnk - PATTERN_ON = (20, 0xffffffff, 0) - PATTERN_OFF = (20, 0, 0xffffffff) + PATTERN_ON = (20, 0xffffffff, 0xffffffff) + PATTERN_OFF = (20, 0, 0) PATTERN_BLINK = (20, 0x55555555, 0x84fc8c04) - FrontpanelLed(which = 0, boolean = False, patterns = [PATTERN_OFF, PATTERN_BLINK, PATTERN_ON, PATTERN_BLINK]).connect(combine) - FrontpanelLed(which = 1, boolean = False, patterns = [PATTERN_ON, PATTERN_ON, PATTERN_OFF, PATTERN_OFF]).connect(combine) + nr_leds = SystemInfo.get("NumFrontpanelLEDs", 0) + + if nr_leds == 1: + FrontpanelLed(which = 0, boolean = False, patterns = [PATTERN_OFF, PATTERN_BLINK, PATTERN_OFF, PATTERN_BLINK]).connect(combine) + elif nr_leds == 2: + FrontpanelLed(which = 0, boolean = False, patterns = [PATTERN_OFF, PATTERN_BLINK, PATTERN_ON, PATTERN_BLINK]).connect(combine) + FrontpanelLed(which = 1, boolean = False, patterns = [PATTERN_ON, PATTERN_ON, PATTERN_OFF, PATTERN_OFF]).connect(combine) |
