diff options
Diffstat (limited to 'host/lib/usrp/dboard/twinrx/twinrx_experts.cpp')
-rw-r--r-- | host/lib/usrp/dboard/twinrx/twinrx_experts.cpp | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/host/lib/usrp/dboard/twinrx/twinrx_experts.cpp b/host/lib/usrp/dboard/twinrx/twinrx_experts.cpp index ddaa4211e..3b41972da 100644 --- a/host/lib/usrp/dboard/twinrx/twinrx_experts.cpp +++ b/host/lib/usrp/dboard/twinrx/twinrx_experts.cpp @@ -30,6 +30,17 @@ using namespace uhd::math; using namespace uhd::usrp::dboard::twinrx; /*!--------------------------------------------------------- + * twinrx_scheduling_expert::resolve + * --------------------------------------------------------- + */ +void twinrx_scheduling_expert::resolve() +{ + // Currently a straight pass-through. To be expanded as needed + // when more advanced scheduling is needed + _rx_frontend_time = _command_time; +} + +/*!--------------------------------------------------------- * twinrx_freq_path_expert::resolve * --------------------------------------------------------- */ @@ -222,6 +233,19 @@ void twinrx_freq_coercion_expert::resolve() */ void twinrx_nyquist_expert::resolve() { + // Do not execute when clear_command_time is called. + // This is a transition of the command time from non-zero to zero. + if (_rx_frontend_time == time_spec_t(0.0) and _cached_cmd_time != time_spec_t(0.0)) { + _cached_cmd_time = _rx_frontend_time; + return; + } + + // Do not execute twice for the same command time unless untimed + if (_rx_frontend_time == _cached_cmd_time and _rx_frontend_time != time_spec_t(0.0)) { + return; + } + _cached_cmd_time = _rx_frontend_time; + double if_freq_sign = 1.0; if (_lo1_inj_side == INJ_HIGH_SIDE) if_freq_sign *= -1.0; if (_lo2_inj_side == INJ_HIGH_SIDE) if_freq_sign *= -1.0; @@ -570,10 +594,6 @@ void twinrx_settings_expert::_resolve_lox_freq( ch0_freq_c = _set_lox_synth_freq(lo_stage, twinrx_ctrl::CH2, ch0_freq_d); } else if (synth0_mapping == MAPPING_SHARED or synth1_mapping == MAPPING_SHARED) { // If any synthesizer is being shared then we are not in hopping mode - if (rf_freq_ppm_t(ch0_freq_d) != ch1_freq_d) { - UHD_MSG(warning) << - "Incompatible RF/LO frequencies for LO sharing. Using Ch0 settings for both channels."; - } twinrx_ctrl::channel_t ch = (synth0_mapping == MAPPING_SHARED) ? twinrx_ctrl::CH1 : twinrx_ctrl::CH2; ch0_freq_c = _set_lox_synth_freq(lo_stage, ch, ch0_freq_d); ch1_freq_c = ch0_freq_c; @@ -597,10 +617,6 @@ void twinrx_settings_expert::_resolve_lox_freq( ch1_freq_c = _set_lox_synth_freq(lo_stage, twinrx_ctrl::CH2, ch1_freq_d); } else if (synth0_mapping == MAPPING_SHARED or synth1_mapping == MAPPING_SHARED) { // If any synthesizer is being shared then we are not in hopping mode - if (rf_freq_ppm_t(ch0_freq_d) != ch1_freq_d) { - UHD_MSG(warning) << - "Incompatible RF/LO frequencies for LO sharing. Using Ch0 settings for both channels."; - } twinrx_ctrl::channel_t ch = (synth0_mapping == MAPPING_SHARED) ? twinrx_ctrl::CH1 : twinrx_ctrl::CH2; ch0_freq_c = _set_lox_synth_freq(lo_stage, ch, ch0_freq_d); ch1_freq_c = ch0_freq_c; |