From a8edd0a1e0ba8c4b1bfe42e0d5236ebf0a7a32cd Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Wed, 2 Nov 2022 16:17:02 -0700 Subject: [PATCH] log signed speed --- selfdrive/car/gm/carstate.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/selfdrive/car/gm/carstate.py b/selfdrive/car/gm/carstate.py index 7cb2274674..9fb756f2c9 100644 --- a/selfdrive/car/gm/carstate.py +++ b/selfdrive/car/gm/carstate.py @@ -39,6 +39,7 @@ class CarState(CarStateBase): pt_cp.vl["EBCMWheelSpdFront"]["FRWheelSpd"], pt_cp.vl["EBCMWheelSpdRear"]["RLWheelSpd"], pt_cp.vl["EBCMWheelSpdRear"]["RRWheelSpd"], + unit=CV.KPH_TO_MS * (-1 if pt_cp.vl["MovingBackward"]["RLWheelSpd"] else 1), ) ret.vEgoRaw = mean([ret.wheelSpeeds.fl, ret.wheelSpeeds.fr, ret.wheelSpeeds.rl, ret.wheelSpeeds.rr]) ret.vEgo, ret.aEgo = self.update_speed_kf(ret.vEgoRaw) @@ -139,6 +140,7 @@ class CarState(CarStateBase): ("FRWheelSpd", "EBCMWheelSpdFront"), ("RLWheelSpd", "EBCMWheelSpdRear"), ("RRWheelSpd", "EBCMWheelSpdRear"), + ("MovingBackward", "EBCMWheelSpdRear"), ("PRNDL2", "ECMPRDNL2"), ("ManualMode", "ECMPRDNL2"), ("LKADriverAppldTrq", "PSCMStatus"),