mirror of
https://github.com/opentx/opentx.git
synced 2025-07-24 16:55:20 +03:00
Companion import / export issue for switches from X9D+ 2019
This commit is contained in:
parent
52624710cd
commit
a5d62805c3
3 changed files with 9 additions and 5 deletions
|
@ -90,12 +90,17 @@ inline int MAX_SWITCHES_POSITION(Board::Type board, int version)
|
|||
if (version < 219) {
|
||||
if (IS_TARANIS_X7(board) || IS_HORUS(board))
|
||||
return Boards::getCapability(board, Board::SwitchPositions) - 2 * 3;
|
||||
if (IS_TARANIS_X9D(board))
|
||||
return 8 * 3;
|
||||
}
|
||||
|
||||
if (IS_TARANIS_X9D(board)) {
|
||||
return 9 * 3; // all X9D have storage for 9 switches (X9D+ 2019)
|
||||
}
|
||||
|
||||
return Boards::getCapability(board, Board::SwitchPositions);
|
||||
}
|
||||
|
||||
//#define MAX_SWITCHES_POSITION(board, version) (Boards::getCapability(board, Board::SwitchPositions))
|
||||
#define MAX_ROTARY_ENCODERS(board) (IS_SKY9X(board) ? 1 : 0)
|
||||
#define MAX_FLIGHT_MODES(board, version) 9
|
||||
#define MAX_TIMERS(board, version) 3
|
||||
|
|
|
@ -482,7 +482,6 @@ enum SwitchSources {
|
|||
SWSRC_SR2,
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(PCBSKY9X)
|
||||
SWSRC_ID0 = SWSRC_FIRST_SWITCH,
|
||||
SWSRC_ID1,
|
||||
|
@ -501,7 +500,7 @@ enum SwitchSources {
|
|||
|
||||
#if NUM_XPOTS > 0
|
||||
SWSRC_FIRST_MULTIPOS_SWITCH,
|
||||
SWSRC_LAST_MULTIPOS_SWITCH = SWSRC_FIRST_MULTIPOS_SWITCH + (NUM_POTS * XPOTS_MULTIPOS_COUNT) - 1,
|
||||
SWSRC_LAST_MULTIPOS_SWITCH = SWSRC_FIRST_MULTIPOS_SWITCH + (NUM_XPOTS * XPOTS_MULTIPOS_COUNT) - 1,
|
||||
#endif
|
||||
|
||||
SWSRC_FIRST_TRIM,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue