use fec from satellites.xml,
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Sat, 17 Dec 2005 12:58:46 +0000 (12:58 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Sat, 17 Dec 2005 12:58:46 +0000 (12:58 +0000)
small work on scan

lib/dvb/frontend.cpp
lib/dvb/frontendparms.h
lib/python/Components/NimManager.py
lib/python/Screens/ScanSetup.py

index 0bfb1f5..103d894 100644 (file)
@@ -177,8 +177,11 @@ RESULT eDVBFrontendParameters::calculateDifference(const iDVBFrontendParameters
                        diff = 1<<29;
                else if (sat.polarisation != osat.polarisation)
                        diff = 1<<28;
                        diff = 1<<29;
                else if (sat.polarisation != osat.polarisation)
                        diff = 1<<28;
-               else 
+               else
+               {
                        diff = abs(sat.frequency - osat.frequency);
                        diff = abs(sat.frequency - osat.frequency);
+                       diff += abs(sat.symbol_rate - osat.symbol_rate);
+               }
                return 0;
        }
        case iDVBFrontend::feCable:
                return 0;
        }
        case iDVBFrontend::feCable:
index e98b6db..5ce1100 100644 (file)
@@ -22,7 +22,7 @@ struct eDVBFrontendParametersSatellite
        struct FEC
        {
                enum {
        struct FEC
        {
                enum {
-                       fNone, f1_2, f2_3, f3_4, f5_6, f7_8, fAuto
+                       fAuto, f1_2, f2_3, f3_4, f5_6, f7_8, fNone
                };
        };
        unsigned int frequency, symbol_rate;
                };
        };
        unsigned int frequency, symbol_rate;
index 38047cb..933ebcf 100644 (file)
@@ -166,7 +166,7 @@ class NimManager:
                                else:
                                        self.transponders[self.parsedCab] = [ ]
 
                                else:
                                        self.transponders[self.parsedCab] = [ ]
 
-                               self.transponders[self.parsedCab].append((0, freq, sr, mod, fec))
+                               self.transponders[self.parsedCab].append((1, freq, sr, mod, fec))
 
        class parseTerrestrials(ContentHandler):
                def __init__(self, terrestrialsList, transponders):
 
        class parseTerrestrials(ContentHandler):
                def __init__(self, terrestrialsList, transponders):
@@ -197,7 +197,7 @@ class NimManager:
                                else:
                                        self.transponders[self.parsedTer] = [ ]
 
                                else:
                                        self.transponders[self.parsedTer] = [ ]
 
-                               self.transponders[self.parsedTer].append((0, freq, bw, const, crh, crl, guard, transm, hierarchy, inv))
+                               self.transponders[self.parsedTer].append((2, freq, bw, const, crh, crl, guard, transm, hierarchy, inv))
 
        def getTransponders(self, pos):
                return self.transponders[pos]
 
        def getTransponders(self, pos):
                return self.transponders[pos]
index 7234078..74238f1 100644 (file)
@@ -19,8 +19,8 @@ def getInitialTransponderList(tlist, pos):
                        parm.frequency = x[1]
                        parm.symbol_rate = x[2]
                        parm.polarisation = x[3] # eDVBFrontendParametersSatellite.Polarisation.Vertical
                        parm.frequency = x[1]
                        parm.symbol_rate = x[2]
                        parm.polarisation = x[3] # eDVBFrontendParametersSatellite.Polarisation.Vertical
-                       #parm.fec = x[4]                        # eDVBFrontendParametersSatellite.FEC.f3_4;
-                       parm.fec = 6                                    # AUTO
+                       parm.fec = x[4]                 # eDVBFrontendParametersSatellite.FEC.f3_4;
+                       #parm.fec = 6                                   # AUTO
                        #parm.inversion = 1     #eDVBFrontendParametersSatellite.Inversion.Off;
                        parm.inversion = 2              #AUTO
                        parm.orbital_position = pos
                        #parm.inversion = 1     #eDVBFrontendParametersSatellite.Inversion.Off;
                        parm.inversion = 2              #AUTO
                        parm.orbital_position = pos
@@ -170,7 +170,7 @@ class ScanSetup(Screen):
                        config.scan.sat.inversion = configElement_nonSave("config.scan.sat.inversion", configSelection, 2, (_("off"), _("on"), _("Auto")))
                        config.scan.sat.symbolrate = configElement_nonSave("config.scan.sat.symbolrate", configSequence, [27500], configsequencearg.get("INTEGER", (1, 99999)))
                        config.scan.sat.polarization = configElement_nonSave("config.scan.sat.polarization", configSelection, 0, (_("horizontal"), _("vertical"),  _("circular left"), _("circular right")))
                        config.scan.sat.inversion = configElement_nonSave("config.scan.sat.inversion", configSelection, 2, (_("off"), _("on"), _("Auto")))
                        config.scan.sat.symbolrate = configElement_nonSave("config.scan.sat.symbolrate", configSequence, [27500], configsequencearg.get("INTEGER", (1, 99999)))
                        config.scan.sat.polarization = configElement_nonSave("config.scan.sat.polarization", configSelection, 0, (_("horizontal"), _("vertical"),  _("circular left"), _("circular right")))
-                       config.scan.sat.fec = configElement_nonSave("config.scan.sat.fec", configSelection, 7, ("None", "1/2", "2/3", "3/4", "5/6", "7/8", "auto"))
+                       config.scan.sat.fec = configElement_nonSave("config.scan.sat.fec", configSelection, 7, (_("Auto"), "1/2", "2/3", "3/4", "5/6", "7/8", _("None")))
 
                        # cable
                        config.scan.cab.frequency = configElement_nonSave("config.scan.cab.frequency", configSequence, [466], configsequencearg.get("INTEGER", (50, 9999)))
 
                        # cable
                        config.scan.cab.frequency = configElement_nonSave("config.scan.cab.frequency", configSequence, [466], configsequencearg.get("INTEGER", (50, 9999)))