nightrider mode improvements, nice monitor, ready text 1x
- Nightrider: lines 1px wider (3px outline), engagement border hidden, planner lines hidden when disengaged, stay on onroad view in park - Normal mode only: return to ready splash on park - Ready text sprite at native 1x size - Nice monitor: keeps claude processes at nice 19, runs every 30s Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -177,7 +177,14 @@ void OnroadWindow::offroadTransition(bool offroad) {
|
||||
|
||||
void OnroadWindow::paintEvent(QPaintEvent *event) {
|
||||
QPainter p(this);
|
||||
p.fillRect(rect(), QColor(bg.red(), bg.green(), bg.blue(), 255));
|
||||
// CLEARPILOT: hide engagement border in nightrider mode
|
||||
int dm = paramsMemory.getInt("ScreenDisplayMode");
|
||||
bool nightrider = (dm == 1 || dm == 4);
|
||||
if (nightrider) {
|
||||
p.fillRect(rect(), Qt::black);
|
||||
} else {
|
||||
p.fillRect(rect(), QColor(bg.red(), bg.green(), bg.blue(), 255));
|
||||
}
|
||||
|
||||
QString logicsDisplayString = QString();
|
||||
if (scene.show_jerk) {
|
||||
@@ -596,11 +603,20 @@ 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]) {
|
||||
painter.restore();
|
||||
return;
|
||||
}
|
||||
|
||||
// CLEARPILOT: nightrider lines are 1px wider (3 instead of 2)
|
||||
int outlineWidth = outlineOnly ? 3 : 2;
|
||||
|
||||
// lanelines
|
||||
for (int i = 0; i < std::size(scene.lane_line_vertices); ++i) {
|
||||
QColor lineColor = QColor::fromRgbF(1.0, 1.0, 1.0, std::clamp<float>(scene.lane_line_probs[i], 0.0, 0.7));
|
||||
if (outlineOnly) {
|
||||
painter.setPen(QPen(lineColor, 2));
|
||||
painter.setPen(QPen(lineColor, outlineWidth));
|
||||
painter.setBrush(Qt::NoBrush);
|
||||
} else {
|
||||
painter.setPen(Qt::NoPen);
|
||||
@@ -614,7 +630,7 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
|
||||
for (int i = 0; i < std::size(scene.road_edge_vertices); ++i) {
|
||||
QColor edgeCol = QColor::fromRgbF(1.0, 0, 0, std::clamp<float>(1.0 - scene.road_edge_stds[i], 0.0, 1.0));
|
||||
if (outlineOnly) {
|
||||
painter.setPen(QPen(edgeCol, 2));
|
||||
painter.setPen(QPen(edgeCol, outlineWidth));
|
||||
painter.setBrush(Qt::NoBrush);
|
||||
} else {
|
||||
painter.setPen(Qt::NoPen);
|
||||
@@ -689,7 +705,7 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
|
||||
|
||||
if (outlineOnly) {
|
||||
painter.setPen(QPen(QColor(center_lane_color.red(), center_lane_color.green(),
|
||||
center_lane_color.blue(), 180), 2));
|
||||
center_lane_color.blue(), 180), outlineWidth));
|
||||
painter.setBrush(Qt::NoBrush);
|
||||
} else {
|
||||
painter.setPen(Qt::NoPen);
|
||||
@@ -718,7 +734,7 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
|
||||
if (scene.blind_spot_path) {
|
||||
QColor bsColor = QColor::fromHslF(0 / 360., 0.75, 0.50, 0.6);
|
||||
if (outlineOnly) {
|
||||
painter.setPen(QPen(bsColor, 2));
|
||||
painter.setPen(QPen(bsColor, outlineWidth));
|
||||
painter.setBrush(Qt::NoBrush);
|
||||
} else {
|
||||
QLinearGradient bs(0, height(), 0, 0);
|
||||
|
||||
Reference in New Issue
Block a user