From f0d494b7522bb1aa398ff1665a1a878bcd03b315 Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Fri, 22 Jul 2022 16:25:06 +0200 Subject: [PATCH] Nissan: cleanup set speed (#25233) * Nissan: cleanup set speed * update ref --- selfdrive/car/nissan/carstate.py | 2 +- selfdrive/test/process_replay/ref_commit | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/car/nissan/carstate.py b/selfdrive/car/nissan/carstate.py index 3c5d7dc24b..a5ca237110 100644 --- a/selfdrive/car/nissan/carstate.py +++ b/selfdrive/car/nissan/carstate.py @@ -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"] diff --git a/selfdrive/test/process_replay/ref_commit b/selfdrive/test/process_replay/ref_commit index 41d683602a..b144852714 100644 --- a/selfdrive/test/process_replay/ref_commit +++ b/selfdrive/test/process_replay/ref_commit @@ -1 +1 @@ -658b1097663a8deea2c4d77c4c00a514739980bb \ No newline at end of file +2bfa96aad8b951988cf9d0dd95d3c9d9019a1c0e \ No newline at end of file