diff --git a/radio/src/gui/128x64/model_setup.cpp b/radio/src/gui/128x64/model_setup.cpp index 76b243894..bf10106d0 100644 --- a/radio/src/gui/128x64/model_setup.cpp +++ b/radio/src/gui/128x64/model_setup.cpp @@ -744,7 +744,7 @@ void menuModelSetup(event_t event) #endif } uint8_t swactive = !(g_model.switchWarningEnable & (1<> (3 * idx) & 0x07; - - *s++ = 'A' + idx; - if (state == 0) - *s = '\0'; - else { - *s++ = "x\300-\301"[state]; - *s = '\0'; - } - return dest; -} +// char * getSwitchWarningString(char * dest, swsrc_t idx) +// { +// char * s = dest; +// uint8_t state = g_model.switchWarningState >> (3*idx) & 0x07; +// *s++ = 'A' + idx; +// if (state == 0) +// *s = '\0'; +// else { +// *s++ = "x\300-\301"[state]; +// *s = '\0'; +// } +// return dest; +// } #if !defined(PCBSKY9X) char *getSwitchName(char *dest, swsrc_t idx) @@ -752,10 +751,10 @@ char *strAppendDate(char *str, bool time) #if !defined(BOOT) static char tmpHelpersString[32]; -char *getSwitchWarningString(swsrc_t idx) -{ - return getSwitchWarningString(tmpHelpersString, idx); -} +// char * getSwitchWarningString(swsrc_t idx) +// { +// return getSwitchWarningString(tmpHelpersString, idx); +// } char *getSourceString(mixsrc_t idx) { diff --git a/radio/src/strhelpers.h b/radio/src/strhelpers.h index ede5a31ee..eccca57c7 100644 --- a/radio/src/strhelpers.h +++ b/radio/src/strhelpers.h @@ -77,11 +77,11 @@ char *getSourceString(char *dest, mixsrc_t idx); char *getFlightModeString(char *dest, int8_t idx); #define SWITCH_WARNING_STR_SIZE 3 -char *getSwitchWarningString(char *dest, swsrc_t idx); +// char *getSwitchWarningString(char *dest, swsrc_t idx); char *getSourceString(mixsrc_t idx); char *getSwitchPositionName(swsrc_t idx); -char *getSwitchWarningString(swsrc_t idx); +// char *getSwitchWarningString(swsrc_t idx); char *getCurveString(int idx); char *getTimerString(int32_t tme, TimerOptions timerOptions = {.options = 0}); void splitTimer(char *s0, char *s1, char *s2, char *s3, int tme, diff --git a/radio/src/switches.cpp b/radio/src/switches.cpp index 1d2825018..296f5ab9e 100644 --- a/radio/src/switches.cpp +++ b/radio/src/switches.cpp @@ -708,7 +708,7 @@ void checkSwitches() LcdFlags attr = ((states & mask) == (switches_states & mask)) ? 0 : INVERS; if (attr) { if (++numWarnings < 6) { - char c = "\300-\301"[(states & mask) >> (i*2)]; + char c = (STR_CHAR_UP "-" STR_CHAR_DOWN)[(states & mask) >> (i*2)]; drawSource(x, y, MIXSRC_FIRST_SWITCH+i, attr); lcdDrawChar(lcdNextPos, y, c, attr); x = lcdNextPos + 3; @@ -727,9 +727,9 @@ void checkSwitches() if (++numWarnings < 6) { lcdDrawTextAtIndex(x, y, STR_VSRCRAW, NUM_STICKS + 1 + i, INVERS); if (IS_POT(POT1 + i)) - lcdDrawChar(lcdNextPos, y, g_model.potsWarnPosition[i] > GET_LOWRES_POT_POSITION(i) ? 126 : 127, INVERS); + lcdDrawChar(lcdNextPos, y, g_model.potsWarnPosition[i] > GET_LOWRES_POT_POSITION(i) ? 126 : 127, INVERS); // TODO: use constants for chars else - lcdDrawChar(lcdNextPos, y, g_model.potsWarnPosition[i] > GET_LOWRES_POT_POSITION(i) ? '\300' : '\301', INVERS); + lcdDrawChar(lcdNextPos, y, g_model.potsWarnPosition[i] > GET_LOWRES_POT_POSITION(i) ? CHAR_UP : CHAR_DOWN, INVERS); x = lcdNextPos + 3; } }