Prevent X9E simu crash when BT is enabled (#5966)

* Better 'non horus BT' XE handling

* Cleanup

* Adjust BT message for X9E

* [Companion][HardwarePanel][X9E] Change BT Mode options to OFF/Enabled, X9E only.
This commit is contained in:
3djc
2018-06-13 22:25:22 +02:00
committed by Bertrand Songis
parent 7aca3eb5b7
commit 6898efcc02
16 changed files with 66 additions and 129 deletions
+8 -1
View File
@@ -158,7 +158,14 @@ HardwarePanel::HardwarePanel(QWidget * parent, GeneralSettings & generalSettings
}
if (IS_TARANIS_X7(board) || IS_TARANIS_XLITE(board)|| IS_TARANIS_X9E(board) || IS_HORUS(board)) {
ui->bluetoothMode->setAutoIndexes();
ui->bluetoothMode->addItem(tr("OFF"), 0);
if (IS_TARANIS_X9E(board)) {
ui->bluetoothMode->addItem(tr("Enabled"), 1);
}
else {
ui->bluetoothMode->addItem(tr("Telemetry"), 1);
ui->bluetoothMode->addItem(tr("Trainer"), 2);
}
ui->bluetoothMode->setField(generalSettings.bluetoothMode, this);
ui->bluetoothName->setField(generalSettings.bluetoothName, 10, this);
}