add neutrino restart to webif

Signed-off-by: GetAway <get-away@t-online.de>
This commit is contained in:
TangoCash
2021-11-08 21:57:24 +01:00
committed by GetAway
parent 27c8115cee
commit d918e6c517
11 changed files with 64 additions and 14 deletions

View File

@@ -4537,6 +4537,9 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
}
return messages_return::handled;
}
else if( msg == NeutrinoMessages::RESTART ) {
ExitRun(CNeutrinoApp::EXIT_RESTART);
}
else if( msg == NeutrinoMessages::REBOOT ) {
ExitRun(CNeutrinoApp::EXIT_REBOOT);
}
@@ -4815,7 +4818,7 @@ void CNeutrinoApp::ExitRun(int exit_code)
if (cs_get_revision() != 10)
bright = g_settings.lcd_setting[SNeutrinoSettings::LCD_DEEPSTANDBY_BRIGHTNESS];
#endif
if (exit_code != CNeutrinoApp::EXIT_REBOOT)
if (exit_code != EXIT_NORMAL && exit_code != EXIT_RESTART)
{
if (timer_minutes)
{
@@ -5370,6 +5373,12 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey)
ExitRun(CNeutrinoApp::EXIT_REBOOT);
returnval = menu_return::RETURN_NONE;
}
else if (actionKey=="restart")
{
videoDecoder->SetCECMode((VIDEO_HDMI_CEC_MODE)0);
ExitRun(CNeutrinoApp::EXIT_RESTART);
returnval = menu_return::RETURN_NONE;
}
else if (actionKey=="clock_switch")
{
InfoClock->switchClockOnOff();