mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-09-12 17:49:31 +00:00
Fix baseband thread init order bug for all procs. (#1293)
This commit is contained in:
@@ -34,20 +34,17 @@
|
||||
#include <array>
|
||||
#include <memory>
|
||||
|
||||
class ReplayProcessor : public BasebandProcessor {
|
||||
class GPSReplayProcessor : public BasebandProcessor {
|
||||
public:
|
||||
ReplayProcessor();
|
||||
GPSReplayProcessor();
|
||||
|
||||
void execute(const buffer_c8_t& buffer) override;
|
||||
|
||||
void on_message(const Message* const message) override;
|
||||
|
||||
private:
|
||||
size_t baseband_fs = 3072000;
|
||||
static constexpr auto spectrum_rate_hz = 50.0f;
|
||||
|
||||
BasebandThread baseband_thread{baseband_fs, this, NORMALPRIO + 20, baseband::Direction::Transmit};
|
||||
|
||||
std::array<complex8_t, 2048> iq{};
|
||||
const buffer_c8_t iq_buffer{
|
||||
iq.data(),
|
||||
@@ -72,6 +69,10 @@ class ReplayProcessor : public BasebandProcessor {
|
||||
|
||||
TXProgressMessage txprogress_message{};
|
||||
RequestSignalMessage sig_message{RequestSignalMessage::Signal::FillRequest};
|
||||
|
||||
/* NB: Threads should be the last members in the class definition. */
|
||||
BasebandThread baseband_thread{
|
||||
baseband_fs, this, baseband::Direction::Transmit, /*auto_start*/ false};
|
||||
};
|
||||
|
||||
#endif /*__PROC_GPS_SIM_HPP__*/
|
||||
|
||||
Reference in New Issue
Block a user