Commit 41896be7 authored by Raymond Knopp's avatar Raymond Knopp

modifications to allow for multiple usrps connected to same UHD instance

parent 6849e297
......@@ -1082,15 +1082,21 @@ extern "C" {
LOG_E(HW,"No USRP Device Found.\n ");
free(s);
return -1;
} else if (device_adds.size() > 1) {
LOG_E(HW,"More than one USRP Device Found. Please specify device more precisely in config file.\n");
} else if (device_adds.size() > 2) {
LOG_E(HW,"More than two USRP Devices Found. Please specify devices more precisely in config file.\n");
free(s);
return -1;
}
LOG_I(HW,"Found USRP %s\n", device_adds[0].get("type").c_str());
double usrp_master_clock;
if (device_adds.size>1 && strcmp(device_adds[0].get("type"),device_adds[1].get("type")) != 0) {
LOG_E(HW,"Please use the same type of USRP\n");
free(s);
return(-1);
}
LOG_I(HW,"Found %d USRP of type %s\n", device_adds.size,device_adds[0].get("type").c_str());
if (device_adds[0].get("type") == "b200") {
printf("Found USRP b200\n");
device->type = USRP_B200_DEV;
......@@ -1116,7 +1122,7 @@ extern "C" {
s->usrp = uhd::usrp::multi_usrp::make(args);
// lock mboard clocks
if (openair0_cfg[0].clock_source == internal)
if (openair0_cfg[0].clock_source == internal && device_adds.size == 1)
s->usrp->set_clock_source("internal");
else
s->usrp->set_clock_source("external");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment