Skip to content

Commit

Permalink
adjust GUI for more preset name room (#2068)
Browse files Browse the repository at this point in the history
  • Loading branch information
gullradriel committed Mar 30, 2024
1 parent cb9fee8 commit 2acefee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions firmware/application/apps/ui_looking_glass_app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ int32_t GlassView::map(int32_t value, int32_t fromLow, int32_t fromHigh, int32_t
void GlassView::update_display_beep() {
if (beep_enabled) {
button_beep_squelch.set_style(&Styles::green);
// <bip:-XXXdb>
button_beep_squelch.set_text("[bip>" + to_string_dec_int(beep_squelch, 4) + "db]");
// bip-XXdb
button_beep_squelch.set_text("bip" + to_string_dec_int(beep_squelch, 3) + "db");
receiver_model.set_headphone_volume(receiver_model.headphone_volume()); // WM8731 hack.
} else {
button_beep_squelch.set_style(&Styles::white);
button_beep_squelch.set_text("[ beep OFF ]");
button_beep_squelch.set_text("bip OFF ");
}
}

Expand Down Expand Up @@ -548,8 +548,8 @@ GlassView::GlassView(

button_beep_squelch.on_change = [this]() {
int new_beep_squelch = beep_squelch + button_beep_squelch.get_encoder_delta();
if (new_beep_squelch < -100)
new_beep_squelch = -100;
if (new_beep_squelch < -99)
new_beep_squelch = -99;
if (new_beep_squelch > 20)
new_beep_squelch = 20;
beep_squelch = new_beep_squelch;
Expand Down
8 changes: 4 additions & 4 deletions firmware/application/apps/ui_looking_glass_app.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class GlassView : public View {
Labels labels{
{{0, 0 * 16}, "MIN: MAX: LNA VGA ", Color::light_grey()},
{{0, 1 * 16}, "RANGE: FILTER: AMP:", Color::light_grey()},
{{0, 2 * 16}, "PRESET:", Color::light_grey()},
{{0, 2 * 16}, "P:", Color::light_grey()},
{{0, 3 * 16}, "MARKER: MHz RXIQCAL", Color::light_grey()},
//{{0, 4 * 16}, "RES: STEPS:", Color::light_grey()}};
{{0, 4 * 16}, "RES: VOL:", Color::light_grey()}};
Expand Down Expand Up @@ -215,12 +215,12 @@ class GlassView : public View {
{28 * 8, 1 * 16}};

OptionsField range_presets{
{7 * 8, 2 * 16},
10,
{2 * 8, 2 * 16},
20,
{}};

ButtonWithEncoder button_beep_squelch{
{18 * 8, 2 * 16 + 4, 12 * 8, 1 * 8},
{240 - 8 * 8, 2 * 16 + 4, 8 * 8, 1 * 8},
""};

TextField field_marker{
Expand Down

0 comments on commit 2acefee

Please sign in to comment.