From 317bff29a5358c7bfc576359ab5a3b3fcf30ad10 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 15 Nov 2011 14:54:18 -0800 Subject: uhd: added freq options and common gain setter --- host/lib/usrp/common/apply_corrections.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'host/lib') diff --git a/host/lib/usrp/common/apply_corrections.cpp b/host/lib/usrp/common/apply_corrections.cpp index e3ec9baab..6aee00753 100644 --- a/host/lib/usrp/common/apply_corrections.cpp +++ b/host/lib/usrp/common/apply_corrections.cpp @@ -58,6 +58,7 @@ static std::complex get_fe_dc_correction( const std::string &key, const double lo_freq ){ const std::vector &datas = fe_cal_cache[key]; + if (datas.empty()) throw uhd::runtime_error("empty calibration table " + key); //search for lo freq size_t lo_index = 0; @@ -84,6 +85,7 @@ static std::complex get_fe_iq_correction( const std::string &key, const double lo_freq ){ const std::vector &datas = fe_cal_cache[key]; + if (datas.empty()) throw uhd::runtime_error("empty calibration table " + key); //search for lo freq size_t lo_index = 0; @@ -153,11 +155,11 @@ static void apply_fe_corrections( } - if (file_prefix.find("dc") != std::string::npos){ + if (file_prefix.find("dc_cal") != std::string::npos){ sub_tree->access >(fe_path) .set(get_fe_dc_correction(cal_data_path.string(), lo_freq)); } - else if (file_prefix.find("iq") != std::string::npos){ + else if (file_prefix.find("iq_cal") != std::string::npos){ sub_tree->access >(fe_path) .set(get_fe_iq_correction(cal_data_path.string(), lo_freq)); } -- cgit v1.2.3