Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0d1ceddad2 | |||
| 20ea43f317 |
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
@@ -851,8 +851,15 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
|
|||||||
// CLEARPILOT: nightrider mode — outline only, no fill
|
// CLEARPILOT: nightrider mode — outline only, no fill
|
||||||
bool outlineOnly = nightriderMode;
|
bool outlineOnly = nightriderMode;
|
||||||
|
|
||||||
// CLEARPILOT: in nightrider mode, hide all lines when not engaged
|
// CLEARPILOT: read here so the nightrider hide-when-disengaged check below
|
||||||
if (outlineOnly && edgeColor == bg_colors[STATUS_DISENGAGED]) {
|
// can let lane-change frames through (controlsd forces edgeColor to
|
||||||
|
// STATUS_DISENGAGED while no_lat_lane_change is true).
|
||||||
|
bool is_no_lat_lane_change = paramsMemory.getBool("no_lat_lane_change");
|
||||||
|
|
||||||
|
// CLEARPILOT: in nightrider mode, hide all lines when not engaged — except
|
||||||
|
// during a lane change, where we still want lane lines + road edges drawn
|
||||||
|
// alongside the yellow lane-change outline.
|
||||||
|
if (outlineOnly && edgeColor == bg_colors[STATUS_DISENGAGED] && !is_no_lat_lane_change) {
|
||||||
painter.restore();
|
painter.restore();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -893,8 +900,7 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
|
|||||||
// paint center lane path
|
// paint center lane path
|
||||||
// QColor bg_colors[CHANGE_LANE_PATH_COLOR];
|
// QColor bg_colors[CHANGE_LANE_PATH_COLOR];
|
||||||
|
|
||||||
// CLEARPILOT: read from paramsMemory; controlsd writes "no_lat_lane_change".
|
// is_no_lat_lane_change was read at the top of this function.
|
||||||
bool is_no_lat_lane_change = paramsMemory.getBool("no_lat_lane_change");
|
|
||||||
|
|
||||||
QColor center_lane_color;
|
QColor center_lane_color;
|
||||||
|
|
||||||
@@ -955,11 +961,17 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (outlineOnly) {
|
if (outlineOnly) {
|
||||||
// CLEARPILOT: in nightrider, the tire path outline is light blue at 3px.
|
// CLEARPILOT: in nightrider, the tire path is rendered as an outline.
|
||||||
// Uses a fixed light-blue instead of center_lane_color (which is status-tinted) so
|
// - Normal: light blue 3px (status-neutral guide)
|
||||||
// the path reads as a neutral guide, not as engagement/status feedback.
|
// - Lane change: 4px outline of CHANGE_LANE_PATH_COLOR (the same yellow
|
||||||
QColor lightBlue(153, 204, 255, 220); // #99CCFF light blue, mostly opaque
|
// used to fill the polygon in normal mode), so the nightrider lane
|
||||||
painter.setPen(QPen(lightBlue, 3));
|
// change reads as the same visual cue, just hollow.
|
||||||
|
if (is_no_lat_lane_change) {
|
||||||
|
painter.setPen(QPen(bg_colors[CHANGE_LANE_PATH_COLOR], 4));
|
||||||
|
} else {
|
||||||
|
QColor lightBlue(153, 204, 255, 220); // #99CCFF light blue, mostly opaque
|
||||||
|
painter.setPen(QPen(lightBlue, 3));
|
||||||
|
}
|
||||||
painter.setBrush(Qt::NoBrush);
|
painter.setBrush(Qt::NoBrush);
|
||||||
} else {
|
} else {
|
||||||
painter.setPen(Qt::NoPen);
|
painter.setPen(Qt::NoPen);
|
||||||
|
|||||||
Reference in New Issue
Block a user