1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-31 11:19:18 +00:00

fix whitespace

This commit is contained in:
Jim Melton 2021-02-15 13:46:12 -07:00
parent 75483e1d2d
commit 41c7a7ad7d
No known key found for this signature in database
GPG Key ID: C46392D9AACAB216
5 changed files with 19 additions and 28 deletions

View File

@ -51,14 +51,6 @@ public:
void start() override;
/*!
* \brief Returns "Ad9361_Fpga_Signal_Source"
*/
inline std::string implementation() override
{
return ;
}
inline size_t item_size() override
{
return item_size_;

View File

@ -175,8 +175,8 @@ uint64_t FileSourceBase::samples() const
FileSourceBase::FileSourceBase(ConfigurationInterface const* configuration, std::string role, std::string impl,
Concurrent_Queue<pmt::pmt_t>* queue,
std::string default_item_type)
Concurrent_Queue<pmt::pmt_t>* queue,
std::string default_item_type)
: SignalSourceBase(configuration, role, impl)
, filename_(configuration->property(role + ".filename"s, "../data/example_capture.dat"s))
, file_source_()
@ -295,16 +295,16 @@ size_t FileSourceBase::samplesToSkip() const
if (seconds_to_skip_ > 0)
{
// sampling_frequency is in terms of actual samples (output packets). If this source is
// compressed, there may be multiple packets per file (read) sample. First compute the
// actual number of samples to skip (function of time and sample rate)
// sampling_frequency is in terms of actual samples (output packets). If this source is
// compressed, there may be multiple packets per file (read) sample. First compute the
// actual number of samples to skip (function of time and sample rate)
samples_to_skip = static_cast<size_t>(seconds_to_skip_ * sampling_frequency_);
// convert from sample to input items, scaling this value to input item space
// (rounding up)
samples_to_skip = std::ceil(samples_to_skip / packetsPerSample());
// convert from sample to input items, scaling this value to input item space
// (rounding up)
samples_to_skip = std::ceil(samples_to_skip / packetsPerSample());
// complex inputs require two input items for one sample (arguably, packetsPerSample could be scaled by 0.5)
// complex inputs require two input items for one sample (arguably, packetsPerSample could be scaled by 0.5)
if (is_complex())
{
samples_to_skip *= 2;
@ -330,7 +330,7 @@ size_t FileSourceBase::computeSamplesInFile() const
// this could throw, but the existence of the file has been proven before we get here.
auto size = fs::file_size(filename());
// if there is some kind of compression/encoding, figure out the uncompressed number of samples
// if there is some kind of compression/encoding, figure out the uncompressed number of samples
n_samples = std::floor(packetsPerSample() * size / item_size());
auto to_skip = samplesToSkip();
@ -479,4 +479,3 @@ void FileSourceBase::pre_connect_hook(gr::top_block_sptr top_block [[maybe_unuse
void FileSourceBase::post_connect_hook(gr::top_block_sptr top_block [[maybe_unused]]) {}
void FileSourceBase::pre_disconnect_hook(gr::top_block_sptr top_block [[maybe_unused]]) {}
void FileSourceBase::post_disconnect_hook(gr::top_block_sptr top_block [[maybe_unused]]) {}

View File

@ -85,8 +85,8 @@ protected:
// type supported. Rather than require the item type to be specified in the config file, allow
// sub-classes to impose their will
FileSourceBase(ConfigurationInterface const* configuration, std::string role, std::string impl,
Concurrent_Queue<pmt::pmt_t>* queue,
std::string default_item_type="short");
Concurrent_Queue<pmt::pmt_t>* queue,
std::string default_item_type = "short");
//! perform post-construction initialization
void init();

View File

@ -24,7 +24,7 @@ using namespace std::string_literals;
NsrFileSignalSource::NsrFileSignalSource(const ConfigurationInterface* configuration,
const std::string& role, unsigned int in_streams, unsigned int out_streams,
Concurrent_Queue<pmt::pmt_t>* queue)
: FileSourceBase(configuration, role, "Nsr_File_Signal_Source"s, queue, "byte"s)
: FileSourceBase(configuration, role, "Nsr_File_Signal_Source"s, queue, "byte"s)
{
if (in_streams > 0)
{
@ -39,7 +39,7 @@ NsrFileSignalSource::NsrFileSignalSource(const ConfigurationInterface* configura
std::tuple<size_t, bool> NsrFileSignalSource::itemTypeToSize()
{
auto is_complex = false;
auto item_size = size_t(sizeof(char)); // default
auto item_size = size_t(sizeof(char)); // default
if (item_type() == "byte")
{
@ -47,7 +47,7 @@ std::tuple<size_t, bool> NsrFileSignalSource::itemTypeToSize()
}
else
{
LOG(WARNING) << item_type() << " unrecognized item type. Using byte.";
LOG(WARNING) << item_type() << " unrecognized item type. Using byte.";
}
return std::make_tuple(item_size, is_complex);

View File

@ -1101,7 +1101,7 @@ int GNSSFlowgraph::disconnect_signal_sources_from_signal_conditioners()
{
try
{
auto& src = sig_source_.at(i);
auto& src = sig_source_.at(i);
// TODO: Remove this array implementation and create generic multistream connector
// (if a signal source has more than 1 stream, then connect it to the multistream signal conditioner)
@ -1115,7 +1115,7 @@ int GNSSFlowgraph::disconnect_signal_sources_from_signal_conditioners()
}
else
{
auto RF_Channels = src->getRfChannels();
auto RF_Channels = src->getRfChannels();
for (auto j = 0u; j < RF_Channels; ++j)
{