From 191d68c0c07505af44f15a62fd59ac4216211e89 Mon Sep 17 00:00:00 2001 From: ghost Date: Wed, 3 Dec 2008 18:03:03 +0100 Subject: dont switch to 18V and measure input current, when slow rotor tuning is selected --- lib/dvb/sec.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'lib/dvb/sec.cpp') diff --git a/lib/dvb/sec.cpp b/lib/dvb/sec.cpp index 39124b34..a56dbf04 100644 --- a/lib/dvb/sec.cpp +++ b/lib/dvb/sec.cpp @@ -797,17 +797,22 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA bool turn_fast = need_turn_fast(rotor_param.m_inputpower_parameters.m_turning_speed); eSecCommand::rotor cmd; eSecCommand::pair compare; - compare.voltage = VOLTAGE(18); + if (turn_fast) + compare.voltage = VOLTAGE(18); + else + compare.voltage = VOLTAGE(13); compare.steps = +3; sec_sequence.push_back( eSecCommand(eSecCommand::IF_VOLTAGE_GOTO, compare) ); sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, compare.voltage) ); // measure idle power values - sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_MEASURE_IDLE_INPUTPOWER]) ); // wait 150msec after voltage change - sec_sequence.push_back( eSecCommand(eSecCommand::MEASURE_IDLE_INPUTPOWER, 1) ); - compare.val = 1; compare.steps = -2; - sec_sequence.push_back( eSecCommand(eSecCommand::IF_MEASURE_IDLE_WAS_NOT_OK_GOTO, compare) ); - sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, VOLTAGE(13)) ); + if (turn_fast) { + sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_MEASURE_IDLE_INPUTPOWER]) ); // wait 150msec after voltage change + sec_sequence.push_back( eSecCommand(eSecCommand::MEASURE_IDLE_INPUTPOWER, 1) ); + compare.val = 1; + sec_sequence.push_back( eSecCommand(eSecCommand::IF_MEASURE_IDLE_WAS_NOT_OK_GOTO, compare) ); + sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, VOLTAGE(13)) ); + } sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_MEASURE_IDLE_INPUTPOWER]) ); // wait 150msec before measure sec_sequence.push_back( eSecCommand(eSecCommand::MEASURE_IDLE_INPUTPOWER, 0) ); compare.val = 0; -- cgit v1.2.3 From 2ff2e2c4f2a413b36d3eeafee3439ec5df38c59d Mon Sep 17 00:00:00 2001 From: ghost Date: Wed, 3 Dec 2008 20:01:01 +0100 Subject: hopefully finally fix "second cable of motorized LNB" --- lib/dvb/sec.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/dvb/sec.cpp') diff --git a/lib/dvb/sec.cpp b/lib/dvb/sec.cpp index a56dbf04..751a5453 100644 --- a/lib/dvb/sec.cpp +++ b/lib/dvb/sec.cpp @@ -283,7 +283,7 @@ int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite eSecDebugNoSimulate("ret5 %d", ret); } - if (ret && rotor && curRotorPos != -1 && (direct_connected || satpos_depends_ptr == -1) ) // direct conntected or loopthrough! + if (ret && rotor && curRotorPos != -1) ret -= abs(curRotorPos-sat.orbital_position); eSecDebugNoSimulate("ret6 %d", ret); -- cgit v1.2.3