usrp_cal_utils: use UHD 4 calibration data path

UHD 4 removed get_app_path, replace it with designated calibration data directory.

This change will require users to move calibration blobs to new location for UHD 4 or recalibrate.

Reference: 1383fde345
This commit is contained in:
Dmitry Sharshakov
2023-11-11 23:39:42 +03:00
committed by Alexander Chemeris
parent 20ab77fe91
commit c59bb6d776
2 changed files with 2 additions and 4 deletions

View File

@@ -104,7 +104,7 @@ static void apply_fe_corrections(
const uhd::usrp::dboard_eeprom_t db_eeprom = sub_tree->access<uhd::usrp::dboard_eeprom_t>(db_path).get();
//make the calibration file path
const fs::path cal_data_path = fs::path(uhd::get_app_path()) / ".uhd" / "cal" / (file_prefix + db_eeprom.serial + ".csv");
const fs::path cal_data_path = fs::path(uhd::get_cal_data_path()) / (file_prefix + db_eeprom.serial + ".csv");
UHD_MSG(status) << "Looking for FE correction at: " << cal_data_path.c_str() << "... ";
if (not fs::exists(cal_data_path)) {
UHD_MSG(status) << "Not found" << std::endl;

View File

@@ -138,9 +138,7 @@ static void store_results(
std::string serial = get_serial(usrp, rx_tx);
//make the calibration file path
fs::path cal_data_path = fs::path(uhd::get_app_path()) / ".uhd";
fs::create_directory(cal_data_path);
cal_data_path = cal_data_path / "cal";
fs::path cal_data_path = fs::path(uhd::get_cal_data_path());
fs::create_directory(cal_data_path);
cal_data_path = cal_data_path / str(boost::format("%s_%s_cal_v0.2_%s.csv") % rx_tx % what % serial);
if (fs::exists(cal_data_path)){