mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-08-18 05:34:01 +00:00
Remove message_map from Context.
It doesn't belong in a display/rendering context object, it has much broader significance, mostly distributing messages via the M4->M0 IPC mechanism.
This commit is contained in:
@@ -21,6 +21,8 @@
|
||||
|
||||
#include "ui_baseband_stats_view.hpp"
|
||||
|
||||
#include "event_m0.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
|
||||
@@ -40,7 +42,7 @@ BasebandStatsView::BasebandStatsView() {
|
||||
}
|
||||
|
||||
void BasebandStatsView::on_show() {
|
||||
context().message_map().register_handler(Message::ID::BasebandStatistics,
|
||||
EventDispatcher::message_map().register_handler(Message::ID::BasebandStatistics,
|
||||
[this](const Message* const p) {
|
||||
this->on_statistics_update(static_cast<const BasebandStatisticsMessage*>(p)->statistics);
|
||||
}
|
||||
@@ -48,7 +50,7 @@ void BasebandStatsView::on_show() {
|
||||
}
|
||||
|
||||
void BasebandStatsView::on_hide() {
|
||||
context().message_map().unregister_handler(Message::ID::BasebandStatistics);
|
||||
EventDispatcher::message_map().unregister_handler(Message::ID::BasebandStatistics);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user