From 6347d817582886ab7c7535b44601538749d06d5b Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 16 Nov 2008 12:23:21 +0100 Subject: [PATCH] =?utf8?q?Add=20possibility=20to=20set=20Pilot=20also=20fo?= =?utf8?q?r=20DVB-S2=20non=208PSK=20Transponders=20(i.e.=20the=20new=20Eur?= =?utf8?q?o1080=20Transponder=20on=207=C2=B0E)=20But=20this=20needs=20also?= =?utf8?q?=20new=20drivers!?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- lib/dvb/db.cpp | 9 +++------ lib/dvb/frontend.cpp | 29 +++++++++++++---------------- lib/python/Screens/ScanSetup.py | 3 +-- lib/service/servicedvb.cpp | 15 ++++++--------- 4 files changed, 23 insertions(+), 33 deletions(-) diff --git a/lib/dvb/db.cpp b/lib/dvb/db.cpp index c6c2e855..1c332033 100644 --- a/lib/dvb/db.cpp +++ b/lib/dvb/db.cpp @@ -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 { diff --git a/lib/dvb/frontend.cpp b/lib/dvb/frontend.cpp index 27ea66ec..b0e92d39 100644 --- a/lib/dvb/frontend.cpp +++ b/lib/dvb/frontend.cpp @@ -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 diff --git a/lib/python/Screens/ScanSetup.py b/lib/python/Screens/ScanSetup.py index ab110a24..608dcb2d 100644 --- a/lib/python/Screens/ScanSetup.py +++ b/lib/python/Screens/ScanSetup.py @@ -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] diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp index 2f98ed6b..6c1e46f7 100644 --- a/lib/service/servicedvb.cpp +++ b/lib/service/servicedvb.cpp @@ -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; } -- 2.30.2