mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
neutrino.cpp: add buttons backlight settings
This commit is contained in:
@@ -375,6 +375,9 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
|||||||
g_settings.led_deep_mode = configfile.getInt32( "led_deep_mode", 3);
|
g_settings.led_deep_mode = configfile.getInt32( "led_deep_mode", 3);
|
||||||
g_settings.led_rec_mode = configfile.getInt32( "led_rec_mode", 1);
|
g_settings.led_rec_mode = configfile.getInt32( "led_rec_mode", 1);
|
||||||
g_settings.led_blink = configfile.getInt32( "led_blink", 1);
|
g_settings.led_blink = configfile.getInt32( "led_blink", 1);
|
||||||
|
g_settings.backlight_tv = configfile.getInt32( "backlight_tv", 1);
|
||||||
|
g_settings.backlight_standby = configfile.getInt32( "backlight_standby", 0);
|
||||||
|
g_settings.backlight_deepstandby = configfile.getInt32( "backlight_deepstandby", 0);
|
||||||
|
|
||||||
g_settings.hdd_fs = configfile.getInt32( "hdd_fs", 0);
|
g_settings.hdd_fs = configfile.getInt32( "hdd_fs", 0);
|
||||||
g_settings.hdd_sleep = configfile.getInt32( "hdd_sleep", 120);
|
g_settings.hdd_sleep = configfile.getInt32( "hdd_sleep", 120);
|
||||||
@@ -854,6 +857,9 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
|||||||
configfile.setInt32( "led_deep_mode", g_settings.led_deep_mode);
|
configfile.setInt32( "led_deep_mode", g_settings.led_deep_mode);
|
||||||
configfile.setInt32( "led_rec_mode", g_settings.led_rec_mode);
|
configfile.setInt32( "led_rec_mode", g_settings.led_rec_mode);
|
||||||
configfile.setInt32( "led_blink", g_settings.led_blink);
|
configfile.setInt32( "led_blink", g_settings.led_blink);
|
||||||
|
configfile.setInt32( "backlight_tv", g_settings.backlight_tv);
|
||||||
|
configfile.setInt32( "backlight_standby", g_settings.backlight_standby);
|
||||||
|
configfile.setInt32( "backlight_deepstandby", g_settings.backlight_deepstandby);
|
||||||
|
|
||||||
//misc
|
//misc
|
||||||
configfile.setInt32( "power_standby", g_settings.power_standby);
|
configfile.setInt32( "power_standby", g_settings.power_standby);
|
||||||
@@ -1786,6 +1792,7 @@ TIMER_START();
|
|||||||
CVFD::getInstance()->init(font.filename, font.name);
|
CVFD::getInstance()->init(font.filename, font.name);
|
||||||
CVFD::getInstance()->Clear();
|
CVFD::getInstance()->Clear();
|
||||||
CVFD::getInstance()->ShowText(g_Locale->getText(LOCALE_NEUTRINO_STARTING));
|
CVFD::getInstance()->ShowText(g_Locale->getText(LOCALE_NEUTRINO_STARTING));
|
||||||
|
CVFD::getInstance()->setBacklight(g_settings.backlight_tv);
|
||||||
|
|
||||||
/* set service manager options before starting zapit */
|
/* set service manager options before starting zapit */
|
||||||
CServiceManager::getInstance()->KeepNumbers(g_settings.keep_channel_numbers);
|
CServiceManager::getInstance()->KeepNumbers(g_settings.keep_channel_numbers);
|
||||||
@@ -3230,7 +3237,6 @@ void CNeutrinoApp::standbyMode( bool bOnOff, bool fromDeepStandby )
|
|||||||
if(mode == mode_radio && g_Radiotext)
|
if(mode == mode_radio && g_Radiotext)
|
||||||
g_Radiotext->radiotext_stop();
|
g_Radiotext->radiotext_stop();
|
||||||
|
|
||||||
|
|
||||||
#ifdef ENABLE_PIP
|
#ifdef ENABLE_PIP
|
||||||
g_Zapit->stopPip();
|
g_Zapit->stopPip();
|
||||||
#endif
|
#endif
|
||||||
@@ -3260,6 +3266,7 @@ void CNeutrinoApp::standbyMode( bool bOnOff, bool fromDeepStandby )
|
|||||||
CVFD::getInstance()->Clear();
|
CVFD::getInstance()->Clear();
|
||||||
CVFD::getInstance()->setMode(CVFD::MODE_STANDBY);
|
CVFD::getInstance()->setMode(CVFD::MODE_STANDBY);
|
||||||
}
|
}
|
||||||
|
CVFD::getInstance()->setBacklight(g_settings.backlight_standby);
|
||||||
|
|
||||||
if(g_settings.mode_clock) {
|
if(g_settings.mode_clock) {
|
||||||
InfoClock->StopClock();
|
InfoClock->StopClock();
|
||||||
@@ -3309,6 +3316,8 @@ void CNeutrinoApp::standbyMode( bool bOnOff, bool fromDeepStandby )
|
|||||||
perror(NEUTRINO_LEAVE_STANDBY_SCRIPT " failed");
|
perror(NEUTRINO_LEAVE_STANDBY_SCRIPT " failed");
|
||||||
|
|
||||||
CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO);
|
CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO);
|
||||||
|
CVFD::getInstance()->setBacklight(g_settings.backlight_tv);
|
||||||
|
|
||||||
g_Zapit->setStandby(false);
|
g_Zapit->setStandby(false);
|
||||||
/* the old code did:
|
/* the old code did:
|
||||||
if(was_record) g_Zapit->startPlayBack()
|
if(was_record) g_Zapit->startPlayBack()
|
||||||
@@ -3620,8 +3629,10 @@ void stop_daemons(bool stopall, bool for_flash)
|
|||||||
delete &CMoviePlayerGui::getInstance();
|
delete &CMoviePlayerGui::getInstance();
|
||||||
CZapit::getInstance()->Stop();
|
CZapit::getInstance()->Stop();
|
||||||
printf("zapit shutdown done\n");
|
printf("zapit shutdown done\n");
|
||||||
if (!for_flash)
|
if (!for_flash) {
|
||||||
CVFD::getInstance()->Clear();
|
CVFD::getInstance()->Clear();
|
||||||
|
CVFD::getInstance()->setBacklight(g_settings.backlight_deepstandby);
|
||||||
|
}
|
||||||
if(stopall && !for_flash) {
|
if(stopall && !for_flash) {
|
||||||
if (cpuFreq) {
|
if (cpuFreq) {
|
||||||
cpuFreq->SetCpuFreq(g_settings.cpufreq * 1000 * 1000);
|
cpuFreq->SetCpuFreq(g_settings.cpufreq * 1000 * 1000);
|
||||||
|
@@ -543,6 +543,9 @@ struct SNeutrinoSettings
|
|||||||
int led_deep_mode;
|
int led_deep_mode;
|
||||||
int led_rec_mode;
|
int led_rec_mode;
|
||||||
int led_blink;
|
int led_blink;
|
||||||
|
int backlight_tv;
|
||||||
|
int backlight_standby;
|
||||||
|
int backlight_deepstandby;
|
||||||
#define FILESYSTEM_ENCODING_TO_UTF8(a) (g_settings.filesystem_is_utf8 ? (a) : ZapitTools::Latin1_to_UTF8(a).c_str())
|
#define FILESYSTEM_ENCODING_TO_UTF8(a) (g_settings.filesystem_is_utf8 ? (a) : ZapitTools::Latin1_to_UTF8(a).c_str())
|
||||||
#define UTF8_TO_FILESYSTEM_ENCODING(a) (g_settings.filesystem_is_utf8 ? (a) : ZapitTools::UTF8_to_Latin1(a).c_str())
|
#define UTF8_TO_FILESYSTEM_ENCODING(a) (g_settings.filesystem_is_utf8 ? (a) : ZapitTools::UTF8_to_Latin1(a).c_str())
|
||||||
#define FILESYSTEM_ENCODING_TO_UTF8_STRING(a) (g_settings.filesystem_is_utf8 ? (a) : ZapitTools::Latin1_to_UTF8(a))
|
#define FILESYSTEM_ENCODING_TO_UTF8_STRING(a) (g_settings.filesystem_is_utf8 ? (a) : ZapitTools::Latin1_to_UTF8(a))
|
||||||
|
Reference in New Issue
Block a user