mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-08 22:52:27 -04:00
Transmit DisplayFrameSync message, handle in WaterfallSpectrum.
More kludginess, especially around initialization and timing. But it addresses the flickering lines of pixels at the bottom of the waterfall scroll area!
This commit is contained in:
parent
aaa1bc3a09
commit
ba33cc737d
4 changed files with 23 additions and 5 deletions
|
@ -240,16 +240,23 @@ void WaterfallWidget::on_show() {
|
|||
context().message_map().register_handler(Message::ID::FIFONotify,
|
||||
[this](const Message* const p) {
|
||||
const auto message = reinterpret_cast<const FIFONotifyMessage*>(p);
|
||||
auto fifo = reinterpret_cast<ChannelSpectrumFIFO*>(message->fifo);
|
||||
ChannelSpectrum channel_spectrum;
|
||||
if( fifo->out(channel_spectrum) ) {
|
||||
this->on_channel_spectrum(channel_spectrum);
|
||||
this->fifo = reinterpret_cast<ChannelSpectrumFIFO*>(message->fifo);
|
||||
}
|
||||
);
|
||||
context().message_map().register_handler(Message::ID::DisplayFrameSync,
|
||||
[this](const Message* const p) {
|
||||
if( this->fifo ) {
|
||||
ChannelSpectrum channel_spectrum;
|
||||
while( fifo->out(channel_spectrum) ) {
|
||||
this->on_channel_spectrum(channel_spectrum);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
void WaterfallWidget::on_hide() {
|
||||
context().message_map().unregister_handler(Message::ID::DisplayFrameSync);
|
||||
context().message_map().unregister_handler(Message::ID::FIFONotify);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue