From 334ede288c345ea04993748eb7af50a0a871c5b8 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Wed, 19 Oct 2022 20:40:52 -0700 Subject: [PATCH] GM: make loopback updated check more explicit This previously checked if parser_pyx filled the defaultdict, now it checks the values in the list (same either way) old-commit-hash: 301a7ce1899a3212900dc6cfb08de6840d276a05 --- selfdrive/car/gm/carstate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/car/gm/carstate.py b/selfdrive/car/gm/carstate.py index f531914877..b651606b79 100644 --- a/selfdrive/car/gm/carstate.py +++ b/selfdrive/car/gm/carstate.py @@ -28,7 +28,7 @@ class CarState(CarStateBase): self.buttons_counter = pt_cp.vl["ASCMSteeringButton"]["RollingCounter"] # Variables used for avoiding LKAS faults - self.loopback_lka_steering_cmd_updated = len(loopback_cp.vl_all["ASCMLKASteeringCmd"]) > 0 + self.loopback_lka_steering_cmd_updated = len(loopback_cp.vl_all["ASCMLKASteeringCmd"]["RollingCounter"]) > 0 if self.CP.networkLocation == NetworkLocation.fwdCamera: self.camera_lka_steering_cmd_counter = cam_cp.vl["ASCMLKASteeringCmd"]["RollingCounter"]