mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-30 01:59:13 -04:00
Give new Processor to EventDispatcher.
This commit is contained in:
parent
525e72ac86
commit
1a5f3a4422
3 changed files with 25 additions and 11 deletions
|
@ -51,6 +51,12 @@ CH_IRQ_HANDLER(MAPP_IRQHandler) {
|
|||
|
||||
Thread* EventDispatcher::thread_event_loop = nullptr;
|
||||
|
||||
EventDispatcher::EventDispatcher(
|
||||
std::unique_ptr<BasebandProcessor> baseband_processor
|
||||
) : baseband_processor { std::move(baseband_processor) }
|
||||
{
|
||||
}
|
||||
|
||||
void EventDispatcher::run() {
|
||||
thread_event_loop = chThdSelf();
|
||||
|
||||
|
@ -107,10 +113,10 @@ void EventDispatcher::on_message_shutdown(const ShutdownMessage&) {
|
|||
}
|
||||
|
||||
void EventDispatcher::on_message_default(const Message* const message) {
|
||||
baseband_thread.on_message(message);
|
||||
baseband_processor->on_message(message);
|
||||
}
|
||||
|
||||
void EventDispatcher::handle_spectrum() {
|
||||
const UpdateSpectrumMessage message;
|
||||
baseband_thread.on_message(&message);
|
||||
baseband_processor->on_message(&message);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue