mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-08 06:32:35 -04:00
Partial refactor of channel filter frequency code.
Move channel filter frequency determination to baseband side, where the filtering is determined and performed. Add useful accessor methods to BlockDecimator.
This commit is contained in:
parent
ffc50785b7
commit
6f2cbd1ac5
4 changed files with 34 additions and 19 deletions
|
@ -226,17 +226,9 @@ private:
|
|||
void on_channel_spectrum(const ChannelSpectrum& spectrum) {
|
||||
waterfall_view.on_channel_spectrum(spectrum);
|
||||
frequency_scale.set_spectrum_sampling_rate(spectrum.sampling_rate, spectrum.db_count);
|
||||
|
||||
// TODO: Set with actual information.
|
||||
//taps_64_lp_042_078_tfilter
|
||||
// TODO: Pass these details, don't hard-code them.
|
||||
// Channel spectrum is channel filter input, decimated by 2 by the
|
||||
// channel filter, then by 4 by the channel spectrum decimator.
|
||||
constexpr size_t channel_spectrum_decimation = 2 * 4;
|
||||
// TODO: Rename spectrum.bandwidth to spectrum.sampling_rate so this makes sense. */
|
||||
frequency_scale.set_channel_filter(
|
||||
spectrum.sampling_rate * channel_spectrum_decimation * 42 / 1000,
|
||||
spectrum.sampling_rate * channel_spectrum_decimation * 78 / 1000
|
||||
spectrum.channel_filter_pass_frequency,
|
||||
spectrum.channel_filter_stop_frequency
|
||||
);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue