diff --git a/data/locale/english.locale b/data/locale/english.locale index 2a104b45d..21620470f 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1362,6 +1362,7 @@ cam.init_ok CAM init complete cam.waiting Waiting for CI answer cam.timeout Timeout waiting CI menu ready cam.reset Reset +cam.reset_standby Reset after standby subtitles.head Subtitles subtitles.stop Stop subtitles favorites.copy Copy bouquet to Favorites diff --git a/src/gui/cam_menu.cpp b/src/gui/cam_menu.cpp index f9d976a69..6c40f414f 100644 --- a/src/gui/cam_menu.cpp +++ b/src/gui/cam_menu.cpp @@ -81,14 +81,26 @@ printf("CCAMMenuHandler::exec: actionkey %s\n", actionkey.c_str()); } else if(actionkey == "cam2") { return doMenu(1); } else if(actionkey == "reset1") { - ci->Reset(0); + if(ci->CamPresent(0)) + ci->Reset(0); } else if(actionkey == "reset2") { - ci->Reset(1); + if(ci->CamPresent(1)) + ci->Reset(1); } + if(!parent) + return 0; + return doMainMenu (); } +#define OPTIONS_OFF0_ON1_OPTION_COUNT 2 +const CMenuOptionChooser::keyval OPTIONS_OFF0_ON1_OPTIONS[OPTIONS_OFF0_ON1_OPTION_COUNT] = +{ + { 0, LOCALE_OPTIONS_OFF }, + { 1, LOCALE_OPTIONS_ON } +}; + int CCAMMenuHandler::doMainMenu () { int ret; @@ -104,6 +116,9 @@ int CCAMMenuHandler::doMainMenu () cammenu->addItem( GenericMenuBack ); cammenu->addItem( GenericMenuSeparatorLine ); + cammenu->addItem( new CMenuOptionChooser(LOCALE_CAM_RESET_STANDBY, &g_settings.ci_standby_reset, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); + cammenu->addItem( GenericMenuSeparatorLine ); + CMenuWidget * tempMenu; if(ci->CamPresent(0)) { ci->GetName(0, name1); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 990169c4b..9676dfe2b 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -776,6 +776,7 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.cpufreq = configfile.getInt32("cpufreq", 0); g_settings.standby_cpufreq = configfile.getInt32("standby_cpufreq", 100); g_settings.rounded_corners = configfile.getInt32("rounded_corners", 1); + g_settings.ci_standby_reset = configfile.getInt32("ci_standby_reset", 0); //FIXME g_settings.cpufreq = 0; @@ -1293,6 +1294,7 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setInt32( "cpufreq", g_settings.cpufreq); configfile.setInt32( "standby_cpufreq", g_settings.standby_cpufreq); configfile.setInt32("rounded_corners", g_settings.rounded_corners); + configfile.setInt32("ci_standby_reset", g_settings.ci_standby_reset); configfile.setInt32( "make_hd_list", g_settings.make_hd_list); //fb-alpha values for gtx @@ -4005,6 +4007,11 @@ void CNeutrinoApp::standbyMode( bool bOnOff ) cpuFreq->SetCpuFreq(g_settings.cpufreq * 1000 * 1000); powerManager->SetStandby(false, false); + + if(g_settings.ci_standby_reset) { + g_CamHandler->exec(NULL, "reset1"); + g_CamHandler->exec(NULL, "reset2"); + } frameBuffer->setActive(true); funNotifier->changeNotify(NONEXISTANT_LOCALE, (void*) &g_settings.fan_speed); diff --git a/src/system/locals.h b/src/system/locals.h index 52c421bcd..4078c0387 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1378,6 +1378,7 @@ typedef enum { LOCALE_CAM_WAITING, LOCALE_CAM_TIMEOUT, LOCALE_CAM_RESET, + LOCALE_CAM_RESET_STANDBY, LOCALE_SUBTITLES_HEAD, LOCALE_SUBTITLES_STOP, LOCALE_FAN_SPEED, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index d2a9d600b..c937b6a5a 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1378,6 +1378,7 @@ const char *locale_real_names[] = { "cam.waiting", "cam.timeout", "cam.reset", + "cam.reset_standby", "subtitles.head", "subtitles.stop", "fan_speed", diff --git a/src/system/settings.h b/src/system/settings.h index 664d0fe00..7a350bb6b 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -91,6 +91,7 @@ struct SNeutrinoSettings int avsync; int clockrec; int rounded_corners; + int ci_standby_reset; //vcr int vcr_AutoSwitch;