mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-14 00:07:49 +00:00
Implement, use configuration for FM demod deviation.
This commit is contained in:
@@ -55,9 +55,13 @@ public:
|
|||||||
buffer_s16_t dst
|
buffer_s16_t dst
|
||||||
);
|
);
|
||||||
|
|
||||||
|
void configure(const float sampling_rate, const float deviation_hz) {
|
||||||
|
k = static_cast<float>(32767.0f / (2.0 * pi * deviation_hz / sampling_rate));
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
complex16_t::rep_type z_;
|
complex16_t::rep_type z_;
|
||||||
const float k;
|
float k;
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* namespace demodulate */
|
} /* namespace demodulate */
|
||||||
|
@@ -492,6 +492,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void configure(const FSKConfiguration new_configuration) {
|
void configure(const FSKConfiguration new_configuration) {
|
||||||
|
demod.configure(76800, 2 * new_configuration.symbol_rate);
|
||||||
clock_recovery.configure(new_configuration.symbol_rate, 76800);
|
clock_recovery.configure(new_configuration.symbol_rate, 76800);
|
||||||
access_code_correlator.configure(
|
access_code_correlator.configure(
|
||||||
new_configuration.access_code,
|
new_configuration.access_code,
|
||||||
|
Reference in New Issue
Block a user