[Companion] 9XR-PRO EEPROM import fix
+ cosmetics + compilation error fixed on Manjaro
This commit is contained in:
@@ -161,6 +161,7 @@ enum Capability {
|
|||||||
HasTopLcd,
|
HasTopLcd,
|
||||||
GlobalFunctions,
|
GlobalFunctions,
|
||||||
VirtualInputs,
|
VirtualInputs,
|
||||||
|
InputsLength,
|
||||||
TrainerInputs,
|
TrainerInputs,
|
||||||
RtcTime,
|
RtcTime,
|
||||||
SportTelemetry,
|
SportTelemetry,
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ class SourcesConversionTable: public ConversionTable {
|
|||||||
addConversion(RawSource(SOURCE_TYPE_NONE), val++);
|
addConversion(RawSource(SOURCE_TYPE_NONE), val++);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_STM32(board) && version >= 216) {
|
if ((IS_ARM(board) && version >= 218) || (IS_STM32(board) && version >= 216)) {
|
||||||
for (int i=0; i<32; i++) {
|
for (int i=0; i<32; i++) {
|
||||||
addConversion(RawSource(SOURCE_TYPE_VIRTUAL_INPUT, i), val++);
|
addConversion(RawSource(SOURCE_TYPE_VIRTUAL_INPUT, i), val++);
|
||||||
}
|
}
|
||||||
@@ -776,7 +776,7 @@ class HeliField: public StructField {
|
|||||||
public:
|
public:
|
||||||
HeliField(SwashRingData & heli, BoardEnum board, unsigned int version, unsigned int variant)
|
HeliField(SwashRingData & heli, BoardEnum board, unsigned int version, unsigned int variant)
|
||||||
{
|
{
|
||||||
if (IS_STM32(board) && version >= 217) {
|
if ((IS_ARM(board) && version >= 218) || (IS_STM32(board) && version >= 217)) {
|
||||||
Append(new UnsignedField<8>(heli.type));
|
Append(new UnsignedField<8>(heli.type));
|
||||||
Append(new UnsignedField<8>(heli.value));
|
Append(new UnsignedField<8>(heli.value));
|
||||||
Append(new SourceField<8>(heli.collectiveSource, board, version, variant));
|
Append(new SourceField<8>(heli.collectiveSource, board, version, variant));
|
||||||
|
|||||||
@@ -714,6 +714,8 @@ int OpenTxFirmware::getCapability(Capability capability)
|
|||||||
return IS_ARM(board) ? 64 : 0;
|
return IS_ARM(board) ? 64 : 0;
|
||||||
case VirtualInputs:
|
case VirtualInputs:
|
||||||
return IS_ARM(board) ? 64 : 0;
|
return IS_ARM(board) ? 64 : 0;
|
||||||
|
case InputsLength:
|
||||||
|
return HAS_LARGE_LCD(board) ? 4 : 3;
|
||||||
case TrainerInputs:
|
case TrainerInputs:
|
||||||
return IS_ARM(board) ? 16 : 8;
|
return IS_ARM(board) ? 16 : 8;
|
||||||
case RtcTime:
|
case RtcTime:
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, G
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (firmware->getCapability(VirtualInputs)) {
|
if (firmware->getCapability(VirtualInputs)) {
|
||||||
ui->inputName->setMaxLength(4);
|
ui->inputName->setMaxLength(firmware->getCapability(InputsLength));
|
||||||
populateSourceCB(ui->sourceCB, ed->srcRaw, generalSettings, &model, POPULATE_NONE | POPULATE_SOURCES |
|
populateSourceCB(ui->sourceCB, ed->srcRaw, generalSettings, &model, POPULATE_NONE | POPULATE_SOURCES |
|
||||||
POPULATE_SWITCHES | POPULATE_TRIMS | POPULATE_TELEMETRY);
|
POPULATE_SWITCHES | POPULATE_TRIMS | POPULATE_TELEMETRY);
|
||||||
ui->sourceCB->removeItem(0);
|
ui->sourceCB->removeItem(0);
|
||||||
@@ -127,8 +127,9 @@ ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, G
|
|||||||
for (int i=0; i<9; i++) {
|
for (int i=0; i<9; i++) {
|
||||||
connect(cb_fp[i], SIGNAL(toggled(bool)), this, SLOT(valuesChanged()));
|
connect(cb_fp[i], SIGNAL(toggled(bool)), this, SLOT(valuesChanged()));
|
||||||
}
|
}
|
||||||
if (firmware->getCapability(VirtualInputs))
|
if (firmware->getCapability(VirtualInputs)) {
|
||||||
connect(ui->inputName, SIGNAL(editingFinished()), this, SLOT(valuesChanged()));
|
connect(ui->inputName, SIGNAL(editingFinished()), this, SLOT(valuesChanged()));
|
||||||
|
}
|
||||||
|
|
||||||
QTimer::singleShot(0, this, SLOT(shrink()));
|
QTimer::singleShot(0, this, SLOT(shrink()));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user