1 from config import config #global config instance
2 from config import ConfigSlider
3 from config import configSelection
4 from config import ConfigSubsection
5 from config import configElement
13 def setBright(self, value):
14 eDBoxLCD.getInstance().setLCDBrightness(value * 20)
17 def setContrast(self, value):
18 eDBoxLCD.getInstance().setLCDContrast(value)
21 def setInverted(self, value):
24 eDBoxLCD.getInstance().setInverted(1 - value)
28 config.lcd = ConfigSubsection();
29 config.lcd.bright = configElement("config.lcd.bright", ConfigSlider, 10, "")
30 config.lcd.contrast = configElement("config.lcd.contrast", ConfigSlider, 10, "")
31 config.lcd.standby = configElement("config.lcd.standby", ConfigSlider, 0, "")
32 config.lcd.invert = configElement("config.lcd.invert", configSelection, 0, (("enable", _("Enable")), ("disable", _("Disable"))))
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);
45 config.lcd.bright.addNotifier(setLCDbright);
46 config.lcd.contrast.addNotifier(setLCDcontrast);
47 config.lcd.invert.addNotifier(setLCDinverted);