mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-03-14 07:28:17 +00:00
Code cleaning, and a better Pass_Through
This commit is contained in:
parent
c9ee0c4eab
commit
5fe91b8338
@ -85,9 +85,6 @@ FirFilter::FirFilter(ConfigurationInterface* configuration, std::string role,
|
||||
fir_filter_fff_2_ = gr::filter::fir_filter_fff::make(1, taps_);
|
||||
DLOG(INFO) << "I input_filter(" << fir_filter_fff_1_->unique_id() << ")";
|
||||
DLOG(INFO) << "Q input_filter(" << fir_filter_fff_2_->unique_id() << ")";
|
||||
//float_to_short_1_ = gr::blocks::float_to_short::make();
|
||||
//float_to_short_2_ = gr::blocks::float_to_short::make();
|
||||
//short_x2_to_cshort_ = make_short_x2_to_cshort();
|
||||
float_to_complex_ = gr::blocks::float_to_complex::make();
|
||||
if (dump_)
|
||||
{
|
||||
|
@ -47,8 +47,18 @@ Pass_Through::Pass_Through(ConfigurationInterface* configuration, std::string ro
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
std::string default_item_type = "gr_complex";
|
||||
item_type_ = configuration->property(role + ".item_type", default_item_type);
|
||||
std::string input_type = configuration->property(role + ".input_item_type", default_item_type);
|
||||
std::string output_type = configuration->property(role + ".output_item_type", default_item_type);
|
||||
if(input_type.compare(output_type) != 0)
|
||||
{
|
||||
LOG(WARNING) << "input_item_type and output_item_type are different in a Pass_Through implementation! Taking "
|
||||
<< input_type
|
||||
<< ", but item_size will supersede it.";
|
||||
}
|
||||
|
||||
item_type_ = configuration->property(role + ".item_type", input_type);
|
||||
vector_size_ = configuration->property(role + ".vector_size", 1);
|
||||
|
||||
if(item_type_.compare("float") == 0)
|
||||
{
|
||||
item_size_ = sizeof(float);
|
||||
@ -61,6 +71,10 @@ Pass_Through::Pass_Through(ConfigurationInterface* configuration, std::string ro
|
||||
{
|
||||
item_size_ = sizeof(int16_t);
|
||||
}
|
||||
else if(item_type_.compare("ishort") == 0)
|
||||
{
|
||||
item_size_ = sizeof(int16_t);
|
||||
}
|
||||
else if(item_type_.compare("cshort") == 0)
|
||||
{
|
||||
item_size_ = sizeof(lv_16sc_t);
|
||||
@ -69,6 +83,10 @@ Pass_Through::Pass_Through(ConfigurationInterface* configuration, std::string ro
|
||||
{
|
||||
item_size_ = sizeof(int8_t);
|
||||
}
|
||||
else if(item_type_.compare("ibyte") == 0)
|
||||
{
|
||||
item_size_ = sizeof(int8_t);
|
||||
}
|
||||
else if(item_type_.compare("cbyte") == 0)
|
||||
{
|
||||
item_size_ = sizeof(lv_8sc_t);
|
||||
|
Loading…
x
Reference in New Issue
Block a user