umtrx: support for cal side A or B

This commit is contained in:
Josh Blum
2014-08-22 10:23:00 -07:00
parent a0560566cc
commit d719a3e62e
2 changed files with 11 additions and 4 deletions

View File

@@ -154,11 +154,12 @@ static void store_results(
const std::vector<result_t> &results,
const std::string &XX,
const std::string &xx,
const std::string &what
const std::string &what,
const std::string &which
){
//extract eeprom serial
uhd::property_tree::sptr tree = usrp->get_device()->get_tree();
const uhd::fs_path db_path = "/mboards/0/dboards/A/" + xx + "_eeprom";
const uhd::fs_path db_path = "/mboards/0/dboards/"+which+"/" + xx + "_eeprom";
const uhd::usrp::dboard_eeprom_t db_eeprom = tree->access<uhd::usrp::dboard_eeprom_t>(db_path).get();
if (db_eeprom.serial.empty()) throw std::runtime_error(XX + " dboard has empty serial!");