mirror of
https://github.com/opentx/opentx.git
synced 2025-07-23 00:05:17 +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
|
@ -167,6 +167,10 @@ class GeneralSettings {
|
|||
char themeName[8+1];
|
||||
typedef uint8_t ThemeOptionData[8+1];
|
||||
ThemeOptionData themeOptionValue[5];
|
||||
|
||||
char registrationId[8+1];
|
||||
int gyroMax;
|
||||
int gyroOffset;
|
||||
|
||||
bool switchPositionAllowedTaranis(int index) const;
|
||||
bool switchSourceAllowedTaranis(int index) const;
|
||||
|
|
|
@ -2627,8 +2627,8 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, Board::Type
|
|||
internalField.Append(new UnsignedField<7>(this, generalData.backlightOffBright));
|
||||
internalField.Append(new ZCharField<10>(this, generalData.bluetoothName, "Bluetooth name"));
|
||||
}
|
||||
else if (IS_TARANIS_X9E(board)) {
|
||||
internalField.Append(new UnsignedField<8>(this, generalData.bluetoothMode));
|
||||
else if (IS_TARANIS_X9E(board) || IS_TARANIS_X7(board) || IS_TARANIS_XLITE(board) || IS_TARANIS_XLITES(board)) {
|
||||
internalField.Append(new SpareBitsField<8>(this));
|
||||
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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue