From 98bd84035be7221bd74f6fe7f70afc5fc7ae633a Mon Sep 17 00:00:00 2001 From: Dmitry Sharshakov Date: Sat, 11 Nov 2023 23:39:42 +0300 Subject: [PATCH] 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: https://github.com/EttusResearch/uhd/commit/1383fde3457168ed759d6ed3b913dfae8a6085ef --- host/cores/apply_corrections.cpp | 2 +- host/utils/usrp_cal_utils.hpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/host/cores/apply_corrections.cpp b/host/cores/apply_corrections.cpp index 54ae9ed9..4a19c49c 100644 --- a/host/cores/apply_corrections.cpp +++ b/host/cores/apply_corrections.cpp @@ -104,7 +104,7 @@ static void apply_fe_corrections( const uhd::usrp::dboard_eeprom_t db_eeprom = sub_tree->access(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; diff --git a/host/utils/usrp_cal_utils.hpp b/host/utils/usrp_cal_utils.hpp index 726e3cbc..40ba2584 100644 --- a/host/utils/usrp_cal_utils.hpp +++ b/host/utils/usrp_cal_utils.hpp @@ -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)){