-add led on/off menu

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@725 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
satbaby
2010-08-18 16:37:00 +00:00
parent 6a549a7290
commit d88dece038
11 changed files with 81 additions and 4 deletions

View File

@@ -493,6 +493,9 @@ typedef enum {
LOCALE_LCDMENU_STATUSLINE_BOTH,
LOCALE_LCDMENU_STATUSLINE_PLAYTIME,
LOCALE_LCDMENU_STATUSLINE_VOLUME,
LOCALE_LEDCONTROLER_MODE_TV,
LOCALE_LEDCONTROLER_MODE_DEEPSTANDBY,
LOCALE_LEDCONTROLER_MODE_STANDBY,
LOCALE_MAINMENU_AUDIOPLAYER,
LOCALE_MAINMENU_CLEARSECTIONSD,
LOCALE_MAINMENU_GAMES,

View File

@@ -493,6 +493,9 @@ const char *locale_real_names[] = {
"lcdmenu.statusline.both",
"lcdmenu.statusline.playtime",
"lcdmenu.statusline.volume",
"ledcontroler.mode.tv",
"ledcontroler.mode.deepstandby",
"ledcontroler.mode.standby",
"mainmenu.audioplayer",
"mainmenu.clearsectionsd",
"mainmenu.games",

View File

@@ -961,6 +961,11 @@ int CDataResetNotifier::exec(CMenuTarget* /*parent*/, const std::string& actionK
}
return true;
}
bool CLedControlNotifier::changeNotify(const neutrino_locale_t, void * data)
{
CVFD::getInstance()->setled();
return true;
}
bool CFanControlNotifier::changeNotify(const neutrino_locale_t, void * data)
{
@@ -983,9 +988,9 @@ bool CFanControlNotifier::changeNotify(const neutrino_locale_t, void * data)
return true;
}
extern cCpuFreqManager * cpuFreq;
bool CCpuFreqNotifier::changeNotify(const neutrino_locale_t, void * data)
{
extern cCpuFreqManager * cpuFreq;
int freq = * (int *) data;
printf("CCpuFreqNotifier: %d Mhz\n", freq);

View File

@@ -294,6 +294,12 @@ public:
int exec(CMenuTarget* parent, const std::string& actionKey);
};
class CLedControlNotifier : public CChangeObserver
{
public:
bool changeNotify(const neutrino_locale_t, void * data);
};
class CFanControlNotifier : public CChangeObserver
{
public:

View File

@@ -393,7 +393,9 @@ struct SNeutrinoSettings
char lcd_setting_dim_time[4];
char lcd_setting_dim_brightness[4];
int led_tv_mode;
int led_standby_mode;
int led_deep_mode;
#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 FILESYSTEM_ENCODING_TO_UTF8_STRING(a) (g_settings.filesystem_is_utf8 ? (a) : Latin1_to_UTF8(a))