update to latest

This commit is contained in:
hawkeyexp 2019-01-26 20:03:07 +01:00
parent 4ebdcd935f
commit 03c1518baf
12 changed files with 7676 additions and 623 deletions

View File

@ -57,7 +57,6 @@ private slots:
void onUpdateAlphaTrans(int value);
void onUpdateBrightnessDay(int value);
void onUpdateBrightnessNight(int value);
void onShowBindings();
void onUpdateSystemVolume(int value);
void onUpdateSystemCapture(int value);
void setTime();

View File

@ -38,6 +38,7 @@ private slots:
void on_pushButtonUpdateOpenauto_clicked();
void on_pushButtonUpdateSystem_clicked();
void on_pushButtonUpdateCheck_clicked();
void on_pushButtonUpdateCancel_clicked();
private:
Ui::UpdateDialog *ui_;

View File

@ -46,8 +46,23 @@ App::App(boost::asio::io_service& ioService, aasdk::usb::USBWrapper& usbWrapper,
void App::waitForUSBDevice()
{
strand_.dispatch([this, self = this->shared_from_this()]() {
this->waitForDevice();
this->enumerateDevices();
try
{
this->waitForDevice();
}
catch(...)
{
OPENAUTO_LOG(error) << "[App] waitForUSBDevice() -exception caused by this->waitForDevice();";
}
try
{
this->enumerateDevices();
}
catch(...)
{
OPENAUTO_LOG(error) << "[App] waitForUSBDevice() exception caused by this->enumerateDevices()";
}
});
}
@ -224,7 +239,11 @@ void App::onUSBHubError(const aasdk::error::Error& error)
if(error != aasdk::error::ErrorCode::OPERATION_ABORTED &&
error != aasdk::error::ErrorCode::OPERATION_IN_PROGRESS)
{
this->waitForDevice();
try {
this->waitForDevice();
} catch (...) {
OPENAUTO_LOG(error) << "[App] onUSBHubError: exception caused by this->waitForDevice();";
}
}
}

View File

@ -94,7 +94,6 @@ void AndroidAutoEntity::pause()
try {
std::for_each(serviceList_.begin(), serviceList_.end(), std::bind(&IService::pause, std::placeholders::_1));
messenger_->stop();
} catch (...) {
OPENAUTO_LOG(info) << "[AndroidAutoEntity] exception in pause.";
}

View File

@ -876,6 +876,19 @@ void f1x::openauto::autoapp::ui::MainWindow::cameraControlShow()
ui_->oldmenuWidget->hide();
}
ui_->cameraWidget->show();
// check if dashcam is recording
if (std::ifstream("/tmp/dashcam_is_recording")) {
if (ui_->pushButtonRecordActive->isVisible() == false) {
ui_->pushButtonRecordActive->show();
ui_->pushButtonRecord->hide();
}
} else {
if (ui_->pushButtonRecordActive->isVisible() == true) {
ui_->pushButtonRecordActive->hide();
ui_->pushButtonRecord->show();
}
}
}
}
@ -988,34 +1001,44 @@ void f1x::openauto::autoapp::ui::MainWindow::updateBG()
this->setStyleSheet("QMainWindow { background: url(:/firework.png); background-repeat: no-repeat; background-position: center; }");
this->holidaybg = true;
}
else if (ui_->mediaWidget->isVisible() == false) {
if (!this->nightModeEnabled) {
if (!this->nightModeEnabled) {
if (ui_->mediaWidget->isVisible() == true) {
if (this->wallpaperEQFileExists) {
this->setStyleSheet("QMainWindow { background: url(wallpaper-eq.png); background-repeat: no-repeat; background-position: center; }");
} else {
this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }");
}
} else {
if (this->oldGUIStyle) {
if (this->wallpaperClassicDayFileExists) {
//this->setStyleSheet( this->styleSheet().append("QMainWindow { background: url(wallpaper-classic.png); background-repeat: no-repeat; background-position: center; }") );
this->setStyleSheet("QMainWindow { background: url(wallpaper-classic.png); background-repeat: no-repeat; background-position: center; }");
} else {
this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }");
}
} else {
if (this->wallpaperDayFileExists) {
//this->setStyleSheet( this->styleSheet().append("QMainWindow { background: url(wallpaper.png); background-repeat: no-repeat; background-position: center; }") );
this->setStyleSheet("QMainWindow { background: url(wallpaper.png); background-repeat: no-repeat; background-position: center; }");
} else {
this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }");
}
}
}
} else {
if (ui_->mediaWidget->isVisible() == true) {
if (this->wallpaperEQFileExists) {
this->setStyleSheet("QMainWindow { background: url(wallpaper-eq.png); background-repeat: no-repeat; background-position: center; }");
} else {
this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }");
}
} else {
if (this->oldGUIStyle) {
if (this->wallpaperClassicNightFileExists) {
//this->setStyleSheet( this->styleSheet().append("QMainWindow { background: url(wallpaper-classic-night.png); background-repeat: no-repeat; background-position: center; }") );
this->setStyleSheet( "QMainWindow { background: url(wallpaper-classic-night.png); background-repeat: no-repeat; background-position: center; }");
} else {
this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }");
}
} else {
if (this->wallpaperNightFileExists) {
//this->setStyleSheet( this->styleSheet().append("QMainWindow { background: url(wallpaper-night.png); background-repeat: no-repeat; background-position: center; }") );
this->setStyleSheet("QMainWindow { background: url(wallpaper-night.png); background-repeat: no-repeat; background-position: center; }");
} else {
this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }");
@ -1228,6 +1251,19 @@ void f1x::openauto::autoapp::ui::MainWindow::metaDataChanged()
if (playlist->currentIndex() != -1 && fullpathplaying != "") {
QString currentsong = ui_->mp3List->item(playlist->currentIndex())->text();
ui_->labelCurrentPlaying->setText(currentsong);
if (currentsong.length() > 48) {
int id = QFontDatabase::addApplicationFont(":/Roboto-Regular.ttf");
QString family = QFontDatabase::applicationFontFamilies(id).at(0);
QFont _font(family, 12, QFont::Bold);
_font.setItalic(true);
ui_->labelCurrentPlaying->setFont(_font);
} else {
int id = QFontDatabase::addApplicationFont(":/Roboto-Regular.ttf");
QString family = QFontDatabase::applicationFontFamilies(id).at(0);
QFont _font(family, 16, QFont::Bold);
_font.setItalic(true);
ui_->labelCurrentPlaying->setFont(_font);
}
}
} catch (...) {
// use metadata from player
@ -1358,10 +1394,9 @@ void f1x::openauto::autoapp::ui::MainWindow::scanFiles()
QString url=configuration_->readFileContent(this->musicfolder + "/" + this->albumfolder + "/" + filename);
content.push_back(QMediaContent(QUrl(url)));
ui_->mp3List->addItem(filename.replace(".strm",""));
//ui_->mp3List->addItem(url);
} else {
content.push_back(QMediaContent(QUrl::fromLocalFile(this->musicfolder + "/" + this->albumfolder + "/" + filename)));
// add items to gui
content.push_back(QMediaContent(QUrl::fromLocalFile(this->musicfolder + "/" + this->albumfolder + "/" + filename)));
// read metadata using taglib
try {
TagLib::FileRef file((this->musicfolder + "/" + this->albumfolder + "/" + filename).toUtf8(),true);
@ -1589,6 +1624,7 @@ void f1x::openauto::autoapp::ui::MainWindow::tmpChanged()
ui_->clockOnlyWidget->hide();
toggleGUI();
toggleGUI();
updateBG();
}
}
@ -1751,20 +1787,6 @@ void f1x::openauto::autoapp::ui::MainWindow::tmpChanged()
}
}
}
// check if rearcam is eanbled
this->rearCamEnabled = check_file_exist("/tmp/rearcam_enabled");
if (this->rearCamEnabled) {
if (!this->rearCamVisible) {
this->rearCamVisible = true;
f1x::openauto::autoapp::ui::MainWindow::MainWindow::showRearCam();
}
} else {
if (this->rearCamVisible) {
this->rearCamVisible = false;
f1x::openauto::autoapp::ui::MainWindow::MainWindow::hideRearCam();
}
}
}
// check if shutdown is external triggered and init clean app exit

