wip
This commit is contained in:
@@ -888,7 +888,7 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
|
||||
|
||||
i += (i + 2) < max_len ? 1 : 0; // Skipping a point to optimize rendering
|
||||
}
|
||||
} catch (const std::exception& e) {
|
||||
} catch (const std::exception& e) {
|
||||
// Default shading if for some reason the above code fails
|
||||
path_gradient = QLinearGradient(0, height(), 0, 0);
|
||||
path_gradient.setColorAt(0.0, QColor(center_lane_color.red(), center_lane_color.green(), center_lane_color.blue(), static_cast<int>(CENTER_LANE_ALPHA * 255 * 0.5)));
|
||||
@@ -900,10 +900,10 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
|
||||
path_gradient.setColorAt(0.5, QColor(center_lane_color.red(), center_lane_color.green(), center_lane_color.blue(), static_cast<int>(CENTER_LANE_ALPHA * 255 * 0.4)));
|
||||
path_gradient.setColorAt(1.0, QColor(center_lane_color.red(), center_lane_color.green(), center_lane_color.blue(), static_cast<int>(CENTER_LANE_ALPHA * 255 * 0.0)));
|
||||
}
|
||||
}
|
||||
|
||||
painter.setBrush(path_gradient);
|
||||
painter.drawPolygon(scene.track_vertices);
|
||||
painter.setBrush(path_gradient);
|
||||
painter.drawPolygon(scene.track_vertices);
|
||||
}
|
||||
|
||||
// Paint path edges ,Use current background color
|
||||
if (edgeColor != bg_colors[STATUS_DISENGAGED]) {
|
||||
@@ -1134,7 +1134,9 @@ void AnnotatedCameraWidget::paintEvent(QPaintEvent *event) {
|
||||
update_model(s, model, sm["uiPlan"].getUiPlan());
|
||||
drawLaneLines(painter, s);
|
||||
|
||||
if (s->scene.longitudinal_control && sm.rcv_frame("modelV2") > s->scene.started_frame) {
|
||||
// Clearpilot - draw leads even in stock long (test)
|
||||
// if (s->scene.longitudinal_control && sm.rcv_frame("modelV2") > s->scene.started_frame) {
|
||||
if (sm.rcv_frame("modelV2") > s->scene.started_frame) {
|
||||
update_leads(s, model);
|
||||
float prev_drel = -1;
|
||||
for (int i = 0; i < model.getLeadsV3().size() && i < 2; i++) {
|
||||
|
||||
Reference in New Issue
Block a user