mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-08-20 15:43:43 +08:00
ui for tetoo
This commit is contained in:
@@ -47,6 +47,7 @@ AnnotatedCameraWidget::AnnotatedCameraWidget(VisionStreamType type, QWidget* par
|
||||
rainbow_path = new RainbowPath;
|
||||
flight_panel = new FlightPanel;
|
||||
chevron_ext = new ChevronExt;
|
||||
tt_indicator = new TeTooIndicator;
|
||||
#endif
|
||||
|
||||
}
|
||||
@@ -94,6 +95,7 @@ void AnnotatedCameraWidget::updateState(const UIState &s) {
|
||||
rainbow_path->update_states(s);
|
||||
flight_panel->update_states(s, is_metric);
|
||||
chevron_ext->update_states(s, is_metric);
|
||||
tt_indicator->update_states(s, is_metric);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -145,6 +147,11 @@ void AnnotatedCameraWidget::drawHud(QPainter &p) {
|
||||
p.setFont(InterFont(66));
|
||||
drawText(p, rect().center().x(), 290, speedUnit, 200);
|
||||
|
||||
#ifdef DP
|
||||
tt_indicator->paint_speed_camera(p, rect());
|
||||
tt_indicator->paint_maxspeed(p, set_speed_rect.topRight());
|
||||
#endif
|
||||
|
||||
p.restore();
|
||||
}
|
||||
|
||||
@@ -395,6 +402,7 @@ void AnnotatedCameraWidget::paintGL() {
|
||||
update_model(s, model);
|
||||
|
||||
#ifdef DP
|
||||
tt_indicator->paint_road_name(painter, rect().left(), rect().bottom(), rect().width());
|
||||
flight_panel->paint(painter, width(), height());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -44,7 +44,8 @@ private:
|
||||
PersonalityButton *personality_btn;
|
||||
KnightScanner *knight_scanner;
|
||||
RainbowPath *rainbow_path;
|
||||
ChevronExt * chevron_ext;
|
||||
ChevronExt *chevron_ext;
|
||||
TeTooIndicator *tt_indicator;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
||||
@@ -252,6 +252,8 @@ UIState::UIState(QObject *parent) : QObject(parent) {
|
||||
"carControl", "controlsStateExt",
|
||||
// de2e
|
||||
"longitudinalPlanExt",
|
||||
// TeToo
|
||||
"teToo",
|
||||
});
|
||||
|
||||
Params params;
|
||||
|
||||
Reference in New Issue
Block a user