This commit is contained in:
concordia
2024-05-02 21:22:23 -05:00
parent dc561e3c2d
commit f56042fcb9
6 changed files with 13 additions and 10 deletions

View File

@@ -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."), ""},

View File

@@ -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"),

View File

@@ -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);

View File

@@ -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");

View File

@@ -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