From f56042fcb9656e111c90be4d42ba579e4c7eb435 Mon Sep 17 00:00:00 2001 From: concordia Date: Thu, 2 May 2024 21:22:23 -0500 Subject: [PATCH] wip --- clearpilot_notes.txt | 1 + selfdrive/frogpilot/ui/qt/offroad/visual_settings.cc | 2 +- selfdrive/manager/manager.py | 2 +- selfdrive/ui/qt/onroad.cc | 8 ++++---- selfdrive/ui/ui.cc | 5 +++-- selfdrive/ui/ui.h | 5 +++-- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/clearpilot_notes.txt b/clearpilot_notes.txt index 1b83652..e213b9a 100644 --- a/clearpilot_notes.txt +++ b/clearpilot_notes.txt @@ -2,6 +2,7 @@ Create a debug console. Its should log events like what buttons are pressed, when OP starts, the fact NNFF is loaded, etc. example of using stdin and stdout as a message buffer: +CHANGE PathEdgeWidth to 10 in defaults selfdrive/manager/build.py diff --git a/selfdrive/frogpilot/ui/qt/offroad/visual_settings.cc b/selfdrive/frogpilot/ui/qt/offroad/visual_settings.cc index 7012c10..dbb0100 100644 --- a/selfdrive/frogpilot/ui/qt/offroad/visual_settings.cc +++ b/selfdrive/frogpilot/ui/qt/offroad/visual_settings.cc @@ -41,7 +41,7 @@ FrogPilotVisualsPanel::FrogPilotVisualsPanel(SettingsWindow *parent) : FrogPilot {"ModelUI", tr("Model UI"), tr("Customize the model visualizations on the screen."), "../assets/offroad/icon_calibration.png"}, {"DynamicPathWidth", tr("Dynamic Path Width"), tr("Have the path width dynamically adjust based on the current engagement state of openpilot."), ""}, {"HideLeadMarker", tr("Hide Lead Marker"), tr("Hide the lead marker from the onroad UI."), ""}, - {"LaneLinesWidth", tr("Lane Lines"), tr("Adjust the visual thickness of lane lines on your display.\n\nDefault matches the MUTCD average of 4 inches."), ""}, + // {"LaneLinesWidth", tr("Lane Lines"), tr("Adjust the visual thickness of lane lines on your display.\n\nDefault matches the MUTCD average of 4 inches."), ""}, {"PathEdgeWidth", tr("Path Edges"), tr("Adjust the width of the path edges shown on your UI to represent different driving modes and statuses.\n\nDefault is 20% of the total path.\n\nBlue = Navigation\nLight Blue = 'Always On Lateral'\nGreen = Default\nOrange = 'Experimental Mode'\nRed = 'Traffic Mode'\nYellow = 'Conditional Experimental Mode' Overriden"), ""}, {"PathWidth", tr("Path Width"), tr("Customize the width of the driving path shown on your UI.\n\nDefault matches the width of a 2019 Lexus ES 350."), ""}, {"RoadEdgesWidth", tr("Road Edges"), tr("Adjust the visual thickness of road edges on your display.\n\nDefault is 1/2 of the MUTCD average lane line width of 4 inches."), ""}, diff --git a/selfdrive/manager/manager.py b/selfdrive/manager/manager.py index b9974ad..1cf58f7 100755 --- a/selfdrive/manager/manager.py +++ b/selfdrive/manager/manager.py @@ -169,7 +169,7 @@ def manager_init(frogpilot_functions) -> None: ("IncreaseThermalLimits", "0"), ("LaneChangeTime", "0"), ("LaneDetectionWidth", "60"), - ("LaneLinesWidth", "4"), + ("LaneLinesWidth", "2"), ("LateralTune", "1"), ("LeadDepartingAlert", "0"), ("LeadDetectionThreshold", "35"), diff --git a/selfdrive/ui/qt/onroad.cc b/selfdrive/ui/qt/onroad.cc index ec06cbd..cc5a7cc 100644 --- a/selfdrive/ui/qt/onroad.cc +++ b/selfdrive/ui/qt/onroad.cc @@ -825,10 +825,10 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) { // CLEARPILOT: color channel code rewriten to allow custom colors // Define base RGB color and alpha - int base_red = 200; // Dark red component - int base_green = 0; // Minimal green component - int base_blue = 0; // Minimal blue component - float base_alpha = 0.75; // 60% opacity + int base_red = 150; // Dark red component + int base_green = 150; // Minimal green component + int base_blue = 150; // Minimal blue component + float base_alpha = 0.4; // 60% opacity QColor baseColor(base_red, base_green, base_blue); diff --git a/selfdrive/ui/ui.cc b/selfdrive/ui/ui.cc index 1b447ca..91f2d53 100644 --- a/selfdrive/ui/ui.cc +++ b/selfdrive/ui/ui.cc @@ -358,8 +358,9 @@ void ui_update_frogpilot_params(UIState *s) { scene.model_ui = params.getBool("ModelUI"); scene.dynamic_path_width = scene.model_ui && params.getBool("DynamicPathWidth"); scene.hide_lead_marker = scene.model_ui && params.getBool("HideLeadMarker"); - scene.lane_line_width = params.getInt("LaneLinesWidth") * (scene.is_metric ? 1.0f : INCH_TO_CM) / 200.0f; - scene.path_edge_width = params.getInt("PathEdgeWidth"); + // CLEARPILOT + scene.lane_line_width = /* params.getInt("LaneLinesWidth") */ 2 * (scene.is_metric ? 1.0f : INCH_TO_CM) / 200.0f; + scene.path_edge_width = /* params.getInt("PathEdgeWidth"); */ 15; scene.path_width = params.getInt("PathWidth") / 10.0f * (scene.is_metric ? 1.0f : FOOT_TO_METER) / 2.0f; scene.road_edge_width = params.getInt("RoadEdgesWidth") * (scene.is_metric ? 1.0f : INCH_TO_CM) / 200.0f; scene.unlimited_road_ui_length = scene.model_ui && params.getBool("UnlimitedLength"); diff --git a/selfdrive/ui/ui.h b/selfdrive/ui/ui.h index 4b3a88d..4420787 100644 --- a/selfdrive/ui/ui.h +++ b/selfdrive/ui/ui.h @@ -130,8 +130,9 @@ typedef enum UIStatus { // Clearpilot custom colors const QColor bg_colors [] = { [STATUS_DISENGAGED] = QColor(0x17, 0x33, 0x49, 0xc8), - [STATUS_OVERRIDE] = QColor(218, 112, 36, 0xd1), // When you nudge the steering wheel while engaged - [STATUS_ENGAGED] = QColor(218, 112, 36, 0xd1), // Orange + [STATUS_OVERRIDE] = QColor(217, 214, 137, 0xd1), // When you nudge the steering wheel while engaged + // [STATUS_ENGAGED] = QColor(218, 112, 36, 0xd1), // Orange + [STATUS_ENGAGED] = QColor(217, 214, 137, 0xd1), // Orange [STATUS_ALWAYS_ON_LATERAL_ACTIVE] = QColor(158, 126, 111, 0xd1), // Gray [STATUS_TRAFFIC_MODE_ACTIVE] = QColor(0xc9, 0x22, 0x31, 0xd1), // ? unused? [STATUS_EXPERIMENTAL_ACTIVE] = QColor(126, 32, 128, 0xd1), // Magenta