zapit/src/zapit.cpp: prevent 'rotor moving' message for ZapForEpg

Origin commit data
------------------
Commit: 78fd4a1204
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2013-10-07 (Mon, 07 Oct 2013)
This commit is contained in:
[CST] Focus
2013-10-07 16:58:41 +04:00
parent ea128d69e4
commit c8e0610199
2 changed files with 5 additions and 4 deletions

View File

@@ -158,7 +158,7 @@ class CZapit : public OpenThreads::Thread
void RestoreChannelPids(CZapitChannel* channel);
//void ConfigFrontend();
bool TuneChannel(CFrontend *frontend, CZapitChannel * channel, bool &transponder_change);
bool TuneChannel(CFrontend *frontend, CZapitChannel * channel, bool &transponder_change, bool send_event = true);
bool ParsePatPmt(CZapitChannel * channel);
bool send_data_count(int connfd, int data_count);

View File

@@ -417,7 +417,7 @@ audio_map_set_t * CZapit::GetSavedPids(const t_channel_id channel_id)
return NULL;
}
bool CZapit::TuneChannel(CFrontend * frontend, CZapitChannel * channel, bool &transponder_change)
bool CZapit::TuneChannel(CFrontend * frontend, CZapitChannel * channel, bool &transponder_change, bool send_event)
{
if(channel == NULL || frontend == NULL)
return false;
@@ -427,6 +427,7 @@ bool CZapit::TuneChannel(CFrontend * frontend, CZapitChannel * channel, bool &tr
int waitForMotor = frontend->driveToSatellitePosition(channel->getSatellitePosition());
if(waitForMotor > 0) {
printf("[zapit] waiting %d seconds for motor to turn satellite dish.\n", waitForMotor);
if (send_event)
SendEvent(CZapitClient::EVT_ZAP_MOTOR, &waitForMotor, sizeof(waitForMotor));
for(int i = 0; i < waitForMotor; i++) {
sleep(1);
@@ -712,7 +713,7 @@ bool CZapit::ZapForEpg(const t_channel_id channel_id)
ERROR("Cannot get frontend\n");
return false;
}
if(!TuneChannel(frontend, newchannel, transponder_change))
if(!TuneChannel(frontend, newchannel, transponder_change, false))
return false;
#if 0
if(!ParsePatPmt(newchannel))