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 c6c2e85..1c33203 100644 (file)
@@ -497,7 +497,7 @@ void eDVBDB::saveServicelist(const char *file)
                {
                        if (sat.system == eDVBFrontendParametersSatellite::System::DVB_S2)
                        {
                {
                        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,
                                        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,
                                        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
                        {
                        }
                        else
                        {
index 27ea66e..b0e92d3 100644 (file)
@@ -1014,22 +1014,19 @@ void fillDictWithSatelliteData(ePyObject dict, const FRONTENDPARAMETERS &parm, e
                        break;
                }
                PutToDict(dict, "rolloff", tmp);
                        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
                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";
                                {
                                        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";
                                        {
                                                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
                                        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
                        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
                        }
                }
 #endif
index ab110a2..608dcb2 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))
                                        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]
                        elif self.scan_type.value == "single_satellite":
                                self.updateSatList()
                                print self.scan_satselection[index_to_scan]
index 2f98ed6..6c1e46f 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);
                                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;
        }
                        tmp="DVB-S2";
                        break;
        }