Introduce T-pro and function switches handling

This commit is contained in:
3djc
2021-12-17 17:07:48 +01:00
committed by Raphael Coeffic
parent 69dafd13c0
commit d31482c18b
63 changed files with 1324 additions and 70 deletions
+13 -4
View File
@@ -82,6 +82,8 @@ uint32_t Boards::getFourCC(Type board)
return 0x3D78746F;
case BOARD_JUMPER_TLITE:
return 0x4278746F;
case BOARD_JUMPER_TPRO:
return 0x4678746F;
case BOARD_JUMPER_T16:
return 0x3F78746F;
case BOARD_JUMPER_T18:
@@ -121,6 +123,7 @@ int Boards::getEEpromSize(Board::Type board)
case BOARD_TARANIS_X9E:
case BOARD_JUMPER_T12:
case BOARD_JUMPER_TLITE:
case BOARD_JUMPER_TPRO:
case BOARD_RADIOMASTER_TX12:
case BOARD_RADIOMASTER_T8:
case BOARD_RADIOMASTER_ZORRO:
@@ -160,6 +163,7 @@ int Boards::getFlashSize(Type board)
case BOARD_TARANIS_X9E:
case BOARD_JUMPER_T12:
case BOARD_JUMPER_TLITE:
case BOARD_JUMPER_TPRO:
case BOARD_RADIOMASTER_TX12:
case BOARD_RADIOMASTER_ZORRO:
case BOARD_RADIOMASTER_T8:
@@ -196,7 +200,7 @@ SwitchInfo Boards::getSwitchInfo(Board::Type board, int index)
if (index < DIM(switches))
return switches[index];
}
else if (IS_TARANIS_XLITE(board) || IS_JUMPER_TLITE(board)) {
else if (IS_TARANIS_XLITE(board) || IS_JUMPER_TLITE(board) || IS_JUMPER_TPRO(board)) {
const Board::SwitchInfo switches[] = {
{SWITCH_3POS, "SA"},
{SWITCH_3POS, "SB"},
@@ -365,7 +369,7 @@ int Boards::getCapability(Board::Type board, Board::Capability capability)
return 1;
else if (IS_JUMPER_TLITE(board))
return 0;
else if (IS_TARANIS_SMALL(board))
else if (IS_TARANIS_SMALL(board) || IS_JUMPER_TPRO(board))
return 2;
else if (IS_TARANIS_X9E(board))
return 4;
@@ -427,7 +431,7 @@ int Boards::getCapability(Board::Type board, Board::Capability capability)
return 7;
else if (board == BOARD_TARANIS_X7)
return 8;
else if (board == BOARD_JUMPER_TLITE)
else if (board == BOARD_JUMPER_TLITE || board == BOARD_JUMPER_TPRO)
return 4;
else if (board == BOARD_FLYSKY_NV14)
return 8;
@@ -447,7 +451,7 @@ int Boards::getCapability(Board::Type board, Board::Capability capability)
case FactoryInstalledSwitches:
if (IS_TARANIS_X9E(board))
return 8;
else if (IS_JUMPER_TLITE(board))
else if (IS_JUMPER_TLITE(board) || IS_JUMPER_TPRO(board))
return 4;
else if(IS_RADIOMASTER_ZORRO(board))
return 8;
@@ -479,6 +483,9 @@ int Boards::getCapability(Board::Type board, Board::Capability capability)
case HasColorLcd:
return IS_FAMILY_HORUS_OR_T16(board);
case NumFunctionSwitches:
return IS_JUMPER_TPRO(board) ? 6 : 0;
default:
return 0;
}
@@ -645,6 +652,8 @@ QString Boards::getBoardName(Board::Type board)
return "Jumper T12";
case BOARD_JUMPER_TLITE:
return "Jumper T-Lite";
case BOARD_JUMPER_TPRO:
return "Jumper T-Pro";
case BOARD_JUMPER_T16:
return "Jumper T16";
case BOARD_JUMPER_T18: