diff --git a/src/autoapp/UI/SettingsWindow.cpp b/src/autoapp/UI/SettingsWindow.cpp index 6226a47..b6d7a09 100644 --- a/src/autoapp/UI/SettingsWindow.cpp +++ b/src/autoapp/UI/SettingsWindow.cpp @@ -159,6 +159,18 @@ void SettingsWindow::onSave() params.append("#"); params.append( std::string(ui_->comboBoxHardwareDAC->currentText().toStdString()) ); params.append("#"); + if (ui_->checkBoxDisableShutdown->isChecked()) { + params.append("1"); + } else { + params.append("0"); + } + params.append("#"); + if (ui_->checkBoxDisableScreenOff->isChecked()) { + params.append("1"); + } else { + params.append("0"); + } + params.append("#"); system((std::string("/usr/local/bin/autoapp_helper setparams#") + std::string(params) + std::string(" &") ).c_str()); this->close(); } @@ -451,16 +463,28 @@ void SettingsWindow::loadSystemValues() // set dac QString dac = "Custom"; - if (getparams[23] == "allo-boss") { + if (getparams[23] == "allo-boss-dac-pcm512x-audio,slave") { dac = "Allo - Boss"; } - if (getparams[23] == "allo-piano") { + if (getparams[23] == "allo-piano-dac-pcm512x-audio,slave") { dac = "Allo - Piano"; } - if (getparams[23] == "Audioinjector-zero") { + if (getparams[23] == "iqaudio-dacplus") { + dac = "IQaudIO - Pi-DAC Plus/Pro/Zero"; + } + if (getparams[23] == "iqaudio-dacplus,unmute_amp") { + dac = "IQaudIO - Pi-Digi Amp Plus"; + } + if (getparams[23] == "iqaudio-dacplus,auto_mute_amp") { + dac = "IQaudIO - Pi-Digi Amp Plus - Automute"; + } + if (getparams[23] == "iqaudio-digi-wm8804-audio") { + dac = "IQaudIO - Pi-Digi Plus"; + } + if (getparams[23] == "audioinjector-zero") { dac = "Audioinjector - Zero"; } - if (getparams[23] == "Audioinjector-stereo") { + if (getparams[23] == "audioinjector-stereo") { dac = "Audioinjector - Stereo"; } if (getparams[23] == "hifiberry-dac") { @@ -479,6 +503,20 @@ void SettingsWindow::loadSystemValues() dac = "Raspberry Pi - Onboard"; } ui_->comboBoxHardwareDAC->setCurrentText(dac); + + // set shutdown disable + if (getparams[24] == "1") { + ui_->checkBoxDisableShutdown->setChecked(true); + } else { + ui_->checkBoxDisableShutdown->setChecked(false); + } + + // set screen off disable + if (getparams[25] == "1") { + ui_->checkBoxDisableScreenOff->setChecked(true); + } else { + ui_->checkBoxDisableScreenOff->setChecked(false); + } } } diff --git a/src/autoapp/UI/settingswindow.ui b/src/autoapp/UI/settingswindow.ui index ad89066..536a43a 100644 --- a/src/autoapp/UI/settingswindow.ui +++ b/src/autoapp/UI/settingswindow.ui @@ -204,8 +204,13 @@ color: rgb(238, 238, 236); 71 + + + true + + - <html><head/><body><p align="justify"><span style=" font-style:italic;">720p and 1080p must be activated in hidden Developer settings of Android Auto application.</span></p></body></html> + 720p and 1080p must be activated in hidden Developer settings of Android Auto application. true @@ -304,8 +309,13 @@ color: rgb(238, 238, 236); 31 + + + true + + - <html><head/><body><p><span style=" font-size:10pt; font-style:italic;">OMX Layer is used only in case of OMX video output.</span></p></body></html> + OMX Layer is used only in case of OMX video output. @@ -524,8 +534,13 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} 31 + + + true + + - <html><head/><body><p><span style=" font-size:10pt; font-style:italic;">Disable audio channel if you need custom audio routing e.g. via A2DP or AUX.</span></p></body></html> + Disable audio channel if you need custom audio routing e.g. via A2DP or AUX. @@ -591,7 +606,7 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - Pulse Input / Output Device + Pulseaudio Input / Output Device @@ -606,11 +621,11 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} false - default + not selected - default + not selected @@ -640,11 +655,11 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} false - default + not selected - default + not selected @@ -664,9 +679,9 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 0 + 2 120 - 616 + 612 23 @@ -1074,8 +1089,13 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} 31 + + + true + + - <html><head/><body><p><span style=" font-size:10pt; font-style:italic; color:#babdb6;">Provide address in format AA:BB:CC:DD:EE:FF.</span></p></body></html> + Provide address in format AA:BB:CC:DD:EE:FF. @@ -1289,7 +1309,7 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - Playback Volume Selected Hardware + Playback Volume @@ -1335,7 +1355,7 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - Capture Volume Selected Hardware + Capture Volume @@ -1375,9 +1395,9 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} 0 - 300 + 320 616 - 161 + 131 @@ -1399,9 +1419,9 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 160 + 150 42 - 240 + 201 23 @@ -1425,9 +1445,9 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 160 + 150 93 - 240 + 201 23 @@ -1438,7 +1458,7 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 400 + 350 81 110 41 @@ -1473,7 +1493,7 @@ subcontrol-position: center left; - 400 + 350 30 110 41 @@ -1511,9 +1531,9 @@ subcontrol-position: center left; - 530 + 470 30 - 81 + 64 41 @@ -1524,9 +1544,9 @@ subcontrol-position: center left; - 530 + 470 80 - 81 + 64 41 @@ -1534,6 +1554,69 @@ subcontrol-position: center left; Seconds + + + + 540 + 40 + 71 + 23 + + + + Disable + + + + + + 540 + 90 + 71 + 23 + + + + Disable + + + + + + + 0 + 290 + 616 + 23 + + + + + true + + + + Volume bars are only working if you select output/input device + + + Qt::AlignCenter + + + true + + + + + + 80 + 286 + 21 + 31 + + + + <html><head/><body><p><img src=":/ico_info.png"/></p></body></html> + @@ -2491,6 +2574,11 @@ subcontrol-position: center left; 23 + + + true + + Needs configured rtc! @@ -2557,9 +2645,9 @@ subcontrol-position: center left; - 0 + 2 410 - 616 + 612 23 @@ -2581,7 +2669,7 @@ subcontrol-position: center left; - 10 + 80 406 31 31 @@ -2655,7 +2743,7 @@ subcontrol-position: center left; 90 90 - 200 + 300 30 @@ -2734,7 +2822,7 @@ subcontrol-position: center left; 90 40 - 200 + 300 30 @@ -2744,6 +2832,12 @@ subcontrol-position: center left; Custom + + 0 + + + 0 + Custom @@ -2764,6 +2858,26 @@ subcontrol-position: center left; Allo - Piano + + + IQaudIO - Pi-DAC Plus/Pro/Zero + + + + + IQaudIO - Pi-Digi Amp Plus + + + + + IQaudIO - Pi-Digi Amp Plus - Automute + + + + + IQaudIO - Pi-Digi Plus + + Audioinjector - Zero @@ -2813,7 +2927,7 @@ subcontrol-position: center left; 90 140 - 200 + 300 30 @@ -2859,6 +2973,11 @@ subcontrol-position: center left; 41 + + + true + + Timezone is needed for rtc - Sync with timeserver can be done via "crankshaft rtc sync" in shell. @@ -2868,9 +2987,9 @@ subcontrol-position: center left; - 0 + 2 410 - 616 + 612 23 @@ -2892,7 +3011,7 @@ subcontrol-position: center left; - 10 + 80 406 31 31