Add BT mode handling (#5926)

Enable BT for Xlite and X7
This commit is contained in:
3djc
2018-06-02 18:15:37 +02:00
committed by Bertrand Songis
parent e3f2664440
commit a87722b078
5 changed files with 24 additions and 10 deletions
+4 -4
View File
@@ -157,8 +157,8 @@ HardwarePanel::HardwarePanel(QWidget * parent, GeneralSettings & generalSettings
ui->txCurrentCalibrationLabel->hide();
}
if (IS_TARANIS_X9E(board) || IS_HORUS(board)) {
ui->bluetoothEnable->setChecked(generalSettings.bluetoothEnable);
if (IS_TARANIS_X7(board) || IS_TARANIS_XLITE(board)|| IS_TARANIS_X9E(board) || IS_HORUS(board)) {
ui->bluetoothMode->setCurrentIndex(generalSettings.bluetoothMode);
ui->bluetoothName->setField(generalSettings.bluetoothName, 10, this);
}
else {
@@ -238,9 +238,9 @@ void HardwarePanel::on_txCurrentCalibration_editingFinished()
}
}
void HardwarePanel::on_bluetoothEnable_stateChanged(int)
void HardwarePanel::on_bluetoothMode_stateChanged(int index)
{
generalSettings.bluetoothEnable = ui->bluetoothEnable->isChecked();
generalSettings.bluetoothMode = index;
emit modified();
}