mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-19 11:13:53 +08:00
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>
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user