diff --git a/src/autoapp/Projection/RtAudioOutput.cpp b/src/autoapp/Projection/RtAudioOutput.cpp index 139cd51..45897ad 100644 --- a/src/autoapp/Projection/RtAudioOutput.cpp +++ b/src/autoapp/Projection/RtAudioOutput.cpp @@ -54,7 +54,9 @@ bool RtAudioOutput::open() RtAudio::StreamOptions streamOptions; streamOptions.flags = RTAUDIO_MINIMIZE_LATENCY | RTAUDIO_SCHEDULE_REALTIME; uint32_t bufferFrames = sampleRate_ == 16000 ? 1024 : 2048; //according to the observation of audio packets + //dac_->openStream(¶meters, nullptr, RTAUDIO_SINT16, sampleRate_, &bufferFrames, &RtAudioOutput::audioBufferReadHandler, static_cast(this), &streamOptions); dac_->openStream(¶meters, nullptr, RTAUDIO_SINT16, sampleRate_, &bufferFrames, &RtAudioOutput::audioBufferReadHandler, static_cast(this), &streamOptions); + OPENAUTO_LOG(info) << "[RtAudioOutput] Sample Rate: " << sampleRate_; return audioBuffer_.open(QIODevice::ReadWrite); } catch(const RtAudioError& e) diff --git a/src/autoapp/UI/MainWindow.cpp b/src/autoapp/UI/MainWindow.cpp index 861bee9..c666fee 100644 --- a/src/autoapp/UI/MainWindow.cpp +++ b/src/autoapp/UI/MainWindow.cpp @@ -574,13 +574,4 @@ void f1x::openauto::autoapp::ui::MainWindow::showTime() ui_->Digital_clock->setText(time_text); sleep_for(milliseconds(10)); - /**if (configuration_->showClock()) { - if (ui_->Digital_clock->isVisible() == true) { - ui_->Digital_clock->hide(); - } - } else { - if (ui_->Digital_clock->isVisible() == false) { - ui_->Digital_clock->show(); - } - }**/ } diff --git a/src/autoapp/UI/SettingsWindow.cpp b/src/autoapp/UI/SettingsWindow.cpp index 9973c2e..02d5d4c 100644 --- a/src/autoapp/UI/SettingsWindow.cpp +++ b/src/autoapp/UI/SettingsWindow.cpp @@ -181,6 +181,10 @@ void SettingsWindow::onSave() params.append("#"); params.append( std::to_string(ui_->spinBoxGPIOShutdownDelay->value()) ); params.append("#"); + params.append( std::string(ui_->lineEditWifiClientSSID->text().toStdString()) ); + params.append("#"); + params.append( std::string(ui_->lineEditWifiClientPassword->text().toStdString()) ); + params.append("#"); system((std::string("/usr/local/bin/autoapp_helper setparams#") + std::string(params) + std::string(" &") ).c_str()); this->close(); } @@ -545,6 +549,10 @@ void SettingsWindow::loadSystemValues() // GPIO based shutdown ui_->comboBoxGPIOShutdown->setCurrentText(getparams[28]); ui_->spinBoxGPIOShutdownDelay->setValue(getparams[29].toInt()); + + // Wifi Credentials + ui_->lineEditWifiClientSSID->setText(getparams[30]); + ui_->lineEditWifiClientPassword->setText(getparams[31]); } } diff --git a/src/autoapp/UI/settingswindow.ui b/src/autoapp/UI/settingswindow.ui index 4fb887f..c9b401b 100644 --- a/src/autoapp/UI/settingswindow.ui +++ b/src/autoapp/UI/settingswindow.ui @@ -33,9 +33,9 @@ color: rgb(238, 238, 236); - 630 + 660 430 - 161 + 131 41 @@ -49,9 +49,9 @@ color: rgb(238, 238, 236); - 630 + 660 330 - 161 + 131 41 @@ -70,7 +70,7 @@ color: rgb(238, 238, 236); 0 0 - 621 + 651 481 @@ -86,7 +86,7 @@ color: rgb(238, 238, 236); 0 10 - 616 + 646 91 @@ -146,7 +146,7 @@ color: rgb(238, 238, 236); 0 80 - 616 + 646 141 @@ -238,7 +238,7 @@ color: rgb(238, 238, 236); 0 10 - 616 + 646 61 @@ -280,7 +280,7 @@ color: rgb(238, 238, 236); 0 230 - 616 + 646 121 @@ -438,7 +438,7 @@ subcontrol-position: center left; 0 360 - 616 + 646 81 @@ -492,8 +492,8 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} -1 10 - 616 - 111 + 431 + 101 @@ -529,8 +529,8 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} 60 - 70 - 511 + 60 + 341 31 @@ -542,12 +542,15 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} Disable audio channel if you need custom audio routing e.g. via A2DP or AUX. + + true + 30 - 70 + 60 21 31 @@ -560,10 +563,10 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 0 - 130 - 616 - 61 + 435 + 10 + 211 + 101 @@ -574,7 +577,7 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} 10 30 - 112 + 101 23 @@ -585,9 +588,9 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 140 + 130 30 - 112 + 71 23 @@ -600,8 +603,8 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} 0 - 220 - 616 + 120 + 646 151 @@ -611,9 +614,9 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 90 + 80 30 - 400 + 471 30 @@ -624,9 +627,9 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 10 + 20 30 - 80 + 61 30 @@ -637,9 +640,9 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 90 + 80 70 - 400 + 471 30 @@ -650,9 +653,9 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 10 + 20 70 - 80 + 61 30 @@ -663,10 +666,10 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 2 - 120 - 612 - 23 + 80 + 106 + 471 + 31 @@ -675,10 +678,10 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - To activate changed audio device you have to disconnect/reconnect phone! + To activate changed audio device you have to save settings and disconnect / reconnect phone! - Qt::AlignCenter + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter true @@ -688,7 +691,7 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} 20 - 114 + 108 31 31 @@ -698,6 +701,98 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} + + + + 0 + 280 + 646 + 81 + + + + Playback Volume + + + + + 570 + 40 + 41 + 31 + + + + 0 + + + + + + 20 + 40 + 531 + 32 + + + + QSlider::handle:horizontal { background: white; height: 32px; width: 52px; margin: 0 0;} +QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} + + + 100 + + + Qt::Horizontal + + + + + + + 0 + 370 + 646 + 81 + + + + Capture Volume + + + + + 570 + 40 + 41 + 31 + + + + 0 + + + + + + 20 + 40 + 531 + 32 + + + + QSlider::handle:horizontal { background: white; height: 32px; width: 52px; margin: 0 0;} +QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} + + + 100 + + + Qt::Horizontal + + + @@ -721,7 +816,7 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} 0 70 - 616 + 646 381 @@ -953,7 +1048,7 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 490 + 520 80 121 41 @@ -969,7 +1064,7 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 490 + 520 140 121 41 @@ -985,7 +1080,7 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 490 + 520 200 121 41 @@ -1001,15 +1096,15 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - Bluetooth + Wireless 0 10 - 616 - 441 + 646 + 171 @@ -1032,7 +1127,7 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} 20 - 90 + 60 171 23 @@ -1044,8 +1139,8 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 130 - 120 + 110 + 90 231 31 @@ -1054,8 +1149,8 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 60 - 120 + 40 + 90 67 31 @@ -1067,10 +1162,10 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 180 - 160 - 320 - 31 + 400 + 80 + 181 + 41 @@ -1081,14 +1176,17 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} Provide address in format AA:BB:CC:DD:EE:FF. + + true + - 150 - 160 + 370 + 90 21 - 31 + 21 @@ -1098,8 +1196,8 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 20 - 60 + 180 + 30 151 23 @@ -1111,10 +1209,10 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 10 - 206 + 50 + 130 31 - 41 + 31 @@ -1124,9 +1222,9 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 50 - 210 - 501 + 90 + 130 + 481 31 @@ -1135,6 +1233,100 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} + + + + 0 + 190 + 646 + 111 + + + + Wifi client settings + + + + + 410 + 30 + 231 + 31 + + + + true + + + QLineEdit::PasswordEchoOnEdit + + + false + + + + + + 330 + 30 + 71 + 31 + + + + Password: + + + + + + 50 + 70 + 31 + 31 + + + + <html><head/><body><p><img src=":/ico_warning.png"/></p></body></html> + + + + + + 90 + 70 + 481 + 31 + + + + The wifi connection is only available in dev mode or debug mode! + + + + + + 90 + 30 + 231 + 31 + + + + + + + 10 + 30 + 71 + 31 + + + + SSID: + + + @@ -1145,7 +1337,7 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} 0 10 - 616 + 646 91 @@ -1283,105 +1475,13 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - - - - 0 - 110 - 616 - 81 - - - - Playback Volume - - - - - 570 - 40 - 41 - 31 - - - - 0 - - - - - - 20 - 40 - 531 - 32 - - - - QSlider::handle:horizontal { background: white; height: 32px; width: 52px; margin: 0 0;} -QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - - - 100 - - - Qt::Horizontal - - - - - - - 0 - 200 - 616 - 81 - - - - Capture Volume - - - - - 570 - 40 - 41 - 31 - - - - 0 - - - - - - 20 - 40 - 531 - 32 - - - - QSlider::handle:horizontal { background: white; height: 32px; width: 52px; margin: 0 0;} -QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - - - 100 - - - Qt::Horizontal - - - 0 - 320 - 616 - 131 + 300 + 646 + 121 @@ -1417,7 +1517,7 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} 10 - 81 + 75 150 41 @@ -1430,7 +1530,7 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} 150 - 93 + 87 201 23 @@ -1443,7 +1543,7 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} 350 - 81 + 75 110 41 @@ -1529,7 +1629,7 @@ subcontrol-position: center left; 470 - 80 + 74 64 41 @@ -1555,7 +1655,7 @@ subcontrol-position: center left; 540 - 90 + 84 71 23 @@ -1565,13 +1665,262 @@ subcontrol-position: center left; - + 0 - 290 - 616 - 23 + 110 + 311 + 91 + + + + Screen Orientation + + + + + 120 + 30 + 120 + 23 + + + + 180° Rotated + + + + + + 10 + 30 + 80 + 23 + + + + Normal + + + true + + + + + + + 320 + 110 + 326 + 91 + + + + Debugmode + + + + + 120 + 30 + 120 + 23 + + + + Enabled + + + + + + 10 + 30 + 80 + 23 + + + + Disabled + + + true + + + + + + 10 + 56 + 21 + 31 + + + + <html><head/><body><p><img src=":/ico_info.png"/></p></body></html> + + + + + + 40 + 60 + 241 + 23 + + + + + true + + + + Debud Mode overrides dev mode! + + + true + + + + + + + 0 + 210 + 646 + 81 + + + + Auto Day / Night + + + + + 10 + 40 + 80 + 21 + + + + Start Day + + + + + + 210 + 40 + 80 + 21 + + + + Start Night + + + + + + 90 + 30 + 100 + 41 + + + + QSpinBox::up-button { width: 32px; height: 32px; +subcontrol-origin: margin; +subcontrol-position: center right; +} +QSpinBox::down-button { width: 32px; height: 32px; +subcontrol-origin: margin; +subcontrol-position: center left; +} + + + Qt::AlignCenter + + + 23 + + + 8 + + + + + + 290 + 30 + 100 + 41 + + + + QSpinBox::up-button { width: 32px; height: 32px; +subcontrol-origin: margin; +subcontrol-position: center right; +} +QSpinBox::down-button { width: 32px; height: 32px; +subcontrol-origin: margin; +subcontrol-position: center left; +} + + + Qt::AlignCenter + + + 23 + + + 18 + + + + + + 440 + 40 + 171 + 23 + + + + + true + + + + Needs configured rtc! + + + true + + + + + + 410 + 36 + 21 + 31 + + + + <html><head/><body><p><img src=":/ico_info.png"/></p></body></html> + + + + + + + 2 + 425 + 644 + 26 @@ -1580,7 +1929,7 @@ subcontrol-position: center left; - Volume bars are only working if you select output/input device + To activate this settings you have to reboot after changing! Qt::AlignCenter @@ -1589,17 +1938,17 @@ subcontrol-position: center left; true - + 80 - 286 - 21 + 422 + 31 31 - <html><head/><body><p><img src=":/ico_info.png"/></p></body></html> + <html><head/><body><p align="justify"><img src=":/ico_warning.png"/></p></body></html> @@ -1612,7 +1961,7 @@ subcontrol-position: center left; 0 10 - 400 + 646 141 @@ -1635,7 +1984,7 @@ subcontrol-position: center left; - 90 + 110 60 100 30 @@ -1786,7 +2135,7 @@ subcontrol-position: center left; - 10 + 30 60 80 30 @@ -1799,7 +2148,7 @@ subcontrol-position: center left; - 290 + 330 60 100 30 @@ -1950,7 +2299,7 @@ subcontrol-position: center left; - 90 + 110 100 100 30 @@ -2101,7 +2450,7 @@ subcontrol-position: center left; - 10 + 30 100 80 30 @@ -2114,7 +2463,7 @@ subcontrol-position: center left; - 200 + 240 100 90 30 @@ -2127,7 +2476,7 @@ subcontrol-position: center left; - 290 + 330 100 100 30 @@ -2278,7 +2627,7 @@ subcontrol-position: center left; - 200 + 240 60 90 30 @@ -2289,186 +2638,13 @@ subcontrol-position: center left; - - - - 0 - 160 - 616 - 81 - - - - Auto Day / Night - - - - - 10 - 40 - 80 - 21 - - - - Start Day - - - - - - 210 - 40 - 80 - 21 - - - - Start Night - - - - - - 90 - 30 - 100 - 41 - - - - QSpinBox::up-button { width: 32px; height: 32px; -subcontrol-origin: margin; -subcontrol-position: center right; -} -QSpinBox::down-button { width: 32px; height: 32px; -subcontrol-origin: margin; -subcontrol-position: center left; -} - - - Qt::AlignCenter - - - 23 - - - 8 - - - - - - 290 - 30 - 100 - 41 - - - - QSpinBox::up-button { width: 32px; height: 32px; -subcontrol-origin: margin; -subcontrol-position: center right; -} -QSpinBox::down-button { width: 32px; height: 32px; -subcontrol-origin: margin; -subcontrol-position: center left; -} - - - Qt::AlignCenter - - - 23 - - - 18 - - - - - - 440 - 40 - 171 - 23 - - - - - true - - - - Needs configured rtc! - - - true - - - - - - 410 - 36 - 21 - 31 - - - - <html><head/><body><p><img src=":/ico_info.png"/></p></body></html> - - - - - - - 0 - 250 - 300 - 61 - - - - Start Mode Openauto - - - - - 120 - 30 - 81 - 23 - - - - X11 - - - - - - 10 - 30 - 81 - 23 - - - - EGL - - - true - - - 2 - 420 - 612 - 23 + 425 + 644 + 26 @@ -2490,7 +2666,7 @@ subcontrol-position: center left; 80 - 416 + 422 31 31 @@ -2499,54 +2675,12 @@ subcontrol-position: center left; <html><head/><body><p align="justify"><img src=":/ico_warning.png"/></p></body></html> - - - - 320 - 250 - 296 - 61 - - - - Screen Orientation - - - - - 120 - 30 - 120 - 23 - - - - 180° Rotated - - - - - - 10 - 30 - 80 - 23 - - - - Normal - - - true - - - - 0 - 320 - 300 + 230 + 250 + 416 61 @@ -2558,7 +2692,7 @@ subcontrol-position: center left; 10 30 - 281 + 201 21 @@ -2567,89 +2701,13 @@ subcontrol-position: center left; - - - - 320 - 320 - 296 - 91 - - - - Debugmode - - - - - 120 - 30 - 120 - 23 - - - - Enabled - - - - - - 10 - 30 - 80 - 23 - - - - Disabled - - - true - - - - - - 10 - 56 - 21 - 31 - - - - <html><head/><body><p><img src=":/ico_info.png"/></p></body></html> - - - - - - 40 - 60 - 241 - 23 - - - - - true - - - - Debud Mode excludes dev mode! - - - true - - - - 400 - 10 - 216 - 141 + 0 + 160 + 646 + 81 @@ -2659,7 +2717,7 @@ subcontrol-position: center left; 100 - 26 + 34 100 30 @@ -2810,7 +2868,7 @@ subcontrol-position: center left; 10 - 26 + 34 80 30 @@ -2822,8 +2880,8 @@ subcontrol-position: center left; - 10 - 66 + 240 + 34 80 30 @@ -2835,8 +2893,8 @@ subcontrol-position: center left; - 100 - 66 + 330 + 34 100 30 @@ -2986,8 +3044,8 @@ subcontrol-position: center left; - 100 - 96 + 540 + 30 100 41 @@ -3024,8 +3082,8 @@ subcontrol-position: center left; - 10 - 100 + 460 + 34 80 30 @@ -3035,6 +3093,48 @@ subcontrol-position: center left; + + + + 0 + 250 + 221 + 61 + + + + Start Mode Openauto + + + + + 120 + 30 + 81 + 23 + + + + X11 + + + + + + 10 + 30 + 81 + 23 + + + + EGL + + + true + + + @@ -3045,7 +3145,7 @@ subcontrol-position: center left; 0 10 - 616 + 646 231 @@ -3302,9 +3402,9 @@ subcontrol-position: center left; 2 - 410 - 612 - 23 + 425 + 646 + 26 @@ -3326,7 +3426,7 @@ subcontrol-position: center left; 80 - 406 + 422 31 31 @@ -3340,10 +3440,10 @@ subcontrol-position: center left; - 650 - 80 + 660 + 30 131 - 151 + 131 @@ -3353,9 +3453,9 @@ subcontrol-position: center left; - 630 + 660 380 - 161 + 131 41