From f995ffff71d819416a89c1bec3ceb69d121daa4e Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Fri, 24 Feb 2006 18:31:14 +0000 Subject: [PATCH 1/1] fix calculation in calculateDifference for cable and terrestrial which should complete the cable scan and hopefully the terrestrial scan as well --- lib/dvb/frontend.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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; } -- 2.30.2