From 3683360f869cf29f89a5949391cb7eb9e8bf63d7 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Wed, 6 Apr 2022 22:03:40 -0700 Subject: [PATCH] controlsd: fix long press set speed increment (#24161) old-commit-hash: 1ea66ee244f604b8da898c584e849c0d568235ee --- selfdrive/controls/lib/drive_helpers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/selfdrive/controls/lib/drive_helpers.py b/selfdrive/controls/lib/drive_helpers.py index 7e01582db7..ca5c1d3329 100644 --- a/selfdrive/controls/lib/drive_helpers.py +++ b/selfdrive/controls/lib/drive_helpers.py @@ -49,7 +49,8 @@ def update_v_cruise(v_cruise_kph, buttonEvents, button_timers, enabled, metric): long_press = False button_type = None - v_cruise_delta = 1. if metric else CV.MPH_TO_KPH + # should be CV.MPH_TO_KPH, but this causes rounding errors + v_cruise_delta = 1. if metric else 1.6 for b in buttonEvents: if b.type.raw in button_timers and not b.pressed: