diff --git a/src/autoapp/UI/SettingsWindow.cpp b/src/autoapp/UI/SettingsWindow.cpp index 5817942..9973c2e 100644 --- a/src/autoapp/UI/SettingsWindow.cpp +++ b/src/autoapp/UI/SettingsWindow.cpp @@ -177,6 +177,10 @@ void SettingsWindow::onSave() params.append("0"); } params.append("#"); + params.append( std::string(ui_->comboBoxGPIOShutdown->currentText().toStdString()) ); + params.append("#"); + params.append( std::to_string(ui_->spinBoxGPIOShutdownDelay->value()) ); + params.append("#"); system((std::string("/usr/local/bin/autoapp_helper setparams#") + std::string(params) + std::string(" &") ).c_str()); this->close(); } @@ -538,6 +542,9 @@ void SettingsWindow::loadSystemValues() ui_->radioButtonDebugmodeDisabled->setChecked(true); } + // GPIO based shutdown + ui_->comboBoxGPIOShutdown->setCurrentText(getparams[28]); + ui_->spinBoxGPIOShutdownDelay->setValue(getparams[29].toInt()); } } diff --git a/src/autoapp/UI/settingswindow.ui b/src/autoapp/UI/settingswindow.ui index a38098b..4fb887f 100644 --- a/src/autoapp/UI/settingswindow.ui +++ b/src/autoapp/UI/settingswindow.ui @@ -1612,7 +1612,7 @@ subcontrol-position: center left; 0 10 - 616 + 400 141 @@ -1799,7 +1799,7 @@ subcontrol-position: center left; - 300 + 290 60 100 30 @@ -2114,7 +2114,7 @@ subcontrol-position: center left; - 210 + 200 100 90 30 @@ -2124,174 +2124,10 @@ subcontrol-position: center left; Rearcam Pin - - - - 500 - 60 - 100 - 30 - - - - false - - - - - - - - - - - - - - - - - - 1 - - - - - 2 - - - - - 3 - - - - - 4 - - - - - 5 - - - - - 6 - - - - - 7 - - - - - 8 - - - - - 9 - - - - - 10 - - - - - 11 - - - - - 12 - - - - - 13 - - - - - 14 - - - - - 15 - - - - - 16 - - - - - 17 - - - - - 18 - - - - - 19 - - - - - 20 - - - - - 21 - - - - - 22 - - - - - 23 - - - - - 24 - - - - - 25 - - - - - 26 - - - - - - - 420 - 60 - 80 - 30 - - - - Android Pin - - - 300 + 290 100 100 30 @@ -2442,7 +2278,7 @@ subcontrol-position: center left; - 210 + 200 60 90 30 @@ -2734,9 +2570,9 @@ subcontrol-position: center left; - 325 + 320 320 - 291 + 296 91 @@ -2790,7 +2626,7 @@ subcontrol-position: center left; 40 60 - 251 + 241 23 @@ -2807,6 +2643,398 @@ subcontrol-position: center left; + + + + 400 + 10 + 216 + 141 + + + + Standalone GPIO Settings + + + + + 100 + 26 + 100 + 30 + + + + false + + + - - - + + + + - - - + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + 5 + + + + + 6 + + + + + 7 + + + + + 8 + + + + + 9 + + + + + 10 + + + + + 11 + + + + + 12 + + + + + 13 + + + + + 14 + + + + + 15 + + + + + 16 + + + + + 17 + + + + + 18 + + + + + 19 + + + + + 20 + + + + + 21 + + + + + 22 + + + + + 23 + + + + + 24 + + + + + 25 + + + + + 26 + + + + + + + 10 + 26 + 80 + 30 + + + + Android Pin + + + + + + 10 + 66 + 80 + 30 + + + + Ignition Pin + + + + + + 100 + 66 + 100 + 30 + + + + false + + + - - - + + + + - - - + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + 5 + + + + + 6 + + + + + 7 + + + + + 8 + + + + + 9 + + + + + 10 + + + + + 11 + + + + + 12 + + + + + 13 + + + + + 14 + + + + + 15 + + + + + 16 + + + + + 17 + + + + + 18 + + + + + 19 + + + + + 20 + + + + + 21 + + + + + 22 + + + + + 23 + + + + + 24 + + + + + 25 + + + + + 26 + + + + + + + 100 + 96 + 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; +} + + + true + + + Qt::AlignCenter + + + 5 + + + 60 + + + 1 + + + 30 + + + + + + 10 + 100 + 80 + 30 + + + + Delay + + +