mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
neutrino: consolidate fan detection in one place
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1217 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: 07ea7e9c63
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2011-02-26 (Sat, 26 Feb 2011)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -234,7 +234,7 @@ void CMiscMenue::showMiscSettingsMenuGeneral(CMenuWidget *ms_general)
|
|||||||
ms_general->addItem(new CMenuOptionChooser(LOCALE_EXTRA_CACHE_TXT, (int *)&g_settings.cacheTXT, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
|
ms_general->addItem(new CMenuOptionChooser(LOCALE_EXTRA_CACHE_TXT, (int *)&g_settings.cacheTXT, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
|
||||||
|
|
||||||
//fan speed
|
//fan speed
|
||||||
if (g_info.delivery_system == DVB_S && (cs_get_revision() < 8))
|
if (g_info.has_fan)
|
||||||
{
|
{
|
||||||
CFanControlNotifier *fanNotifier = new CFanControlNotifier();
|
CFanControlNotifier *fanNotifier = new CFanControlNotifier();
|
||||||
//don't show fan speed settings on cable box and NEO
|
//don't show fan speed settings on cable box and NEO
|
||||||
|
@@ -2145,9 +2145,13 @@ int CNeutrinoApp::run(int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
g_Zapit = new CZapitClient;
|
g_Zapit = new CZapitClient;
|
||||||
|
|
||||||
if (!scanSettings.loadSettings(NEUTRINO_SCAN_SETTINGS_FILE, (g_info.delivery_system = g_Zapit->getDeliverySystem()))) {
|
g_info.delivery_system = g_Zapit->getDeliverySystem();
|
||||||
|
if (!scanSettings.loadSettings(NEUTRINO_SCAN_SETTINGS_FILE, g_info.delivery_system)) {
|
||||||
dprintf(DEBUG_NORMAL, "Loading of scan settings failed. Using defaults.\n");
|
dprintf(DEBUG_NORMAL, "Loading of scan settings failed. Using defaults.\n");
|
||||||
}
|
}
|
||||||
|
/* only SAT-hd1 before rev 8 has fan, rev 1 is TD (compat hack) */
|
||||||
|
g_info.has_fan = (cs_get_revision() > 1 && cs_get_revision() < 8 && g_info.delivery_system == DVB_S);
|
||||||
|
dprintf(DEBUG_NORMAL, "g_info.has_fan: %d\n", g_info.has_fan);
|
||||||
|
|
||||||
|
|
||||||
CVFD::getInstance()->showVolume(g_settings.current_volume);
|
CVFD::getInstance()->showVolume(g_settings.current_volume);
|
||||||
@@ -3602,7 +3606,7 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode)
|
|||||||
if (g_RCInput != NULL)
|
if (g_RCInput != NULL)
|
||||||
delete g_RCInput;
|
delete g_RCInput;
|
||||||
//fan speed
|
//fan speed
|
||||||
if (g_info.delivery_system == DVB_S && (cs_get_revision() < 8)) {
|
if (g_info.has_fan) {
|
||||||
int fspeed = 0;
|
int fspeed = 0;
|
||||||
CFanControlNotifier * funNotifier= new CFanControlNotifier();
|
CFanControlNotifier * funNotifier= new CFanControlNotifier();
|
||||||
funNotifier->changeNotify(NONEXISTANT_LOCALE, (void *) &fspeed);
|
funNotifier->changeNotify(NONEXISTANT_LOCALE, (void *) &fspeed);
|
||||||
@@ -3935,7 +3939,7 @@ void CNeutrinoApp::standbyMode( bool bOnOff )
|
|||||||
lastMode = mode;
|
lastMode = mode;
|
||||||
mode = mode_standby;
|
mode = mode_standby;
|
||||||
//fan speed
|
//fan speed
|
||||||
if (g_info.delivery_system == DVB_S && (cs_get_revision() < 8)) {
|
if (g_info.has_fan) {
|
||||||
int fspeed = 1;
|
int fspeed = 1;
|
||||||
CFanControlNotifier * funNotifier= new CFanControlNotifier();
|
CFanControlNotifier * funNotifier= new CFanControlNotifier();
|
||||||
funNotifier->changeNotify(NONEXISTANT_LOCALE, (void *) &fspeed);
|
funNotifier->changeNotify(NONEXISTANT_LOCALE, (void *) &fspeed);
|
||||||
@@ -3958,7 +3962,7 @@ void CNeutrinoApp::standbyMode( bool bOnOff )
|
|||||||
}
|
}
|
||||||
frameBuffer->setActive(true);
|
frameBuffer->setActive(true);
|
||||||
//fan speed
|
//fan speed
|
||||||
if (g_info.delivery_system == DVB_S && (cs_get_revision() < 8)) {
|
if (g_info.has_fan) {
|
||||||
CFanControlNotifier * funNotifier= new CFanControlNotifier();
|
CFanControlNotifier * funNotifier= new CFanControlNotifier();
|
||||||
funNotifier->changeNotify(NONEXISTANT_LOCALE, (void*) &g_settings.fan_speed);
|
funNotifier->changeNotify(NONEXISTANT_LOCALE, (void*) &g_settings.fan_speed);
|
||||||
delete funNotifier;
|
delete funNotifier;
|
||||||
|
@@ -541,6 +541,7 @@ struct SglobalInfo
|
|||||||
{
|
{
|
||||||
unsigned char box_Type;
|
unsigned char box_Type;
|
||||||
delivery_system_t delivery_system;
|
delivery_system_t delivery_system;
|
||||||
|
bool has_fan;
|
||||||
};
|
};
|
||||||
|
|
||||||
const int RECORDING_OFF = 0;
|
const int RECORDING_OFF = 0;
|
||||||
|
Reference in New Issue
Block a user