mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-02-23 16:19:59 -05:00
Reorder methods in source file to indicate call order.
This commit is contained in:
parent
088f60f2bc
commit
d1637db2fc
@ -29,6 +29,30 @@
|
|||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
void SpectrumCollector::feed(
|
||||||
|
const buffer_c16_t& channel,
|
||||||
|
const uint32_t filter_pass_frequency,
|
||||||
|
const uint32_t filter_stop_frequency
|
||||||
|
) {
|
||||||
|
channel_filter_pass_frequency = filter_pass_frequency;
|
||||||
|
channel_filter_stop_frequency = filter_stop_frequency;
|
||||||
|
channel_spectrum_decimator.feed(
|
||||||
|
channel,
|
||||||
|
[this](const buffer_c16_t& data) {
|
||||||
|
this->post_message(data);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SpectrumCollector::post_message(const buffer_c16_t& data) {
|
||||||
|
if( !channel_spectrum_request_update ) {
|
||||||
|
fft_swap(data, channel_spectrum);
|
||||||
|
channel_spectrum_sampling_rate = data.sampling_rate;
|
||||||
|
channel_spectrum_request_update = true;
|
||||||
|
events_flag(EVT_MASK_SPECTRUM);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SpectrumCollector::update() {
|
void SpectrumCollector::update() {
|
||||||
// Called from idle thread (after EVT_MASK_SPECTRUM is flagged)
|
// Called from idle thread (after EVT_MASK_SPECTRUM is flagged)
|
||||||
if( channel_spectrum_request_update ) {
|
if( channel_spectrum_request_update ) {
|
||||||
@ -53,27 +77,3 @@ void SpectrumCollector::update() {
|
|||||||
shared_memory.application_queue.push(spectrum_message);
|
shared_memory.application_queue.push(spectrum_message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpectrumCollector::feed(
|
|
||||||
const buffer_c16_t& channel,
|
|
||||||
const uint32_t filter_pass_frequency,
|
|
||||||
const uint32_t filter_stop_frequency
|
|
||||||
) {
|
|
||||||
channel_filter_pass_frequency = filter_pass_frequency;
|
|
||||||
channel_filter_stop_frequency = filter_stop_frequency;
|
|
||||||
channel_spectrum_decimator.feed(
|
|
||||||
channel,
|
|
||||||
[this](const buffer_c16_t& data) {
|
|
||||||
this->post_message(data);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SpectrumCollector::post_message(const buffer_c16_t& data) {
|
|
||||||
if( !channel_spectrum_request_update ) {
|
|
||||||
fft_swap(data, channel_spectrum);
|
|
||||||
channel_spectrum_sampling_rate = data.sampling_rate;
|
|
||||||
channel_spectrum_request_update = true;
|
|
||||||
events_flag(EVT_MASK_SPECTRUM);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -38,14 +38,14 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void update();
|
|
||||||
|
|
||||||
void feed(
|
void feed(
|
||||||
const buffer_c16_t& channel,
|
const buffer_c16_t& channel,
|
||||||
const uint32_t filter_pass_frequency,
|
const uint32_t filter_pass_frequency,
|
||||||
const uint32_t filter_stop_frequency
|
const uint32_t filter_stop_frequency
|
||||||
);
|
);
|
||||||
|
|
||||||
|
void update();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BlockDecimator<256> channel_spectrum_decimator;
|
BlockDecimator<256> channel_spectrum_decimator;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user