X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/a2f2b1a1523b784e70cf3bd9a74b4cc5cfdbb3de..a9589a258f6173fc8af17d802def10d0d918bc16:/lib/dvb/sec.cpp diff --git a/lib/dvb/sec.cpp b/lib/dvb/sec.cpp index 6f64cf56..d14acc85 100644 --- a/lib/dvb/sec.cpp +++ b/lib/dvb/sec.cpp @@ -99,7 +99,7 @@ int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite if ( sat.frequency > lnb_param.m_lof_threshold ) band |= 1; - if (!(sat.polarisation & eDVBFrontendParametersSatellite::Polarisation::Vertical)) + if (!(sat.polarisation & eDVBFrontendParametersSatellite::Polarisation_Vertical)) band |= 2; if (di_param.m_diseqc_mode >= eDVBSatelliteDiseqcParameters::V1_0) @@ -373,7 +373,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA if ( sat.frequency > lnb_param.m_lof_threshold ) band |= 1; - if (!(sat.polarisation & eDVBFrontendParametersSatellite::Polarisation::Vertical)) + if (!(sat.polarisation & eDVBFrontendParametersSatellite::Polarisation_Vertical)) band |= 2; int lof = (band&1)?lnb_param.m_lof_hi:lnb_param.m_lof_lo; @@ -390,11 +390,11 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA frontend.setData(eDVBFrontend::FREQ_OFFSET, sat.frequency - parm.FREQUENCY); if ( voltage_mode == eDVBSatelliteSwitchParameters::_14V - || ( sat.polarisation & eDVBFrontendParametersSatellite::Polarisation::Vertical + || ( sat.polarisation & eDVBFrontendParametersSatellite::Polarisation_Vertical && voltage_mode == eDVBSatelliteSwitchParameters::HV ) ) voltage = VOLTAGE(13); else if ( voltage_mode == eDVBSatelliteSwitchParameters::_18V - || ( !(sat.polarisation & eDVBFrontendParametersSatellite::Polarisation::Vertical) + || ( !(sat.polarisation & eDVBFrontendParametersSatellite::Polarisation_Vertical) && voltage_mode == eDVBSatelliteSwitchParameters::HV ) ) voltage = VOLTAGE(18); if ( (sw_param.m_22khz_signal == eDVBSatelliteSwitchParameters::ON) @@ -563,7 +563,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA compare.tone = iDVBFrontend::toneOff; sec_sequence.push_back( eSecCommand(eSecCommand::IF_TONE_GOTO, compare) ); sec_sequence.push_back( eSecCommand(eSecCommand::SET_TONE, iDVBFrontend::toneOff) ); - sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_CONT_TONE]) ); + sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_CONT_TONE_DISABLE_BEFORE_DISEQC]) ); if (diseqc13V) vlt = iDVBFrontend::voltage13; @@ -705,7 +705,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA compare.tone = iDVBFrontend::toneOff; sec_sequence.push_back( eSecCommand(eSecCommand::IF_TONE_GOTO, compare) ); sec_sequence.push_back( eSecCommand(eSecCommand::SET_TONE, iDVBFrontend::toneOff) ); - sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_CONT_TONE]) ); + sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_CONT_TONE_DISABLE_BEFORE_DISEQC]) ); compare.voltage = iDVBFrontend::voltageOff; compare.steps = +4; @@ -839,7 +839,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA compare.tone = tone; sec_sequence.push_back( eSecCommand(eSecCommand::IF_TONE_GOTO, compare) ); sec_sequence.push_back( eSecCommand(eSecCommand::SET_TONE, tone) ); - sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_CONT_TONE]) ); + sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_FINAL_CONT_TONE_CHANGE]) ); sec_sequence.push_back( eSecCommand(eSecCommand::SET_FRONTEND) ); cmd.direction=1; // check for running rotor @@ -884,7 +884,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA compare.tone = tone; sec_sequence.push_back( eSecCommand(eSecCommand::IF_TONE_GOTO, compare) ); sec_sequence.push_back( eSecCommand(eSecCommand::SET_TONE, tone) ); - sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_CONT_TONE]) ); + sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_FINAL_CONT_TONE_CHANGE]) ); } sec_sequence.push_back( eSecCommand(eSecCommand::UPDATE_CURRENT_SWITCHPARMS) ); @@ -897,11 +897,11 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA compare.voltage = iDVBFrontend::voltageOff; sec_sequence.push_back( eSecCommand(eSecCommand::IF_NOT_VOLTAGE_GOTO, compare) ); sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, iDVBFrontend::voltage13) ); - sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, 50 ) ); + sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_ENABLE_VOLTAGE_BEFORE_SWITCH_CMDS] ) ); sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, iDVBFrontend::voltage18_5) ); sec_sequence.push_back( eSecCommand(eSecCommand::SET_TONE, iDVBFrontend::toneOff) ); - sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_MOTOR_CMD]) ); // wait 150msec after voltage change + sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_SWITCH_CMDS]) ); // wait 20 ms after voltage change eDVBDiseqcCommand diseqc; memset(diseqc.data, 0, MAX_DISEQC_LENGTH); @@ -936,12 +936,12 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA eDebugNoSimulate("found no useable satellite configuration for %s freq %d%s %s on orbital position (%d)", sat.system ? "DVB-S2" : "DVB-S", sat.frequency, - sat.polarisation == eDVBFrontendParametersSatellite::Polarisation::Horizontal ? "H" : - eDVBFrontendParametersSatellite::Polarisation::Vertical ? "V" : - eDVBFrontendParametersSatellite::Polarisation::CircularLeft ? "CL" : "CR", - sat.modulation == eDVBFrontendParametersSatellite::Modulation::Auto ? "AUTO" : - eDVBFrontendParametersSatellite::Modulation::QPSK ? "QPSK" : - eDVBFrontendParametersSatellite::Modulation::M8PSK ? "8PSK" : "QAM16", + sat.polarisation == eDVBFrontendParametersSatellite::Polarisation_Horizontal ? "H" : + eDVBFrontendParametersSatellite::Polarisation_Vertical ? "V" : + eDVBFrontendParametersSatellite::Polarisation_CircularLeft ? "CL" : "CR", + sat.modulation == eDVBFrontendParametersSatellite::Modulation_Auto ? "AUTO" : + eDVBFrontendParametersSatellite::Modulation_QPSK ? "QPSK" : + eDVBFrontendParametersSatellite::Modulation_8PSK ? "8PSK" : "QAM16", sat.orbital_position ); return -1; }