Files
StarPilot/selfdrive/ui/qt/onroad/annotated_camera.h
T
2026-02-13 00:21:38 -07:00

56 lines
1.4 KiB
C++

#pragma once
#include <QVBoxLayout>
#include <memory>
#include "selfdrive/ui/qt/onroad/hud.h"
#include "selfdrive/ui/qt/onroad/buttons.h"
#include "selfdrive/ui/qt/onroad/driver_monitoring.h"
#include "selfdrive/ui/qt/onroad/model.h"
#include "selfdrive/ui/qt/widgets/cameraview.h"
#include "frogpilot/ui/qt/onroad/frogpilot_buttons.h"
#include "frogpilot/ui/screenrecorder/screenrecorder.h"
class AnnotatedCameraWidget : public CameraWidget {
Q_OBJECT
public:
explicit AnnotatedCameraWidget(VisionStreamType type, QWidget* parent = 0);
void updateState(const UIState &s, const FrogPilotUIState &fs);
// FrogPilot variables
double fps;
FrogPilotAnnotatedCameraWidget *frogpilot_nvg;
FrogPilotUIScene frogpilot_scene;
QJsonObject frogpilot_toggles;
private:
QVBoxLayout *main_layout;
ExperimentalButton *experimental_btn;
DriverMonitorRenderer dmon;
HudRenderer hud;
ModelRenderer model;
std::unique_ptr<PubMaster> pm;
int skip_frame_count = 0;
bool wide_cam_requested = false;
// FrogPilot variables
void paintEvent(QPaintEvent *event) override;
DrivingPersonalityButton *personality_btn;
ScreenRecorder *screen_recorder;
protected:
void paintGL() override;
void initializeGL() override;
void showEvent(QShowEvent *event) override;
mat4 calcFrameMatrix() override;
double prev_draw_t = 0;
FirstOrderFilter fps_filter;
};