@ -5,7 +5,7 @@ from common.realtime import DT_CTRL
from opendbc . can . packer import CANPacker
from selfdrive . car import apply_std_steer_torque_limits
from selfdrive . car . hyundai import hyundaicanfd , hyundaican
from selfdrive . car . hyundai . values import HyundaiFlags , Buttons , CarControllerParams , CANFD_CAR , CAR
from selfdrive . car . hyundai . values import HyundaiFlags , Buttons , CarControllerParams , CANFD_CAR , CAR , CAMERA_SCC_CAR
VisualAlert = car . CarControl . HUDControl . VisualAlert
LongCtrlState = car . CarControl . Actuators . LongControlState
@ -84,7 +84,7 @@ class CarController:
# *** common hyundai stuff ***
# tester present - w/ no response (keeps relevant ECU disabled)
if self . frame % 100 == 0 and self . CP . openpilotLongitudinalControl :
if self . frame % 100 == 0 and self . CP . openpilotLongitudinalControl and self . CP . carFingerprint not in CAMERA_SCC_CAR :
addr , bus = 0x7d0 , 0
if self . CP . flags & HyundaiFlags . CANFD_HDA2 . value :
addr , bus = 0x730 , 5
@ -107,6 +107,7 @@ class CarController:
can_sends . append ( hyundaicanfd . create_lfahda_cluster ( self . packer , self . CP , CC . enabled ) )
if self . CP . openpilotLongitudinalControl :
if self . CP . flags & HyundaiFlags . CANFD_HDA2 . value :
can_sends . extend ( hyundaicanfd . create_adrv_messages ( self . packer , self . frame ) )
if self . frame % 2 == 0 :
can_sends . append ( hyundaicanfd . create_acc_control ( self . packer , self . CP , CC . enabled , accel , stopping , CC . cruiseControl . override ,