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

@@ -43,43 +43,42 @@
#include "ais_baseband.hpp"
class AISProcessor : public BasebandProcessor {
public:
AISProcessor();
public:
AISProcessor();
void execute(const buffer_c8_t& buffer) override;
void execute(const buffer_c8_t& buffer) override;
private:
static constexpr size_t baseband_fs = 2457600;
private:
static constexpr size_t baseband_fs = 2457600;
BasebandThread baseband_thread { baseband_fs, this, NORMALPRIO + 20, baseband::Direction::Receive };
RSSIThread rssi_thread { NORMALPRIO + 10 };
BasebandThread baseband_thread{baseband_fs, this, NORMALPRIO + 20, baseband::Direction::Receive};
RSSIThread rssi_thread{NORMALPRIO + 10};
std::array<complex16_t, 512> dst { };
const buffer_c16_t dst_buffer {
dst.data(),
dst.size()
};
std::array<complex16_t, 512> dst{};
const buffer_c16_t dst_buffer{
dst.data(),
dst.size()};
dsp::decimate::FIRC8xR16x24FS4Decim8 decim_0 { };
dsp::decimate::FIRC16xR16x32Decim8 decim_1 { };
dsp::matched_filter::MatchedFilter mf { baseband::ais::square_taps_38k4_1t_p, 2 };
dsp::decimate::FIRC8xR16x24FS4Decim8 decim_0{};
dsp::decimate::FIRC16xR16x32Decim8 decim_1{};
dsp::matched_filter::MatchedFilter mf{baseband::ais::square_taps_38k4_1t_p, 2};
clock_recovery::ClockRecovery<clock_recovery::FixedErrorFilter> clock_recovery {
19200, 9600, { 0.0555f },
[this](const float symbol) { this->consume_symbol(symbol); }
};
symbol_coding::NRZIDecoder nrzi_decode { };
PacketBuilder<BitPattern, BitPattern, BitPattern> packet_builder {
{ 0b0101010101111110, 16, 1 },
{ 0b111110, 6 },
{ 0b01111110, 8 },
[this](const baseband::Packet& packet) {
this->payload_handler(packet);
}
};
clock_recovery::ClockRecovery<clock_recovery::FixedErrorFilter> clock_recovery{
19200,
9600,
{0.0555f},
[this](const float symbol) { this->consume_symbol(symbol); }};
symbol_coding::NRZIDecoder nrzi_decode{};
PacketBuilder<BitPattern, BitPattern, BitPattern> packet_builder{
{0b0101010101111110, 16, 1},
{0b111110, 6},
{0b01111110, 8},
[this](const baseband::Packet& packet) {
this->payload_handler(packet);
}};
void consume_symbol(const float symbol);
void payload_handler(const baseband::Packet& packet);
void consume_symbol(const float symbol);
void payload_handler(const baseband::Packet& packet);
};
#endif/*__PROC_AIS_H__*/
#endif /*__PROC_AIS_H__*/