mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-13 10:47:44 +00:00
Wefax warning fix modulation fix (#2543)
* changed order of modulations, changed case to avoid capture * added missing AMAudioFMApt mode to dump pmem * reorder demod, adding missing ones, fix warnings * removed uneeded 'previous_modulation', renamed WFAX to AMFM to match other places * removing uneeded 'previous_modulation' uneeded check in change_modulation * move capture at the end so AMAUdioFMApt is matching the other arrays for position 4 * added AMFM to Recon Level and Scanner * clang + more details in some comments --------- Co-authored-by: gullradriel <gullradriel@no-mail.com>
This commit is contained in:
@@ -72,7 +72,7 @@ void AudioOutput::on_block(const buffer_f32_t& audio) {
|
||||
if (do_processing) {
|
||||
const auto audio_present_now = squelch.execute(audio);
|
||||
|
||||
hpf.execute_in_place(audio); // IIRBiquadFilter name is "hpf", but we will call with "hpf-coef" for all except WFAX with "lpf-coef".
|
||||
hpf.execute_in_place(audio); // IIRBiquadFilter name is "hpf", but we will call with "hpf-coef" for all except AMFM (WFAX) with "lpf-coef"
|
||||
deemph.execute_in_place(audio);
|
||||
|
||||
audio_present_history = (audio_present_history << 1) | (audio_present_now ? 1 : 0);
|
||||
|
@@ -79,7 +79,7 @@ static inline float angle_precise(const complex32_t t) {
|
||||
return atan2f(t.imag(), t.real());
|
||||
}
|
||||
|
||||
buffer_f32_t SSB_FM::execute( // Added to handle WFAX (HF weather map )-
|
||||
buffer_f32_t SSB_FM::execute( // Added to handle AMFM (WFAX, HF weather map )
|
||||
const buffer_c16_t& src, // input arg , pointer Complex c16 i,q buffer.
|
||||
const buffer_f32_t& dst) { // input arg , pointer f32 buffer audio demodulated
|
||||
complex16_t* src_p = src.p; // removed const ; init src_p pointer with the mem address pointed by src.p.
|
||||
|
@@ -48,7 +48,7 @@ class SSB {
|
||||
static constexpr float k = 1.0f / 32768.0f;
|
||||
};
|
||||
|
||||
class SSB_FM { // Added to handle WFAX-
|
||||
class SSB_FM { // Added to handle AMFM for WFAX
|
||||
public:
|
||||
buffer_f32_t execute(
|
||||
const buffer_c16_t& src,
|
||||
@@ -56,7 +56,7 @@ class SSB_FM { // Added to handle WFAX-
|
||||
|
||||
private:
|
||||
static constexpr float k = 1.0f / 32768.0f;
|
||||
dsp::Real_to_Complex real_to_complex; // It is a member variable of SSB_FM.
|
||||
dsp::Real_to_Complex real_to_complex{}; // It is a member variable of SSB_FM.
|
||||
};
|
||||
|
||||
class FM {
|
||||
|
@@ -65,7 +65,9 @@ buffer_f32_t NarrowbandAMAudio::demodulate(const buffer_c16_t& channel) {
|
||||
return demod_ssb_fm.execute(channel, audio_buffer); // Calling a derivative of demod_ssb (USB) , but with different FIR taps + FM audio tones demod.
|
||||
break;
|
||||
|
||||
// return demod am as a default
|
||||
default:
|
||||
return demod_am.execute(channel, audio_buffer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user