This commit is contained in:
Your Name
2024-04-28 15:44:33 -05:00
parent 244b27e467
commit 0ec0d8368f
4 changed files with 49 additions and 360 deletions

View File

@@ -17,9 +17,8 @@
// HomeWindow: the container for the offroad and onroad UIs
HomeWindow::HomeWindow(QWidget* parent) : QWidget(parent) {
_parent = parent;
// Start hidden at first
// _parent->setVisible(false);
parent->setVisible(false)
// CLEARPILOT Sidebar set to invisible in drive view.
params.putBool("Sidebar", false);
@@ -29,7 +28,6 @@ HomeWindow::HomeWindow(QWidget* parent) : QWidget(parent) {
main_layout->setSpacing(0);
sidebar = new Sidebar(this);
sidebar->setVisible(false);
main_layout->addWidget(sidebar);
QObject::connect(sidebar, &Sidebar::openSettings, this, &HomeWindow::openSettings);
@@ -38,7 +36,6 @@ HomeWindow::HomeWindow(QWidget* parent) : QWidget(parent) {
home = new OffroadHome(this);
QObject::connect(home, &OffroadHome::openSettings, this, &HomeWindow::openSettings);
home->setVisible(false);
slayout->addWidget(home);
onroad = new OnroadWindow(this);
@@ -100,11 +97,9 @@ void HomeWindow::offroadTransition(bool offroad) {
slayout->setCurrentWidget(onroad);
uiState()->scene.map_open = onroad->isMapVisible();
}
// _parent->setVisible(true);
}
void HomeWindow::showDriverView(bool show, bool started) {
// _parent->setVisible(true);
if (show) {
emit closeSettings();
slayout->setCurrentWidget(driver_view);
@@ -131,11 +126,9 @@ void HomeWindow::mousePressEvent(QMouseEvent* e) {
// params.putBool("Sidebar", sidebar->isVisible());
// }
// CLEARPILOT - click ready shows home
if (!onroad->isVisible() && ready->isVisible()) {
sidebar->setVisible(true);
home->setVisible(false);
slayout->setCurrentWidget(home);
}
@@ -272,7 +265,9 @@ OffroadHome::OffroadHome(QWidget* parent) : QFrame(parent) {
void OffroadHome::showEvent(QShowEvent *event) {
refresh();
// CLEARPILOT changed timeout to 2 min
// What does this even do?
timer->start(120 * 1000);
// slayout->addWidget(ready);
}
void OffroadHome::hideEvent(QHideEvent *event) {

View File

@@ -390,7 +390,7 @@ void ui_update_frogpilot_params(UIState *s) {
scene.screen_brightness = screen_management ? params.getInt("ScreenBrightness") : 101;
scene.screen_brightness_onroad = screen_management ? params.getInt("ScreenBrightnessOnroad") : 101;
scene.screen_recorder = screen_management && params.getBool("ScreenRecorder");
scene.screen_timeout = screen_management ? params.getInt("ScreenTimeout") : 30;
scene.screen_timeout = screen_management ? params.getInt("ScreenTimeout") : 120;
scene.screen_timeout_onroad = screen_management ? params.getInt("ScreenTimeoutOnroad") : 10;
scene.standby_mode = screen_management && params.getBool("StandbyMode");