-add deepStandby brightness menu for neo

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@724 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
satbaby
2010-08-17 16:36:21 +00:00
parent e0403071de
commit 6a549a7290
11 changed files with 95 additions and 27 deletions

View File

@@ -161,7 +161,7 @@ void CVFD::setlcdparameter(void)
{
if(!has_lcd) return;
last_toggle_state_power = g_settings.lcd_setting[SNeutrinoSettings::LCD_POWER];
setlcdparameter((mode == MODE_STANDBY) ? g_settings.lcd_setting[SNeutrinoSettings::LCD_STANDBY_BRIGHTNESS] : g_settings.lcd_setting[SNeutrinoSettings::LCD_BRIGHTNESS],
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);
}
@@ -480,6 +480,22 @@ int CVFD::getBrightnessStandby()
return g_settings.lcd_setting[SNeutrinoSettings::LCD_STANDBY_BRIGHTNESS];
}
void CVFD::setBrightnessDeepStandby(int bright)
{
if(!has_lcd) return;
g_settings.lcd_setting[SNeutrinoSettings::LCD_DEEPSTANDBY_BRIGHTNESS] = bright;
setlcdparameter();
}
int CVFD::getBrightnessDeepStandby()
{
//FIXME for old neutrino.conf
if(g_settings.lcd_setting[SNeutrinoSettings::LCD_DEEPSTANDBY_BRIGHTNESS] > 15)
g_settings.lcd_setting[SNeutrinoSettings::LCD_DEEPSTANDBY_BRIGHTNESS] = 15;
return g_settings.lcd_setting[SNeutrinoSettings::LCD_DEEPSTANDBY_BRIGHTNESS];
}
void CVFD::setPower(int /*power*/)
{
if(!has_lcd) return;
@@ -498,7 +514,7 @@ void CVFD::togglePower(void)
if(!has_lcd) return;
last_toggle_state_power = 1 - last_toggle_state_power;
setlcdparameter((mode == MODE_STANDBY) ? g_settings.lcd_setting[SNeutrinoSettings::LCD_STANDBY_BRIGHTNESS] : g_settings.lcd_setting[SNeutrinoSettings::LCD_BRIGHTNESS],
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);
}