mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-30 10:09:25 -04:00
Implement, use configuration for FM demod deviation.
This commit is contained in:
parent
fa275156ed
commit
3a96c04aa7
2 changed files with 6 additions and 1 deletions
|
@ -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,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue