|
|
@ -8,6 +8,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
#include "common/watchdog.h" |
|
|
|
#include "common/watchdog.h" |
|
|
|
#include "common/util.h" |
|
|
|
#include "common/util.h" |
|
|
|
|
|
|
|
#include "selfdrive/ui/qt/offroad/driverview.h" |
|
|
|
#include "selfdrive/ui/qt/network/networking.h" |
|
|
|
#include "selfdrive/ui/qt/network/networking.h" |
|
|
|
#include "selfdrive/ui/qt/offroad/settings.h" |
|
|
|
#include "selfdrive/ui/qt/offroad/settings.h" |
|
|
|
#include "selfdrive/ui/qt/qt_window.h" |
|
|
|
#include "selfdrive/ui/qt/qt_window.h" |
|
|
@ -203,7 +204,12 @@ DevicePanel::DevicePanel(SettingsWindow *parent) : ListWidget(parent) { |
|
|
|
|
|
|
|
|
|
|
|
auto dcamBtn = new ButtonControl(tr("Driver Camera"), tr("PREVIEW"), |
|
|
|
auto dcamBtn = new ButtonControl(tr("Driver Camera"), tr("PREVIEW"), |
|
|
|
tr("Preview the driver facing camera to ensure that driver monitoring has good visibility. (vehicle must be off)")); |
|
|
|
tr("Preview the driver facing camera to ensure that driver monitoring has good visibility. (vehicle must be off)")); |
|
|
|
connect(dcamBtn, &ButtonControl::clicked, [=]() { emit showDriverView(); }); |
|
|
|
connect(dcamBtn, &ButtonControl::clicked, [this, dcamBtn]() { |
|
|
|
|
|
|
|
dcamBtn->setEnabled(false); |
|
|
|
|
|
|
|
DriverViewDialog driver_view(this); |
|
|
|
|
|
|
|
driver_view.exec(); |
|
|
|
|
|
|
|
dcamBtn->setEnabled(true); |
|
|
|
|
|
|
|
}); |
|
|
|
addItem(dcamBtn); |
|
|
|
addItem(dcamBtn); |
|
|
|
|
|
|
|
|
|
|
|
auto resetCalibBtn = new ButtonControl(tr("Reset Calibration"), tr("RESET"), ""); |
|
|
|
auto resetCalibBtn = new ButtonControl(tr("Reset Calibration"), tr("RESET"), ""); |
|
|
@ -375,7 +381,6 @@ SettingsWindow::SettingsWindow(QWidget *parent) : QFrame(parent) { |
|
|
|
// setup panels
|
|
|
|
// setup panels
|
|
|
|
DevicePanel *device = new DevicePanel(this); |
|
|
|
DevicePanel *device = new DevicePanel(this); |
|
|
|
QObject::connect(device, &DevicePanel::reviewTrainingGuide, this, &SettingsWindow::reviewTrainingGuide); |
|
|
|
QObject::connect(device, &DevicePanel::reviewTrainingGuide, this, &SettingsWindow::reviewTrainingGuide); |
|
|
|
QObject::connect(device, &DevicePanel::showDriverView, this, &SettingsWindow::showDriverView); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TogglesPanel *toggles = new TogglesPanel(this); |
|
|
|
TogglesPanel *toggles = new TogglesPanel(this); |
|
|
|
QObject::connect(this, &SettingsWindow::expandToggleDescription, toggles, &TogglesPanel::expandToggleDescription); |
|
|
|
QObject::connect(this, &SettingsWindow::expandToggleDescription, toggles, &TogglesPanel::expandToggleDescription); |
|
|
|