neutrino: cleanup ExitRun() function from unused code

Conflicts:
	src/neutrino.cpp

Signed-off-by: Thilo Graf <dbt@novatux.de>


Origin commit data
------------------
Branch: ni/coolstream
Commit: f128d38ad3
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-11-20 (Mon, 20 Nov 2017)

Origin message was:
------------------
- neutrino: cleanup ExitRun() function from unused code

 Conflicts:
	src/neutrino.cpp

Signed-off-by: Thilo Graf <dbt@novatux.de>


------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2017-11-20 15:19:06 +01:00
committed by Thilo Graf
parent 3ef2c7e028
commit ba000a4491

View File

@@ -3826,7 +3826,7 @@ void CNeutrinoApp::ExitRun(int can_shutdown)
delete CRecordManager::getInstance(); delete CRecordManager::getInstance();
CEpgScan::getInstance()->Stop(); CEpgScan::getInstance()->Stop();
if(g_settings.epg_save /* && timeset && g_Sectionsd->getIsTimeSet ()*/) if (g_settings.epg_save)
{ {
g_Sectionsd->setPauseScanning(true); g_Sectionsd->setPauseScanning(true);
saveEpg(NeutrinoModes::mode_off); saveEpg(NeutrinoModes::mode_off);
@@ -3838,7 +3838,7 @@ void CNeutrinoApp::ExitRun(int can_shutdown)
CVFD::getInstance()->setMode(CVFD::MODE_SHUTDOWN); CVFD::getInstance()->setMode(CVFD::MODE_SHUTDOWN);
stop_daemons(true /*can_shutdown*/); //need here for timer_is_rec before saveSetup stop_daemons(true); // need here for timer_is_rec before saveSetup
g_settings.shutdown_timer_record_type = timer_is_rec; g_settings.shutdown_timer_record_type = timer_is_rec;
saveSetup(NEUTRINO_SETTINGS_FILE); saveSetup(NEUTRINO_SETTINGS_FILE);
@@ -3853,88 +3853,7 @@ void CNeutrinoApp::ExitRun(int can_shutdown)
printf("entering off state\n"); printf("entering off state\n");
printf("timer_minutes: %ld\n", timer_minutes); printf("timer_minutes: %ld\n", timer_minutes);
mode = NeutrinoModes::mode_off; mode = NeutrinoModes::mode_off;
//CVFD::getInstance()->ShowText(g_Locale->getText(LOCALE_MAINMENU_SHUTDOWN));
#if 0 #if 0
fp_standby_data_t standby;
time_t mtime = time(NULL);
struct tm *tmtime = localtime(&mtime);
time_t fp_timer = 0;
if (timer_minutes)
{
fp_timer = timer_minutes - mtime/60;
if (fp_timer < 1)
fp_timer = 1;
}
printf("now: %ld, timer %ld, FP timer %ldmin\n", mtime/60, timer_minutes, fp_timer);fflush(stdout);
int leds = 0x40;
switch (g_settings.led_deep_mode)
{
case 0:
leds = 0x0; //off leds
break;
case 1:
leds = 0x60; //on led1 & 2
break;
case 2:
leds = 0x20; //led1 on , 2 off
break;
case 3:
leds = 0x40; //led2 off, 2 on
break;
default:
break;
}
if (leds && g_settings.led_blink && fp_timer)
leds |= 0x80;
standby.brightness = cs_get_revision() == 10 ? 0 : g_settings.lcd_setting[SNeutrinoSettings::LCD_DEEPSTANDBY_BRIGHTNESS];
standby.flags = leds;
standby.current_hour = tmtime->tm_hour;
standby.current_minute = tmtime->tm_min;
standby.timer_minutes_hi = fp_timer >> 8;;
standby.timer_minutes_lo = fp_timer & 0xFF;
my_system("/etc/init.d/rcK");
sync();
CFSMounter::umount(); // unreachable NFS server
my_system(2,"/bin/umount", "-a");
sleep(1);
stop_video();
int fd = open("/dev/display", O_RDONLY);
if (fd < 0)
{
perror("/dev/display");
reboot(LINUX_REBOOT_CMD_RESTART);
}
else
{
if (ioctl(fd, IOC_FP_STANDBY, (fp_standby_data_t *) &standby))
{
perror("IOC_FP_STANDBY");
reboot(LINUX_REBOOT_CMD_RESTART);
}
else
{
while (true)
sleep(1);
}
}
}
else
{
delete g_RCInput;
my_system("/etc/init.d/rcK");
//fan speed
if (g_info.hw_caps->has_fan)
CFanControlNotifier::setSpeed(0);
stop_video();
Cleanup();
//_exit(0);
exit(0);
} }
#endif #endif
int leds = 0; int leds = 0;
@@ -3944,16 +3863,16 @@ void CNeutrinoApp::ExitRun(int can_shutdown)
leds = 0x40; leds = 0x40;
switch (g_settings.led_deep_mode){ switch (g_settings.led_deep_mode){
case 0: case 0:
leds = 0x0;//off leds leds = 0x0; // leds off
break; break;
case 1: case 1:
leds = 0x60;//on led1 & 2 leds = 0x60; // led1 on, led2 on
break; break;
case 2: case 2:
leds = 0x20;//led1 on , 2 off leds = 0x20; // led1 on, led2 off
break; break;
case 3: case 3:
leds = 0x40;//led2 off, 2 on leds = 0x40; // led1 off, led2 on
break; break;
default: default:
break; break;
@@ -4002,10 +3921,10 @@ void CNeutrinoApp::ExitRun(int can_shutdown)
delete g_RCInput; delete g_RCInput;
g_RCInput = NULL; g_RCInput = NULL;
//fan speed
if (g_info.hw_caps->has_fan) if (g_info.hw_caps->has_fan)
CFanControlNotifier::setSpeed(0); CFanControlNotifier::setSpeed(0);
//CVFD::getInstance()->ShowText(g_Locale->getText(LOCALE_MAINMENU_REBOOT));
delete CVFD::getInstance(); delete CVFD::getInstance();
delete SHTDCNT::getInstance(); delete SHTDCNT::getInstance();
stop_video(); stop_video();