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);
50 config.lcd.contrast = ConfigSlider(default=5, limits=(0, 20))
51 config.lcd.contrast.addNotifier(setLCDcontrast);
53 config.lcd.contrast = ConfigNothing()
56 config.lcd.standby = ConfigSlider(default=standby_default, limits=(0, 10))
57 config.lcd.standby.addNotifier(setLCDbright);
58 config.lcd.standby.apply = lambda : setLCDbright(config.lcd.standby)
60 config.lcd.bright = ConfigSlider(default=5, limits=(0, 10))
61 config.lcd.bright.addNotifier(setLCDbright);
62 config.lcd.bright.apply = lambda : setLCDbright(config.lcd.bright)
63 config.lcd.bright.callNotifiersOnSaveAndCancel = True
65 config.lcd.invert = ConfigYesNo(default=False)
66 config.lcd.invert.addNotifier(setLCDinverted);
70 config.lcd.contrast = ConfigNothing()
71 config.lcd.bright = ConfigNothing()
72 config.lcd.standby = ConfigNothing()
73 config.lcd.bright.apply = lambda : doNothing()
74 config.lcd.standby.apply = lambda : doNothing()