aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb/scan.cpp
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-07-03 13:11:34 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-07-03 13:11:34 +0000
commitc650b2ace739188d451031e19d116a4669a61326 (patch)
tree039d3ca5c219fb6af7d443a43850f1c30e1c3bfe /lib/dvb/scan.cpp
parent52a9bee10e04a59263f474d8a25b02ec714d3871 (diff)
downloadenigma2-c650b2ace739188d451031e19d116a4669a61326.tar.gz
enigma2-c650b2ace739188d451031e19d116a4669a61326.zip
update unscanned transponders in toScan list with nit values
Diffstat (limited to 'lib/dvb/scan.cpp')
-rw-r--r--lib/dvb/scan.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/dvb/scan.cpp b/lib/dvb/scan.cpp
index c4d4c6f4..e981123c 100644
--- a/lib/dvb/scan.cpp
+++ b/lib/dvb/scan.cpp
@@ -250,20 +250,23 @@ void eDVBScan::addKnownGoodChannel(const eDVBChannelID &chid, iDVBFrontendParame
void eDVBScan::addChannelToScan(const eDVBChannelID &chid, iDVBFrontendParameters *feparm)
{
/* check if we don't already have that channel ... */
-
+
/* ... in the list of channels to scan */
for (std::list<ePtr<iDVBFrontendParameters> >::const_iterator i(m_ch_toScan.begin()); i != m_ch_toScan.end(); ++i)
if (sameChannel(*i, feparm))
+ {
+ *i = feparm; // update
return;
+ }
/* ... in the list of successfully scanned channels */
for (std::list<ePtr<iDVBFrontendParameters> >::const_iterator i(m_ch_scanned.begin()); i != m_ch_scanned.end(); ++i)
if (sameChannel(*i, feparm))
return;
-
+
/* ... in the list of unavailable channels */
for (std::list<ePtr<iDVBFrontendParameters> >::const_iterator i(m_ch_unavailable.begin()); i != m_ch_unavailable.end(); ++i)
- if (sameChannel(*i, feparm))
+ if (sameChannel(*i, feparm, true))
return;
/* ... on the current channel */
@@ -274,10 +277,10 @@ void eDVBScan::addChannelToScan(const eDVBChannelID &chid, iDVBFrontendParameter
m_ch_toScan.push_front(feparm); // better.. then the rotor not turning wild from east to west :)
}
-int eDVBScan::sameChannel(iDVBFrontendParameters *ch1, iDVBFrontendParameters *ch2) const
+int eDVBScan::sameChannel(iDVBFrontendParameters *ch1, iDVBFrontendParameters *ch2, bool exact) const
{
int diff;
- if (ch1->calculateDifference(ch2, diff))
+ if (ch1->calculateDifference(ch2, diff, exact))
return 0;
if (diff < 4000) // more than 4mhz difference?
return 1;