1 from config import config, ConfigSubsection, ConfigSlider, ConfigYesNo, ConfigNothing
3 from enigma import eDBoxLCD
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()
33 def setLCDbright(configElement):
34 ilcd.setBright(configElement.value);
36 def setLCDcontrast(configElement):
37 ilcd.setContrast(configElement.value);
39 def setLCDinverted(configElement):
40 ilcd.setInverted(configElement.value);
44 config.lcd = ConfigSubsection();
46 config.lcd.bright = ConfigSlider(default=10, limits=(0, 10))
47 config.lcd.bright.addNotifier(setLCDbright);
48 config.lcd.bright.apply = lambda : setLCDbright(config.lcd.bright)
51 config.lcd.contrast = ConfigSlider(default=5, limits=(0, 20))
52 config.lcd.contrast.addNotifier(setLCDcontrast);
54 config.lcd.contrast = ConfigNothing()
56 config.lcd.standby = ConfigSlider(default=0, limits=(0, 10))
57 config.lcd.standby.apply = lambda : setLCDbright(config.lcd.standby)
59 config.lcd.invert = ConfigYesNo(default=False)
60 config.lcd.invert.addNotifier(setLCDinverted);