From 9c7d8a87a88d474aaef52d04bb9ba80424c4ae1c Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 16 Sep 2022 11:10:37 -0700 Subject: [PATCH] fix metric conversion --- selfdrive/car/hyundai/carstate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/car/hyundai/carstate.py b/selfdrive/car/hyundai/carstate.py index 7eb46645e1..687b179ac8 100644 --- a/selfdrive/car/hyundai/carstate.py +++ b/selfdrive/car/hyundai/carstate.py @@ -68,7 +68,7 @@ class CarState(CarStateBase): self.dash_speed_counter = 0 if is_metric: - ret.vEgoCluster = self.dash_speed + ret.vEgoCluster = self.dash_speed * CV.KPH_TO_MS else: # compensate for dash rounding ret.vEgoCluster = math.floor(self.dash_speed * CV.KPH_TO_MPH + CV.KPH_TO_MPH) * CV.MPH_TO_MS