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() {
add_children({ {
&portapack,
&rssi,
&channel,
&audio,
} });
}

View File

@ -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 {

View File

@ -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,

View File

@ -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
};