From b70f1d9506acded52f65ffcc8aaaa236194387f7 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Sat, 1 Aug 2015 17:51:35 -0700 Subject: [PATCH] Move RSSI/baseband/audio bars to receiver mode. Addresses issue #38. Side effects: more room in receiver for fields and data. More room for global status indications in full bar of SystemStatusView. --- firmware/application/ui_navigation.cpp | 3 --- firmware/application/ui_navigation.hpp | 12 --------- firmware/application/ui_receiver.cpp | 5 +++- firmware/application/ui_receiver.hpp | 34 +++++++++++++++++--------- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/firmware/application/ui_navigation.cpp b/firmware/application/ui_navigation.cpp index 8efb1fa8..8b730049 100644 --- a/firmware/application/ui_navigation.cpp +++ b/firmware/application/ui_navigation.cpp @@ -39,9 +39,6 @@ namespace ui { SystemStatusView::SystemStatusView() { add_children({ { &portapack, - &rssi, - &channel, - &audio, } }); } diff --git a/firmware/application/ui_navigation.hpp b/firmware/application/ui_navigation.hpp index 473c04b6..ee816a04 100644 --- a/firmware/application/ui_navigation.hpp +++ b/firmware/application/ui_navigation.hpp @@ -44,18 +44,6 @@ private: { 0, 0, 9 * 8, 1 * 16 }, "PortaPack", }; - - RSSI rssi { - { 19 * 8, 0, 11 * 8, 4 }, - }; - - Channel channel { - { 19 * 8, 5, 11 * 8, 4 }, - }; - - Audio audio { - { 19 * 8, 10, 11 * 8, 4 }, - }; }; class NavigationView : public View { diff --git a/firmware/application/ui_receiver.cpp b/firmware/application/ui_receiver.cpp index beb4a2f6..80b7b96f 100644 --- a/firmware/application/ui_receiver.cpp +++ b/firmware/application/ui_receiver.cpp @@ -389,6 +389,9 @@ ReceiverView::ReceiverView( ) : receiver_model(receiver_model) { add_children({ { + &rssi, + &channel, + &audio, &button_done, &field_frequency, &field_lna, @@ -488,7 +491,7 @@ ReceiverView::~ReceiverView() { } void ReceiverView::set_parent_rect(const Rect new_parent_rect) { - const ui::Dim header_height = 2 * 16; + const ui::Dim header_height = 3 * 16; waterfall.set_parent_rect({ 0, header_height, diff --git a/firmware/application/ui_receiver.hpp b/firmware/application/ui_receiver.hpp index 978ccfae..639ad6b7 100644 --- a/firmware/application/ui_receiver.hpp +++ b/firmware/application/ui_receiver.hpp @@ -370,25 +370,37 @@ public: private: ReceiverModel& receiver_model; + RSSI rssi { + { 19 * 8, 0, 11 * 8, 4 }, + }; + + Channel channel { + { 19 * 8, 5, 11 * 8, 4 }, + }; + + Audio audio { + { 19 * 8, 10, 11 * 8, 4 }, + }; + Button button_done { - { 0 * 8, 0 * 16, 3 * 8, 16 }, + { 0 * 8, 1 * 16, 3 * 8, 16 }, " < ", }; FrequencyField field_frequency { - { 3 * 8, 0 * 16 }, + { 3 * 8, 1 * 16 }, }; LNAGainField field_lna { - { 13 * 8, 0 * 16 } + { 13 * 8, 1 * 16 } }; /* BasebandBandwidthField options_baseband_bandwidth { - { 15 * 8, 0 * 16 }, + { 15 * 8, 1 * 16 }, }; */ NumberField field_vga { - { 16 * 8, 0 * 16}, + { 16 * 8, 1 * 16}, 2, { max2837::vga::gain_db_min, max2837::vga::gain_db_max }, max2837::vga::gain_db_step, @@ -396,7 +408,7 @@ private: }; OptionsField options_modulation { - { 19 * 8, 0 * 16 }, + { 19 * 8, 1 * 16 }, 4, { // TODO: Put ordinals in here... @@ -408,7 +420,7 @@ private: }; /* OptionsField options_baseband_oversampling { - { 24 * 8, 0 * 16 }, + { 24 * 8, 1 * 16 }, 1, { { "4", 4 }, @@ -418,7 +430,7 @@ private: }; */ NumberField field_vregmode { - { 24 * 8, 0 * 16 }, + { 24 * 8, 1 * 16 }, 1, { 0, 1 }, 1, @@ -426,7 +438,7 @@ private: }; NumberField field_volume { - { 28 * 8, 0 * 16 }, + { 28 * 8, 1 * 16 }, 2, { 0, 99 }, 1, @@ -434,12 +446,12 @@ private: }; FrequencyOptionsView view_frequency_options { - { 0 * 8, 1 * 16, 30 * 8, 1 * 16 }, + { 0 * 8, 2 * 16, 30 * 8, 1 * 16 }, &style_options_group }; RadioGainOptionsView view_rf_gain_options { - { 0 * 8, 1 * 16, 30 * 8, 1 * 16 }, + { 0 * 8, 2 * 16, 30 * 8, 1 * 16 }, &style_options_group };