[Companion] Fixes #4777 (#4860)

This commit is contained in:
Bertrand Songis
2017-04-26 21:43:35 +02:00
committed by GitHub
parent f10bad7abe
commit 3aceed62c9
5 changed files with 37 additions and 39 deletions
+30 -7
View File
@@ -67,15 +67,38 @@ class StorageFormat
return board;
}
static uint32_t getFourCC(Board::Type board)
{
switch (board) {
case Board::BOARD_X12S:
case Board::BOARD_X10:
return 0x3478746F;
case Board::BOARD_TARANIS_X7:
return 0x3678746F;
case Board::BOARD_TARANIS_X9E:
return 0x3578746F;
case Board::BOARD_TARANIS_X9D:
case Board::BOARD_TARANIS_X9DP:
return 0x3378746F;
case Board::BOARD_SKY9X:
case Board::BOARD_AR9X:
return 0x3278746F;
case Board::BOARD_MEGA2560:
case Board::BOARD_GRUVIN9X:
return 0x3178746F;
default:
return 0;
}
}
uint32_t getFourCC()
{
return getFourCC(board);
}
virtual bool isBoardCompatible(Board::Type board)
{
if (this->board == board)
return true;
if (IS_TARANIS_X9D(this->board) && IS_TARANIS_X9D(board))
return true;
return false;
return getFourCC() == getFourCC(board);
}
protected: