git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Components/Lcd.py: use 1 instead of 0 for Oled standby default value (with new driver...
[enigma2.git]
/
lib
/
python
/
Components
/
Lcd.py
diff --git
a/lib/python/Components/Lcd.py
b/lib/python/Components/Lcd.py
index 5709769234b5a49002c3848fbb5760f67c26759a..7d27c097ee9fd2c98a68c977a7711253f25d82be 100644
(file)
--- a/
lib/python/Components/Lcd.py
+++ b/
lib/python/Components/Lcd.py
@@
-31,6
+31,7
@@
class LCD:
def InitLcd():
detected = eDBoxLCD.getInstance().detected()
SystemInfo["Display"] = detected
def InitLcd():
detected = eDBoxLCD.getInstance().detected()
SystemInfo["Display"] = detected
+ config.lcd = ConfigSubsection();
if detected:
def setLCDbright(configElement):
ilcd.setBright(configElement.value);
if detected:
def setLCDbright(configElement):
ilcd.setBright(configElement.value);
@@
-41,25
+42,33
@@
def InitLcd():
def setLCDinverted(configElement):
ilcd.setInverted(configElement.value);
def setLCDinverted(configElement):
ilcd.setInverted(configElement.value);
- ilcd = LCD()
-
- config.lcd = ConfigSubsection();
+ standby_default = 0
- config.lcd.bright = ConfigSlider(default=10, limits=(0, 10))
- config.lcd.bright.addNotifier(setLCDbright);
- config.lcd.bright.apply = lambda : setLCDbright(config.lcd.bright)
+ ilcd = LCD()
if not ilcd.isOled():
config.lcd.contrast = ConfigSlider(default=5, limits=(0, 20))
config.lcd.contrast.addNotifier(setLCDcontrast);
else:
config.lcd.contrast = ConfigNothing()
if not ilcd.isOled():
config.lcd.contrast = ConfigSlider(default=5, limits=(0, 20))
config.lcd.contrast.addNotifier(setLCDcontrast);
else:
config.lcd.contrast = ConfigNothing()
+ standby_default = 1
- config.lcd.standby = ConfigSlider(default=0, limits=(0, 10))
+ config.lcd.standby = ConfigSlider(default=standby_default, limits=(0, 10))
+ config.lcd.standby.addNotifier(setLCDbright);
config.lcd.standby.apply = lambda : setLCDbright(config.lcd.standby)
config.lcd.standby.apply = lambda : setLCDbright(config.lcd.standby)
+ config.lcd.bright = ConfigSlider(default=5, limits=(0, 10))
+ config.lcd.bright.addNotifier(setLCDbright);
+ config.lcd.bright.apply = lambda : setLCDbright(config.lcd.bright)
+ config.lcd.bright.callNotifiersOnSaveAndCancel = True
+
config.lcd.invert = ConfigYesNo(default=False)
config.lcd.invert.addNotifier(setLCDinverted);
else:
config.lcd.invert = ConfigYesNo(default=False)
config.lcd.invert.addNotifier(setLCDinverted);
else:
- config.lcd.bright.apply = lambda : pass
- config.lcd.standby.apply = lambda : pass
+ def doNothing():
+ pass
+ config.lcd.contrast = ConfigNothing()
+ config.lcd.bright = ConfigNothing()
+ config.lcd.standby = ConfigNothing()
+ config.lcd.bright.apply = lambda : doNothing()
+ config.lcd.standby.apply = lambda : doNothing()