diff options
| author | ghost <andreas.monzner@multimedia-labs.de> | 2008-12-13 01:33:05 +0100 |
|---|---|---|
| committer | ghost <andreas.monzner@multimedia-labs.de> | 2008-12-13 01:33:05 +0100 |
| commit | b833353b5285a547eb18c079aa860c9ee2765d6e (patch) | |
| tree | 21e8101fddc3cbf8439af55f1cda6ec6b32ccca3 /lib/dvb/sec.cpp | |
| parent | 32800bd26365ee1ec17590b76ebf59ed8489ddfe (diff) | |
| download | enigma2-b833353b5285a547eb18c079aa860c9ee2765d6e.tar.gz enigma2-b833353b5285a547eb18c079aa860c9ee2765d6e.zip | |
add possibility to set manual lnb priority (only in advanced sat config)
range 0..64 to decrease priorities (this is lower as all auto given priorities)
range 14000..14064 this is higher than auto given rotor priorities
range 19000..19064 this is higher than each auto given priorities
Diffstat (limited to 'lib/dvb/sec.cpp')
| -rw-r--r-- | lib/dvb/sec.cpp | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/lib/dvb/sec.cpp b/lib/dvb/sec.cpp index 751a5453..1022b955 100644 --- a/lib/dvb/sec.cpp +++ b/lib/dvb/sec.cpp @@ -140,7 +140,7 @@ int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite { bool rotor=false; eDVBSatelliteLNBParameters &lnb_param = m_lnbs[idx]; - if ( lnb_param.slot_mask & slot_id ) // lnb for correct tuner? + if ( lnb_param.m_slot_mask & slot_id ) // lnb for correct tuner? { int ret = 0; eDVBSatelliteDiseqcParameters &di_param = lnb_param.m_diseqc_parameters; @@ -297,6 +297,9 @@ int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite ret=0; } + if (ret && lnb_param.m_prio != -1) + ret = lnb_param.m_prio; + eSecDebugNoSimulate("ret %d, score old %d", ret, score); if (ret > score) { @@ -309,7 +312,12 @@ int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite } } if (score && satcount) - score -= (satcount-1); + { + if (score > (satcount-1)) + score -= (satcount-1); + else + score = 1; // min score + } if (score && direct_connected) score += 5; // increase score for tuners with direct sat connection eSecDebugNoSimulate("final score %d", score); @@ -963,7 +971,8 @@ RESULT eDVBSatelliteEquipmentControl::clear() for (int i=0; i <= m_lnbidx; ++i) { m_lnbs[i].m_satellites.clear(); - m_lnbs[i].slot_mask = 0; + m_lnbs[i].m_slot_mask = 0; + m_lnbs[i].m_prio = -1; // auto } m_lnbidx=-1; @@ -1021,7 +1030,7 @@ RESULT eDVBSatelliteEquipmentControl::setLNBSlotMask(int slotmask) { eSecDebug("eDVBSatelliteEquipmentControl::setLNBSlotMask(%d)", slotmask); if ( currentLNBValid() ) - m_lnbs[m_lnbidx].slot_mask = slotmask; + m_lnbs[m_lnbidx].m_slot_mask = slotmask; else return -ENOENT; return 0; @@ -1067,6 +1076,17 @@ RESULT eDVBSatelliteEquipmentControl::setLNBIncreasedVoltage(bool onoff) return 0; } +RESULT eDVBSatelliteEquipmentControl::setLNBPrio(int prio) +{ + eSecDebug("eDVBSatelliteEquipmentControl::setLNBPrio(%d)", prio); + if ( currentLNBValid() ) + m_lnbs[m_lnbidx].m_prio = prio; + else + return -ENOENT; + return 0; +} + + /* DiSEqC Specific Parameters */ RESULT eDVBSatelliteEquipmentControl::setDiSEqCMode(int diseqcmode) { |
