Add possibility to set Pilot also for DVB-S2 non 8PSK Transponders (i.e. the new...
authorghost <andreas.monzner@multimedia-labs.de>
Sun, 16 Nov 2008 11:23:21 +0000 (12:23 +0100)
committerghost <andreas.monzner@multimedia-labs.de>
Sun, 16 Nov 2008 11:57:27 +0000 (12:57 +0100)
But this needs also new drivers!

lib/dvb/db.cpp
lib/dvb/frontend.cpp
lib/python/Screens/ScanSetup.py
lib/service/servicedvb.cpp

index c6c2e855cd692eeaf5a4619990a6d737845cf610..1c33203397aa5d3847ba08042e1503fe9896cc26 100644 (file)
@@ -497,7 +497,7 @@ void eDVBDB::saveServicelist(const char *file)
                {
                        if (sat.system == eDVBFrontendParametersSatellite::System::DVB_S2)
                        {
-                               fprintf(f, "\ts %d:%d:%d:%d:%d:%d:%d:%d:%d:%d",
+                               fprintf(f, "\ts %d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d",
                                        sat.frequency, sat.symbol_rate,
                                        sat.polarisation, sat.fec,
                                        sat.orbital_position > 1800 ? sat.orbital_position - 3600 : sat.orbital_position,
@@ -505,11 +505,8 @@ void eDVBDB::saveServicelist(const char *file)
                                        flags,
                                        sat.system,
                                        sat.modulation,
-                                       sat.rolloff);
-                               if (sat.modulation == eDVBFrontendParametersSatellite::Modulation::M8PSK)
-                                       fprintf(f, ":%d\n", sat.pilot);
-                               else
-                                       fprintf(f, "\n");
+                                       sat.rolloff,
+                                       sat.pilot);
                        }
                        else
                        {
index 27ea66ec19fd12c4092a1ab76f73e81f6f33d3da..b0e92d39ea1f0a078d9717eff484f40b27969983 100644 (file)
@@ -1014,22 +1014,19 @@ void fillDictWithSatelliteData(ePyObject dict, const FRONTENDPARAMETERS &parm, e
                        break;
                }
                PutToDict(dict, "rolloff", tmp);
-               if (parm_u_qpsk_fec_inner > FEC_S2_QPSK_9_10)
+               switch(parm_inversion & 0x30)
                {
-                       switch(parm_inversion & 0x30)
-                       {
-                       case 0: // pilot off
-                               tmp = "PILOT_OFF";
-                               break;
-                       case 0x10: // pilot on
-                               tmp = "PILOT_ON";
-                               break;
-                       case 0x20: // pilot auto
-                               tmp = "PILOT_AUTO";
-                               break;
-                       }
-                       PutToDict(dict, "pilot", tmp);
+               case 0: // pilot off
+                       tmp = "PILOT_OFF";
+                       break;
+               case 0x10: // pilot on
+                       tmp = "PILOT_ON";
+                       break;
+               case 0x20: // pilot auto
+                       tmp = "PILOT_AUTO";
+                       break;
                }
+               PutToDict(dict, "pilot", tmp);
                tmp = "DVB-S2";
        }
        else
@@ -1310,7 +1307,7 @@ void eDVBFrontend::getTransponderData(ePyObject dest, bool original)
                                {
                                        const FRONTENDPARAMETERS &parm = original || m_simulate ? this->parm : front;
                                        const char *tmp = "INVERSION_AUTO";
-                                       switch(parm_inversion)
+                                       switch(parm_inversion & 3)
                                        {
                                                case INVERSION_ON:
                                                        tmp = "INVERSION_ON";
@@ -1916,10 +1913,10 @@ RESULT eDVBFrontend::prepare_sat(const eDVBFrontendParametersSatellite &feparm,
                                        return -EINVAL;
                        }
                        parm_inversion |= (feparm.rolloff << 2); // Hack.. we use bit 2..3 of inversion param for rolloff
+                       parm_inversion |= (feparm.pilot << 4); // Hack.. we use bit 4..5 of inversion param for pilot
                        if (feparm.modulation == eDVBFrontendParametersSatellite::Modulation::M8PSK) {
                                parm_u_qpsk_fec_inner = (fe_code_rate_t)((int)parm_u_qpsk_fec_inner+9);
                                // 8PSK fec driver values are decimal 9 bigger
-                               parm_inversion |= (feparm.pilot << 4); // Hack.. we use bit 4..5 of inversion param for pilot
                        }
                }
 #endif
index ab110a24027470017725d33b2be7013afb7b551f..608dcb2d2d0e1cb237102007bf695ef7c34da03c 100644 (file)
@@ -394,8 +394,7 @@ class ScanSetup(ConfigListScreen, Screen, CableTransponderSearchSupport):
                                        self.modulationEntry = getConfigListEntry(_('Modulation'), self.scan_sat.modulation)
                                        self.list.append(self.modulationEntry)
                                        self.list.append(getConfigListEntry(_('Rolloff'), self.scan_sat.rolloff))
-                                       if self.scan_sat.modulation.value == "8psk":
-                                               self.list.append(getConfigListEntry(_('Pilot'), self.scan_sat.pilot))
+                                       self.list.append(getConfigListEntry(_('Pilot'), self.scan_sat.pilot))
                        elif self.scan_type.value == "single_satellite":
                                self.updateSatList()
                                print self.scan_satselection[index_to_scan]
index 2f98ed6b1e9d15b0f7a4ce114d088daf6d8820ed..6c1e46f7bf472c125cf79e95e7b25303585fbf61 100644 (file)
@@ -174,17 +174,14 @@ void PutSatelliteDataToDict(ePyObject &dict, eDVBFrontendParametersSatellite &fe
                                case eDVBFrontendParametersSatellite::RollOff::alpha_0_20: tmp="0.20"; break;
                        }
                        PutToDict(dict, "roll off", tmp);
-                       if (feparm.modulation == eDVBFrontendParametersSatellite::Modulation::M8PSK)
+                       switch(feparm.pilot)
                        {
-                               switch(feparm.pilot)
-                               {
-                                       case eDVBFrontendParametersSatellite::Pilot::On: tmp="ON"; break;
-                                       case eDVBFrontendParametersSatellite::Pilot::Off: tmp="OFF"; break;
-                                       default:
-                                       case eDVBFrontendParametersSatellite::Pilot::Unknown: tmp="AUTO"; break;
-                               }
-                               PutToDict(dict, "pilot", tmp);
+                               case eDVBFrontendParametersSatellite::Pilot::On: tmp="ON"; break;
+                               case eDVBFrontendParametersSatellite::Pilot::Off: tmp="OFF"; break;
+                               default:
+                               case eDVBFrontendParametersSatellite::Pilot::Unknown: tmp="AUTO"; break;
                        }
+                       PutToDict(dict, "pilot", tmp);
                        tmp="DVB-S2";
                        break;
        }