mirror of
				https://github.com/fairwaves/UHD-Fairwaves.git
				synced 2025-11-03 05:23:14 +00:00 
			
		
		
		
	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:
		
				
					committed by
					
						
						Alexander Chemeris
					
				
			
			
				
	
			
			
			
						parent
						
							20ab77fe91
						
					
				
				
					commit
					c59bb6d776
				
			@@ -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();
 | 
					    const uhd::usrp::dboard_eeprom_t db_eeprom = sub_tree->access<uhd::usrp::dboard_eeprom_t>(db_path).get();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    //make the calibration file path
 | 
					    //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() << "...  ";
 | 
					    UHD_MSG(status) << "Looking for FE correction at: " << cal_data_path.c_str() << "...  ";
 | 
				
			||||||
    if (not fs::exists(cal_data_path)) {
 | 
					    if (not fs::exists(cal_data_path)) {
 | 
				
			||||||
        UHD_MSG(status) << "Not found" << std::endl;
 | 
					        UHD_MSG(status) << "Not found" << std::endl;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -138,9 +138,7 @@ static void store_results(
 | 
				
			|||||||
    std::string serial = get_serial(usrp, rx_tx);
 | 
					    std::string serial = get_serial(usrp, rx_tx);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    //make the calibration file path
 | 
					    //make the calibration file path
 | 
				
			||||||
    fs::path cal_data_path = fs::path(uhd::get_app_path()) / ".uhd";
 | 
					    fs::path cal_data_path = fs::path(uhd::get_cal_data_path());
 | 
				
			||||||
    fs::create_directory(cal_data_path);
 | 
					 | 
				
			||||||
    cal_data_path = cal_data_path / "cal";
 | 
					 | 
				
			||||||
    fs::create_directory(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);
 | 
					    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)){
 | 
					    if (fs::exists(cal_data_path)){
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user