Formatted code (#1007)

* Updated style

* Updated files

* fixed new line

* Updated spacing

* File fix WIP

* Updated to clang 13

* updated comment style

* Removed old comment code
This commit is contained in:
jLynx
2023-05-19 08:16:05 +12:00
committed by GitHub
parent 7aca7ce74d
commit 033c4e9a5b
599 changed files with 70746 additions and 66896 deletions

View File

@@ -22,7 +22,7 @@
#ifndef __SPECTRUM_COLLECTOR_H__
#define __SPECTRUM_COLLECTOR_H__
#define ARRAY_ELEMENTS(x) (sizeof(x) / sizeof(x[0]))
#define ARRAY_ELEMENTS(x) (sizeof(x) / sizeof(x[0]))
/* sizeof() compile-time operator that returns #bytes of (data type). We used it to get #elements_array */
#include "dsp_types.hpp"
@@ -36,38 +36,37 @@
#include "message.hpp"
class SpectrumCollector {
public:
void on_message(const Message* const message);
public:
void on_message(const Message* const message);
void set_decimation_factor(const size_t decimation_factor);
void set_decimation_factor(const size_t decimation_factor);
void feed(
const buffer_c16_t& channel,
const int32_t filter_low_frequency,
const int32_t filter_high_frequency,
const int32_t filter_transition
);
void feed(
const buffer_c16_t& channel,
const int32_t filter_low_frequency,
const int32_t filter_high_frequency,
const int32_t filter_transition);
private:
BlockDecimator<complex16_t, 256> channel_spectrum_decimator { 1 };
ChannelSpectrum fifo_data[1 << ChannelSpectrumConfigMessage::fifo_k] { };
ChannelSpectrumFIFO fifo { fifo_data, ChannelSpectrumConfigMessage::fifo_k };
private:
BlockDecimator<complex16_t, 256> channel_spectrum_decimator{1};
ChannelSpectrum fifo_data[1 << ChannelSpectrumConfigMessage::fifo_k]{};
ChannelSpectrumFIFO fifo{fifo_data, ChannelSpectrumConfigMessage::fifo_k};
volatile bool channel_spectrum_request_update { false };
bool streaming { false };
std::array<std::complex<float>, 256> channel_spectrum { };
uint32_t channel_spectrum_sampling_rate { 0 };
int32_t channel_filter_low_frequency { 0 };
int32_t channel_filter_high_frequency { 0 };
int32_t channel_filter_transition { 0 };
volatile bool channel_spectrum_request_update{false};
bool streaming{false};
std::array<std::complex<float>, 256> channel_spectrum{};
uint32_t channel_spectrum_sampling_rate{0};
int32_t channel_filter_low_frequency{0};
int32_t channel_filter_high_frequency{0};
int32_t channel_filter_transition{0};
void post_message(const buffer_c16_t& data);
void post_message(const buffer_c16_t& data);
void set_state(const SpectrumStreamingConfigMessage& message);
void start();
void stop();
void set_state(const SpectrumStreamingConfigMessage& message);
void start();
void stop();
void update();
void update();
};
#endif/*__SPECTRUM_COLLECTOR_H__*/
#endif /*__SPECTRUM_COLLECTOR_H__*/