Adding support to B205mini*

This commit is contained in:
FlUxIuS 2023-01-04 13:37:28 +01:00
parent cfcd34b06e
commit 619f601f5a
1 changed files with 28 additions and 24 deletions

View File

@ -4,6 +4,7 @@
*
* Copyright 2010-2011 Free Software Foundation, Inc.
* Copyright 2014 Ettus Research LLC
* Patched by FlUxIuS @ Penthertz SAS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -234,33 +235,36 @@ double UHDDevice::setRxGain(double db)
*/
bool UHDDevice::parse_dev_type()
{
std::string mboard_str, dev_str;
uhd::property_tree::sptr prop_tree;
size_t usrp2_str, b200_str, b210_str, x300_str, x310_str;
std::string mboard_str, dev_str;
uhd::property_tree::sptr prop_tree;
size_t usrp2_str, b200_str, b210_str, x300_str, x310_str, b205mini_str;
prop_tree = usrp_dev->get_device()->get_tree();
dev_str = prop_tree->access<std::string>("/name").get();
mboard_str = usrp_dev->get_mboard_name();
prop_tree = usrp_dev->get_device()->get_tree();
dev_str = prop_tree->access<std::string>("/name").get();
mboard_str = usrp_dev->get_mboard_name();
usrp2_str = dev_str.find("USRP2");
b200_str = mboard_str.find("B200");
b210_str = mboard_str.find("B210");
x300_str = mboard_str.find("X300");
x310_str = mboard_str.find("X310");
usrp2_str = dev_str.find("USRP2");
b200_str = mboard_str.find("B200");
b205mini_str = mboard_str.find("B205mini");
b210_str = mboard_str.find("B210");
x300_str = mboard_str.find("X300");
x310_str = mboard_str.find("X310");
if (b200_str != std::string::npos) {
dev_type = B2XX;
} else if (b210_str != std::string::npos) {
dev_type = B2XX;
} else if (usrp2_str != std::string::npos) {
dev_type = USRP2;
} else if (x300_str != std::string::npos) {
dev_type = X300;
} else if (x310_str != std::string::npos) {
dev_type = X300;
} else {
goto nosupport;
}
if (b200_str != std::string::npos) {
dev_type = B2XX;
} else if (b205mini_str != std::string::npos) {
dev_type = B2XX;
} else if (b210_str != std::string::npos) {
dev_type = B2XX;
} else if (usrp2_str != std::string::npos) {
dev_type = USRP2;
} else if (x300_str != std::string::npos) {
dev_type = X300;
} else if (x310_str != std::string::npos) {
dev_type = X300;
} else {
goto nosupport;
}
tx_window = TX_WINDOW_FIXED;
LOG(INFO) << "Using fixed transmit window for "