Latest fixes
This commit is contained in:
parent
60564c0e98
commit
43bab5a782
@ -140,21 +140,21 @@ void ConnectDialog::loadClientList()
|
|||||||
}
|
}
|
||||||
versionFile.close();
|
versionFile.close();
|
||||||
|
|
||||||
if (ui_->listWidgetClients->count() == 1) {
|
//if (ui_->listWidgetClients->count() == 1) {
|
||||||
this->setControlsEnabledStatus(false);
|
// this->setControlsEnabledStatus(false);
|
||||||
|
//
|
||||||
const auto& ipAddress = ui_->lineEditIPAddress->text().toStdString();
|
// const auto& ipAddress = ui_->lineEditIPAddress->text().toStdString();
|
||||||
auto socket = std::make_shared<boost::asio::ip::tcp::socket>(ioService_);
|
// auto socket = std::make_shared<boost::asio::ip::tcp::socket>(ioService_);
|
||||||
ui_->progressBarConnect->show();
|
// ui_->progressBarConnect->show();
|
||||||
try
|
// try
|
||||||
{
|
// {
|
||||||
tcpWrapper_.asyncConnect(*socket, ipAddress, 5277, std::bind(&ConnectDialog::connectHandler, this, std::placeholders::_1, ipAddress, socket));
|
// tcpWrapper_.asyncConnect(*socket, ipAddress, 5277, std::bind(&ConnectDialog::connectHandler, this, std::placeholders::_1, ipAddress, socket));
|
||||||
}
|
// }
|
||||||
catch(const boost::system::system_error& se)
|
// catch(const boost::system::system_error& se)
|
||||||
{
|
// {
|
||||||
emit connectionFailed(QString(se.what()));
|
// emit connectionFailed(QString(se.what()));
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ui_->lineEditIPAddress->setText("");
|
ui_->lineEditIPAddress->setText("");
|
||||||
|
@ -193,6 +193,8 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi
|
|||||||
ui_->pushButtonAndroidAuto->hide();
|
ui_->pushButtonAndroidAuto->hide();
|
||||||
ui_->pushButtonAndroidAuto2->hide();
|
ui_->pushButtonAndroidAuto2->hide();
|
||||||
|
|
||||||
|
ui_->SysinfoTopLeft2->hide();
|
||||||
|
|
||||||
QTimer *timer=new QTimer(this);
|
QTimer *timer=new QTimer(this);
|
||||||
connect(timer, SIGNAL(timeout()),this,SLOT(showTime()));
|
connect(timer, SIGNAL(timeout()),this,SLOT(showTime()));
|
||||||
timer->start(1000);
|
timer->start(1000);
|
||||||
@ -227,6 +229,7 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi
|
|||||||
QFileInfo brightnessFile(brightnessFilename);
|
QFileInfo brightnessFile(brightnessFilename);
|
||||||
if (!brightnessFile.exists() && !this->brightnessButtonForce) {
|
if (!brightnessFile.exists() && !this->brightnessButtonForce) {
|
||||||
ui_->pushButtonBrightness->hide();
|
ui_->pushButtonBrightness->hide();
|
||||||
|
ui_->pushButtonBrightness2->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
// as default hide brightness slider
|
// as default hide brightness slider
|
||||||
@ -404,6 +407,7 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi
|
|||||||
// run monitor for custom brightness command if enabled in crankshaft_env.sh
|
// run monitor for custom brightness command if enabled in crankshaft_env.sh
|
||||||
if (brigthnessvalues[3] == "1") {
|
if (brigthnessvalues[3] == "1") {
|
||||||
ui_->pushButtonBrightness->show();
|
ui_->pushButtonBrightness->show();
|
||||||
|
ui_->pushButtonBrightness2->show();
|
||||||
this->customBrightnessControl = true;
|
this->customBrightnessControl = true;
|
||||||
system("/usr/local/bin/autoapp_helper startcustombrightness &");
|
system("/usr/local/bin/autoapp_helper startcustombrightness &");
|
||||||
}
|
}
|
||||||
@ -1212,7 +1216,6 @@ void f1x::openauto::autoapp::ui::MainWindow::scanFolders()
|
|||||||
catch(...) {
|
catch(...) {
|
||||||
ui_->SysinfoTopLeft->hide();
|
ui_->SysinfoTopLeft->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void f1x::openauto::autoapp::ui::MainWindow::scanFiles()
|
void f1x::openauto::autoapp::ui::MainWindow::scanFiles()
|
||||||
@ -1415,14 +1418,14 @@ void f1x::openauto::autoapp::ui::MainWindow::tmpChanged()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (std::ifstream("/tmp/config_in_progress") || std::ifstream("/tmp/debug_in_progress") || std::ifstream("/tmp/enable_pairing")) {
|
if (std::ifstream("/tmp/config_in_progress") || std::ifstream("/tmp/debug_in_progress") || std::ifstream("/tmp/enable_pairing")) {
|
||||||
if (ui_->SysinfoTopLeft->isVisible() == false) {
|
if (ui_->SysinfoTopLeft2->isVisible() == false) {
|
||||||
if (std::ifstream("/tmp/config_in_progress")) {
|
if (std::ifstream("/tmp/config_in_progress")) {
|
||||||
ui_->pushButtonSettings->hide();
|
ui_->pushButtonSettings->hide();
|
||||||
ui_->pushButtonSettings2->hide();
|
ui_->pushButtonSettings2->hide();
|
||||||
ui_->pushButtonLock->show();
|
ui_->pushButtonLock->show();
|
||||||
ui_->pushButtonLock2->show();
|
ui_->pushButtonLock2->show();
|
||||||
ui_->SysinfoTopLeft->setText("Config in progress ...");
|
ui_->SysinfoTopLeft2->setText("Config in progress ...");
|
||||||
ui_->SysinfoTopLeft->show();
|
ui_->SysinfoTopLeft2->show();
|
||||||
}
|
}
|
||||||
if (std::ifstream("/tmp/debug_in_progress")) {
|
if (std::ifstream("/tmp/debug_in_progress")) {
|
||||||
ui_->pushButtonSettings->hide();
|
ui_->pushButtonSettings->hide();
|
||||||
@ -1431,20 +1434,20 @@ void f1x::openauto::autoapp::ui::MainWindow::tmpChanged()
|
|||||||
ui_->pushButtonDebug2->hide();
|
ui_->pushButtonDebug2->hide();
|
||||||
ui_->pushButtonLock->show();
|
ui_->pushButtonLock->show();
|
||||||
ui_->pushButtonLock2->show();
|
ui_->pushButtonLock2->show();
|
||||||
ui_->SysinfoTopLeft->setText("Creating debug.zip ...");
|
ui_->SysinfoTopLeft2->setText("Creating debug.zip ...");
|
||||||
ui_->SysinfoTopLeft->show();
|
ui_->SysinfoTopLeft2->show();
|
||||||
}
|
}
|
||||||
if (std::ifstream("/tmp/enable_pairing")) {
|
if (std::ifstream("/tmp/enable_pairing")) {
|
||||||
ui_->pushButtonDebug->hide();
|
ui_->pushButtonDebug->hide();
|
||||||
ui_->pushButtonDebug2->hide();
|
ui_->pushButtonDebug2->hide();
|
||||||
ui_->SysinfoTopLeft->setText("Pairing enabled for 120 seconds!");
|
ui_->SysinfoTopLeft2->setText("Pairing enabled for 120 seconds!");
|
||||||
ui_->SysinfoTopLeft->show();
|
ui_->SysinfoTopLeft2->show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (ui_->SysinfoTopLeft->isVisible() == true) {
|
if (ui_->SysinfoTopLeft2->isVisible() == true) {
|
||||||
ui_->SysinfoTopLeft->setText("");
|
ui_->SysinfoTopLeft2->setText("");
|
||||||
ui_->SysinfoTopLeft->hide();
|
ui_->SysinfoTopLeft2->hide();
|
||||||
ui_->pushButtonSettings->show();
|
ui_->pushButtonSettings->show();
|
||||||
ui_->pushButtonSettings2->show();
|
ui_->pushButtonSettings2->show();
|
||||||
ui_->pushButtonLock->hide();
|
ui_->pushButtonLock->hide();
|
||||||
|
@ -323,7 +323,7 @@ color: rgb(255, 255, 255);</string>
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="SysinfoTopLeft">
|
<widget class="QLabel" name="SysinfoTopLeft">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
@ -359,6 +359,41 @@ color: rgb(78, 244, 37);</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="SysinfoTopLeft2">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>22</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>22</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: rgba(0, 0, 0, 0);
|
||||||
|
color: rgb(78, 244, 37);</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -124,8 +124,9 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::exit, []() { system("touch /tmp/shutdown"); std::exit(0); });
|
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::exit, []() { system("touch /tmp/shutdown"); std::exit(0); });
|
||||||
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::reboot, []() { system("touch /tmp/reboot"); std::exit(0); });
|
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::reboot, []() { system("touch /tmp/reboot"); std::exit(0); });
|
||||||
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::openSettings, &settingsWindow, &autoapp::ui::SettingsWindow::showFullScreen);
|
|
||||||
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::openSettings, &settingsWindow, &autoapp::ui::SettingsWindow::loadSystemValues);
|
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::openSettings, &settingsWindow, &autoapp::ui::SettingsWindow::loadSystemValues);
|
||||||
|
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::openSettings, &settingsWindow, &autoapp::ui::SettingsWindow::showFullScreen);
|
||||||
|
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::openConnectDialog, &connectDialog, &autoapp::ui::ConnectDialog::loadClientList);
|
||||||
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::openConnectDialog, &connectDialog, &autoapp::ui::ConnectDialog::exec);
|
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::openConnectDialog, &connectDialog, &autoapp::ui::ConnectDialog::exec);
|
||||||
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::openWifiDialog, &wifiDialog, &autoapp::ui::WifiDialog::exec);
|
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::openWifiDialog, &wifiDialog, &autoapp::ui::WifiDialog::exec);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user