fix auto inversion,
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 16 Dec 2005 22:40:52 +0000 (22:40 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 16 Dec 2005 22:40:52 +0000 (22:40 +0000)
make lamedb inversion value compatible with e1

lib/dvb/frontendparms.h
lib/dvb/sec.cpp

index 466ae346bd0e895949e1fc4f79790e911a38ee98..e98b6dbf3352cb8da03043779fb1885a8c228010 100644 (file)
@@ -16,7 +16,7 @@ struct eDVBFrontendParametersSatellite
        struct Inversion
        {
                enum {
-                       On, Off, Unknown
+                       Off, On, Unknown
                };
        };
        struct FEC
index 411cb52eda157797a9035df91b246db31c2db4fd..d76b40b6640c79402bd9f8be3e84471092a371f7 100644 (file)
@@ -28,7 +28,6 @@ eDVBSatelliteEquipmentControl::eDVBSatelliteEquipmentControl(eSmartPtrList<eDVBR
 
        clear();
 
-#if 1
 // ASTRA
        addLNB();
        setLNBTunerMask(3);
@@ -62,7 +61,6 @@ eDVBSatelliteEquipmentControl::eDVBSatelliteEquipmentControl(eSmartPtrList<eDVBR
        addSatellite(130);
        setVoltageMode(eDVBSatelliteSwitchParameters::HV);
        setToneMode(eDVBSatelliteSwitchParameters::HILO);
-#else
 
 // Rotor
        addLNB();
@@ -84,12 +82,7 @@ eDVBSatelliteEquipmentControl::eDVBSatelliteEquipmentControl(eSmartPtrList<eDVBR
        setUseInputpower(true);
        setInputpowerDelta(50);
 
-       addSatellite(130);
-       setVoltageMode(eDVBSatelliteSwitchParameters::HV);
-       setToneMode(eDVBSatelliteSwitchParameters::HILO);
-       setRotorPosNum(0);
-
-       addSatellite(192);
+       addSatellite(235);
        setVoltageMode(eDVBSatelliteSwitchParameters::HV);
        setToneMode(eDVBSatelliteSwitchParameters::HILO);
        setRotorPosNum(0);
@@ -103,7 +96,6 @@ eDVBSatelliteEquipmentControl::eDVBSatelliteEquipmentControl(eSmartPtrList<eDVBR
        setVoltageMode(eDVBSatelliteSwitchParameters::HV);
        setToneMode(eDVBSatelliteSwitchParameters::HILO);
        setRotorPosNum(1); // stored pos 1
-#endif
 }
 
 int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite &sat, iDVBFrontend *fe, int frontend_id )
@@ -261,7 +253,19 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
                        if (sat.polarisation == eDVBFrontendParametersSatellite::Polarisation::Horizontal)
                                band |= 2;
 
-                       parm.INVERSION = (!sat.inversion) ? INVERSION_ON : INVERSION_OFF;
+                       switch (sat.inversion)
+                       {
+                               case eDVBFrontendParametersCable::Inversion::On:
+                                       parm.INVERSION = INVERSION_ON;
+                                       break;
+                               case eDVBFrontendParametersCable::Inversion::Off:
+                                       parm.INVERSION = INVERSION_OFF;
+                                       break;
+                               default:
+                               case eDVBFrontendParametersCable::Inversion::Unknown:
+                                       parm.INVERSION = INVERSION_AUTO;
+                                       break;
+                       }
 
                        switch (sat.fec)
                        {