fix(yaml): flex switch warnings (#4949)
Co-authored-by: raphaelcoeffic <1050031+raphaelcoeffic@users.noreply.github.com> Co-authored-by: 3djc <3djc@gh.com> Co-authored-by: elecpower <neilh713@tpg.com.au>
This commit is contained in:
co-authored by
raphaelcoeffic
3djc
elecpower
parent
dd87ecb89a
commit
0d6ce7d22d
@@ -216,7 +216,7 @@ char switchGetLetter(uint8_t idx)
|
||||
return -1;
|
||||
|
||||
uint8_t c = 1;
|
||||
if (idx >= switchGetMaxSwitches()) c = 2;
|
||||
if (idx >= switchGetMaxSwitches() || switchIsFlex(idx)) c = 2;
|
||||
|
||||
const char* name = switchGetName(idx);
|
||||
if (!name) return -1;
|
||||
@@ -760,7 +760,7 @@ swsrc_t getMovedSwitch()
|
||||
|
||||
bool isSwitchWarningRequired(uint16_t &bad_pots)
|
||||
{
|
||||
swarnstate_t states = g_model.switchWarningState;
|
||||
swarnstate_t states = g_model.switchWarning;
|
||||
|
||||
if (!mixerTaskRunning()) getADC();
|
||||
getMovedSwitch();
|
||||
@@ -809,7 +809,7 @@ void checkSwitches()
|
||||
void checkSwitches()
|
||||
{
|
||||
swarnstate_t last_bad_switches = 0xff;
|
||||
swarnstate_t states = g_model.switchWarningState;
|
||||
swarnstate_t states = g_model.switchWarning;
|
||||
uint16_t bad_pots = 0, last_bad_pots = 0xff;
|
||||
|
||||
#if defined(PWR_BUTTON_PRESS)
|
||||
|
||||
Reference in New Issue
Block a user