From acc1c2a77996ccd37aaf6ae3736ed4dbdc387868 Mon Sep 17 00:00:00 2001 From: Federico Amedeo Izzo Date: Sun, 11 Jul 2021 17:43:36 +0200 Subject: [PATCH] M17: Print source and destination IDs in mode screen --- openrtx/src/ui/ui_mode.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/openrtx/src/ui/ui_mode.c b/openrtx/src/ui/ui_mode.c index c6904b4f..2f0f231a 100644 --- a/openrtx/src/ui/ui_mode.c +++ b/openrtx/src/ui/ui_mode.c @@ -22,6 +22,7 @@ #include #include #include +#include /* UI main screen helper functions, their implementation is in "ui_main.c" */ extern void _ui_drawMainTop(); @@ -50,6 +51,9 @@ void _ui_drawModeDetails() { char bw_str[8] = { 0 }; char encdec_str[9] = { 0 }; + + rtxStatus_t cfg = rtx_getCurrentStatus(); + switch(last_state.channel.mode) { case FM: @@ -84,7 +88,7 @@ void _ui_drawModeDetails() encdec_str); break; case DMR: - // Print Module Frequency on line 2 of 3 + // Print talkgroup on line 2 of 3 gfx_printLine(2, 3, layout.top_h, SCREEN_HEIGHT - layout.bottom_h, layout.horizontal_pad, layout.mode_font_small, TEXT_ALIGN_LEFT, color_white, "TG:"); @@ -93,6 +97,16 @@ void _ui_drawModeDetails() layout.horizontal_pad, layout.mode_font_small, TEXT_ALIGN_LEFT, color_white, "ID:"); break; + case M17: + // Print M17 Source ID on line 2 of 3 + gfx_printLine(2, 3, layout.top_h, SCREEN_HEIGHT - layout.bottom_h, + layout.horizontal_pad, layout.mode_font_small, + TEXT_ALIGN_LEFT, color_white, "Src ID: %s", cfg.source_address); + // Print M17 Destination ID on line 3 of 3 + gfx_printLine(3, 3, layout.top_h, SCREEN_HEIGHT - layout.bottom_h, + layout.horizontal_pad, layout.mode_font_small, + TEXT_ALIGN_LEFT, color_white, "Dst ID: %s", cfg.destination_address); + break; } }