mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-19 05:33:02 +00:00
Improve formatting
This commit is contained in:
parent
6b45a92e6e
commit
dd42c5c1b0
@ -65,8 +65,6 @@ Ad936xCustomSignalSource::Ad936xCustomSignalSource(const ConfigurationInterface*
|
||||
high_side_lo_(configuration->property(role + ".high_side_lo", false)),
|
||||
tx_lo_channel_(configuration->property(role + ".tx_lo_channel", 1)),
|
||||
rx0_to_rx1_delay_ns_(configuration->property(role + ".rx0_to_rx1_delay_ns", 0.0))
|
||||
|
||||
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
@ -186,7 +184,6 @@ Ad936xCustomSignalSource::Ad936xCustomSignalSource(const ConfigurationInterface*
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
if (dump_)
|
||||
{
|
||||
for (int n = 0; n < n_channels; n++)
|
||||
@ -388,7 +385,6 @@ void Ad936xCustomSignalSource::connect(gr::top_block_sptr top_block)
|
||||
else
|
||||
{
|
||||
if (dump_)
|
||||
|
||||
{
|
||||
top_block->connect(gr_interleaved_short_to_complex_.at(n), 0, sink_.at(n), 0);
|
||||
DLOG(INFO) << "connected source to file sink";
|
||||
@ -520,6 +516,7 @@ gr::basic_block_sptr Ad936xCustomSignalSource::get_right_block()
|
||||
return gr_interleaved_short_to_complex_.at(0);
|
||||
}
|
||||
|
||||
|
||||
gr::basic_block_sptr Ad936xCustomSignalSource::get_right_block(int RF_channel)
|
||||
{
|
||||
if (delay_enabled == true)
|
||||
|
@ -83,7 +83,6 @@ private:
|
||||
std::vector<unpack_byte_4bit_samples_sptr> unpack_byte_fourbits;
|
||||
std::vector<unpack_byte_2bit_cpx_samples_sptr> unpack_byte_twobits;
|
||||
|
||||
|
||||
std::string item_type_;
|
||||
size_t item_size_;
|
||||
int64_t samples_;
|
||||
|
@ -30,10 +30,10 @@ FourBitCpxFileSignalSource::FourBitCpxFileSignalSource(
|
||||
unsigned int in_streams, unsigned int out_streams,
|
||||
Concurrent_Queue<pmt::pmt_t>* queue)
|
||||
: FileSourceBase(configuration, role, "Four_Bit_Cpx_File_Signal_Source"s, queue, "byte"s),
|
||||
sample_type_(configuration->property(role + ".sample_type", "iq"s)),
|
||||
timestamp_file_(configuration->property(role + ".timestamp_filename"s, ""s)),
|
||||
timestamp_clock_offset_ms_(configuration->property(role + ".timestamp_clock_offset_ms"s, 0.0))
|
||||
{
|
||||
sample_type_ = configuration->property(role + ".sample_type", "iq"s);
|
||||
// the complex-ness of the input is inferred from the output type
|
||||
if (sample_type_ == "iq")
|
||||
{
|
||||
@ -48,7 +48,6 @@ FourBitCpxFileSignalSource::FourBitCpxFileSignalSource(
|
||||
LOG(WARNING) << sample_type_ << " unrecognized sample type. Assuming: ";
|
||||
}
|
||||
|
||||
|
||||
if (in_streams > 0)
|
||||
{
|
||||
LOG(ERROR) << "A signal source does not have an input stream";
|
||||
@ -83,8 +82,11 @@ std::tuple<size_t, bool> FourBitCpxFileSignalSource::itemTypeToSize()
|
||||
return std::make_tuple(item_size, is_complex);
|
||||
}
|
||||
|
||||
|
||||
// 1 byte -> 1 complex samples
|
||||
double FourBitCpxFileSignalSource::packetsPerSample() const { return 1.0; }
|
||||
|
||||
|
||||
gnss_shared_ptr<gr::block> FourBitCpxFileSignalSource::source() const
|
||||
{
|
||||
if (timestamp_file_.size() > 1)
|
||||
@ -114,6 +116,7 @@ void FourBitCpxFileSignalSource::create_file_source_hook()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void FourBitCpxFileSignalSource::pre_connect_hook(gr::top_block_sptr top_block)
|
||||
{
|
||||
top_block->connect(file_source(), 0, unpack_byte_, 0);
|
||||
@ -126,6 +129,7 @@ void FourBitCpxFileSignalSource::pre_connect_hook(gr::top_block_sptr top_block)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void FourBitCpxFileSignalSource::pre_disconnect_hook(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (timestamp_file_.size() > 1)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* \file FOUR_BIT_cpx_file_signal_source.h
|
||||
* \file four_bit_cpx_file_signal_source.h
|
||||
* \brief Interface of a class that reads signals samples from a 2 bit complex sampler front-end file
|
||||
* and adapts it to a SignalSourceInterface.
|
||||
* \author Javier Arribas, 2015 jarribas(at)cttc.es
|
||||
@ -62,12 +62,11 @@ protected:
|
||||
private:
|
||||
unpack_byte_4bit_samples_sptr unpack_byte_;
|
||||
gr::blocks::interleaved_short_to_complex::sptr inter_shorts_to_cpx_;
|
||||
std::string sample_type_;
|
||||
bool reverse_interleaving_;
|
||||
|
||||
gnss_shared_ptr<Gnss_Sdr_Timestamp> timestamp_block_;
|
||||
std::string sample_type_;
|
||||
std::string timestamp_file_;
|
||||
double timestamp_clock_offset_ms_;
|
||||
bool reverse_interleaving_;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user