mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Small FM squelch simplification.
This commit is contained in:
parent
0962343190
commit
ef37bbd851
@ -41,5 +41,5 @@ bool FMSquelch::execute(buffer_s16_t audio) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (max_squared < (threshold * threshold));
|
return (max_squared < threshold_squared);
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
static constexpr size_t N = 32;
|
static constexpr size_t N = 32;
|
||||||
static constexpr int16_t threshold = 3072;
|
static constexpr uint32_t threshold_squared = 8192 * 8192;
|
||||||
|
|
||||||
IIRBiquadFilter non_audio_hpf { non_audio_hpf_config };
|
IIRBiquadFilter non_audio_hpf { non_audio_hpf_config };
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user