mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
examples: Move setup time in tx_waveforms after tuning
This avoids potential LO-lock-detect failures.
This commit is contained in:
parent
52860eeb67
commit
f646ff838b
@ -192,8 +192,6 @@ int UHD_SAFE_MAIN(int argc, char* argv[])
|
||||
usrp->set_tx_antenna(ant, channel);
|
||||
}
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1)); // allow for some setup time
|
||||
|
||||
// error when the waveform is not possible to generate
|
||||
if (std::abs(wave_freq) > usrp->get_tx_rate() / 2) {
|
||||
throw std::runtime_error("wave freq out of Nyquist zone");
|
||||
@ -283,6 +281,12 @@ int UHD_SAFE_MAIN(int argc, char* argv[])
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
// Allow for some setup time: In particular, LOs and other tuning-related
|
||||
// components might need some time to lock. 1 second is way more than enough
|
||||
// time. If there were no sleep time at all, we might see LO lock errors
|
||||
// as the following check does not include a polling loop.
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
|
||||
// Check Ref and LO Lock detect
|
||||
std::vector<std::string> sensor_names;
|
||||
const size_t tx_sensor_chan = channel_nums.empty() ? 0 : channel_nums[0];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user