View File

@ -69,7 +69,6 @@ SettingsWindow::SettingsWindow(configuration::IConfiguration::Pointer configurat
connect(ui_->pushButtonClearSelection, &QPushButton::clicked, std::bind(&SettingsWindow::setButtonCheckBoxes, this, false));
connect(ui_->pushButtonSelectAll, &QPushButton::clicked, std::bind(&SettingsWindow::setButtonCheckBoxes, this, true));
connect(ui_->pushButtonResetToDefaults, &QPushButton::clicked, this, &SettingsWindow::onResetToDefaults);
connect(ui_->pushButtonShowBindings, &QPushButton::clicked, this, &SettingsWindow::onShowBindings);
connect(ui_->horizontalSliderSystemVolume, &QSlider::valueChanged, this, &SettingsWindow::onUpdateSystemVolume);
connect(ui_->horizontalSliderSystemCapture, &QSlider::valueChanged, this, &SettingsWindow::onUpdateSystemCapture);
connect(ui_->radioButtonHotspot, &QPushButton::clicked, this, &SettingsWindow::onStartHotspot);
@ -84,6 +83,8 @@ SettingsWindow::SettingsWindow(configuration::IConfiguration::Pointer configurat
connect(ui_->pushButtonNetworkAuto, &QPushButton::clicked, [&]() { system("/usr/local/bin/crankshaft network auto &");});
connect(ui_->pushButtonNetwork0, &QPushButton::clicked, this, &SettingsWindow::on_pushButtonNetwork0_clicked);
connect(ui_->pushButtonNetwork1, &QPushButton::clicked, this, &SettingsWindow::on_pushButtonNetwork1_clicked);
connect(ui_->pushButtonSambaStart, &QPushButton::clicked, [&]() { system("/usr/local/bin/crankshaft samba start &");});
connect(ui_->pushButtonSambaStop, &QPushButton::clicked, [&]() { system("/usr/local/bin/crankshaft samba stop &");});
// menu
ui_->tab1->show();
@ -100,7 +101,6 @@ SettingsWindow::SettingsWindow(configuration::IConfiguration::Pointer configurat
ui_->labelBluetoothAdapterAddress->hide();
ui_->lineEditExternalBluetoothAdapterAddress->hide();
ui_->labelTestInProgress->hide();
ui_->pushButtonShowBindings->hide();
connect(ui_->pushButtonTab1, &QPushButton::clicked, this, &SettingsWindow::show_tab1);
connect(ui_->pushButtonTab2, &QPushButton::clicked, this, &SettingsWindow::show_tab2);
@ -109,6 +109,7 @@ SettingsWindow::SettingsWindow(configuration::IConfiguration::Pointer configurat
connect(ui_->pushButtonTab5, &QPushButton::clicked, this, &SettingsWindow::show_tab5);
connect(ui_->pushButtonTab5, &QPushButton::clicked, this, &SettingsWindow::updateNetworkInfo);
connect(ui_->pushButtonTab6, &QPushButton::clicked, this, &SettingsWindow::show_tab6);
connect(ui_->pushButtonTab6, &QPushButton::clicked, this, &SettingsWindow::updateSystemInfo);
connect(ui_->pushButtonTab7, &QPushButton::clicked, this, &SettingsWindow::show_tab7);
connect(ui_->pushButtonTab8, &QPushButton::clicked, this, &SettingsWindow::show_tab8);
connect(ui_->pushButtonTab9, &QPushButton::clicked, this, &SettingsWindow::show_tab9);
@ -162,6 +163,16 @@ SettingsWindow::SettingsWindow(configuration::IConfiguration::Pointer configurat
ui_->label_notavailable->show();
}
if (std::ifstream("/tmp/samba_running")) {
ui_->labelSambaStatus->setText("running");
ui_->pushButtonSambaStart->hide();
ui_->pushButtonSambaStop->show();
} else {
ui_->labelSambaStatus->setText("stopped");
ui_->pushButtonSambaStop->hide();
ui_->pushButtonSambaStart->show();
}
QTimer *refresh=new QTimer(this);
connect(refresh, SIGNAL(timeout()),this,SLOT(updateInfo()));
refresh->start(5000);
@ -342,7 +353,7 @@ void SettingsWindow::onSave()
params.append("0");
}
params.append("#");
params.append( std::string(ui_->comboBoxSDOC->currentText().split(" ")[0].toStdString()) );
params.append( std::string(ui_->comboBoxUSBCam->currentText().toStdString()) );
params.append("#");
params.append( std::string(ui_->comboBoxLS->currentText().split(" ")[0].toStdString()) );
params.append("#");
@ -419,6 +430,36 @@ void SettingsWindow::onSave()
params.append("#");
params.append( std::string(ui_->comboBoxResolution->currentText().toStdString()) );
params.append("#");
params.append( std::string((ui_->comboBoxFPS->currentText()).replace(" (not @1080)","").toStdString()) );
params.append("#");
params.append( std::string(ui_->comboBoxAWB->currentText().toStdString()) );
params.append("#");
params.append( std::string(ui_->comboBoxEXP->currentText().toStdString()) );
params.append("#");
params.append( std::string(ui_->comboBoxLoopTime->currentText().toStdString()) );
params.append("#");
params.append( std::string(ui_->comboBoxLoopCount->currentText().toStdString()) );
params.append("#");
if (ui_->checkBoxAutoRecording ->isChecked()) {
params.append("1");
} else {
params.append("0");
}
params.append("#");
if (ui_->checkBoxFlipXUSB ->isChecked()) {
params.append("1");
} else {
params.append("0");
}
params.append("#");
if (ui_->checkBoxFlipYUSB ->isChecked()) {
params.append("1");
} else {
params.append("0");
}
params.append("#");
params.append( std::string(ui_->comboBoxUSBRotation->currentText().replace("180","1").toStdString()) );
params.append("#");
system((std::string("/usr/local/bin/autoapp_helper setparams#") + std::string(params) + std::string(" &") ).c_str());
this->close();
@ -948,6 +989,38 @@ void SettingsWindow::loadSystemValues()
}
ui_->comboBoxRotation->setCurrentText(configuration_->getCSValue("RPICAM_ROTATION"));
ui_->comboBoxResolution->setCurrentText(configuration_->getCSValue("RPICAM_RESOLUTION"));
ui_->comboBoxFPS->setCurrentText(configuration_->getCSValue("RPICAM_FPS"));
ui_->comboBoxAWB->setCurrentText(configuration_->getCSValue("RPICAM_AWB"));
ui_->comboBoxEXP->setCurrentText(configuration_->getCSValue("RPICAM_EXP"));
ui_->comboBoxLoopTime->setCurrentText(configuration_->getCSValue("RPICAM_LOOPTIME"));
ui_->comboBoxLoopCount->setCurrentText(configuration_->getCSValue("RPICAM_LOOPCOUNT"));
if (configuration_->getCSValue("RPICAM_AUTORECORDING") == "1") {
ui_->checkBoxAutoRecording->setChecked(true);
} else {
ui_->checkBoxAutoRecording->setChecked(false);
}
if (configuration_->getCSValue("USBCAM_USE") == "1") {
ui_->comboBoxUSBCam->setCurrentText("enabled");
} else {
ui_->comboBoxUSBCam->setCurrentText("none");
}
if (configuration_->getCSValue("USBCAM_ROTATION") == "1") {
ui_->comboBoxUSBRotation->setCurrentText("180");
} else {
ui_->comboBoxUSBRotation->setCurrentText("0");
}
if (configuration_->getCSValue("USBCAM_HFLIP") == "1") {
ui_->checkBoxFlipXUSB->setChecked(true);
} else {
ui_->checkBoxFlipXUSB->setChecked(false);
}
if (configuration_->getCSValue("USBCAM_VFLIP") == "1") {
ui_->checkBoxFlipYUSB->setChecked(true);
} else {
ui_->checkBoxFlipYUSB->setChecked(false);
}
// set bluetooth
if (configuration_->getCSValue("ENABLE_BLUETOOTH") == "1") {
@ -980,13 +1053,6 @@ void SettingsWindow::loadSystemValues()
ui_->comboBoxBluetooth->setCurrentText("none");
}
// set sdoc
QString sdoc = configuration_->getParamFromFile("/boot/config.txt","dtoverlay=sdtweak");
if (sdoc.contains("sdtweak")) {
ui_->comboBoxSDOC->setCurrentIndex(1);
} else {
ui_->comboBoxSDOC->setCurrentIndex(0);
}
// set lightsensor
if (std::ifstream("/etc/cs_lightsensor")) {
ui_->comboBoxLS->setCurrentIndex(1);
@ -1027,31 +1093,6 @@ void SettingsWindow::loadSystemValues()
updateNetworkInfo();
}
void SettingsWindow::onShowBindings()
{
const QString message = QString("Enter -> [Enter] \n")
+ QString("Left -> [Left] \n")
+ QString("Right -> [Right] \n")
+ QString("Up -> [Up] \n")
+ QString("Down -> [Down] \n")
+ QString("Back -> [Esc] \n")
+ QString("Home -> [H] \n")
+ QString("Phone -> [P] \n")
+ QString("Call end -> [O] \n")
+ QString("Play -> [X] \n")
+ QString("Pause -> [C] \n")
+ QString("Previous track -> [V]/[Media Previous] \n")
+ QString("Next track -> [N]/[Media Next] \n")
+ QString("Toggle play -> [B]/[Media Play] \n")
+ QString("Voice command -> [M] \n")
+ QString("Wheel left -> [1] \n")
+ QString("Wheel right -> [2]");
QMessageBox confirmationMessage(QMessageBox::Information, "Information", message, QMessageBox::Ok);
confirmationMessage.setWindowFlags(Qt::WindowStaysOnTopHint);
confirmationMessage.exec();
}
void SettingsWindow::onStartHotspot()
{
ui_->label_modeswitchprogress->setText("Wait ...");
@ -1265,6 +1306,20 @@ void f1x::openauto::autoapp::ui::SettingsWindow::on_pushButtonAudioTest_clicked(
void f1x::openauto::autoapp::ui::SettingsWindow::updateNetworkInfo()
{
if (std::ifstream("/tmp/samba_running")) {
ui_->labelSambaStatus->setText("running");
if (ui_->pushButtonSambaStart->isVisible() == true) {
ui_->pushButtonSambaStart->hide();
ui_->pushButtonSambaStop->show();
}
} else {
ui_->labelSambaStatus->setText("stopped");
if (ui_->pushButtonSambaStop->isVisible() == true) {
ui_->pushButtonSambaStop->hide();
ui_->pushButtonSambaStart->show();
}
}
if (!std::ifstream("/tmp/mode_change_progress")) {
QNetworkInterface eth0if = QNetworkInterface::interfaceFromName("eth0");
if (eth0if.flags().testFlag(QNetworkInterface::IsUp)) {

View File

@ -2,6 +2,7 @@
#include "ui_updatedialog.h"
#include <QFileInfo>
#include <QTextStream>
#include <QStorageInfo>
#include <fstream>
#include <cstdio>
@ -24,6 +25,7 @@ UpdateDialog::UpdateDialog(QWidget *parent)
connect(ui_->pushButtonUpdateOpenauto, &QPushButton::clicked, this, &UpdateDialog::on_pushButtonUpdateOpenauto_clicked);
connect(ui_->pushButtonUpdateSystem, &QPushButton::clicked, this, &UpdateDialog::on_pushButtonUpdateSystem_clicked);
connect(ui_->pushButtonUpdateCheck, &QPushButton::clicked, this, &UpdateDialog::on_pushButtonUpdateCheck_clicked);
connect(ui_->pushButtonUpdateCancel, &QPushButton::clicked, this, &UpdateDialog::on_pushButtonUpdateCancel_clicked);
connect(ui_->pushButtonClose, &QPushButton::clicked, this, &UpdateDialog::close);
ui_->progressBarCsmt->hide();
@ -32,6 +34,7 @@ UpdateDialog::UpdateDialog(QWidget *parent)
ui_->progressBarSystem->hide();
ui_->labelSystemReadyInstall->hide();
ui_->labelUpdateChecking->hide();
ui_->pushButtonUpdateCancel->hide();
updateCheck();
watcher_tmp = new QFileSystemWatcher(this);
@ -41,6 +44,16 @@ UpdateDialog::UpdateDialog(QWidget *parent)
watcher_download = new QFileSystemWatcher(this);
watcher_download->addPath("/media/USBDRIVES/CSSTORAGE");
connect(watcher_download, &QFileSystemWatcher::directoryChanged, this, &UpdateDialog::downloadCheck);
QStorageInfo storage("/media/USBDRIVES/CSSTORAGE");
storage.refresh();
if (storage.isValid() && storage.isReady()) {
ui_->system->show();
ui_->labelNoStorage->hide();
} else {
ui_->labelNoStorage->show();
ui_->system->hide();
}
}
UpdateDialog::~UpdateDialog()
@ -92,6 +105,12 @@ void f1x::openauto::autoapp::ui::UpdateDialog::on_pushButtonUpdateCheck_clicked(
ui_->pushButtonUpdateCheck->show();
}
void f1x::openauto::autoapp::ui::UpdateDialog::on_pushButtonUpdateCancel_clicked()
{
ui_->pushButtonUpdateCancel->hide();
system("crankshaft update cancel &");
}
void f1x::openauto::autoapp::ui::UpdateDialog::downloadCheck()
{
QDir directory("/media/USBDRIVES/CSSTORAGE");
@ -146,6 +165,7 @@ void f1x::openauto::autoapp::ui::UpdateDialog::updateCheck()
ui_->pushButtonUpdateSystem->hide();
ui_->progressBarSystem->hide();
ui_->labelSystemReadyInstall->show();
ui_->pushButtonUpdateCancel->hide();
} else {
ui_->labelSystemReadyInstall->hide();
if (std::ifstream("/tmp/system_update_available")) {
@ -158,6 +178,7 @@ void f1x::openauto::autoapp::ui::UpdateDialog::updateCheck()
ui_->pushButtonUpdateSystem->hide();
ui_->pushButtonUpdateCheck->hide();
ui_->progressBarSystem->show();
ui_->pushButtonUpdateCancel->show();
QFileInfo downloadfile = "/media/USBDRIVES/CSSTORAGE/" + ui_->labelDownload->text();
if (downloadfile.exists()) {
@ -168,6 +189,8 @@ void f1x::openauto::autoapp::ui::UpdateDialog::updateCheck()
} else {
if (ui_->pushButtonUpdateCheck->isVisible() == false) {
ui_->pushButtonUpdateCheck->show();
ui_->labelDownload->setText("");
ui_->pushButtonUpdateCancel->hide();
}
}
@ -183,3 +206,4 @@ void f1x::openauto::autoapp::ui::UpdateDialog::updateCheck()
}
}
}

View File

@ -3844,7 +3844,7 @@ border: 2px solid rgba(255,255,255,0.5);
outline: none;</string>
</property>
<property name="text">
<string>Save</string>
<string>Save Event</string>
</property>
<property name="icon">
<iconset>
@ -4858,7 +4858,7 @@ background-color: rgba(0, 0, 0, 0);</string>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
<pointsize>14</pointsize>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -66,7 +66,7 @@ color: rgb(255, 255, 255);</string>
<property name="bottomMargin">
<number>2</number>
</property>
<item row="7" column="0" colspan="2">
<item row="8" column="0" colspan="2">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
@ -511,200 +511,7 @@ color: rgb(255, 255, 255);</string>
</layout>
</widget>
</item>
<item row="3" column="0">
<widget class="QWidget" name="system" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="labelSystemOK">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>140</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>140</width>
<height>30</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(78, 154, 6);
border-radius: 4px;
border: 2px solid rgba(255,255,255,0.5);</string>
</property>
<property name="text">
<string>OK</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labelSystemReadyInstall">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>140</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>140</width>
<height>30</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(206, 92, 0);
border-radius: 4px;
border: 2px solid rgba(255,255,255,0.5);</string>
</property>
<property name="text">
<string>Reboot To Install</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonUpdateSystem">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>140</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>140</width>
<height>30</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(164, 0, 0);
border-radius: 4px;
border: 2px solid rgba(255,255,255,0.5);
color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string>Update System</string>
</property>
</widget>
</item>
<item>
<widget class="QProgressBar" name="progressBarSystem">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>140</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>140</width>
<height>30</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgba(186, 189, 182, 0.5);
border-radius: 4px;
border: 2px solid rgba(255,255,255,0.5);
color: rgb(255, 255, 255);</string>
</property>
<property name="maximum">
<number>420</number>
</property>
<property name="value">
<number>0</number>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="labelSystem">
<property name="text">
<string>Update System (Download Flash zip)
This can take some minutes!</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<item row="5" column="0" colspan="2">
<widget class="QLabel" name="labelDownload">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
@ -726,6 +533,264 @@ This can take some minutes!</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QWidget" name="systemupdate" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="labelNoStorage">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>140</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>140</width>
<height>30</height>
</size>
</property>
<property name="font">
<font>
<pointsize>8</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(85, 87, 83);
border-radius: 4px;
border: 2px solid rgba(255,255,255,0.5);</string>
</property>
<property name="text">
<string>No CSSTORAGE to
cache System Updates!</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="system" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="labelSystemOK">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>140</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>140</width>
<height>30</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(78, 154, 6);
border-radius: 4px;
border: 2px solid rgba(255,255,255,0.5);</string>
</property>
<property name="text">
<string>OK</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labelSystemReadyInstall">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>140</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>140</width>
<height>30</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(206, 92, 0);
border-radius: 4px;
border: 2px solid rgba(255,255,255,0.5);</string>
</property>
<property name="text">
<string>Reboot To Install</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonUpdateSystem">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>140</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>140</width>
<height>30</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(164, 0, 0);
border-radius: 4px;
border: 2px solid rgba(255,255,255,0.5);
color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string>Update System</string>
</property>
</widget>
</item>
<item>
<widget class="QProgressBar" name="progressBarSystem">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>140</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>140</width>
<height>30</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgba(186, 189, 182, 0.5);
border-radius: 4px;
border: 2px solid rgba(255,255,255,0.5);
color: rgb(255, 255, 255);</string>
</property>
<property name="maximum">
<number>420</number>
</property>
<property name="value">
<number>0</number>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="labelSystem">
<property name="text">
<string>Update System (Download Flash zip)
This can take some minutes!</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@ -830,6 +895,43 @@ color: rgb(255, 255, 255);</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonUpdateCancel">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>140</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>140</width>
<height>30</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgba(186, 189, 182, 0.5);
border-radius: 4px;
border: 2px solid rgba(255,255,255,0.5);
color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string>Cancel Download</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonClose">
<property name="sizePolicy">

View File

@ -166,17 +166,6 @@ int main(int argc, char* argv[])
OPENAUTO_LOG(info) << "[Camera] Zoom minus.";
});
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::hideRearCam, [&qApplication]() {
system("/opt/crankshaft/cameracontrol.py DashcamMode &");
system("sudo rm /tmp/rearcam_enabled &");
OPENAUTO_LOG(info) << "[Camera] Dashcam mode.";
});
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::showRearCam, [&qApplication]() {
system("/opt/crankshaft/cameracontrol.py Rearcam &");
OPENAUTO_LOG(info) << "[Camera] Rearcam mode.";
});
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::cameraRecord, [&qApplication]() {
system("/opt/crankshaft/cameracontrol.py Record &");
OPENAUTO_LOG(info) << "[Camera] Record.";
@ -248,7 +237,7 @@ int main(int argc, char* argv[])
} else {
OPENAUTO_LOG(info) << "[Autoapp] TriggerAppStop: Manual stop wifi android auto.";
try {
app->stop();
app->onAndroidAutoQuit();
//app->pause();
} catch (...) {
OPENAUTO_LOG(error) << "[Autoapp] TriggerAppStop: stop();";