aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb/sec.cpp
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2008-10-14 10:59:58 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2008-10-14 10:59:58 +0000
commit0ad0f796a6b120c2894fa994cbb9ef299a71cbaf (patch)
tree3119dd3d4371d954f6b74309b50f8116ad580a7e /lib/dvb/sec.cpp
parent1a4a591969bc984eaeb59001bf48b1cdab3a6ed9 (diff)
downloadenigma2-0ad0f796a6b120c2894fa994cbb9ef299a71cbaf.tar.gz
enigma2-0ad0f796a6b120c2894fa994cbb9ef299a71cbaf.zip
fix incorrect calculated score when loopthrough to a motorized lnb
Diffstat (limited to 'lib/dvb/sec.cpp')
-rw-r--r--lib/dvb/sec.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/dvb/sec.cpp b/lib/dvb/sec.cpp
index 0f2069c1..f7933d18 100644
--- a/lib/dvb/sec.cpp
+++ b/lib/dvb/sec.cpp
@@ -128,6 +128,7 @@ eDVBSatelliteEquipmentControl::eDVBSatelliteEquipmentControl(eSmartPtrList<eDVBR
int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite &sat, iDVBFrontend *fe, int slot_id, int *highest_score_lnb)
{
bool simulate = ((eDVBFrontend*)fe)->is_simulate();
+ bool direct_connected = m_not_linked_slot_mask & slot_id;
int score=0, satcount=0;
if (highest_score_lnb)
@@ -153,7 +154,6 @@ int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite
if ( sit != lnb_param.m_satellites.end())
{
bool diseqc=false;
- bool direct_connected = m_not_linked_slot_mask & slot_id;
long band=0,
linked_prev_ptr=-1,
linked_next_ptr=-1,
@@ -268,12 +268,6 @@ int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite
eSecDebugNoSimulate("ret4 %d", ret);
}
- if (ret && rotor && curRotorPos != -1 && direct_connected) {
- ret -= abs(curRotorPos-sat.orbital_position);
- }
-
- eSecDebugNoSimulate("ret5 %d", ret);
-
if (ret)
if (satpos_depends_ptr != -1)
{
@@ -286,9 +280,14 @@ int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite
if (!rotor || curRotorPos != sat.orbital_position)
ret=0;
}
- eSecDebugNoSimulate("ret6 %d", ret);
+ eSecDebugNoSimulate("ret5 %d", ret);
}
+ if (ret && rotor && curRotorPos != -1 && (direct_connected || !satpos_depends_ptr) ) // direct conntected or loopthrough!
+ ret -= abs(curRotorPos-sat.orbital_position);
+
+ eSecDebugNoSimulate("ret6 %d", ret);
+
if (ret)
{
int lof = sat.frequency > lnb_param.m_lof_threshold ?
@@ -311,7 +310,7 @@ int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite
}
if (score && satcount)
score -= (satcount-1);
- if (score && m_not_linked_slot_mask & slot_id)
+ if (score && direct_connected)
score += 5; // increase score for tuners with direct sat connection
eSecDebugNoSimulate("final score %d", score);
return score;