disable dynamic rate for x300

This commit is contained in:
Ismael Gomez 2016-06-27 22:06:43 +02:00
parent 1399d44d0e
commit 3d592aeab7
1 changed files with 17 additions and 16 deletions

View File

@ -246,7 +246,7 @@ int rf_uhd_open(char *args, void **h)
// Allow NULL parameter
if (args == NULL) {
args = "";
} else {
}
/* If device type or name not given in args, choose a B200 */
if (args[0]=='\0') {
if (find_string(devices_str, "type=b200") && !strstr(args, "recv_frame_size")) {
@ -255,13 +255,14 @@ int rf_uhd_open(char *args, void **h)
} else if (find_string(devices_str, "type=x300")) {
// Else if X300 is available, set master clock rate now (can't be changed later)
args = "type=x300,master_clock_rate=184.32e6";
handler->dynamic_rate = false;
}
} else {
// If args is set and x300 type is specified, make sure master_clock_rate is defined
if (strstr(args, "type=x300") && !strstr(args, "master_clock_rate")) {
sprintf(args2, "%s,master_clock_rate=184.32e6",args);
args = args2;
}
handler->dynamic_rate = false;
}
}