controlsd: Fix Toyota steer angle sensor race condition (#23747)

* fix steer angle race condition

* update ref

Co-authored-by: Willem Melching <willem.melching@gmail.com>
pull/23760/head
Vivek Aithal 3 years ago committed by GitHub
parent f03549c276
commit 3e915cf628
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      selfdrive/car/toyota/carstate.py
  2. 2
      selfdrive/test/process_replay/ref_commit

@ -64,7 +64,7 @@ class CarState(CarStateBase):
if self.accurate_steer_angle_seen:
# Offset seems to be invalid for large steering angles
if abs(ret.steeringAngleDeg) < 90:
if abs(ret.steeringAngleDeg) < 90 and cp.can_valid:
self.angle_offset.update(torque_sensor_angle_deg - ret.steeringAngleDeg)
if self.angle_offset.initialized:

@ -1 +1 @@
3bc128c5b47e036021ccfaab9a9924d61eeb59e2
0c4da879ace9c1517c2324b35da7ff05a4744dd9
Loading…
Cancel
Save