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 config.lcd.bright.apply()
34 def standbyCounterChanged(configElement):
35 from Screens.Standby import inStandby
36 inStandby.onClose.append(leaveStandby)
37 config.lcd.standby.apply()
40 detected = eDBoxLCD.getInstance().detected()
41 SystemInfo["Display"] = detected
42 config.lcd = ConfigSubsection();
44 def setLCDbright(configElement):
45 ilcd.setBright(configElement.value);
47 def setLCDcontrast(configElement):
48 ilcd.setContrast(configElement.value);
50 def setLCDinverted(configElement):
51 ilcd.setInverted(configElement.value);
58 config.lcd.contrast = ConfigSlider(default=5, limits=(0, 20))
59 config.lcd.contrast.addNotifier(setLCDcontrast);
61 config.lcd.contrast = ConfigNothing()
64 config.lcd.standby = ConfigSlider(default=standby_default, limits=(0, 10))
65 config.lcd.standby.addNotifier(setLCDbright);
66 config.lcd.standby.apply = lambda : setLCDbright(config.lcd.standby)
68 config.lcd.bright = ConfigSlider(default=5, limits=(0, 10))
69 config.lcd.bright.addNotifier(setLCDbright);
70 config.lcd.bright.apply = lambda : setLCDbright(config.lcd.bright)
71 config.lcd.bright.callNotifiersOnSaveAndCancel = True
73 config.lcd.invert = ConfigYesNo(default=False)
74 config.lcd.invert.addNotifier(setLCDinverted);
78 config.lcd.contrast = ConfigNothing()
79 config.lcd.bright = ConfigNothing()
80 config.lcd.standby = ConfigNothing()
81 config.lcd.bright.apply = lambda : doNothing()
82 config.lcd.standby.apply = lambda : doNothing()
84 config.misc.standbyCounter.addNotifier(standbyCounterChanged, initial_call = False)