mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-22 13:27:24 +00:00
ADS-B TX works well enough for dump1090 and gr-air-modes
Hooked ADS-B RX to baseband instead of debug IQ file, not tested
This commit is contained in:
@@ -26,8 +26,6 @@
|
||||
#include "baseband_processor.hpp"
|
||||
#include "baseband_thread.hpp"
|
||||
|
||||
#define TEST_F2D(f) (uint32_t)((f) * ((1ULL << 32) / 4000000))
|
||||
|
||||
class ADSBTXProcessor : public BasebandProcessor {
|
||||
public:
|
||||
void execute(const buffer_c8_t& buffer) override;
|
||||
@@ -39,16 +37,18 @@ private:
|
||||
|
||||
BasebandThread baseband_thread { 4000000, this, NORMALPRIO + 20, baseband::Direction::Transmit };
|
||||
|
||||
const uint16_t preamble_parts = 0b1010000101000000;
|
||||
bool preamble { }, active { };
|
||||
uint16_t bit_pos { 0 };
|
||||
uint8_t cur_bit { 0 };
|
||||
uint32_t sample { 0 };
|
||||
uint32_t tone_phase { 0 };
|
||||
uint32_t fm_delta { 0 };
|
||||
uint32_t phase { 0 }, sphase { 0 };
|
||||
int32_t tone_sample { 0 }, delta { 0 };
|
||||
int8_t re { }, im { };
|
||||
const complex8_t am_lut[4] = {
|
||||
{ 127, 0 },
|
||||
{ 0, 127 },
|
||||
{ -127, 0 },
|
||||
{ 0, -127 }
|
||||
};
|
||||
|
||||
bool active { };
|
||||
uint32_t terminate { };
|
||||
uint32_t bit_pos { 0 };
|
||||
uint32_t cur_bit { 0 };
|
||||
uint32_t phase { 0 };
|
||||
|
||||
TXDoneMessage message { };
|
||||
};
|
||||
|
Reference in New Issue
Block a user