mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-15 05:02:13 -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
2 changed files with 16 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue