mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-01 11:06:30 -04:00
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:
parent
7aca7ce74d
commit
033c4e9a5b
599 changed files with 70746 additions and 66896 deletions
|
@ -44,43 +44,42 @@
|
|||
#include <bitset>
|
||||
|
||||
class TestProcessor : public BasebandProcessor {
|
||||
public:
|
||||
TestProcessor();
|
||||
|
||||
void execute(const buffer_c8_t& buffer) override;
|
||||
public:
|
||||
TestProcessor();
|
||||
|
||||
private:
|
||||
static constexpr size_t baseband_fs = 2457600*2;
|
||||
|
||||
BasebandThread baseband_thread { baseband_fs, this, NORMALPRIO + 20, baseband::Direction::Receive };
|
||||
RSSIThread rssi_thread { NORMALPRIO + 10 };
|
||||
void execute(const buffer_c8_t& buffer) override;
|
||||
|
||||
std::array<complex16_t, 512> dst { };
|
||||
const buffer_c16_t dst_buffer {
|
||||
dst.data(),
|
||||
dst.size()
|
||||
};
|
||||
private:
|
||||
static constexpr size_t baseband_fs = 2457600 * 2;
|
||||
|
||||
dsp::decimate::FIRC8xR16x24FS4Decim8 decim_0 { };
|
||||
dsp::decimate::FIRC16xR16x32Decim8 decim_1 { };
|
||||
dsp::matched_filter::MatchedFilter mf { baseband::ais::square_taps_38k4_1t_p, 2 };
|
||||
BasebandThread baseband_thread{baseband_fs, this, NORMALPRIO + 20, baseband::Direction::Receive};
|
||||
RSSIThread rssi_thread{NORMALPRIO + 10};
|
||||
|
||||
clock_recovery::ClockRecovery<clock_recovery::FixedErrorFilter> clock_recovery_fsk_9600 {
|
||||
38400, 19192, { 0.00555f },
|
||||
[this](const float raw_symbol) {
|
||||
const uint_fast8_t sliced_symbol = (raw_symbol >= 0.0f) ? 1 : 0;
|
||||
this->packet_builder_fsk_9600_CC1101.execute(sliced_symbol);
|
||||
}
|
||||
};
|
||||
PacketBuilder<BitPattern, NeverMatch, FixedLength> packet_builder_fsk_9600_CC1101 {
|
||||
{ 0b01010110010110100101101001101010, 32, 1 }, // Manchester 0x1337
|
||||
{ },
|
||||
{ 22 * 8 },
|
||||
[this](const baseband::Packet& packet) {
|
||||
const TestAppPacketMessage message { packet };
|
||||
shared_memory.application_queue.push(message);
|
||||
}
|
||||
};
|
||||
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};
|
||||
|
||||
clock_recovery::ClockRecovery<clock_recovery::FixedErrorFilter> clock_recovery_fsk_9600{
|
||||
38400,
|
||||
19192,
|
||||
{0.00555f},
|
||||
[this](const float raw_symbol) {
|
||||
const uint_fast8_t sliced_symbol = (raw_symbol >= 0.0f) ? 1 : 0;
|
||||
this->packet_builder_fsk_9600_CC1101.execute(sliced_symbol);
|
||||
}};
|
||||
PacketBuilder<BitPattern, NeverMatch, FixedLength> packet_builder_fsk_9600_CC1101{
|
||||
{0b01010110010110100101101001101010, 32, 1}, // Manchester 0x1337
|
||||
{},
|
||||
{22 * 8},
|
||||
[this](const baseband::Packet& packet) {
|
||||
const TestAppPacketMessage message{packet};
|
||||
shared_memory.application_queue.push(message);
|
||||
}};
|
||||
};
|
||||
|
||||
#endif/*__PROC_TEST_H__*/
|
||||
#endif /*__PROC_TEST_H__*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue