From a58c3a4b8dc948f64f2655c31e5f3731c8df4c93 Mon Sep 17 00:00:00 2001 From: shane-droid <61736830+shane-droid@users.noreply.github.com> Date: Sun, 9 Oct 2022 15:27:34 +1100 Subject: [PATCH] display friendly LS name on viewlayout --- radio/src/gui/colorlcd/view_logical_switches.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/radio/src/gui/colorlcd/view_logical_switches.h b/radio/src/gui/colorlcd/view_logical_switches.h index 75208400930..80e53181e26 100644 --- a/radio/src/gui/colorlcd/view_logical_switches.h +++ b/radio/src/gui/colorlcd/view_logical_switches.h @@ -51,7 +51,17 @@ class LogicalSwitchDisplayFooter : public Window LogicalSwitchData* cs = lswAddress(index); LcdFlags textColor = COLOR_THEME_PRIMARY2; - dc->drawTextAtIndex(10, 1, STR_VCSWFUNC, cs->func, textColor); + + + + //LS friendly name + const char* chrs = cs->custName; + if(strlen(chrs) > 0){ + dc->drawText(15, 1, cs->custName, textColor); + }else{ + dc->drawTextAtIndex(5, 1, STR_VCSWFUNC, cs->func, textColor); + } + // CSW params unsigned int cstate = lswFamily(cs->func);