mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-09-09 17:53:41 +08:00
3966599e9d
* Revert "Revert "ui: sunnypilot offroad UI" (#511)"
This reverts commit 0e264e1b05.
* Revert "move files to sp dir"
This reverts commit c72d732259d35872fca92b90289785e7b4086140.
* remove drive stats for now
* update translation
* update onboarding
* remove sp onboarding for now
* rearrange
* remove more
* shorter license
45 lines
768 B
C++
45 lines
768 B
C++
#pragma once
|
|
|
|
#include <QMovie>
|
|
#include <QLabel>
|
|
#include <QPushButton>
|
|
|
|
#include "common/util.h"
|
|
|
|
#ifdef SUNNYPILOT
|
|
#include "selfdrive/ui/sunnypilot/ui.h"
|
|
#define UIState UIStateSP
|
|
#else
|
|
#include "selfdrive/ui/ui.h"
|
|
#endif
|
|
|
|
class RecordButton : public QPushButton {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
RecordButton(QWidget* parent = 0);
|
|
|
|
private:
|
|
void paintEvent(QPaintEvent*) override;
|
|
};
|
|
|
|
class BodyWindow : public QWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
BodyWindow(QWidget* parent = 0);
|
|
|
|
private:
|
|
bool charging = false;
|
|
uint64_t last_button = 0;
|
|
FirstOrderFilter fuel_filter;
|
|
QLabel *face;
|
|
QMovie *awake, *sleep;
|
|
RecordButton *btn;
|
|
void paintEvent(QPaintEvent*) override;
|
|
|
|
private slots:
|
|
void updateState(const UIState &s);
|
|
void offroadTransition(bool onroad);
|
|
};
|