mirror of
https://github.com/opentx/opentx.git
synced 2025-07-23 16:25:16 +03:00
[companion] Fix Bluetooth fields availability, add ownerId and gyro
This commit is contained in:
parent
4384bf59f8
commit
afbdcf86e4
2 changed files with 12 additions and 2 deletions
|
@ -168,6 +168,10 @@ class GeneralSettings {
|
||||||
typedef uint8_t ThemeOptionData[8+1];
|
typedef uint8_t ThemeOptionData[8+1];
|
||||||
ThemeOptionData themeOptionValue[5];
|
ThemeOptionData themeOptionValue[5];
|
||||||
|
|
||||||
|
char registrationId[8+1];
|
||||||
|
int gyroMax;
|
||||||
|
int gyroOffset;
|
||||||
|
|
||||||
bool switchPositionAllowedTaranis(int index) const;
|
bool switchPositionAllowedTaranis(int index) const;
|
||||||
bool switchSourceAllowedTaranis(int index) const;
|
bool switchSourceAllowedTaranis(int index) const;
|
||||||
bool isPotAvailable(int index) const;
|
bool isPotAvailable(int index) const;
|
||||||
|
|
|
@ -2627,8 +2627,8 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, Board::Type
|
||||||
internalField.Append(new UnsignedField<7>(this, generalData.backlightOffBright));
|
internalField.Append(new UnsignedField<7>(this, generalData.backlightOffBright));
|
||||||
internalField.Append(new ZCharField<10>(this, generalData.bluetoothName, "Bluetooth name"));
|
internalField.Append(new ZCharField<10>(this, generalData.bluetoothName, "Bluetooth name"));
|
||||||
}
|
}
|
||||||
else if (IS_TARANIS_X9E(board)) {
|
else if (IS_TARANIS_X9E(board) || IS_TARANIS_X7(board) || IS_TARANIS_XLITE(board) || IS_TARANIS_XLITES(board)) {
|
||||||
internalField.Append(new UnsignedField<8>(this, generalData.bluetoothMode));
|
internalField.Append(new SpareBitsField<8>(this));
|
||||||
internalField.Append(new ZCharField<10>(this, generalData.bluetoothName, "Bluetooth name"));
|
internalField.Append(new ZCharField<10>(this, generalData.bluetoothName, "Bluetooth name"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2639,6 +2639,12 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, Board::Type
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internalField.Append(new ZCharField<8>(this, generalData.registrationId, "PXX2 Registration ID"));
|
||||||
|
|
||||||
|
if(IS_TARANIS_XLITES(board)) { // TODO add X12S
|
||||||
|
internalField.Append(new SignedField<8>(this, generalData.gyroMax, "Gyro full scale"));
|
||||||
|
internalField.Append(new SignedField<8>(this, generalData.gyroOffset, "Gyro Offset"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenTxGeneralData::beforeExport()
|
void OpenTxGeneralData::beforeExport()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue