From: ghost Date: Wed, 3 Dec 2008 17:03:03 +0000 (+0100) Subject: dont switch to 18V and measure input current, when slow rotor tuning is selected X-Git-Tag: 2.6.0~558^2~6 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/191d68c0c07505af44f15a62fd59ac4216211e89?hp=2e5c13aebb389a6d74e4130658ccee6a863d01f6 dont switch to 18V and measure input current, when slow rotor tuning is selected --- 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;