mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 17:55:19 +03:00
Fixes #6705
This commit is contained in:
parent
005e74feea
commit
e9b2a84261
2 changed files with 10 additions and 0 deletions
|
@ -338,6 +338,8 @@ int Boards::getCapability(Board::Type board, Board::Capability capability)
|
||||||
case FactoryInstalledSwitches:
|
case FactoryInstalledSwitches:
|
||||||
if (IS_TARANIS_X9E(board))
|
if (IS_TARANIS_X9E(board))
|
||||||
return 8;
|
return 8;
|
||||||
|
if (IS_HORUS_X12S(board))
|
||||||
|
return 8;
|
||||||
else
|
else
|
||||||
return getCapability(board, Switches);
|
return getCapability(board, Switches);
|
||||||
|
|
||||||
|
|
|
@ -131,6 +131,14 @@ void convertModelData_218_to_219(ModelData &model)
|
||||||
zchar2str(name, oldModel.header.name, LEN_MODEL_NAME);
|
zchar2str(name, oldModel.header.name, LEN_MODEL_NAME);
|
||||||
TRACE("Model %s conversion from v218 to v219", name);
|
TRACE("Model %s conversion from v218 to v219", name);
|
||||||
|
|
||||||
|
for (uint8_t i=0; i<MAX_TIMERS_218; i++) {
|
||||||
|
TimerData & timer = newModel.timers[i];
|
||||||
|
if (timer.mode >= TMRMODE_COUNT)
|
||||||
|
timer.mode = TMRMODE_COUNT + convertSwitch_218_to_219(oldModel.timers[i].mode - TMRMODE_COUNT + 1) - 1;
|
||||||
|
else if (timer.mode < 0)
|
||||||
|
timer.mode = convertSwitch_218_to_219(oldModel.timers[i].mode);
|
||||||
|
}
|
||||||
|
|
||||||
for (uint8_t i=0; i<MAX_MIXERS_218; i++) {
|
for (uint8_t i=0; i<MAX_MIXERS_218; i++) {
|
||||||
memmove(&newModel.mixData[i], &oldModel.mixData[i], sizeof(MixData_v218));
|
memmove(&newModel.mixData[i], &oldModel.mixData[i], sizeof(MixData_v218));
|
||||||
newModel.mixData[i].srcRaw = convertSource_218_to_219(newModel.mixData[i].srcRaw); // from newModel to avoid overwrite
|
newModel.mixData[i].srcRaw = convertSource_218_to_219(newModel.mixData[i].srcRaw); // from newModel to avoid overwrite
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue