mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-08-07 17:25:40 +08:00
added chevron extension
This commit is contained in:
@@ -28,6 +28,7 @@ AnnotatedCameraWidget::AnnotatedCameraWidget(VisionStreamType type, QWidget* par
|
||||
#ifdef DP
|
||||
knight_scanner = new KnightScanner;
|
||||
rainbow_path = new RainbowPath;
|
||||
chevron_ext = new ChevronExt;
|
||||
#endif
|
||||
|
||||
}
|
||||
@@ -85,6 +86,7 @@ void AnnotatedCameraWidget::updateState(const UIState &s) {
|
||||
|
||||
#ifdef DP
|
||||
rainbow_path->update_states(s);
|
||||
chevron_ext->update_states(s, is_metric);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -366,6 +368,9 @@ void AnnotatedCameraWidget::drawLead(QPainter &painter, const cereal::RadarState
|
||||
painter.setBrush(redColor(fillAlpha));
|
||||
painter.drawPolygon(chevron, std::size(chevron));
|
||||
|
||||
#ifdef DP
|
||||
chevron_ext->paint(painter, d_rel, x, y);
|
||||
#endif
|
||||
painter.restore();
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ private:
|
||||
#ifdef DP
|
||||
KnightScanner *knight_scanner;
|
||||
RainbowPath *rainbow_path;
|
||||
ChevronExt * chevron_ext;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user