neutrino.cpp: remove CFanControlNotifier new/delete

This commit is contained in:
[CST] Focus
2012-11-02 14:42:49 +04:00
parent c7dd7ccc78
commit cb5d6187df

View File

@@ -1782,8 +1782,7 @@ TIMER_START();
SetupFonts(); SetupFonts();
SetupTiming(); SetupTiming();
g_PicViewer = new CPictureViewer(); g_PicViewer = new CPictureViewer();
colorSetupNotifier = new CColorSetupNotifier; CColorSetupNotifier::setPalette();
colorSetupNotifier->changeNotify(NONEXISTANT_LOCALE, NULL);
CHintBox * hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_NEUTRINO_STARTING)); CHintBox * hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_NEUTRINO_STARTING));
hintBox->paint(); hintBox->paint();
@@ -1855,11 +1854,8 @@ TIMER_START();
#endif #endif
dprintf(DEBUG_NORMAL, "g_info.has_fan: %d\n", g_info.has_fan); dprintf(DEBUG_NORMAL, "g_info.has_fan: %d\n", g_info.has_fan);
//fan speed //fan speed
if (g_info.has_fan) { if (g_info.has_fan)
CFanControlNotifier * fanNotifier= new CFanControlNotifier(); CFanControlNotifier::setSpeed(g_settings.fan_speed);
fanNotifier->changeNotify(NONEXISTANT_LOCALE, (void*) &g_settings.fan_speed);
delete fanNotifier;
}
dvbsub_init(); dvbsub_init();
@@ -2990,10 +2986,7 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode)
cpuFreq->SetCpuFreq(g_settings.standby_cpufreq * 1000 * 1000); cpuFreq->SetCpuFreq(g_settings.standby_cpufreq * 1000 * 1000);
powerManager->SetStandby(true, true); powerManager->SetStandby(true, true);
if (g_info.delivery_system == DVB_S && (cs_get_revision() < 8)) { if (g_info.delivery_system == DVB_S && (cs_get_revision() < 8)) {
int fspeed = 0; CFanControlNotifier::setSpeed(0);
CFanControlNotifier * fanNotifier= new CFanControlNotifier();
fanNotifier->changeNotify(NONEXISTANT_LOCALE, (void *) &fspeed);
delete fanNotifier;
} }
if (powerManager) { if (powerManager) {
powerManager->Close(); powerManager->Close();
@@ -3025,9 +3018,7 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode)
delete g_RCInput; delete g_RCInput;
//fan speed //fan speed
if (g_info.has_fan) { if (g_info.has_fan) {
int fspeed = 0; CFanControlNotifier::setSpeed(0);
CFanControlNotifier fanNotifier;
fanNotifier.changeNotify(NONEXISTANT_LOCALE, (void *) &fspeed);
} }
//CVFD::getInstance()->ShowText(g_Locale->getText(LOCALE_MAINMENU_REBOOT)); //CVFD::getInstance()->ShowText(g_Locale->getText(LOCALE_MAINMENU_REBOOT));
stop_video(); stop_video();
@@ -3224,12 +3215,9 @@ void CNeutrinoApp::standbyMode( bool bOnOff, bool fromDeepStandby )
cpuFreq->SetCpuFreq(g_settings.standby_cpufreq * 1000 * 1000); cpuFreq->SetCpuFreq(g_settings.standby_cpufreq * 1000 * 1000);
//fan speed //fan speed
if (g_info.has_fan) { if (g_info.has_fan)
int fspeed = 1; CFanControlNotifier::setSpeed(1);
CFanControlNotifier * fanNotifier= new CFanControlNotifier();
fanNotifier->changeNotify(NONEXISTANT_LOCALE, (void *) &fspeed);
delete fanNotifier;
}
frameBuffer->setActive(false); frameBuffer->setActive(false);
// Active standby on // Active standby on
powerManager->SetStandby(true, false); powerManager->SetStandby(true, false);
@@ -3252,11 +3240,8 @@ void CNeutrinoApp::standbyMode( bool bOnOff, bool fromDeepStandby )
} }
frameBuffer->setActive(true); frameBuffer->setActive(true);
//fan speed //fan speed
if (g_info.has_fan) { if (g_info.has_fan)
CFanControlNotifier * fanNotifier= new CFanControlNotifier(); CFanControlNotifier::setSpeed(g_settings.fan_speed);
fanNotifier->changeNotify(NONEXISTANT_LOCALE, (void*) &g_settings.fan_speed);
delete fanNotifier;
}
puts("[neutrino.cpp] executing " NEUTRINO_LEAVE_STANDBY_SCRIPT "."); puts("[neutrino.cpp] executing " NEUTRINO_LEAVE_STANDBY_SCRIPT ".");
if (my_system(NEUTRINO_LEAVE_STANDBY_SCRIPT) != 0) if (my_system(NEUTRINO_LEAVE_STANDBY_SCRIPT) != 0)