1 from config import config, ConfigSubsection, ConfigSlider, ConfigYesNo, ConfigNothing
2 from enigma import eDBoxLCD
3 from Components.SystemInfo import SystemInfo
9 def setBright(self, value):
14 eDBoxLCD.getInstance().setLCDBrightness(value)
16 def setContrast(self, value):
21 eDBoxLCD.getInstance().setLCDContrast(value)
23 def setInverted(self, value):
26 eDBoxLCD.getInstance().setInverted(value)
29 return eDBoxLCD.getInstance().isOled()
32 detected = eDBoxLCD.getInstance().detected()
33 SystemInfo["Display"] = detected
34 config.lcd = ConfigSubsection();
36 def setLCDbright(configElement):
37 ilcd.setBright(configElement.value);
39 def setLCDcontrast(configElement):
40 ilcd.setContrast(configElement.value);
42 def setLCDinverted(configElement):
43 ilcd.setInverted(configElement.value);
47 config.lcd.bright = ConfigSlider(default=10, limits=(0, 10))
48 config.lcd.bright.addNotifier(setLCDbright);
49 config.lcd.bright.apply = lambda : setLCDbright(config.lcd.bright)
52 config.lcd.contrast = ConfigSlider(default=5, limits=(0, 20))
53 config.lcd.contrast.addNotifier(setLCDcontrast);
55 config.lcd.contrast = ConfigNothing()
57 config.lcd.standby = ConfigSlider(default=0, limits=(0, 10))
58 config.lcd.standby.apply = lambda : setLCDbright(config.lcd.standby)
60 config.lcd.invert = ConfigYesNo(default=False)
61 config.lcd.invert.addNotifier(setLCDinverted);
65 config.lcd.contrast = ConfigNothing()
66 config.lcd.bright = ConfigNothing()
67 config.lcd.standby = ConfigNothing()
68 config.lcd.bright.apply = lambda : doNothing()
69 config.lcd.standby.apply = lambda : doNothing()