|
|
|
@ -21,7 +21,7 @@ class CarController(): |
|
|
|
|
|
|
|
|
|
self.steer_rate_limited = False |
|
|
|
|
|
|
|
|
|
def update(self, enabled, CS, frame, ext_bus, actuators, visual_alert, left_lane_visible, right_lane_visible, left_lane_depart, right_lane_depart): |
|
|
|
|
def update(self, c, enabled, CS, frame, ext_bus, actuators, visual_alert, left_lane_visible, right_lane_visible, left_lane_depart, right_lane_depart): |
|
|
|
|
""" Controls thread """ |
|
|
|
|
|
|
|
|
|
can_sends = [] |
|
|
|
@ -39,7 +39,7 @@ class CarController(): |
|
|
|
|
# torque value. Do that anytime we happen to have 0 torque, or failing that, |
|
|
|
|
# when exceeding ~1/3 the 360 second timer. |
|
|
|
|
|
|
|
|
|
if enabled and CS.out.vEgo > CS.CP.minSteerSpeed and not (CS.out.standstill or CS.out.steerError or CS.out.steerWarning): |
|
|
|
|
if c.active and CS.out.vEgo > CS.CP.minSteerSpeed and not (CS.out.standstill or CS.out.steerError or CS.out.steerWarning): |
|
|
|
|
new_steer = int(round(actuators.steer * P.STEER_MAX)) |
|
|
|
|
apply_steer = apply_std_steer_torque_limits(new_steer, self.apply_steer_last, CS.out.steeringTorque, P) |
|
|
|
|
self.steer_rate_limited = new_steer != apply_steer |
|
|
|
|