From 25be5abc24eefb85f8fd0f695a91ee4c8d7aadd9 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Wed, 10 Oct 2012 18:34:19 +0400 Subject: [PATCH] zapit/src/zapit.cpp: change signal lock monitor (disabled at the moment) Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/296aee816c326e01b1490398791a1847a8a9bfbd Author: [CST] Focus Date: 2012-10-10 (Wed, 10 Oct 2012) --- src/zapit/src/zapit.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/zapit/src/zapit.cpp b/src/zapit/src/zapit.cpp index 19b574d35..907232ea0 100644 --- a/src/zapit/src/zapit.cpp +++ b/src/zapit/src/zapit.cpp @@ -2134,10 +2134,6 @@ static bool zapit_parse_command(CBasicMessage::Header &rmsg, int connfd) void CZapit::run() { -#if 0 - time_t stime = time(0); - time_t curtime; -#endif printf("[zapit] starting... tid %ld\n", syscall(__NR_gettid)); abort_zapit = 0; @@ -2186,14 +2182,15 @@ void CZapit::run() /* yuck, don't waste that much cpu time :) */ usleep(0); #if 0 - if(!standby && !CServiceScan::getInstance()->Scanning() &¤t_channel) { - curtime = time(0); + static time_t stime = time(0); + if(!standby && !CServiceScan::getInstance()->Scanning() && current_channel) { + time_t curtime = time(0); + //FIXME check if sig_delay needed */ if(sig_delay && (curtime - stime) > sig_delay) { stime = curtime; - uint16_t sig = live_fe->getSignalStrength(); - //if(sig < 8000) - if(sig < 28000) { - printf("[monitor] signal %d, trying to re-tune...\n", sig); + fe_status_t status = live_fe->getStatus(); + printf("[zapit] frontend status %d\n", status); + if (status != FE_HAS_LOCK) { live_fe->retuneChannel(); } }