Skip to content

Commit

Permalink
fix steering error for toyota pedal users
Browse files Browse the repository at this point in the history
  • Loading branch information
sshane committed Apr 24, 2019
1 parent fa0e3a1 commit 6a9a623
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion selfdrive/car/toyota/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,10 @@ def update(self, cp, cp_cam):

# 2 is standby, 10 is active. TODO: check that everything else is really a faulty state
self.steer_state = cp.vl["EPS_STATUS"]['LKA_STATE']
self.steer_error = cp.vl["EPS_STATUS"]['LKA_STATE'] not in [1, 5, 9, 17, 25]
if self.CP.enableGasInterceptor:
self.steer_error = cp.vl["EPS_STATUS"]['LKA_STATE'] not in [1, 3, 5, 9, 17, 25]
else:
self.steer_error = cp.vl["EPS_STATUS"]['LKA_STATE'] not in [1, 5, 9, 17, 25]
self.ipas_active = cp.vl['EPS_STATUS']['IPAS_STATE'] == 3
self.brake_error = 0
self.steer_torque_driver = cp.vl["STEER_TORQUE_SENSOR"]['STEER_TORQUE_DRIVER']
Expand Down

0 comments on commit 6a9a623

Please sign in to comment.