Files
clearpilot/selfdrive/ui/qt/home.h
Brian Hanson c33e155c56 UI overhaul, VPN management, controlsd fix, screen recorder removal
- Fix controlsd crash: self.state.name AttributeError when state is int
- Move telemetry tlog import to module level in carstate.py (was per-frame)
- Remove FrogPilot screen recorder from UI (was crashing OMX on init)
- Ready screen: boot logo background, 8-bit READY! sprite, error states
  (panda not connected, car not recognized) with 10s startup grace period
- ClearPilot menu: always opens to General, QButtonGroup for sidebar,
  System Status uses ButtonControl, VPN toggle with process control
- Sidebar hidden on construction (no flash before splash)
- Status window: threaded data collection (QtConcurrent), panda detection
  via scene.pandaType (SPI, not USB), only refreshes when visible
- VPN: moved to system/clearpilot/, SIGTERM graceful shutdown, keepalive
  ping through tunnel, killall openvpn on disable, launched from
  launch_openpilot.sh instead of continue.sh
- Disable gpsd and dashcamd temporarily for perf testing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 22:43:54 -05:00

80 lines
1.7 KiB
C++
Executable File

#pragma once
#include <QButtonGroup>
#include <QFrame>
#include <QLabel>
#include <QPushButton>
#include <QStackedLayout>
#include <QStackedWidget>
#include <QTimer>
#include <QWidget>
#include "common/params.h"
#include "selfdrive/ui/qt/offroad/driverview.h"
#include "selfdrive/ui/qt/ready.h"
#include "selfdrive/ui/qt/onroad.h"
#include "selfdrive/ui/qt/sidebar.h"
#include "selfdrive/ui/qt/widgets/controls.h"
#include "selfdrive/ui/qt/widgets/offroad_alerts.h"
#include "selfdrive/ui/ui.h"
class ClearPilotPanel : public QFrame {
Q_OBJECT
public:
explicit ClearPilotPanel(QWidget* parent = 0);
signals:
void openSettings(int index = 0, const QString &param = "");
void openStatus();
void closePanel();
public:
void resetToGeneral();
private:
QStackedWidget *panel_widget;
QButtonGroup *nav_group;
};
class HomeWindow : public QWidget {
Q_OBJECT
public:
explicit HomeWindow(QWidget* parent = 0);
QWidget* _parent = 0;
signals:
void openSettings(int index = 0, const QString &param = "");
void openStatus();
void closeSettings();
public slots:
void offroadTransition(bool offroad);
void showDriverView(bool show, bool started=false);
void showOnroad();
void showSidebar(bool show);
protected:
void mousePressEvent(QMouseEvent* e) override;
void mouseDoubleClickEvent(QMouseEvent* e) override;
private:
Sidebar *sidebar;
ClearPilotPanel *home;
OnroadWindow *onroad;
DriverViewWindow *driver_view;
QStackedLayout *slayout;
// FrogPilot variables
Params params;
Params paramsMemory{"/dev/shm/params"};
// CLEARPILOT
ReadyWindow *ready;
bool was_parked_onroad = false;
private slots:
void updateState(const UIState &s);
};