mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-28 01:52:06 +08:00
Volkswagen: no actuation while pre-enabled
old-commit-hash: 661d47325a17574c88c9e6bf8c76880ac3973f15
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user