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.
This commit is contained in:
Jared Boone 2015-08-01 17:51:35 -07:00
parent 30d249df26
commit b70f1d9506
4 changed files with 27 additions and 27 deletions

View File

@ -39,9 +39,6 @@ namespace ui {
SystemStatusView::SystemStatusView() { SystemStatusView::SystemStatusView() {
add_children({ { add_children({ {
&portapack, &portapack,
&rssi,
&channel,
&audio,
} }); } });
} }

View File

@ -44,18 +44,6 @@ private:
{ 0, 0, 9 * 8, 1 * 16 }, { 0, 0, 9 * 8, 1 * 16 },
"PortaPack", "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 { class NavigationView : public View {

View File

@ -389,6 +389,9 @@ ReceiverView::ReceiverView(
) : receiver_model(receiver_model) ) : receiver_model(receiver_model)
{ {
add_children({ { add_children({ {
&rssi,
&channel,
&audio,
&button_done, &button_done,
&field_frequency, &field_frequency,
&field_lna, &field_lna,
@ -488,7 +491,7 @@ ReceiverView::~ReceiverView() {
} }
void ReceiverView::set_parent_rect(const Rect new_parent_rect) { 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({ waterfall.set_parent_rect({
0, header_height, 0, header_height,

View File

@ -370,25 +370,37 @@ public:
private: private:
ReceiverModel& receiver_model; 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 { Button button_done {
{ 0 * 8, 0 * 16, 3 * 8, 16 }, { 0 * 8, 1 * 16, 3 * 8, 16 },
" < ", " < ",
}; };
FrequencyField field_frequency { FrequencyField field_frequency {
{ 3 * 8, 0 * 16 }, { 3 * 8, 1 * 16 },
}; };
LNAGainField field_lna { LNAGainField field_lna {
{ 13 * 8, 0 * 16 } { 13 * 8, 1 * 16 }
}; };
/* /*
BasebandBandwidthField options_baseband_bandwidth { BasebandBandwidthField options_baseband_bandwidth {
{ 15 * 8, 0 * 16 }, { 15 * 8, 1 * 16 },
}; };
*/ */
NumberField field_vga { NumberField field_vga {
{ 16 * 8, 0 * 16}, { 16 * 8, 1 * 16},
2, 2,
{ max2837::vga::gain_db_min, max2837::vga::gain_db_max }, { max2837::vga::gain_db_min, max2837::vga::gain_db_max },
max2837::vga::gain_db_step, max2837::vga::gain_db_step,
@ -396,7 +408,7 @@ private:
}; };
OptionsField options_modulation { OptionsField options_modulation {
{ 19 * 8, 0 * 16 }, { 19 * 8, 1 * 16 },
4, 4,
{ {
// TODO: Put ordinals in here... // TODO: Put ordinals in here...
@ -408,7 +420,7 @@ private:
}; };
/* /*
OptionsField options_baseband_oversampling { OptionsField options_baseband_oversampling {
{ 24 * 8, 0 * 16 }, { 24 * 8, 1 * 16 },
1, 1,
{ {
{ "4", 4 }, { "4", 4 },
@ -418,7 +430,7 @@ private:
}; };
*/ */
NumberField field_vregmode { NumberField field_vregmode {
{ 24 * 8, 0 * 16 }, { 24 * 8, 1 * 16 },
1, 1,
{ 0, 1 }, { 0, 1 },
1, 1,
@ -426,7 +438,7 @@ private:
}; };
NumberField field_volume { NumberField field_volume {
{ 28 * 8, 0 * 16 }, { 28 * 8, 1 * 16 },
2, 2,
{ 0, 99 }, { 0, 99 },
1, 1,
@ -434,12 +446,12 @@ private:
}; };
FrequencyOptionsView view_frequency_options { FrequencyOptionsView view_frequency_options {
{ 0 * 8, 1 * 16, 30 * 8, 1 * 16 }, { 0 * 8, 2 * 16, 30 * 8, 1 * 16 },
&style_options_group &style_options_group
}; };
RadioGainOptionsView view_rf_gain_options { RadioGainOptionsView view_rf_gain_options {
{ 0 * 8, 1 * 16, 30 * 8, 1 * 16 }, { 0 * 8, 2 * 16, 30 * 8, 1 * 16 },
&style_options_group &style_options_group
}; };