From b6c2911f3910cfcc7f3ebdec18d23e0bb91d2fb5 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 20 Feb 2020 08:23:57 +0100 Subject: [PATCH] Fix instantiation of tracking blocks with empty configuration --- src/algorithms/tracking/libs/dll_pll_conf.cc | 5 +++-- src/algorithms/tracking/libs/dll_pll_conf_fpga.cc | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/algorithms/tracking/libs/dll_pll_conf.cc b/src/algorithms/tracking/libs/dll_pll_conf.cc index 9650b154c..cc9a9fbae 100644 --- a/src/algorithms/tracking/libs/dll_pll_conf.cc +++ b/src/algorithms/tracking/libs/dll_pll_conf.cc @@ -29,7 +29,7 @@ Dll_Pll_Conf::Dll_Pll_Conf() /* DLL/PLL tracking configuration */ high_dyn = false; smoother_length = 10; - fs_in = 0.0; + fs_in = 2000000.0; vector_length = 0U; dump = false; dump_mat = true; @@ -81,7 +81,8 @@ void Dll_Pll_Conf::SetFromConfiguration(ConfigurationInterface *configuration, item_type = configuration->property(role + ".item_type", item_type); if (!item_type_valid(item_type)) { - throw std::invalid_argument("Unknown item type: " + item_type); + LOG(WARNING) << "Unknown item type: " + item_type << ". Set to gr_complex"; + item_type = "gr_complex"; } int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", fs_in); diff --git a/src/algorithms/tracking/libs/dll_pll_conf_fpga.cc b/src/algorithms/tracking/libs/dll_pll_conf_fpga.cc index f80cd6523..d984ac0a0 100644 --- a/src/algorithms/tracking/libs/dll_pll_conf_fpga.cc +++ b/src/algorithms/tracking/libs/dll_pll_conf_fpga.cc @@ -30,7 +30,7 @@ Dll_Pll_Conf_Fpga::Dll_Pll_Conf_Fpga() /* DLL/PLL tracking configuration */ high_dyn = false; smoother_length = 10; - fs_in = 0.0; + fs_in = 12500000.0; vector_length = 0U; dump = false; dump_mat = true; @@ -89,7 +89,7 @@ Dll_Pll_Conf_Fpga::Dll_Pll_Conf_Fpga() void Dll_Pll_Conf_Fpga::SetFromConfiguration(ConfigurationInterface *configuration, const std::string &role) { - int32_t fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 12500000); + int32_t fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", fs_in); fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); high_dyn = configuration->property(role + ".high_dyn", high_dyn); smoother_length = configuration->property(role + ".smoother_length", smoother_length);