|
|
@ -17,7 +17,7 @@ from selfdrive.boardd.boardd import can_list_to_can_capnp |
|
|
|
from selfdrive.car.car_helpers import get_car, get_startup_event, get_one_can |
|
|
|
from selfdrive.car.car_helpers import get_car, get_startup_event, get_one_can |
|
|
|
from selfdrive.controls.lib.lateral_planner import CAMERA_OFFSET |
|
|
|
from selfdrive.controls.lib.lateral_planner import CAMERA_OFFSET |
|
|
|
from selfdrive.controls.lib.drive_helpers import VCruiseHelper, get_lag_adjusted_curvature |
|
|
|
from selfdrive.controls.lib.drive_helpers import VCruiseHelper, get_lag_adjusted_curvature |
|
|
|
from selfdrive.controls.lib.latcontrol import LatControl |
|
|
|
from selfdrive.controls.lib.latcontrol import LatControl, MIN_LATERAL_CONTROL_SPEED |
|
|
|
from selfdrive.controls.lib.longcontrol import LongControl |
|
|
|
from selfdrive.controls.lib.longcontrol import LongControl |
|
|
|
from selfdrive.controls.lib.latcontrol_pid import LatControlPID |
|
|
|
from selfdrive.controls.lib.latcontrol_pid import LatControlPID |
|
|
|
from selfdrive.controls.lib.latcontrol_indi import LatControlINDI |
|
|
|
from selfdrive.controls.lib.latcontrol_indi import LatControlINDI |
|
|
@ -569,9 +569,11 @@ class Controls: |
|
|
|
|
|
|
|
|
|
|
|
CC = car.CarControl.new_message() |
|
|
|
CC = car.CarControl.new_message() |
|
|
|
CC.enabled = self.enabled |
|
|
|
CC.enabled = self.enabled |
|
|
|
|
|
|
|
|
|
|
|
# Check which actuators can be enabled |
|
|
|
# Check which actuators can be enabled |
|
|
|
|
|
|
|
standstill = CS.vEgo <= max(self.CP.minSteerSpeed, MIN_LATERAL_CONTROL_SPEED) or CS.standstill |
|
|
|
CC.latActive = self.active and not CS.steerFaultTemporary and not CS.steerFaultPermanent and \ |
|
|
|
CC.latActive = self.active and not CS.steerFaultTemporary and not CS.steerFaultPermanent and \ |
|
|
|
CS.vEgo > self.CP.minSteerSpeed and not CS.standstill |
|
|
|
(not standstill or self.joystick_mode) |
|
|
|
CC.longActive = self.enabled and not self.events.any(ET.OVERRIDE_LONGITUDINAL) and self.CP.openpilotLongitudinalControl |
|
|
|
CC.longActive = self.enabled and not self.events.any(ET.OVERRIDE_LONGITUDINAL) and self.CP.openpilotLongitudinalControl |
|
|
|
|
|
|
|
|
|
|
|
actuators = CC.actuators |
|
|
|
actuators = CC.actuators |
|
|
|