Fixed switch position warning display on B&W

This commit is contained in:
Raphael Coeffic
2021-11-10 11:07:01 +01:00
parent fc4cdfd9ae
commit 68bdf025c1
5 changed files with 24 additions and 25 deletions
+17 -18
View File
@@ -406,20 +406,19 @@ char *getFlightModeString(char *dest, int8_t idx)
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;
}
// 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)
{