simple_display: more readability in togglePower() function

Origin commit data
------------------
Branch: ni/coolstream
Commit: 53f1790261
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-11-01 (Wed, 01 Nov 2017)

Origin message was:
------------------
- simple_display: more readability in togglePower() function

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2017-11-01 13:00:33 +01:00
parent 2ca464d81b
commit 19ebded30d

View File

@@ -642,10 +642,17 @@ void CLCD::togglePower(void)
Clear();
else
showTime(true);
if (g_info.hw_caps->display_type == HW_DISPLAY_LINE_TEXT) {
if (g_info.hw_caps->display_type == HW_DISPLAY_LINE_TEXT)
{
last_toggle_state_power = 1 - last_toggle_state_power;
setlcdparameter((mode == MODE_STANDBY) ? g_settings.lcd_setting[SNeutrinoSettings::LCD_STANDBY_BRIGHTNESS] : (mode == MODE_SHUTDOWN) ? g_settings.lcd_setting[SNeutrinoSettings::LCD_DEEPSTANDBY_BRIGHTNESS] : g_settings.lcd_setting[SNeutrinoSettings::LCD_BRIGHTNESS],
last_toggle_state_power);
if (mode == MODE_STANDBY)
setlcdparameter(g_settings.lcd_setting[SNeutrinoSettings::LCD_STANDBY_BRIGHTNESS], last_toggle_state_power);
else if (mode == MODE_SHUTDOWN)
setlcdparameter(g_settings.lcd_setting[SNeutrinoSettings::LCD_DEEPSTANDBY_BRIGHTNESS], last_toggle_state_power);
else
setlcdparameter(g_settings.lcd_setting[SNeutrinoSettings::LCD_BRIGHTNESS], last_toggle_state_power);
}
}