Compare commits
2 Commits
f6516eb4cc
...
0d1ceddad2
| 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
|
||||
bool outlineOnly = nightriderMode;
|
||||
|
||||
// CLEARPILOT: in nightrider mode, hide all lines when not engaged
|
||||
if (outlineOnly && edgeColor == bg_colors[STATUS_DISENGAGED]) {
|
||||
// CLEARPILOT: read here so the nightrider hide-when-disengaged check below
|
||||
// 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();
|
||||
return;
|
||||
}
|
||||
@@ -893,8 +900,7 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
|
||||
// paint center lane path
|
||||
// QColor bg_colors[CHANGE_LANE_PATH_COLOR];
|
||||
|
||||
// CLEARPILOT: read from paramsMemory; controlsd writes "no_lat_lane_change".
|
||||
bool is_no_lat_lane_change = paramsMemory.getBool("no_lat_lane_change");
|
||||
// is_no_lat_lane_change was read at the top of this function.
|
||||
|
||||
QColor center_lane_color;
|
||||
|
||||
@@ -955,11 +961,17 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
|
||||
}
|
||||
|
||||
if (outlineOnly) {
|
||||
// CLEARPILOT: in nightrider, the tire path outline is light blue at 3px.
|
||||
// Uses a fixed light-blue instead of center_lane_color (which is status-tinted) so
|
||||
// the path reads as a neutral guide, not as engagement/status feedback.
|
||||
// CLEARPILOT: in nightrider, the tire path is rendered as an outline.
|
||||
// - Normal: light blue 3px (status-neutral guide)
|
||||
// - Lane change: 4px outline of CHANGE_LANE_PATH_COLOR (the same yellow
|
||||
// used to fill the polygon in normal mode), so the nightrider lane
|
||||
// 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);
|
||||
} else {
|
||||
painter.setPen(Qt::NoPen);
|
||||
|
||||
Reference in New Issue
Block a user