|
|
|
@ -1,15 +1,15 @@ |
|
|
|
|
from cereal import car |
|
|
|
|
from opendbc.can.packer import CANPacker |
|
|
|
|
from openpilot.selfdrive.car import DT_CTRL, apply_driver_steer_torque_limits, common_fault_avoidance, make_tester_present_msg |
|
|
|
|
from openpilot.selfdrive.car import DT_CTRL, apply_driver_steer_torque_limits, common_fault_avoidance, make_tester_present_msg, structs |
|
|
|
|
from openpilot.selfdrive.car.conversions import Conversions as CV |
|
|
|
|
from openpilot.selfdrive.car.helpers import clip |
|
|
|
|
from openpilot.selfdrive.car.hyundai import hyundaicanfd, hyundaican |
|
|
|
|
from openpilot.selfdrive.car.hyundai.carstate import CarState |
|
|
|
|
from openpilot.selfdrive.car.hyundai.hyundaicanfd import CanBus |
|
|
|
|
from openpilot.selfdrive.car.hyundai.values import HyundaiFlags, Buttons, CarControllerParams, CANFD_CAR, CAR |
|
|
|
|
from openpilot.selfdrive.car.interfaces import CarControllerBase |
|
|
|
|
|
|
|
|
|
VisualAlert = car.CarControl.HUDControl.VisualAlert |
|
|
|
|
LongCtrlState = car.CarControl.Actuators.LongControlState |
|
|
|
|
VisualAlert = structs.CarControl.HUDControl.VisualAlert |
|
|
|
|
LongCtrlState = structs.CarControl.Actuators.LongControlState |
|
|
|
|
|
|
|
|
|
# EPS faults if you apply torque while the steering angle is above 90 degrees for more than 1 second |
|
|
|
|
# All slightly below EPS thresholds to avoid fault |
|
|
|
@ -169,7 +169,7 @@ class CarController(CarControllerBase): |
|
|
|
|
self.frame += 1 |
|
|
|
|
return new_actuators, can_sends |
|
|
|
|
|
|
|
|
|
def create_button_messages(self, CC: car.CarControl, CS: car.CarState, use_clu11: bool): |
|
|
|
|
def create_button_messages(self, CC: structs.CarControl, CS: CarState, use_clu11: bool): |
|
|
|
|
can_sends = [] |
|
|
|
|
if use_clu11: |
|
|
|
|
if CC.cruiseControl.cancel: |
|
|
|
|