diff --git a/firmware/application/analog_audio_app.cpp b/firmware/application/analog_audio_app.cpp index 222610df..89bbbd61 100644 --- a/firmware/application/analog_audio_app.cpp +++ b/firmware/application/analog_audio_app.cpp @@ -216,10 +216,7 @@ void AnalogAudioView::on_show_options_frequency() { field_frequency.set_style(&style_options_group); - auto widget = std::make_unique( - Rect { 0 * 8, 1 * 16, 30 * 8, 1 * 16 }, - &style_options_group - ); + auto widget = std::make_unique(options_view_rect, &style_options_group); widget->set_step(receiver_model.frequency_step()); widget->on_change_step = [this](rf::Frequency f) { @@ -239,10 +236,7 @@ void AnalogAudioView::on_show_options_rf_gain() { field_lna.set_style(&style_options_group); - auto widget = std::make_unique( - Rect { 0 * 8, 1 * 16, 30 * 8, 1 * 16 }, - &style_options_group - ); + auto widget = std::make_unique(options_view_rect, &style_options_group); widget->set_rf_amp(receiver_model.rf_amp()); widget->on_change_rf_amp = [this](bool enable) { @@ -259,18 +253,12 @@ void AnalogAudioView::on_show_options_modulation() { const auto modulation = static_cast(receiver_model.modulation()); if( modulation == ReceiverModel::Mode::AMAudio ) { options_modulation.set_style(&style_options_group); - auto widget = std::make_unique( - Rect { 0 * 8, 1 * 16, 30 * 8, 1 * 16 }, - &style_options_group - ); + auto widget = std::make_unique(options_view_rect, &style_options_group); set_options_widget(std::move(widget)); } if( modulation == ReceiverModel::Mode::NarrowbandFMAudio ) { options_modulation.set_style(&style_options_group); - auto widget = std::make_unique( - Rect { 0 * 8, 1 * 16, 30 * 8, 1 * 16 }, - &style_options_group - ); + auto widget = std::make_unique(options_view_rect, &style_options_group); set_options_widget(std::move(widget)); } } diff --git a/firmware/application/analog_audio_app.hpp b/firmware/application/analog_audio_app.hpp index e3bd24a4..7fb93432 100644 --- a/firmware/application/analog_audio_app.hpp +++ b/firmware/application/analog_audio_app.hpp @@ -93,6 +93,8 @@ public: private: static constexpr ui::Dim header_height = 2 * 16; + const Rect options_view_rect { 0 * 8, 1 * 16, 30 * 8, 1 * 16 }; + RSSI rssi { { 21 * 8, 0, 6 * 8, 4 }, };