diff --git a/selfdrive/ui/qt/home.cc b/selfdrive/ui/qt/home.cc index ec4d7baa84..d2b0fa44d8 100644 --- a/selfdrive/ui/qt/home.cc +++ b/selfdrive/ui/qt/home.cc @@ -3,9 +3,7 @@ #include #include -#include "selfdrive/ui/qt/offroad/experimental_mode.h" #include "selfdrive/ui/qt/util.h" -#include "selfdrive/ui/qt/widgets/prime.h" // HomeWindow: the container for the offroad and onroad UIs diff --git a/selfdrive/ui/qt/offroad/settings.cc b/selfdrive/ui/qt/offroad/settings.cc index 93dcd793c9..4911dc71e9 100644 --- a/selfdrive/ui/qt/offroad/settings.cc +++ b/selfdrive/ui/qt/offroad/settings.cc @@ -356,8 +356,7 @@ void SettingsWindow::setCurrentPanel(int index, const QString ¶m) { } SettingsWindow::SettingsWindow(QWidget *parent) : QFrame(parent) { - RETURN_IF_SUNNYPILOT - +#ifndef SUNNYPILOT // setup two main layouts sidebar_widget = new QWidget; QVBoxLayout *sidebar_layout = new QVBoxLayout(sidebar_widget); @@ -457,4 +456,5 @@ SettingsWindow::SettingsWindow(QWidget *parent) : QFrame(parent) { border-radius: 30px; } )"); +#endif } diff --git a/selfdrive/ui/qt/util.h b/selfdrive/ui/qt/util.h index 6ea53d354a..2bf1a70a62 100644 --- a/selfdrive/ui/qt/util.h +++ b/selfdrive/ui/qt/util.h @@ -13,12 +13,6 @@ #include "cereal/gen/cpp/car.capnp.h" #include "common/params.h" -#ifdef SUNNYPILOT -#define RETURN_IF_SUNNYPILOT return; -#else -#define RETURN_IF_SUNNYPILOT // Do nothing -#endif - QString getVersion(); QString getBrand(); QString getUserAgent(); diff --git a/selfdrive/ui/qt/widgets/controls.cc b/selfdrive/ui/qt/widgets/controls.cc index 7dd3178200..df6e6932c7 100644 --- a/selfdrive/ui/qt/widgets/controls.cc +++ b/selfdrive/ui/qt/widgets/controls.cc @@ -6,7 +6,7 @@ #include "selfdrive/ui/qt/util.h" AbstractControl::AbstractControl(const QString &title, const QString &desc, const QString &icon, QWidget *parent) : QFrame(parent) { - RETURN_IF_SUNNYPILOT +#ifndef SUNNYPILOT QVBoxLayout *main_layout = new QVBoxLayout(this); main_layout->setMargin(0); @@ -57,6 +57,7 @@ AbstractControl::AbstractControl(const QString &title, const QString &desc, cons }); main_layout->addStretch(); +#endif } void AbstractControl::hideEvent(QHideEvent *e) { diff --git a/selfdrive/ui/ui.cc b/selfdrive/ui/ui.cc index cc29aa9143..2bdac39368 100644 --- a/selfdrive/ui/ui.cc +++ b/selfdrive/ui/ui.cc @@ -111,15 +111,16 @@ UIState::UIState(QObject *parent) : QObject(parent) { prime_state = new PrimeState(this); language = QString::fromStdString(Params().get("LanguageSetting")); - RETURN_IF_SUNNYPILOT +#ifndef SUNNYPILOT // update timer timer = new QTimer(this); QObject::connect(timer, &QTimer::timeout, this, &UIState::update); timer->start(1000 / UI_FREQ); +#endif } void UIState::update() { - RETURN_IF_SUNNYPILOT +#ifndef SUNNYPILOT update_sockets(this); update_state(this); updateStatus(); @@ -128,6 +129,7 @@ void UIState::update() { watchdog_kick(nanos_since_boot()); } emit uiUpdate(*this); +#endif } Device::Device(QObject *parent) : brightness_filter(BACKLIGHT_OFFROAD, BACKLIGHT_TS, BACKLIGHT_DT), QObject(parent) {