fix(tx16smk3): allow invert flag for BSP, invert SI and SJ (#7425)

This commit is contained in:
3djc
2026-06-04 13:56:32 +10:00
committed by GitHub
parent 9e1afdfb58
commit 0a22fb978e
2 changed files with 8 additions and 2 deletions
+2 -2
View File
@@ -257,7 +257,7 @@
"name": "SI",
"type": "2POS",
"flags": 0,
"inverted": false,
"inverted": true,
"default": "NONE",
"display": null,
"gpio": null,
@@ -268,7 +268,7 @@
"name": "SJ",
"type": "2POS",
"flags": 0,
"inverted": false,
"inverted": true,
"default": "NONE",
"display": null,
"gpio": null,
+6
View File
@@ -222,6 +222,12 @@ static SwitchHwPos _get_switch_pos(uint8_t idx)
}
}
if (def->inverted) {
pos = pos == SWITCH_HW_UP ? SWITCH_HW_DOWN
: pos == SWITCH_HW_DOWN ? SWITCH_HW_UP
: pos;
}
return pos;
}