Fix baseband thread init order bug for all procs. (#1293)

This commit is contained in:
Kyle Reed
2023-07-22 23:54:17 -07:00
committed by GitHub
parent 828eb67a52
commit 7bd370b5bc
46 changed files with 226 additions and 174 deletions

View File

@@ -38,7 +38,6 @@
class AFSKRxProcessor : public BasebandProcessor {
public:
void execute(const buffer_c8_t& buffer) override;
void on_message(const Message* const message) override;
private:
@@ -53,9 +52,6 @@ class AFSKRxProcessor : public BasebandProcessor {
RECEIVE
};
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(),
@@ -93,9 +89,13 @@ class AFSKRxProcessor : public BasebandProcessor {
bool trigger_word{};
bool triggered{};
void configure(const AFSKRxConfigureMessage& message);
AFSKDataMessage data_message{false, 0};
/* NB: Threads should be the last members in the class definition. */
BasebandThread baseband_thread{baseband_fs, this, baseband::Direction::Receive};
RSSIThread rssi_thread{};
void configure(const AFSKRxConfigureMessage& message);
};
#endif /*__PROC_TPMS_H__*/