diff --git a/src/autoapp/UI/MainWindow.cpp b/src/autoapp/UI/MainWindow.cpp
index 7e04f15..a4c6f0b 100644
--- a/src/autoapp/UI/MainWindow.cpp
+++ b/src/autoapp/UI/MainWindow.cpp
@@ -203,6 +203,7 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi
ui_->systemConfigInProgress->hide();
ui_->systemDebugging->hide();
ui_->pushButtonLock->hide();
+ ui_->btDevice->hide();
QFileInfo DebugmodeFile("/tmp/usb_debug_mode");
if (DebugmodeFile.exists()) {
@@ -520,6 +521,23 @@ void f1x::openauto::autoapp::ui::MainWindow::showTime()
}
}
+ QFileInfo phoneBTConnectedFile("/tmp/btdevice");
+ if (phoneBTConnectedFile.exists()) {
+ if (ui_->btDevice->isVisible() == false) {
+ QFile phoneBTData(QString("/tmp/btdevice"));
+ phoneBTData.open(QIODevice::ReadOnly);
+ QTextStream data_date(&phoneBTData);
+ QString linedate = data_date.readAll();
+ phoneBTData.close();
+ ui_->btDevice->setText(linedate);
+ ui_->btDevice->show();
+ }
+ } else {
+ if (ui_->btDevice->isVisible() == true) {
+ ui_->btDevice->hide();
+ }
+ }
+
QFileInfo configInProgressFile("/tmp/config_in_progress");
QFileInfo debugInProgressFile("/tmp/debug_in_progress");
diff --git a/src/autoapp/UI/SettingsWindow.cpp b/src/autoapp/UI/SettingsWindow.cpp
index 78bea33..726edd4 100644
--- a/src/autoapp/UI/SettingsWindow.cpp
+++ b/src/autoapp/UI/SettingsWindow.cpp
@@ -189,6 +189,12 @@ void SettingsWindow::onSave()
params.append("#");
params.append( std::string(ui_->comboBoxCam->currentText().toStdString()) );
params.append("#");
+ if (ui_->checkBoxBluetoothAutoPair->isChecked()) {
+ params.append("1");
+ } else {
+ params.append("0");
+ }
+ params.append("#");
if (ui_->checkBoxHardwareSave->isChecked()) {
params.append("1");
} else {
@@ -573,6 +579,13 @@ void SettingsWindow::loadSystemValues()
// set cam
ui_->comboBoxCam->setCurrentText(getparams[33]);
+
+ // set cs bluetooth
+ if (getparams[34] == "1") {
+ ui_->checkBoxBluetoothAutoPair->setChecked(true);
+ } else {
+ ui_->checkBoxBluetoothAutoPair->setChecked(false);
+ }
}
}
diff --git a/src/autoapp/UI/mainwindow.ui b/src/autoapp/UI/mainwindow.ui
index 8d0f830..6bf10e5 100644
--- a/src/autoapp/UI/mainwindow.ui
+++ b/src/autoapp/UI/mainwindow.ui
@@ -51,6 +51,36 @@
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ 668
+ 52
+ 120
+ 24
+
+
+
+
+ 120
+ 24
+
+
+
+
+ Roboto
+ 16
+ 75
+ true
+
+
+
+ color: #00CCFF;
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
@@ -793,6 +823,7 @@ QPushButton:pressed { background: orange; border: none; }
pushButtonCameraHide
pushButtonExit
Digital_clock
+ btDevice
phoneConnected
versionString
dateString
diff --git a/src/autoapp/UI/settingswindow.ui b/src/autoapp/UI/settingswindow.ui
index 3483476..d93a767 100644
--- a/src/autoapp/UI/settingswindow.ui
+++ b/src/autoapp/UI/settingswindow.ui
@@ -1104,7 +1104,7 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;}
0
10
646
- 171
+ 101
@@ -1126,8 +1126,8 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;}
- 20
- 60
+ 210
+ 30
171
23
@@ -1139,8 +1139,8 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;}
- 110
- 90
+ 410
+ 66
231
31
@@ -1149,8 +1149,8 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;}
- 40
- 90
+ 340
+ 66
67
31
@@ -1162,8 +1162,8 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;}
- 400
- 80
+ 440
+ 20
181
41
@@ -1183,8 +1183,8 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;}
- 370
- 90
+ 410
+ 30
21
21
@@ -1196,8 +1196,8 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;}
- 180
- 30
+ 20
+ 60
151
23
@@ -1206,37 +1206,6 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;}
Use local adapter
-
-
-
- 50
- 130
- 31
- 31
-
-
-
- <html><head/><body><p><img src=":/ico_warning.png"/></p></body></html>
-
-
-
-
-
- 90
- 130
- 551
- 31
-
-
-
-
- true
-
-
-
- In order to use bluetooth features please remember to pair your device.
-
-
@@ -1263,19 +1232,6 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;}
Credentials must be set in crankshaft_env.sh!
-
-
-
- 50
- 70
- 31
- 31
-
-
-
- <html><head/><body><p><img src=":/ico_warning.png"/></p></body></html>
-
-
@@ -1317,6 +1273,19 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;}
Used SSID:
+
+
+
+ 60
+ 76
+ 21
+ 21
+
+
+
+ <html><head/><body><p><img src=":/ico_info.png"/></p></body></html>
+
+
@@ -1343,19 +1312,6 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;}
Credentials must be set in crankshaft_env.sh!
-
-
-
- 50
- 100
- 31
- 31
-
-
-
- <html><head/><body><p><img src=":/ico_warning.png"/></p></body></html>
-
-
@@ -1416,6 +1372,79 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;}
Enable Hotspot
+
+
+
+ 60
+ 106
+ 21
+ 21
+
+
+
+ <html><head/><body><p><img src=":/ico_info.png"/></p></body></html>
+
+
+
+
+
+
+ 0
+ 120
+ 646
+ 61
+
+
+
+ Bluetooth Pairing / Connect
+
+
+
+
+ 20
+ 26
+ 241
+ 23
+
+
+
+ Enable Autopairing / Autoconnect
+
+
+
+
+
+ 360
+ 20
+ 281
+ 31
+
+
+
+
+ true
+
+
+
+ Experimental and only using local adapter! Needs a reboot after changing!
+
+
+ true
+
+
+
+
+
+ 320
+ 20
+ 31
+ 31
+
+
+
+ <html><head/><body><p><img src=":/ico_warning.png"/></p></body></html>
+
+