Initialize modulation from ReceiverModel.

This commit is contained in:
Jared Boone 2016-02-02 15:01:04 -08:00
parent d82cbcb1c4
commit 1cf38387c1

View File

@ -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<ReceiverModel::Mode>(v));
};
@ -131,7 +132,7 @@ AnalogAudioView::AnalogAudioView(
this->on_headphone_volume_changed(v);
};
update_modulation(static_cast<ReceiverModel::Mode>(receiver_model.modulation()));
update_modulation(static_cast<ReceiverModel::Mode>(modulation));
}
AnalogAudioView::~AnalogAudioView() {