aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb/sec.cpp
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2005-11-16 16:50:27 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2005-11-16 16:50:27 +0000
commite768f7667ec5da0e331725de8a582365358cf7e3 (patch)
treeb884b58e3ede7547306f141c45786b154d7313b5 /lib/dvb/sec.cpp
parent82aa264d3b1732f8c5883a13401a45cb32e00bc1 (diff)
downloadenigma2-e768f7667ec5da0e331725de8a582365358cf7e3.tar.gz
enigma2-e768f7667ec5da0e331725de8a582365358cf7e3.zip
auto tuner selection is now working (this breaks allocateRawChannel..)
TODO: handling for linked tuners (loop through)
Diffstat (limited to 'lib/dvb/sec.cpp')
-rw-r--r--lib/dvb/sec.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/dvb/sec.cpp b/lib/dvb/sec.cpp
index e3fbf26f..aaf459fb 100644
--- a/lib/dvb/sec.cpp
+++ b/lib/dvb/sec.cpp
@@ -62,6 +62,40 @@ eDVBSatelliteEquipmentControl::eDVBSatelliteEquipmentControl()
setToneMode(eDVBSatelliteSwitchParameters::HILO);
}
+int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite &sat, iDVBFrontend *fe, int frontend_id )
+{
+ int ret=0;
+
+ for (int idx=0; idx <= m_lnbidx; ++idx )
+ {
+ eDVBSatelliteLNBParameters &lnb_param = m_lnbs[idx];
+ if ( lnb_param.tuner_mask & frontend_id ) // lnb for correct tuner?
+ {
+ eDVBSatelliteDiseqcParameters &di_param = lnb_param.m_diseqc_parameters;
+ eDVBSatelliteRotorParameters &rotor_param = lnb_param.m_rotor_parameters;
+
+ std::map<int, eDVBSatelliteSwitchParameters>::iterator sit =
+ lnb_param.m_satellites.find(sat.orbital_position);
+ if ( sit != lnb_param.m_satellites.end())
+ {
+ int curRotorPos = -1;
+ fe->getData(6, curRotorPos);
+
+ if ( di_param.m_diseqc_mode == eDVBSatelliteDiseqcParameters::V1_2 ) // ROTOR
+ {
+ if ( curRotorPos == sat.orbital_position )
+ ret=20;
+ else
+ ret=10;
+ }
+ else if (!ret)
+ ret=40;
+ }
+ }
+ }
+ return ret;
+}
+
RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPARAMETERS &parm, eDVBFrontendParametersSatellite &sat)
{
for (int idx=0; idx <= m_lnbidx; ++idx )