Volkswagen: no actuation while pre-enabled

pull/23661/head
Adeeb Shihadeh 3 years ago
parent 72e00a0768
commit 661d47325a
  1. 4
      selfdrive/car/volkswagen/carcontroller.py
  2. 2
      selfdrive/car/volkswagen/interface.py

@ -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

@ -217,7 +217,7 @@ class CarInterface(CarInterfaceBase):
def apply(self, c):
hud_control = c.hudControl
ret = self.CC.update(c.enabled, self.CS, self.frame, self.ext_bus, c.actuators,
ret = self.CC.update(c, c.enabled, self.CS, self.frame, self.ext_bus, c.actuators,
hud_control.visualAlert,
hud_control.leftLaneVisible,
hud_control.rightLaneVisible,

Loading…
Cancel
Save