diff --git a/radio/src/gui/colorlcd/model_setup.cpp b/radio/src/gui/colorlcd/model_setup.cpp index d38762be8..8d510d8d9 100644 --- a/radio/src/gui/colorlcd/model_setup.cpp +++ b/radio/src/gui/colorlcd/model_setup.cpp @@ -607,7 +607,8 @@ class ModuleWindow : public FormGroup { }); if (moduleIdx == INTERNAL_MODULE && isModuleCrossfire(moduleIdx)) { - new StaticText(this, grid.getFieldSlot(2, 1), getStringAtIndex(STR_CRSF_BAUDRATE, CROSSFIRE_STORE_TO_INDEX(g_eeGeneral.internalModuleBaudrate)), 0,COLOR_THEME_PRIMARY1); + char buf[6]; + new StaticText(this, grid.getFieldSlot(2, 1), getStringAtIndex(buf, STR_CRSF_BAUDRATE, CROSSFIRE_STORE_TO_INDEX(g_eeGeneral.internalModuleBaudrate)), 0,COLOR_THEME_PRIMARY1); } // Module parameters diff --git a/radio/src/strhelpers.cpp b/radio/src/strhelpers.cpp index 4b9ea94e7..6f4858618 100644 --- a/radio/src/strhelpers.cpp +++ b/radio/src/strhelpers.cpp @@ -158,13 +158,6 @@ char *getStringAtIndex(char *dest, const char *s, int idx) return dest; } -const char *getStringAtIndex(const char *s, int idx) -{ - uint8_t len = s[0]; - return s + 1 + len * idx; -} - - char *strAppendStringWithIndex(char *dest, const char *s, int idx) { return strAppendUnsigned(strAppend(dest, s), abs(idx)); diff --git a/radio/src/strhelpers.h b/radio/src/strhelpers.h index 94cd87760..5ed7d8807 100644 --- a/radio/src/strhelpers.h +++ b/radio/src/strhelpers.h @@ -66,7 +66,6 @@ char *strAppendFilename(char *dest, const char *filename, const int size); #if !defined(BOOT) char *getStringAtIndex(char *dest, const char *s, int idx); -const char *getStringAtIndex(const char *s, int idx); char *strAppendStringWithIndex(char *dest, const char *s, int idx); #define LEN_TIMER_STRING 10 // "-00:00:00" char *getTimerString(char *dest, int32_t tme, TimerOptions timerOptions = {.options = 0});