From 196634a2be3f5cbac64aeefc6e0aaef142115567 Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Mon, 3 Jul 2006 15:21:23 +0000 Subject: [PATCH] add some debug output --- lib/dvb/frontend.cpp | 7 +++++-- lib/dvb/scan.cpp | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/lib/dvb/frontend.cpp b/lib/dvb/frontend.cpp index 25eb9766..2992820e 100644 --- a/lib/dvb/frontend.cpp +++ b/lib/dvb/frontend.cpp @@ -290,6 +290,8 @@ RESULT eDVBFrontendParameters::calculateDifference(const iDVBFrontendParameters diff = 1<<28; else if (exact && sat.fec != osat.fec && sat.fec != eDVBFrontendParametersSatellite::FEC::fAuto && osat.fec != eDVBFrontendParametersSatellite::FEC::fAuto) diff = 1<<27; + else if (exact && sat.modulation != osat.modulation && sat.modulation != eDVBFrontendParametersSatellite::Modulation::Auto && osat.modulation != eDVBFrontendParametersSatellite::Modulation::Auto) + diff = 1<<27; else { diff = abs(sat.frequency - osat.frequency); @@ -1386,13 +1388,14 @@ RESULT eDVBFrontend::prepare_sat(const eDVBFrontendParametersSatellite &feparm) res = m_sec->prepare(*this, parm, feparm, 1 << m_fe); if (!res) { - eDebug("prepare_sat System %d Freq %d Pol %d SR %d INV %d FEC %d", + eDebug("prepare_sat System %d Freq %d Pol %d SR %d INV %d FEC %d orbpos %d", feparm.system, feparm.frequency, feparm.polarisation, feparm.symbol_rate, feparm.inversion, - feparm.fec); + feparm.fec, + feparm.orbital_position); parm_u_qpsk_symbol_rate = feparm.symbol_rate; switch (feparm.inversion) { diff --git a/lib/dvb/scan.cpp b/lib/dvb/scan.cpp index f9114c2b..d21ed10b 100644 --- a/lib/dvb/scan.cpp +++ b/lib/dvb/scan.cpp @@ -251,28 +251,71 @@ void eDVBScan::addChannelToScan(const eDVBChannelID &chid, iDVBFrontendParameter { /* check if we don't already have that channel ... */ + int type; + feparm->getSystem(type); + + switch(type) + { + case iDVBFrontend::feSatellite: + { + eDVBFrontendParametersSatellite parm; + feparm->getDVBS(parm); + eDebug("try to add %d %d %d %d %d %d", + parm.orbital_position, parm.frequency, parm.symbol_rate, parm.polarisation, parm.fec, parm.modulation); + break; + } + case iDVBFrontend::feCable: + { + eDVBFrontendParametersCable parm; + feparm->getDVBC(parm); + eDebug("try to add %d %d %d %d %d", + parm.frequency, parm.symbol_rate, parm.modulation, parm.fec_inner); + break; + } + case iDVBFrontend::feTerrestrial: + { + eDVBFrontendParametersTerrestrial parm; + feparm->getDVBT(parm); + eDebug("try to add %d %d %d %d %d %d %d %d", + parm.frequency, parm.modulation, parm.transmission_mode, parm.hierarchy, + parm.guard_interval, parm.code_rate_LP, parm.code_rate_HP, parm.bandwidth); + break; + } + } + /* ... in the list of channels to scan */ for (std::list >::iterator i(m_ch_toScan.begin()); i != m_ch_toScan.end(); ++i) if (sameChannel(*i, feparm)) { *i = feparm; // update + eDebug("update"); return; } /* ... in the list of successfully scanned channels */ for (std::list >::const_iterator i(m_ch_scanned.begin()); i != m_ch_scanned.end(); ++i) if (sameChannel(*i, feparm)) + { + eDebug("successfully scanned"); return; + } /* ... in the list of unavailable channels */ for (std::list >::const_iterator i(m_ch_unavailable.begin()); i != m_ch_unavailable.end(); ++i) if (sameChannel(*i, feparm, true)) + { + eDebug("scanned but not available"); return; + } /* ... on the current channel */ if (sameChannel(m_ch_current, feparm)) + { + eDebug("is current"); return; + } + eDebug("really add"); /* otherwise, add it to the todo list. */ m_ch_toScan.push_front(feparm); // better.. then the rotor not turning wild from east to west :) } -- 2.30.2