From: Stefan Pluecken Date: Fri, 24 Feb 2006 18:31:14 +0000 (+0000) Subject: fix calculation in calculateDifference for cable and terrestrial which should complet... X-Git-Tag: 2.6.0~4002 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/f995ffff71d819416a89c1bec3ceb69d121daa4e fix calculation in calculateDifference for cable and terrestrial which should complete the cable scan and hopefully the terrestrial scan as well --- diff --git a/lib/dvb/frontend.cpp b/lib/dvb/frontend.cpp index 1067a017..c8434c06 100644 --- a/lib/dvb/frontend.cpp +++ b/lib/dvb/frontend.cpp @@ -195,7 +195,22 @@ RESULT eDVBFrontendParameters::calculateDifference(const iDVBFrontendParameters return 0; } case iDVBFrontend::feCable: + eDVBFrontendParametersCable ocable; + if (parm->getDVBC(ocable)) + return -2; + + diff = abs(cable.frequency - ocable.frequency); + diff += abs(cable.symbol_rate - ocable.symbol_rate); + + return 0; case iDVBFrontend::feTerrestrial: + eDVBFrontendParametersTerrestrial oterrestrial; + if (parm->getDVBT(oterrestrial)) + return -2; + + diff = abs(terrestrial.frequency - oterrestrial.frequency); + + return 0; default: return -1; }