From 3cf8f095a81a428dd267f42fdadfc22af4489266 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 3 May 2024 22:42:45 -0500 Subject: [PATCH] wip --- selfdrive/car/hyundai/carstate.py | 8 ++++---- selfdrive/ui/qt/onroad.cc | 2 +- selfdrive/ui/ui.cc | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/selfdrive/car/hyundai/carstate.py b/selfdrive/car/hyundai/carstate.py index 4d6e2a8..213242b 100644 --- a/selfdrive/car/hyundai/carstate.py +++ b/selfdrive/car/hyundai/carstate.py @@ -187,9 +187,6 @@ class CarState(CarStateBase): self.lkas_previously_enabled = self.lkas_enabled self.lkas_enabled = cp.vl["BCM_PO_11"]["LFA_Pressed"] - print('Hello World', file=sys.stderr) - print(self, file=sys.stderr) - self.params_memory.put_float("CarSpeedLimit", self.calculate_speed_limit(cp, cp_cam) * speed_conv) return ret @@ -285,10 +282,13 @@ class CarState(CarStateBase): # CLEARPILOT fix lkas_enabled = False try: - lkas_enabled = cp.vl[self.cruise_btns_msg_canfd]["LKAS_BTN"] + lkas_enabled = cp.vl[self.cruise_btns_msg_canfd]["LFA_BTN"] except: nothing = 0 + print('Hello World', file=sys.stderr) + print(self, file=sys.stderr) + self.lkas_enabled = lkas_enabled self.params_memory.put_float("CarSpeedLimit", self.calculate_speed_limit(cp, cp_cam) * speed_factor) diff --git a/selfdrive/ui/qt/onroad.cc b/selfdrive/ui/qt/onroad.cc index 0117c84..7f14dd3 100644 --- a/selfdrive/ui/qt/onroad.cc +++ b/selfdrive/ui/qt/onroad.cc @@ -46,7 +46,7 @@ static void drawIconGif(QPainter &p, const QPoint ¢er, const QMovie &img, co } OnroadWindow::OnroadWindow(QWidget *parent) : QWidget(parent), scene(uiState()->scene) { - bg = QColor(0x17, 0x33, 0x49, 0xc8); // init to a default color + bg = QColor(255, 0x33, 0x49, 0xc8); // init to a default color QVBoxLayout *main_layout = new QVBoxLayout(this); main_layout->setMargin(UI_BORDER_SIZE); QStackedLayout *stacked_layout = new QStackedLayout; diff --git a/selfdrive/ui/ui.cc b/selfdrive/ui/ui.cc index abcdfe5..efaaf51 100644 --- a/selfdrive/ui/ui.cc +++ b/selfdrive/ui/ui.cc @@ -360,7 +360,8 @@ void ui_update_frogpilot_params(UIState *s) { 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; // CLEARPILOT - either disable these options, or set them as defaults and restore them - scene.path_edge_width = /* params.getInt("PathEdgeWidth"); */ OTHER_LANE_WIDTH; + scene.path_edge_width = params.getInt("PathEdgeWidth"); + // scene.path_edge_width = /* params.getInt("PathEdgeWidth"); */ OTHER_LANE_WIDTH; scene.path_width = /* params.getInt("PathWidth") */ CENTER_LANE_WIDTH / 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");