From 1cf38387c1dbb456c1b23bab8d162b73cd108c89 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Tue, 2 Feb 2016 15:01:04 -0800 Subject: [PATCH] Initialize modulation from ReceiverModel. --- firmware/application/analog_audio_app.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/firmware/application/analog_audio_app.cpp b/firmware/application/analog_audio_app.cpp index 51f34f79..f36532ec 100644 --- a/firmware/application/analog_audio_app.cpp +++ b/firmware/application/analog_audio_app.cpp @@ -118,7 +118,8 @@ AnalogAudioView::AnalogAudioView( this->on_vga_changed(v_db); }; - options_modulation.set_by_value(toUType(ReceiverModel::Mode::AMAudio)); + const auto modulation = receiver_model.modulation(); + options_modulation.set_by_value(modulation); options_modulation.on_change = [this](size_t, OptionsField::value_t v) { this->on_modulation_changed(static_cast(v)); }; @@ -131,7 +132,7 @@ AnalogAudioView::AnalogAudioView( this->on_headphone_volume_changed(v); }; - update_modulation(static_cast(receiver_model.modulation())); + update_modulation(static_cast(modulation)); } AnalogAudioView::~AnalogAudioView() {