Merge pull request #8198 from opentx/3djc/fix-x7access
Fix x7 Access switch number
This commit is contained in:
@@ -191,7 +191,20 @@ SwitchInfo Boards::getSwitchInfo(Board::Type board, int index)
|
|||||||
if (index < DIM(switches))
|
if (index < DIM(switches))
|
||||||
return switches[index];
|
return switches[index];
|
||||||
}
|
}
|
||||||
else if (IS_TARANIS_X7(board)) {
|
else if (board == BOARD_TARANIS_X7_ACCESS) {
|
||||||
|
const Board::SwitchInfo switches[] = {
|
||||||
|
{SWITCH_3POS, "SA"},
|
||||||
|
{SWITCH_3POS, "SB"},
|
||||||
|
{SWITCH_3POS, "SC"},
|
||||||
|
{SWITCH_3POS, "SD"},
|
||||||
|
{SWITCH_2POS, "SF"},
|
||||||
|
{SWITCH_TOGGLE, "SH"},
|
||||||
|
{SWITCH_2POS, "SI"}
|
||||||
|
};
|
||||||
|
if (index < DIM(switches))
|
||||||
|
return switches[index];
|
||||||
|
}
|
||||||
|
else if (board == BOARD_TARANIS_X7) {
|
||||||
const Board::SwitchInfo switches[] = {
|
const Board::SwitchInfo switches[] = {
|
||||||
{SWITCH_3POS, "SA"},
|
{SWITCH_3POS, "SA"},
|
||||||
{SWITCH_3POS, "SB"},
|
{SWITCH_3POS, "SB"},
|
||||||
@@ -350,7 +363,9 @@ int Boards::getCapability(Board::Type board, Board::Capability capability)
|
|||||||
return 5;
|
return 5;
|
||||||
else if (board == Board::BOARD_TARANIS_X9LITES)
|
else if (board == Board::BOARD_TARANIS_X9LITES)
|
||||||
return 7;
|
return 7;
|
||||||
else if (IS_TARANIS_X7(board))
|
else if (board == BOARD_TARANIS_X7_ACCESS)
|
||||||
|
return 7;
|
||||||
|
else if (board == BOARD_TARANIS_X7)
|
||||||
return 8;
|
return 8;
|
||||||
else if (IS_FAMILY_T12(board))
|
else if (IS_FAMILY_T12(board))
|
||||||
return 8;
|
return 8;
|
||||||
|
|||||||
@@ -48,6 +48,9 @@ inline int MAX_SWITCHES(Board::Type board, int version)
|
|||||||
if (IS_FAMILY_T12(board))
|
if (IS_FAMILY_T12(board))
|
||||||
return 8;
|
return 8;
|
||||||
|
|
||||||
|
if (IS_TARANIS_X7(board))
|
||||||
|
return 8;
|
||||||
|
|
||||||
return Boards::getCapability(board, Board::Switches);
|
return Boards::getCapability(board, Board::Switches);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user