- use g_info.hw_caps->can_cpufreq to control the cpu frequency

Conflicts:
	src/neutrino.cpp

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2020-08-30 22:49:37 +02:00
committed by Thilo Graf
parent 6491c66a66
commit 42b184f2e9
4 changed files with 22 additions and 30 deletions

View File

@@ -213,7 +213,6 @@ const CMenuOptionChooser::keyval CHANNELLIST_NEW_ZAP_MODE_OPTIONS[CHANNELLIST_NE
{ 2, LOCALE_CHANNELLIST_NEW_ZAP_MODE_ACTIVE }
};
#ifdef CPU_FREQ
#define CPU_FREQ_OPTION_COUNT 13
const CMenuOptionChooser::keyval_ext CPU_FREQ_OPTIONS[CPU_FREQ_OPTION_COUNT] =
{
@@ -231,7 +230,6 @@ const CMenuOptionChooser::keyval_ext CPU_FREQ_OPTIONS[CPU_FREQ_OPTION_COUNT] =
{ 550, NONEXISTANT_LOCALE, "550 Mhz"},
{ 600, NONEXISTANT_LOCALE, "600 Mhz"}
};
#endif /*CPU_FREQ*/
const CMenuOptionChooser::keyval EPG_SCAN_OPTIONS[] =
{
@@ -345,12 +343,13 @@ int CMiscMenue::showMiscSettingsMenu()
mf->setHint("", LOCALE_MENU_HINT_MISC_ONLINESERVICES);
misc_menue.addItem(mf);
#ifdef CPU_FREQ
//CPU
CMenuWidget misc_menue_cpu("CPU", NEUTRINO_ICON_SETTINGS, width);
showMiscSettingsMenuCPUFreq(&misc_menue_cpu);
misc_menue.addItem( new CMenuForwarder("CPU", true, NULL, &misc_menue_cpu, NULL, CRCInput::convertDigitToKey(shortcut++)));
#endif /*CPU_FREQ*/
if (g_info.hw_caps->can_cpufreq)
{
CMenuWidget misc_menue_cpu("CPU", NEUTRINO_ICON_SETTINGS, width);
showMiscSettingsMenuCPUFreq(&misc_menue_cpu);
misc_menue.addItem( new CMenuForwarder("CPU", true, NULL, &misc_menue_cpu, NULL, CRCInput::convertDigitToKey(shortcut++)));
}
int res = misc_menue.exec(NULL, "");
@@ -773,7 +772,6 @@ int CMiscMenue::showMiscSettingsSelectWeatherLocation()
return res;
}
#ifdef CPU_FREQ
//CPU
void CMiscMenue::showMiscSettingsMenuCPUFreq(CMenuWidget *ms_cpu)
{
@@ -783,7 +781,6 @@ void CMiscMenue::showMiscSettingsMenuCPUFreq(CMenuWidget *ms_cpu)
ms_cpu->addItem(new CMenuOptionChooser(LOCALE_CPU_FREQ_NORMAL, &g_settings.cpufreq, CPU_FREQ_OPTIONS, CPU_FREQ_OPTION_COUNT, true, cpuNotifier));
ms_cpu->addItem(new CMenuOptionChooser(LOCALE_CPU_FREQ_STANDBY, &g_settings.standby_cpufreq, CPU_FREQ_OPTIONS, CPU_FREQ_OPTION_COUNT, true));
}
#endif /*CPU_FREQ*/
bool CMiscMenue::changeNotify(const neutrino_locale_t OptionName, void * /*data*/)
{