mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-28 14:43:55 +08:00
Kia Sorento: fix dash speed matching (#26582)
* exception for Sorento * comment
This commit is contained in:
@@ -72,8 +72,10 @@ class CarState(CarStateBase):
|
||||
self.cluster_speed = cp.vl["CLU15"]["CF_Clu_VehicleSpeed"]
|
||||
self.cluster_speed_counter = 0
|
||||
|
||||
# mimic how dash converts to imperial
|
||||
if not self.is_metric:
|
||||
# Mimic how dash converts to imperial.
|
||||
# Sorento is the only platform where CF_Clu_VehicleSpeed is already imperial when not is_metric
|
||||
# TODO: CGW_USM1->CF_Gway_DrLockSoundRValue may describe this
|
||||
if not self.is_metric and self.CP.carFingerprint not in (CAR.KIA_SORENTO,):
|
||||
self.cluster_speed = math.floor(self.cluster_speed * CV.KPH_TO_MPH + CV.KPH_TO_MPH)
|
||||
|
||||
ret.vEgoCluster = self.cluster_speed * speed_conv
|
||||
|
||||
Reference in New Issue
Block a user