Nissan: cleanup set speed (#25233)

* Nissan: cleanup set speed

* update ref
old-commit-hash: f0d494b7522bb1aa398ff1665a1a878bcd03b315
This commit is contained in:
Willem Melching
2022-07-22 16:25:06 +02:00
committed by GitHub
parent 862e3a8300
commit 46b28bc680
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -74,8 +74,8 @@ class CarState(CarStateBase):
conversion = CV.MPH_TO_MS if cp.vl["HUD_SETTINGS"]["SPEED_MPH"] else CV.KPH_TO_MS
else:
conversion = CV.MPH_TO_MS if cp.vl["HUD"]["SPEED_MPH"] else CV.KPH_TO_MS
speed -= 1 # Speed on HUD is always 1 lower than actually sent on can bus
ret.cruiseState.speed = speed * conversion
ret.cruiseState.speedCluster = (speed - 1) * conversion # Speed on HUD is always 1 lower than actually sent on can bus
if self.CP.carFingerprint == CAR.ALTIMA:
ret.steeringTorque = cp_cam.vl["STEER_TORQUE_SENSOR"]["STEER_TORQUE_DRIVER"]
+1 -1
View File
@@ -1 +1 @@
658b1097663a8deea2c4d77c4c00a514739980bb
2bfa96aad8b951988cf9d0dd95d3c9d9019a1c0e