Move FSKPacket message handler to ReceiverView.

This commit is contained in:
Jared Boone 2015-08-14 16:46:32 -07:00
parent c44357a16a
commit 2aa8ae0d1f
2 changed files with 7 additions and 5 deletions

View File

@ -458,11 +458,6 @@ int main(void) {
ui::Painter painter;
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();
m4_init(portapack::spi_flash::baseband, portapack::spi_flash::m4_text_ram_base);

View File

@ -480,9 +480,16 @@ ReceiverView::ReceiverView(
};
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() {
context().message_map[Message::ID::FSKPacket] = nullptr;
// TODO: Manipulating audio codec here, and in ui_receiver.cpp. Good to do
// both?
audio_codec.headphone_mute();