EEPROM conversions tests added to X12S (COMPANION)

This commit is contained in:
Bertrand Songis
2019-09-03 17:01:25 +02:00
parent b005f5dd6c
commit 6457ad245f
6 changed files with 110 additions and 36 deletions
+11 -11
View File
@@ -94,7 +94,7 @@ uint32_t Boards::getFourCC(Type board)
return 0;
}
const int Boards::getEEpromSize(Board::Type board)
int Boards::getEEpromSize(Board::Type board)
{
switch (board) {
case BOARD_STOCK:
@@ -130,7 +130,7 @@ const int Boards::getEEpromSize(Board::Type board)
return 0;
}
const int Boards::getFlashSize(Type board)
int Boards::getFlashSize(Type board)
{
switch (board) {
case BOARD_STOCK:
@@ -166,7 +166,7 @@ const int Boards::getFlashSize(Type board)
}
}
const SwitchInfo Boards::getSwitchInfo(Board::Type board, int index)
SwitchInfo Boards::getSwitchInfo(Board::Type board, int index)
{
if (index < 0)
return {SWITCH_NOT_AVAILABLE, CPN_STR_UNKNOWN_ITEM};
@@ -260,7 +260,7 @@ const SwitchInfo Boards::getSwitchInfo(Board::Type board, int index)
return {SWITCH_NOT_AVAILABLE, CPN_STR_UNKNOWN_ITEM};
}
const int Boards::getCapability(Board::Type board, Board::Capability capability)
int Boards::getCapability(Board::Type board, Board::Capability capability)
{
switch (capability) {
case Sticks:
@@ -276,7 +276,7 @@ const int Boards::getCapability(Board::Type board, Board::Capability capability)
else if (IS_HORUS_X10(board))
return 5;
else if (IS_HORUS_X12S(board))
return 5;
return 3;
else
return 3;
@@ -360,7 +360,7 @@ const int Boards::getCapability(Board::Type board, Board::Capability capability)
return 0;
}
const QString Boards::getAxisName(int index)
QString Boards::getAxisName(int index)
{
const QString axes[] = {
tr("Left Horizontal"),
@@ -376,7 +376,7 @@ const QString Boards::getAxisName(int index)
return tr("Unknown");
}
const QString Boards::getAnalogInputName(Board::Type board, int index)
QString Boards::getAnalogInputName(Board::Type board, int index)
{
if (index < 0)
return CPN_STR_UNKNOWN_ITEM;
@@ -442,8 +442,8 @@ const QString Boards::getAnalogInputName(Board::Type board, int index)
"S1",
"6P",
"S2",
"L1",
"L2",
"S3",
"S4",
"LS",
"RS",
"JSx",
@@ -469,12 +469,12 @@ const QString Boards::getAnalogInputName(Board::Type board, int index)
return CPN_STR_UNKNOWN_ITEM;
}
const bool Boards::isBoardCompatible(Type board1, Type board2)
bool Boards::isBoardCompatible(Type board1, Type board2)
{
return (getFourCC(board1) == getFourCC(board2));
}
const QString Boards::getBoardName(Board::Type board)
QString Boards::getBoardName(Board::Type board)
{
switch (board) {
case BOARD_STOCK: