mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Move FSKPacket message handler to ReceiverView.
This commit is contained in:
parent
c44357a16a
commit
2aa8ae0d1f
@ -458,11 +458,6 @@ int main(void) {
|
|||||||
ui::Painter painter;
|
ui::Painter painter;
|
||||||
EventDispatcher event_dispatcher { &system_view, painter, context };
|
EventDispatcher event_dispatcher { &system_view, painter, context };
|
||||||
|
|
||||||
context.message_map[Message::ID::FSKPacket] = [](const Message* const p) {
|
|
||||||
const auto message = static_cast<const FSKPacketMessage*>(p);
|
|
||||||
(void)message;
|
|
||||||
};
|
|
||||||
|
|
||||||
m4txevent_interrupt_enable();
|
m4txevent_interrupt_enable();
|
||||||
|
|
||||||
m4_init(portapack::spi_flash::baseband, portapack::spi_flash::m4_text_ram_base);
|
m4_init(portapack::spi_flash::baseband, portapack::spi_flash::m4_text_ram_base);
|
||||||
|
@ -480,9 +480,16 @@ ReceiverView::ReceiverView(
|
|||||||
};
|
};
|
||||||
|
|
||||||
receiver_model.enable();
|
receiver_model.enable();
|
||||||
|
|
||||||
|
context().message_map[Message::ID::FSKPacket] = [](const Message* const p) {
|
||||||
|
const auto message = static_cast<const FSKPacketMessage*>(p);
|
||||||
|
(void)message;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
ReceiverView::~ReceiverView() {
|
ReceiverView::~ReceiverView() {
|
||||||
|
context().message_map[Message::ID::FSKPacket] = nullptr;
|
||||||
|
|
||||||
// TODO: Manipulating audio codec here, and in ui_receiver.cpp. Good to do
|
// TODO: Manipulating audio codec here, and in ui_receiver.cpp. Good to do
|
||||||
// both?
|
// both?
|
||||||
audio_codec.headphone_mute();
|
audio_codec.headphone_mute();
|
||||||
|
Loading…
Reference in New Issue
Block a user