From 790669c242362d84d96c75c3a8524fbaa9d03e0b Mon Sep 17 00:00:00 2001 From: Mark Thompson <129641948+NotherNgineer@users.noreply.github.com> Date: Sat, 14 Oct 2023 03:25:40 -0500 Subject: [PATCH] Added Transmitter settings to 2nd DFU overlay screen (#1497) * Added Transmitter settings to 2nd DFU overlay --- firmware/application/apps/ui_dfu_menu.cpp | 10 +++++++--- firmware/application/apps/ui_dfu_menu.hpp | 14 +++++++++----- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/firmware/application/apps/ui_dfu_menu.cpp b/firmware/application/apps/ui_dfu_menu.cpp index b21198e7..0822f63b 100644 --- a/firmware/application/apps/ui_dfu_menu.cpp +++ b/firmware/application/apps/ui_dfu_menu.cpp @@ -92,7 +92,9 @@ DfuMenu2::DfuMenu2(NavigationView& nav) &text_info_line_5, &text_info_line_6, &text_info_line_7, - &text_info_line_8}); + &text_info_line_8, + &text_info_line_9, + &text_info_line_10}); } void DfuMenu2::paint(Painter& painter) { @@ -103,10 +105,12 @@ void DfuMenu2::paint(Painter& painter) { text_info_line_5.set(to_string_dec_uint(portapack::receiver_model.am_configuration(), 10)); text_info_line_6.set(to_string_dec_uint(portapack::receiver_model.nbfm_configuration(), 10)); text_info_line_7.set(to_string_dec_uint(portapack::receiver_model.wfm_configuration(), 10)); - text_info_line_8.set(""); + text_info_line_8.set(to_string_dec_uint(portapack::transmitter_model.target_frequency(), 10)); + text_info_line_9.set(to_string_dec_uint(portapack::transmitter_model.baseband_bandwidth(), 10)); + text_info_line_10.set(to_string_dec_uint(portapack::transmitter_model.sampling_rate(), 10)); constexpr auto margin = 5; - constexpr auto lines = 8 + 2; + constexpr auto lines = 10 + 2; painter.fill_rectangle( {{5 * CHARACTER_WIDTH - margin, 3 * LINE_HEIGHT - margin}, diff --git a/firmware/application/apps/ui_dfu_menu.hpp b/firmware/application/apps/ui_dfu_menu.hpp index 04e570db..a76264db 100644 --- a/firmware/application/apps/ui_dfu_menu.hpp +++ b/firmware/application/apps/ui_dfu_menu.hpp @@ -77,17 +77,19 @@ class DfuMenu2 : public View { private: NavigationView& nav_; - Text text_head{{6 * CHARACTER_WIDTH, 3 * LINE_HEIGHT, 8 * CHARACTER_WIDTH, 1 * LINE_HEIGHT}, "Receiver"}; + Text text_head{{6 * CHARACTER_WIDTH, 3 * LINE_HEIGHT, 14 * CHARACTER_WIDTH, 1 * LINE_HEIGHT}, "Radio Settings"}; Labels labels{ - {{5 * CHARACTER_WIDTH, 5 * LINE_HEIGHT}, "Tgt freq:", Color::dark_cyan()}, - {{5 * CHARACTER_WIDTH, 6 * LINE_HEIGHT}, "Bandwidt:", Color::dark_cyan()}, - {{5 * CHARACTER_WIDTH, 7 * LINE_HEIGHT}, "Sampl Rt:", Color::dark_cyan()}, + {{5 * CHARACTER_WIDTH, 5 * LINE_HEIGHT}, "RX Freq:", Color::dark_cyan()}, + {{5 * CHARACTER_WIDTH, 6 * LINE_HEIGHT}, "RX BW:", Color::dark_cyan()}, + {{5 * CHARACTER_WIDTH, 7 * LINE_HEIGHT}, "RX SampR:", Color::dark_cyan()}, {{5 * CHARACTER_WIDTH, 8 * LINE_HEIGHT}, "Modulatn:", Color::dark_cyan()}, {{5 * CHARACTER_WIDTH, 9 * LINE_HEIGHT}, "AM cfg:", Color::dark_cyan()}, {{5 * CHARACTER_WIDTH, 10 * LINE_HEIGHT}, "NBFM cfg:", Color::dark_cyan()}, {{5 * CHARACTER_WIDTH, 11 * LINE_HEIGHT}, "WFM cfg:", Color::dark_cyan()}, - {{5 * CHARACTER_WIDTH, 12 * LINE_HEIGHT}, "", Color::dark_cyan()}}; + {{5 * CHARACTER_WIDTH, 12 * LINE_HEIGHT}, "TX Freq:", Color::dark_cyan()}, + {{5 * CHARACTER_WIDTH, 13 * LINE_HEIGHT}, "TX BW:", Color::dark_cyan()}, + {{5 * CHARACTER_WIDTH, 14 * LINE_HEIGHT}, "TX SampR:", Color::dark_cyan()}}; Text text_info_line_1{{14 * CHARACTER_WIDTH, 5 * LINE_HEIGHT, 10 * CHARACTER_WIDTH, 1 * LINE_HEIGHT}, ""}; Text text_info_line_2{{14 * CHARACTER_WIDTH, 6 * LINE_HEIGHT, 10 * CHARACTER_WIDTH, 1 * LINE_HEIGHT}, ""}; @@ -97,6 +99,8 @@ class DfuMenu2 : public View { Text text_info_line_6{{14 * CHARACTER_WIDTH, 10 * LINE_HEIGHT, 10 * CHARACTER_WIDTH, 1 * LINE_HEIGHT}, ""}; Text text_info_line_7{{14 * CHARACTER_WIDTH, 11 * LINE_HEIGHT, 10 * CHARACTER_WIDTH, 1 * LINE_HEIGHT}, ""}; Text text_info_line_8{{14 * CHARACTER_WIDTH, 12 * LINE_HEIGHT, 10 * CHARACTER_WIDTH, 1 * LINE_HEIGHT}, ""}; + Text text_info_line_9{{14 * CHARACTER_WIDTH, 13 * LINE_HEIGHT, 10 * CHARACTER_WIDTH, 1 * LINE_HEIGHT}, ""}; + Text text_info_line_10{{14 * CHARACTER_WIDTH, 14 * LINE_HEIGHT, 10 * CHARACTER_WIDTH, 1 * LINE_HEIGHT}, ""}; }; } /* namespace ui */