From bd2d11ef8b910ea79ff18bd8cbd0b5dff091af1d Mon Sep 17 00:00:00 2001 From: Peter Feerick Date: Mon, 13 Nov 2023 09:02:36 +1000 Subject: [PATCH] feat(color): Show index and name (when set) for GVs in input source (#2219) --- radio/src/strhelpers.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/radio/src/strhelpers.cpp b/radio/src/strhelpers.cpp index 51d56d66f..cfe371eaf 100644 --- a/radio/src/strhelpers.cpp +++ b/radio/src/strhelpers.cpp @@ -726,7 +726,15 @@ char *getSourceString(char (&dest)[L], mixsrc_t idx) } } else if (idx <= MIXSRC_LAST_GVAR) { idx -= MIXSRC_FIRST_GVAR; +#if defined(LIBOPENUI) + char* s = strAppendStringWithIndex(dest, STR_GV, idx + 1); + if (g_model.gvars[idx].name[0]) { + s = strAppend(s, ":"); + getGVarString(s, idx); + } +#else strAppendStringWithIndex(dest, STR_GV, idx + 1); +#endif } else if (idx < MIXSRC_FIRST_TIMER) { // Built-in sources: TX Voltage, Time, GPS (+ reserved) const char* src_str;