[tpro] fix function switch behaviours and add always on capability (#1479)
* fix: tpro function switch toggle mode * feat: Function switches now have alway on option * Companion support for function switch always on * Fix nasty eeprom error * Update fs startup item model * Fix Tpro SWITCH_EXISTS Co-authored-by: 3djc <lesitewebdejc@hotmail.com> Co-authored-by: elecpower <neilh713@tpg.com.au>
This commit is contained in:
co-authored by
3djc
elecpower
parent
c6a9101314
commit
d1ef6f866c
@@ -1704,11 +1704,11 @@ QString ModelData::funcSwitchStartToString(const int index, const int value)
|
||||
{
|
||||
switch (value) {
|
||||
case FUNC_SWITCH_START_INACTIVE:
|
||||
return CPN_STR_SW_INDICATOR_UP;
|
||||
return tr("Inactive");
|
||||
case FUNC_SWITCH_START_ACTIVE:
|
||||
return CPN_STR_SW_INDICATOR_DN;
|
||||
return tr("Active");
|
||||
case FUNC_SWITCH_START_PREVIOUS:
|
||||
return "=";
|
||||
return tr("Restore");
|
||||
default:
|
||||
return CPN_STR_UNKNOWN_ITEM;
|
||||
}
|
||||
|
||||
@@ -2659,7 +2659,7 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, Board::Type board, unsig
|
||||
internalField.Append(new SwitchesWarningField<32>(this, modelData.switchWarningStates, board, version));
|
||||
else if (IS_TARANIS_X9E(board))
|
||||
internalField.Append(new SwitchesWarningField<64>(this, modelData.switchWarningStates, board, version));
|
||||
else if (version >= 219 && IS_TARANIS_X9D(board))
|
||||
else if (version >= 219 && (IS_TARANIS_X9D(board) || IS_JUMPER_TPRO(board)))
|
||||
internalField.Append(new SwitchesWarningField<32>(this, modelData.switchWarningStates, board, version));
|
||||
else if (IS_TARANIS(board))
|
||||
internalField.Append(new SwitchesWarningField<16>(this, modelData.switchWarningStates, board, version));
|
||||
@@ -2668,7 +2668,7 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, Board::Type board, unsig
|
||||
|
||||
if (IS_TARANIS_X9E(board))
|
||||
internalField.Append(new UnsignedField<32>(this, modelData.switchWarningEnable));
|
||||
else if (version >= 219 && IS_TARANIS_X9D(board))
|
||||
else if (version >= 219 && (IS_TARANIS_X9D(board) || IS_JUMPER_TPRO(board)))
|
||||
internalField.Append(new UnsignedField<16>(this, modelData.switchWarningEnable));
|
||||
else if (!IS_FAMILY_HORUS_OR_T16(board))
|
||||
internalField.Append(new UnsignedField<8>(this, modelData.switchWarningEnable));
|
||||
|
||||
Reference in New Issue
Block a user