rf: moved setting clock rate to fix x300 segfault

master
Ismael Gomez 9 years ago
parent 7edc69052b
commit 40028f45af

@ -262,6 +262,12 @@ int rf_uhd_open(char *args, void **h)
return -1;
}
/* Find out if the master clock rate is configurable */
double cur_clock, new_clock;
uhd_usrp_get_master_clock_rate(handler->usrp, 0, &cur_clock);
printf("Trying to dynamically change Master clock...\n");
uhd_usrp_set_master_clock_rate(handler->usrp, cur_clock/2, 0);
size_t channel = 0;
uhd_stream_args_t stream_args = {
.cpu_format = "fc32",
@ -301,11 +307,6 @@ int rf_uhd_open(char *args, void **h)
uhd_rx_metadata_make(&handler->rx_md_first);
uhd_tx_metadata_make(&handler->tx_md, false, 0, 0, false, false);
/* Find out if the master clock rate is configurable */
double cur_clock, new_clock;
uhd_usrp_get_master_clock_rate(handler->usrp, 0, &cur_clock);
printf("Trying to dynamically change Master clock...\n");
uhd_usrp_set_master_clock_rate(handler->usrp, cur_clock/2, 0);
uhd_usrp_get_master_clock_rate(handler->usrp, 0, &new_clock);
if (new_clock == cur_clock) {
handler->dynamic_rate = false;

Loading…
Cancel
Save