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):
22 eDBoxLCD.getInstance().setInverted(value)
26 config.lcd = ConfigSubsection();
27 config.lcd.bright = configElement("config.lcd.bright", ConfigSlider, 10, "");
28 config.lcd.contrast = configElement("config.lcd.contrast", ConfigSlider, 10, "");
29 config.lcd.standby = configElement("config.lcd.standby", ConfigSlider, 1, "");
30 config.lcd.invert = configElement("config.lcd.invert", configSelection, 0, ("Disable", "Enable") );
34 def setLCDbright(configElement):
35 ilcd.setBright(configElement.value);
37 def setLCDcontrast(configElement):
38 ilcd.setContrast(configElement.value);
40 def setLCDinverted(configElement):
41 ilcd.setInverted(configElement.value);
43 config.lcd.bright.addNotifier(setLCDbright);
44 config.lcd.contrast.addNotifier(setLCDcontrast);
45 config.lcd.invert.addNotifier(setLCDinverted);