From 5ce9b5d38cbba4d59935ef8504ec2a8cfb0eb149 Mon Sep 17 00:00:00 2001 From: HaraldSchafer Date: Tue, 21 Jun 2022 00:11:13 -0700 Subject: [PATCH 1/8] Bump laika (#24920) --- laika_repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laika_repo b/laika_repo index 44f048bc1f..824b49327a 160000 --- a/laika_repo +++ b/laika_repo @@ -1 +1 @@ -Subproject commit 44f048bc1f58ae9e28dfdeb98e40aea3e0f2b699 +Subproject commit 824b49327aa2f41eb0dafbe3806e6c4841b19f11 From e45eb1bd28623571079122030392fa0fe03e7a42 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 21 Jun 2022 00:11:55 -0700 Subject: [PATCH 2/8] test_models: check cruiseState.available (#24924) * check available is true if enabled is true * remove extra line --- selfdrive/car/tests/test_models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/selfdrive/car/tests/test_models.py b/selfdrive/car/tests/test_models.py index 27dc4ba776..cb4b868582 100755 --- a/selfdrive/car/tests/test_models.py +++ b/selfdrive/car/tests/test_models.py @@ -221,6 +221,7 @@ class TestCarModelBase(unittest.TestCase): # TODO: check rest of panda's carstate (steering, ACC main on, etc.) checks['gasPressed'] += CS.gasPressed != self.safety.get_gas_pressed_prev() + checks['cruiseState'] += CS.cruiseState.enabled and not CS.cruiseState.available # TODO: remove this exception once this mismatch is resolved brake_pressed = CS.brakePressed From d261ff6d0395f3344e41fbf47b6d9aa149ac642f Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Tue, 21 Jun 2022 11:01:44 +0200 Subject: [PATCH 3/8] bump laika --- laika_repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laika_repo b/laika_repo index 824b49327a..27a0d8a776 160000 --- a/laika_repo +++ b/laika_repo @@ -1 +1 @@ -Subproject commit 824b49327aa2f41eb0dafbe3806e6c4841b19f11 +Subproject commit 27a0d8a776fc8c1eaf8608d17ce81a00136f8bd0 From f7205f3b07d15ff4e9d840a689792d7f5b5be0d8 Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Tue, 21 Jun 2022 11:14:25 +0200 Subject: [PATCH 4/8] ui: metric wider set speed box (#24890) --- selfdrive/ui/qt/onroad.cc | 3 ++- selfdrive/ui/qt/onroad.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/selfdrive/ui/qt/onroad.cc b/selfdrive/ui/qt/onroad.cc index 45bf41ba2d..482f04c032 100644 --- a/selfdrive/ui/qt/onroad.cc +++ b/selfdrive/ui/qt/onroad.cc @@ -196,6 +196,7 @@ void NvgWindow::updateState(const UIState &s) { setProperty("has_eu_speed_limit", nav_alive && speed_limit_sign == cereal::NavInstruction::SpeedLimitSign::VIENNA); setProperty("is_cruise_set", cruise_set); + setProperty("is_metric", s.scene.is_metric); setProperty("speed", cur_speed); setProperty("setSpeed", set_speed); setProperty("speedUnit", s.scene.is_metric ? "km/h" : "mph"); @@ -225,8 +226,8 @@ void NvgWindow::drawHud(QPainter &p) { // Draw outer box + border to contain set speed and speed limit int default_rect_width = 172; int rect_width = default_rect_width; + if (is_metric || has_eu_speed_limit) rect_width = 200; if (has_us_speed_limit && speedLimitStr.size() >= 3) rect_width = 223; - else if (has_eu_speed_limit) rect_width = 200; int rect_height = 204; if (has_us_speed_limit) rect_height = 402; diff --git a/selfdrive/ui/qt/onroad.h b/selfdrive/ui/qt/onroad.h index e58d7a7972..4cd88fc9e3 100644 --- a/selfdrive/ui/qt/onroad.h +++ b/selfdrive/ui/qt/onroad.h @@ -34,6 +34,7 @@ class NvgWindow : public CameraViewWidget { Q_PROPERTY(bool is_cruise_set MEMBER is_cruise_set); Q_PROPERTY(bool has_eu_speed_limit MEMBER has_eu_speed_limit); Q_PROPERTY(bool has_us_speed_limit MEMBER has_us_speed_limit); + Q_PROPERTY(bool is_metric MEMBER is_metric); Q_PROPERTY(bool engageable MEMBER engageable); Q_PROPERTY(bool dmActive MEMBER dmActive); @@ -57,6 +58,7 @@ private: float setSpeed; float speedLimit; bool is_cruise_set = false; + bool is_metric = false; bool engageable = false; bool dmActive = false; bool hideDM = false; From 21dd464fd3b0e23e2277479532c56230fe1e66bd Mon Sep 17 00:00:00 2001 From: sshane Date: Tue, 21 Jun 2022 03:22:38 -0700 Subject: [PATCH 5/8] Revert "VW FPv2: reduce number of ECU queries (#24706)" This reverts commit 6c02e554e7174745c7605f4e8f0e3c1aea637091. --- selfdrive/car/fw_versions.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/selfdrive/car/fw_versions.py b/selfdrive/car/fw_versions.py index 66f0564fca..758485c393 100755 --- a/selfdrive/car/fw_versions.py +++ b/selfdrive/car/fw_versions.py @@ -148,14 +148,12 @@ REQUESTS: List[Request] = [ "volkswagen", [VOLKSWAGEN_VERSION_REQUEST_MULTI], [VOLKSWAGEN_VERSION_RESPONSE], - whitelist_ecus=[Ecu.srs, Ecu.eps, Ecu.fwdRadar], rx_offset=VOLKSWAGEN_RX_OFFSET, ), Request( "volkswagen", [VOLKSWAGEN_VERSION_REQUEST_MULTI], [VOLKSWAGEN_VERSION_RESPONSE], - whitelist_ecus=[Ecu.engine, Ecu.transmission], ), # Mazda Request( From 278f7b9e8a54839989d6a5bd8d37d6aeca789d2a Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Tue, 21 Jun 2022 13:15:26 +0200 Subject: [PATCH 6/8] ui: draw MAX above set speed (#24930) --- selfdrive/ui/qt/onroad.cc | 44 ++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/selfdrive/ui/qt/onroad.cc b/selfdrive/ui/qt/onroad.cc index 482f04c032..d92cf36b89 100644 --- a/selfdrive/ui/qt/onroad.cc +++ b/selfdrive/ui/qt/onroad.cc @@ -241,26 +241,6 @@ void NvgWindow::drawHud(QPainter &p) { p.setBrush(blackColor(166)); drawRoundedRect(p, set_speed_rect, top_radius, top_radius, bottom_radius, bottom_radius); - // Draw set speed - if (is_cruise_set) { - if (speedLimit > 0 && status != STATUS_DISENGAGED && status != STATUS_OVERRIDE) { - p.setPen(interpColor( - setSpeed, - {speedLimit + 5, speedLimit + 15, speedLimit + 25}, - {whiteColor(), QColor(0xff, 0x95, 0x00, 0xff), QColor(0xff, 0x00, 0x00, 0xff)} - )); - } else { - p.setPen(whiteColor()); - } - } else { - p.setPen(QColor(0x72, 0x72, 0x72, 0xff)); - } - configFont(p, "Open Sans", 90, "Bold"); - QRect speed_rect = getTextRect(p, Qt::AlignCenter, setSpeedStr); - speed_rect.moveCenter({set_speed_rect.center().x(), 0}); - speed_rect.moveTop(set_speed_rect.top() + 8); - p.drawText(speed_rect, Qt::AlignCenter, setSpeedStr); - // Draw MAX if (is_cruise_set) { if (status == STATUS_DISENGAGED) { @@ -282,9 +262,31 @@ void NvgWindow::drawHud(QPainter &p) { configFont(p, "Open Sans", 40, "SemiBold"); QRect max_rect = getTextRect(p, Qt::AlignCenter, "MAX"); max_rect.moveCenter({set_speed_rect.center().x(), 0}); - max_rect.moveTop(set_speed_rect.top() + 123); + max_rect.moveTop(set_speed_rect.top() + 23); p.drawText(max_rect, Qt::AlignCenter, "MAX"); + // Draw set speed + if (is_cruise_set) { + if (speedLimit > 0 && status != STATUS_DISENGAGED && status != STATUS_OVERRIDE) { + p.setPen(interpColor( + setSpeed, + {speedLimit + 5, speedLimit + 15, speedLimit + 25}, + {whiteColor(), QColor(0xff, 0x95, 0x00, 0xff), QColor(0xff, 0x00, 0x00, 0xff)} + )); + } else { + p.setPen(whiteColor()); + } + } else { + p.setPen(QColor(0x72, 0x72, 0x72, 0xff)); + } + configFont(p, "Open Sans", 90, "Bold"); + QRect speed_rect = getTextRect(p, Qt::AlignCenter, setSpeedStr); + speed_rect.moveCenter({set_speed_rect.center().x(), 0}); + speed_rect.moveTop(set_speed_rect.top() + 67); + p.drawText(speed_rect, Qt::AlignCenter, setSpeedStr); + + + // US/Canada (MUTCD style) sign if (has_us_speed_limit) { const int border_width = 6; From 67b601e0efb5f33697cadadb50d32debb4325d60 Mon Sep 17 00:00:00 2001 From: Anton Rudomanenko Date: Tue, 21 Jun 2022 16:23:43 +0300 Subject: [PATCH 7/8] replay: handle missing socket while replaying route log with --allow flag (#24933) * fix: fix the problem with replay routes locally * fix: Exception with --allow flag in replay.cc Co-authored-by: Anton Rudomaneko --- selfdrive/ui/replay/replay.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/selfdrive/ui/replay/replay.cc b/selfdrive/ui/replay/replay.cc index 5eb7469c92..cf7520b361 100644 --- a/selfdrive/ui/replay/replay.cc +++ b/selfdrive/ui/replay/replay.cc @@ -360,7 +360,8 @@ void Replay::stream() { setCurrentSegment(toSeconds(cur_mono_time_) / 60); // migration for pandaState -> pandaStates to keep UI working for old segments - if (cur_which == cereal::Event::Which::PANDA_STATE_D_E_P_R_E_C_A_T_E_D) { + if (cur_which == cereal::Event::Which::PANDA_STATE_D_E_P_R_E_C_A_T_E_D && + sockets_[cereal::Event::Which::PANDA_STATES] != nullptr) { MessageBuilder msg; auto ps = msg.initEvent().initPandaStates(1); ps[0].setIgnitionLine(true); From 95d8517a81d23e0c385b5f931e7e89a3d3e52b17 Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Tue, 21 Jun 2022 16:26:40 +0200 Subject: [PATCH 8/8] car_bug_report.yml: fix labels --- .github/ISSUE_TEMPLATE/car_bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/car_bug_report.yml b/.github/ISSUE_TEMPLATE/car_bug_report.yml index 23527c3a43..7f368f11b4 100644 --- a/.github/ISSUE_TEMPLATE/car_bug_report.yml +++ b/.github/ISSUE_TEMPLATE/car_bug_report.yml @@ -1,6 +1,6 @@ name: Car bug report description: For issues with a particular car make or model -labels: ["car bug"] +labels: ["car", "bug"] body: - type: markdown