mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04: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();
|
||||
}
|
||||
|
||||
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() {
|
||||
button_done.focus();
|
||||
}
|
||||
|
@ -362,6 +362,9 @@ public:
|
||||
ReceiverView(NavigationView& nav, ReceiverModel& receiver_model);
|
||||
~ReceiverView();
|
||||
|
||||
void on_show() override;
|
||||
void on_hide() override;
|
||||
|
||||
void focus() override;
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user