mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Postpone clearing channel_spectrum_request_update until finished with data in array.
There was potential for new samples to be copied into array as the FFT and post-processing were occuring.
This commit is contained in:
parent
d821afc60d
commit
62e5ec1dbb
@ -81,7 +81,6 @@ void SpectrumCollector::update() {
|
||||
// Called from idle thread (after EVT_MASK_SPECTRUM is flagged)
|
||||
if( streaming && channel_spectrum_request_update ) {
|
||||
/* Decimated buffer is full. Compute spectrum. */
|
||||
channel_spectrum_request_update = false;
|
||||
fft_c_preswapped(channel_spectrum);
|
||||
|
||||
ChannelSpectrum spectrum;
|
||||
@ -100,4 +99,6 @@ void SpectrumCollector::update() {
|
||||
}
|
||||
fifo.in(spectrum);
|
||||
}
|
||||
|
||||
channel_spectrum_request_update = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user