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(value)
27 config.lcd = ConfigSubsection();
28 config.lcd.bright = configElement("config.lcd.bright", configSlider, 10, (1, 10))
29 config.lcd.contrast = configElement("config.lcd.contrast", configSlider, 10, (1, 10))
30 config.lcd.standby = configElement("config.lcd.standby", configSlider, 0, (1,10))
31 config.lcd.invert = configElement("config.lcd.invert", configSelection, 0, (("disable", _("Disable")), ("enable", _("Enable"))))
35 def setLCDbright(configElement):
36 ilcd.setBright(configElement.value);
38 def setLCDcontrast(configElement):
39 ilcd.setContrast(configElement.value);
41 def setLCDinverted(configElement):
42 ilcd.setInverted(configElement.value);
44 config.lcd.bright.addNotifier(setLCDbright);
45 config.lcd.contrast.addNotifier(setLCDcontrast);
46 config.lcd.invert.addNotifier(setLCDinverted);