Changed amp to integer

This commit is contained in:
heurist1
2021-11-06 10:15:17 +00:00
parent 79b24ebe13
commit a571e40c59
3 changed files with 62 additions and 74 deletions

View File

@@ -40,8 +40,6 @@ public:
void on_message(const Message* const message) override;
private:
static constexpr float k = 1.0f / 128.0f;
static constexpr size_t baseband_fs = 2000000;
BasebandThread baseband_thread { baseband_fs, this, NORMALPRIO + 20, baseband::Direction::Receive };
@@ -49,20 +47,17 @@ private:
ADSBFrame frame { };
bool configured { false };
float prev_mag { 0 };
float threshold { }, threshold_low { }, threshold_high { };
//size_t null_count{ 0 };
uint32_t prev_mag { 0 };
size_t bit_count { 0 }, sample_count { 0 };
size_t msgLen{ 112 };
//std::pair<float, uint8_t> shifter[ADSB_PREAMBLE_LENGTH];
float shifter[ADSB_PREAMBLE_LENGTH];
uint32_t shifter[ADSB_PREAMBLE_LENGTH+1];
bool decoding { };
bool preamble { }, active { };
uint16_t bit_pos { 0 };
uint8_t cur_bit { 0 };
uint32_t sample { 0 };
int8_t re { }, im { };
float amp {0.0f};
int32_t re { }, im { };
int32_t amp {0};
};
#endif