port C++ UI from broken: ready/splash, ClearPilot menu, onroad widgets, nightrider

Wholesale port of the 10 UI files (main.cc, ui.{cc,h}, onroad.{cc,h},
home.{cc,h}, window.{cc,h}, ready.{cc,h}, SConscript). sidebar.{cc,h}
unchanged.

Brings in:
- splash/ready screen rendered via Qt directly (replaces stock home)
- ready page shown when started but gear=park
- ClearPilot offroad menu (Home/Dashcam/Debug panels) replacing stock
- onroad UI: speed widget reading ClearpilotSpeedDisplay (gpsLocation
  via speed_logicd), speed-limit widget, cruise-vs-limit warning sign
- nightrider mode: camera suppressed, lane lines/path drawn as 2px
  outlines only (ScreenDisplayMode 1 or 4)
- screen power: ScreenDisplayMode 3 forces setAwake(false)
- ignition off blanks screen immediately (tap still wakes)
- Qt-based RPC widget-tree dump server at ipc:///tmp/clearpilot_ui_rpc
- crash handler in main.cc with stack trace

Deviation from broken (3 sites): no_lat_lane_change is read from
paramsMemory (controlsd writes it there in baseline) instead of broken's
custom cereal field frogpilotCarControl.noLatLaneChange. Keeps the
existing self-driving wiring intact.

SConscript drops screenrecorder.cc from qt_src (broken did the same;
omx_encoder.cc still built for dashcamd's future link).

Build clean. UI hasn't been launched yet — that comes after the
controlsd button-handler commit lands.

Translation .ts files are auto-regenerated by Qt's lupdate; included.
This commit is contained in:
2026-05-03 23:03:42 -05:00
parent 41c154014a
commit b5a0b3221c
23 changed files with 1302 additions and 292 deletions
+15 -20
View File
@@ -1,9 +1,11 @@
#pragma once
#include <QButtonGroup>
#include <QFrame>
#include <QLabel>
#include <QPushButton>
#include <QStackedLayout>
#include <QStackedWidget>
#include <QTimer>
#include <QWidget>
@@ -16,32 +18,23 @@
#include "selfdrive/ui/qt/widgets/offroad_alerts.h"
#include "selfdrive/ui/ui.h"
class OffroadHome : public QFrame {
class ClearPilotPanel : public QFrame {
Q_OBJECT
public:
explicit OffroadHome(QWidget* parent = 0);
explicit ClearPilotPanel(QWidget* parent = 0);
signals:
void openSettings(int index = 0, const QString &param = "");
void openStatus();
void closePanel();
public:
void resetToGeneral();
private:
void showEvent(QShowEvent *event) override;
void hideEvent(QHideEvent *event) override;
void refresh();
Params params;
QTimer* timer;
ElidedLabel* version;
QStackedLayout* center_layout;
UpdateAlert *update_widget;
OffroadAlert* alerts_widget;
QPushButton* alert_notif;
QPushButton* update_notif;
// FrogPilot variables
ElidedLabel* date;
QStackedWidget *panel_widget;
QButtonGroup *nav_group;
};
class HomeWindow : public QWidget {
@@ -53,6 +46,7 @@ public:
signals:
void openSettings(int index = 0, const QString &param = "");
void openStatus();
void closeSettings();
public slots:
@@ -67,17 +61,18 @@ protected:
private:
Sidebar *sidebar;
OffroadHome *home;
ClearPilotPanel *home;
OnroadWindow *onroad;
DriverViewWindow *driver_view;
QStackedLayout *slayout;
// FrogPilot variables
Params params;
Params paramsMemory{"/dev/shm/params"};
// CLEARPILOT
// bool show_ready;
ReadyWindow *ready;
bool was_parked_onroad = false;
private slots:
void updateState(const UIState &s);