Add capability test for models list file
This commit is contained in:
committed by
Raphael Coeffic
parent
5a8a5ab743
commit
6b8175835b
@@ -163,7 +163,8 @@ enum Capability {
|
|||||||
HasADCJitterFilter,
|
HasADCJitterFilter,
|
||||||
HasTelemetryBaudrate,
|
HasTelemetryBaudrate,
|
||||||
TopBarZones,
|
TopBarZones,
|
||||||
FunctionSwitches
|
FunctionSwitches,
|
||||||
|
HasModelList
|
||||||
};
|
};
|
||||||
|
|
||||||
class EEPROMInterface
|
class EEPROMInterface
|
||||||
|
|||||||
@@ -752,14 +752,15 @@ int OpenTxFirmware::getCapability(::Capability capability)
|
|||||||
case HasAntennaChoice:
|
case HasAntennaChoice:
|
||||||
return ((IS_FAMILY_HORUS_OR_T16(board) && board != Board::BOARD_X10_EXPRESS) || (IS_TARANIS_XLITE(board) && !IS_TARANIS_XLITES(board))) ? true : false;
|
return ((IS_FAMILY_HORUS_OR_T16(board) && board != Board::BOARD_X10_EXPRESS) || (IS_TARANIS_XLITE(board) && !IS_TARANIS_XLITES(board))) ? true : false;
|
||||||
case HasADCJitterFilter:
|
case HasADCJitterFilter:
|
||||||
return IS_HORUS_OR_TARANIS(board) ? true : false;
|
return IS_HORUS_OR_TARANIS(board);
|
||||||
case HasTelemetryBaudrate:
|
case HasTelemetryBaudrate:
|
||||||
return IS_HORUS_OR_TARANIS(board) ? true : false;
|
return IS_HORUS_OR_TARANIS(board);
|
||||||
case TopBarZones:
|
case TopBarZones:
|
||||||
return getCapability(LcdWidth) > getCapability(LcdHeight) ? 4 : 2;
|
return getCapability(LcdWidth) > getCapability(LcdHeight) ? 4 : 2;
|
||||||
case FunctionSwitches:
|
case FunctionSwitches:
|
||||||
return IS_JUMPER_TPRO(board) ? 6 : 0;
|
return IS_JUMPER_TPRO(board) ? 6 : 0;
|
||||||
|
case HasModelsList:
|
||||||
|
return IS_FAMILY_HORUS_OR_T16(board);
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user