NBFM configuration message.

Allows changing NBFM filter configurations from M0.
This commit is contained in:
Jared Boone 2016-01-03 12:46:21 -08:00
parent a5012427d8
commit 0497dbf62f

View File

@ -29,6 +29,7 @@
#include "baseband_packet.hpp"
#include "ert_packet.hpp"
#include "dsp_fir_taps.hpp"
#include "utility.hpp"
@ -51,6 +52,7 @@ public:
AISPacket = 7,
ERTPacket = 9,
UpdateSpectrum = 10,
NBFMConfigure = 11,
MAX
};
@ -269,6 +271,27 @@ public:
}
};
class NBFMConfigureMessage : public Message {
public:
constexpr NBFMConfigureMessage(
const fir_taps_real<24>& decim_0_filter,
const fir_taps_real<32>& decim_1_filter,
const fir_taps_real<32>& channel_filter,
const size_t deviation
) : Message { ID::NBFMConfigure },
decim_0_filter { decim_0_filter },
decim_1_filter { decim_1_filter },
channel_filter { channel_filter },
deviation { deviation }
{
}
const fir_taps_real<24> decim_0_filter;
const fir_taps_real<32> decim_1_filter;
const fir_taps_real<32> channel_filter;
const size_t deviation;
};
class MessageHandlerMap {
public:
using MessageHandler = std::function<void(Message* const p)>;