mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-05-10 16:16:46 +00:00
Restore receiver mode when View is displayed.
Needs refactor because on_modulation_changed() doesn't change the modulation so much as the "app" or receiver mode.
This commit is contained in:
parent
42d13e6713
commit
fbd077e91d
@ -498,6 +498,19 @@ ReceiverView::~ReceiverView() {
|
|||||||
receiver_model.disable();
|
receiver_model.disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ReceiverView::on_show() {
|
||||||
|
View::on_show();
|
||||||
|
|
||||||
|
// TODO: Separate concepts of baseband "modulation" and receiver "mode".
|
||||||
|
on_modulation_changed(static_cast<ReceiverModel::Mode>(receiver_model.modulation()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReceiverView::on_hide() {
|
||||||
|
on_modulation_changed(static_cast<ReceiverModel::Mode>(-1));
|
||||||
|
|
||||||
|
View::on_hide();
|
||||||
|
}
|
||||||
|
|
||||||
void ReceiverView::focus() {
|
void ReceiverView::focus() {
|
||||||
button_done.focus();
|
button_done.focus();
|
||||||
}
|
}
|
||||||
|
@ -362,6 +362,9 @@ public:
|
|||||||
ReceiverView(NavigationView& nav, ReceiverModel& receiver_model);
|
ReceiverView(NavigationView& nav, ReceiverModel& receiver_model);
|
||||||
~ReceiverView();
|
~ReceiverView();
|
||||||
|
|
||||||
|
void on_show() override;
|
||||||
|
void on_hide() override;
|
||||||
|
|
||||||
void focus() override;
|
void focus() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user