mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-01-13 00:09:43 -05:00
Clean up AnalogAudioView::on_show_options_modulation().
This commit is contained in:
parent
760c73a7be
commit
61b5faf8b5
@ -245,18 +245,25 @@ void AnalogAudioView::on_show_options_rf_gain() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AnalogAudioView::on_show_options_modulation() {
|
void AnalogAudioView::on_show_options_modulation() {
|
||||||
|
std::unique_ptr<Widget> widget;
|
||||||
|
|
||||||
const auto modulation = static_cast<ReceiverModel::Mode>(receiver_model.modulation());
|
const auto modulation = static_cast<ReceiverModel::Mode>(receiver_model.modulation());
|
||||||
if( modulation == ReceiverModel::Mode::AMAudio ) {
|
switch(modulation) {
|
||||||
auto widget = std::make_unique<AMOptionsView>(options_view_rect, &style_options_group);
|
case ReceiverModel::Mode::AMAudio:
|
||||||
|
widget = std::make_unique<AMOptionsView>(options_view_rect, &style_options_group);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ReceiverModel::Mode::NarrowbandFMAudio:
|
||||||
|
widget = std::make_unique<NBFMOptionsView>(options_view_rect, &style_options_group);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
set_options_widget(std::move(widget));
|
set_options_widget(std::move(widget));
|
||||||
options_modulation.set_style(&style_options_group);
|
options_modulation.set_style(&style_options_group);
|
||||||
}
|
}
|
||||||
if( modulation == ReceiverModel::Mode::NarrowbandFMAudio ) {
|
|
||||||
auto widget = std::make_unique<NBFMOptionsView>(options_view_rect, &style_options_group);
|
|
||||||
set_options_widget(std::move(widget));
|
|
||||||
options_modulation.set_style(&style_options_group);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void AnalogAudioView::on_frequency_step_changed(rf::Frequency f) {
|
void AnalogAudioView::on_frequency_step_changed(rf::Frequency f) {
|
||||||
receiver_model.set_frequency_step(f);
|
receiver_model.set_frequency_step(f);
|
||||||
|
Loading…
Reference in New Issue
Block a user