fix calculation in calculateDifference for cable and terrestrial which should complet...
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Fri, 24 Feb 2006 18:31:14 +0000 (18:31 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Fri, 24 Feb 2006 18:31:14 +0000 (18:31 +0000)
terrestrial scan as well

lib/dvb/frontend.cpp

index 1067a017d4f87eb609adc98391d1c99c10b8e8cd..c8434c066bbe4556e940b56a44357d7e167398ff 100644 (file)
@@ -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;
        }