webif standby -add option CEC standby off (dont use TV off)

Origin commit data
------------------
Branch: ni/coolstream
Commit: 9855a220be
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2014-01-28 (Tue, 28 Jan 2014)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2014-01-28 10:29:28 +01:00
parent b87b7e17c8
commit 8126ba13a5
5 changed files with 35 additions and 12 deletions

View File

@@ -857,8 +857,12 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint6
*msg = NeutrinoMessages::RELOAD_SETUP;
*data = 0;
break;
case NeutrinoMessages::EVT_HDMI_CEC_ON:
*msg = NeutrinoMessages::EVT_HDMI_CEC_ON;
case NeutrinoMessages::EVT_HDMI_CEC_VIEW_ON:
*msg = NeutrinoMessages::EVT_HDMI_CEC_VIEW_ON;
*data = 0;
break;
case NeutrinoMessages::EVT_HDMI_CEC_STANDBY:
*msg = NeutrinoMessages::EVT_HDMI_CEC_STANDBY;
*data = 0;
break;
default:

View File

@@ -3035,12 +3035,18 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
// ShowHint(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_EXTRA_ZAPIT_SDT_CHANGED),
// CMessageBox::mbrBack,CMessageBox::mbBack, NEUTRINO_ICON_INFO);
}
else if (msg == NeutrinoMessages::EVT_HDMI_CEC_ON) {
else if (msg == NeutrinoMessages::EVT_HDMI_CEC_VIEW_ON) {
if(g_settings.hdmi_cec_view_on)
videoDecoder->SetCECAutoView(g_settings.hdmi_cec_view_on);
return messages_return::handled;
}
else if (msg == NeutrinoMessages::EVT_HDMI_CEC_STANDBY) {
if(g_settings.hdmi_cec_standby)
videoDecoder->SetCECAutoStandby(g_settings.hdmi_cec_standby);
return messages_return::handled;
}
if ((msg >= CRCInput::RC_WithData) && (msg < CRCInput::RC_WithData + 0x10000000))
delete [] (unsigned char*) data;

View File

@@ -152,7 +152,8 @@ struct NeutrinoMessages {
EVT_EIT_COMPLETE = CRCInput::RC_WithData + 24, /* data: (t_channel_id *) */
EVT_BACK_ZAP_COMPLETE = CRCInput::RC_WithData + 25, /* data: (t_channel_id *) */
EVT_HDMI_CEC_ON = CRCInput::RC_WithData + 26
EVT_HDMI_CEC_VIEW_ON = CRCInput::RC_WithData + 26,
EVT_HDMI_CEC_STANDBY = CRCInput::RC_WithData + 27
};
enum
{

View File

@@ -430,30 +430,41 @@ void CControlAPI::StandbyCGI(CyhookHandler *hh)
CEC_HDMI_off = true;
}
}
//dont use CEC with standbyoff --- use: control/standby?off&cec=off
if (hh->ParamList["1"] == "on") // standby mode on
{
//dont use CEC with standbyoff (TV off) --- use: control/standby?off&cec=off
if(g_settings.hdmi_cec_standby && CEC_HDMI_off){
videoDecoder->SetCECAutoStandby(0);
}
if(CNeutrinoApp::getInstance()->getMode() != 4)
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::STANDBY_ON, CEventServer::INITID_HTTPD);
hh->SendOk();
if(g_settings.hdmi_cec_standby && CEC_HDMI_off){//dont use CEC with standbyoff (TV off)
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::EVT_HDMI_CEC_STANDBY, CEventServer::INITID_HTTPD);
}
}
else if (hh->ParamList["1"] == "off")// standby mode off
{
//dont use CEC with with view on (TV on) --- use: control/standby?off&cec=off
if(g_settings.hdmi_cec_view_on && CEC_HDMI_off){
videoDecoder->SetCECAutoView(0);
}
if (hh->ParamList["1"] == "on") // standby mode on
{
if(CNeutrinoApp::getInstance()->getMode() != 4)
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::STANDBY_ON, CEventServer::INITID_HTTPD);
hh->SendOk();
}
else if (hh->ParamList["1"] == "off")// standby mode off
{
NeutrinoAPI->Zapit->setStandby(false);
if(CNeutrinoApp::getInstance()->getMode() == 4)
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::STANDBY_OFF, CEventServer::INITID_HTTPD);
hh->SendOk();
if(g_settings.hdmi_cec_view_on && CEC_HDMI_off){//dont use CEC with view on (TV on)
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::EVT_HDMI_CEC_VIEW_ON, CEventServer::INITID_HTTPD);
}
}
else
hh->SendError();
if(g_settings.hdmi_cec_view_on && CEC_HDMI_off){//dont use CEC with standbyoff
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::EVT_HDMI_CEC_ON, CEventServer::INITID_HTTPD);
}
}
else
if(CNeutrinoApp::getInstance()->getMode() == 4)//mode_standby = 4

View File

@@ -130,7 +130,8 @@ CNeutrinoAPI::CNeutrinoAPI()
EventServer->registerEvent2( NeutrinoMessages::LOCK_RC, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");
EventServer->registerEvent2( NeutrinoMessages::UNLOCK_RC, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");
EventServer->registerEvent2( NeutrinoMessages::RELOAD_SETUP, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");//reload neutrino conf
EventServer->registerEvent2( NeutrinoMessages::EVT_HDMI_CEC_ON, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");
EventServer->registerEvent2( NeutrinoMessages::EVT_HDMI_CEC_VIEW_ON, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");
EventServer->registerEvent2( NeutrinoMessages::EVT_HDMI_CEC_STANDBY, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");
}
//-------------------------------------------------------------------------