diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2005-04-25 14:37:54 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2005-04-25 14:37:54 +0000 |
| commit | 949a07352f59a32a5ae00f30650a6d067ef59b77 (patch) | |
| tree | f9c33061c2c112d751e9832e0b15410c922e818a /lib/dvb/sec.cpp | |
| parent | 9a236ba05f412b3f6853f54c5665cf0e5398d7d3 (diff) | |
| download | enigma2-949a07352f59a32a5ae00f30650a6d067ef59b77.tar.gz enigma2-949a07352f59a32a5ae00f30650a6d067ef59b77.zip | |
do voltage and tone control in SEC_SEND_SEQUENCE on old api..sorry for this hack
Diffstat (limited to 'lib/dvb/sec.cpp')
| -rw-r--r-- | lib/dvb/sec.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/lib/dvb/sec.cpp b/lib/dvb/sec.cpp index 1555090c..a668ebe7 100644 --- a/lib/dvb/sec.cpp +++ b/lib/dvb/sec.cpp @@ -25,7 +25,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA { int hi; eDebug("(very) ugly and hardcoded eDVBSatelliteEquipmentControl"); - + if (sat.frequency > 11700000) hi = 1; else @@ -50,24 +50,32 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA } parm.u.qpsk.SYMBOLRATE = sat.symbol_rate; - frontend.setVoltage((sat.polarisation == eDVBFrontendParametersSatellite::Polarisation::Vertical) ? iDVBFrontend::voltage13 : iDVBFrontend::voltage18); - eDVBDiseqcCommand diseqc; - + +#if HAVE_DVB_API_VERSION < 3 + diseqc.voltage = sat.polarisation == eDVBFrontendParametersSatellite::Polarisation::Vertical ? iDVBFrontend::voltage13 : iDVBFrontend::voltage18; + diseqc.tone = hi ? iDVBFrontend::toneOn : iDVBFrontend::toneOff; +#else + frontend.setVoltage(sat.polarisation == eDVBFrontendParametersSatellite::Polarisation::Vertical ? iDVBFrontend::voltage13 : iDVBFrontend::voltage18); +#endif + diseqc.len = 4; diseqc.data[0] = 0xe0; diseqc.data[1] = 0x10; diseqc.data[2] = 0x38; diseqc.data[3] = 0xF0; - + if (hi) diseqc.data[3] |= 1; - + if (sat.polarisation == eDVBFrontendParametersSatellite::Polarisation::Horizontal) diseqc.data[3] |= 2; frontend.sendDiseqc(diseqc); + +#if HAVE_DVB_API_VERSION > 2 frontend.setTone(hi ? iDVBFrontend::toneOn : iDVBFrontend::toneOff); +#endif return 0; } |
