mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-24 06:44:25 -04:00
ChannelSpectrumConfig message subsumes FIFONotify.
Separate channel spectrum config from spectrum data. This will permit sending config info only when necessary. Use type information of ChannelSpectrum to statically define number of FFT bins elsewhere. TODO: Posting configuration message way too often. Fixing that is the next step.
This commit is contained in:
parent
ba33cc737d
commit
7710b2d1fa
5 changed files with 49 additions and 42 deletions
|
@ -37,7 +37,7 @@ class FrequencyScale : public Widget {
|
|||
public:
|
||||
void on_show() override;
|
||||
|
||||
void set_spectrum_sampling_rate(const uint32_t new_sampling_rate, const size_t new_spectrum_bins);
|
||||
void set_spectrum_sampling_rate(const uint32_t new_sampling_rate);
|
||||
void set_channel_filter(const uint32_t pass_frequency, const uint32_t stop_frequency);
|
||||
|
||||
void paint(Painter& painter) override;
|
||||
|
@ -46,7 +46,7 @@ private:
|
|||
static constexpr Dim filter_band_height = 4;
|
||||
|
||||
uint32_t spectrum_sampling_rate { 0 };
|
||||
size_t spectrum_bins { 0 };
|
||||
const size_t spectrum_bins = std::tuple_size<decltype(ChannelSpectrum::db)>::value;
|
||||
uint32_t channel_filter_pass_frequency { 0 };
|
||||
uint32_t channel_filter_stop_frequency { 0 };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue