Morse rx further development (#2959)

* filters OK, radio configurations set

* all modes are working, noise still needs work, especially in FM. A baseband enum is also needed

* audio and decoding fixed, clipping and the baseband enum are still missing
This commit is contained in:
Pezsma
2026-02-03 22:25:52 +01:00
committed by GitHub
parent 6739b43914
commit a44a00acf0
6 changed files with 483 additions and 48 deletions
+13 -2
View File
@@ -60,13 +60,22 @@ class MorseProcessor : public BasebandProcessor {
dsp::decimate::FIRC8xR16x24FS4Decim8 decim_0{};
dsp::decimate::FIRC16xR16x32Decim8 decim_1{};
dsp::decimate::FIRAndDecimateComplex channel_filter{};
dsp::demodulate::AM demod_AM{};
dsp::demodulate::FM demod_cw_fm{};
dsp::demodulate::SSB demod_ssb{};
AudioOutput audio_output{};
bool configured{false};
uint8_t modulation{0}; // 0=CW/FM, 1=USB, 2=LSB
enum class ModulationMode : uint8_t {
AM = 0,
FM = 1,
DSB = 2,
USB = 3,
LSB = 4
};
ModulationMode modulation = ModulationMode::AM;
int32_t user_squelch_level{0};
bool squelch_is_open{true};
int32_t squelch_hold{0};
@@ -79,7 +88,6 @@ class MorseProcessor : public BasebandProcessor {
float meas_freq_accumulator{0.0f};
uint32_t meas_freq_count{0};
uint32_t ui_update_timer{0};
float current_freq{700.0f};
// --- Decoding variables (Goertzel) ---
@@ -92,6 +100,9 @@ class MorseProcessor : public BasebandProcessor {
int64_t noise_floor{5000};
int32_t startup_delay{20};
float dc_average = 0.0f; // DC level tracking
int32_t dc_average_int = 0;
MorseRXDataMessage message{};
MorseRXfreqMessage freq_message{};
};