Add jack config to companion

This commit is contained in:
Kilrah
2018-11-03 16:56:51 +01:00
committed by Bertrand Songis
parent 8ffff76632
commit 8ab05f89c3
7 changed files with 1021 additions and 972 deletions
+18 -1
View File
@@ -151,13 +151,21 @@ ui(new Ui::GeneralSetup)
ui->adjustRTC->hide();
}
if (IS_STM32(firmware->getBoard())){
if (IS_STM32(firmware->getBoard())) {
ui->usbModeCB->setCurrentIndex(generalSettings.usbMode);
}
else {
ui->usbModeLabel->hide();
ui->usbModeCB->hide();
}
if (firmware->getCapability(HasSwitchableJack)) {
ui->jackModeCB->setCurrentIndex(generalSettings.jackMode);
}
else {
ui->jackModeLabel->hide();
ui->jackModeCB->hide();
}
if (!firmware->getCapability(OptrexDisplay)) {
ui->label_displayType->hide();
@@ -353,6 +361,15 @@ void GeneralSetupPanel::on_usbModeCB_currentIndexChanged(int index)
}
}
void GeneralSetupPanel::on_jackModeCB_currentIndexChanged(int index)
{
if (!lock) {
generalSettings.jackMode = ui->jackModeCB->currentIndex();
emit modified();
}
}
void GeneralSetupPanel::on_backlightColor_SL_valueChanged()
{
if (!lock) {