From c2623aa00ee29fe5391a44a9ec26dc9aee2b5ebe Mon Sep 17 00:00:00 2001 From: Risto Date: Mon, 14 Jun 2021 20:07:15 +0200 Subject: [PATCH] Show special functions from 1 to 64, instead of 0 to 63 To be more uniform with other elements, such as curves, global variables that start from 0. --- radio/src/gui/colorlcd/special_functions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radio/src/gui/colorlcd/special_functions.cpp b/radio/src/gui/colorlcd/special_functions.cpp index 72814bcd7..92de8cc49 100644 --- a/radio/src/gui/colorlcd/special_functions.cpp +++ b/radio/src/gui/colorlcd/special_functions.cpp @@ -76,7 +76,7 @@ class SpecialFunctionEditPage : public Page window, {PAGE_TITLE_LEFT, PAGE_TITLE_TOP + PAGE_LINE_HEIGHT, LCD_W - PAGE_TITLE_LEFT, 20}, - (functions == g_model.customFn ? "SF" : "GF") + std::to_string(index), + (functions == g_model.customFn ? "SF" : "GF") + std::to_string(index+1), 0, FOCUS_COLOR); } @@ -526,7 +526,7 @@ void SpecialFunctionsPage::build(FormWindow *window, int8_t focusIndex) for (uint8_t i = 0; i < MAX_SPECIAL_FUNCTIONS; i++) { CustomFunctionData *cfn = &functions[i]; - strAppendUnsigned(&s[2], i); + strAppendUnsigned(&s[2], i+1); if (cfn->swtch == 0) { auto button = new TextButton(window, grid.getLabelSlot(), s);