mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-06 08:56:02 +08:00
Hyundai: Longitudinal support for Camera SCC cars (CAN for now)
This commit is contained in:
+1
-1
Submodule panda updated: 62868c36a8...c22894274b
@@ -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
|
||||
|
||||
@@ -296,7 +296,7 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.longitudinalTuning.kiV = [0.0]
|
||||
ret.longitudinalActuatorDelayLowerBound = 0.5
|
||||
ret.longitudinalActuatorDelayUpperBound = 0.5
|
||||
ret.experimentalLongitudinalAvailable = candidate not in (LEGACY_SAFETY_MODE_CAR | CAMERA_SCC_CAR)
|
||||
ret.experimentalLongitudinalAvailable = candidate not in LEGACY_SAFETY_MODE_CAR
|
||||
ret.openpilotLongitudinalControl = experimental_long and ret.experimentalLongitudinalAvailable
|
||||
ret.pcmCruise = not ret.openpilotLongitudinalControl
|
||||
|
||||
@@ -347,7 +347,7 @@ class CarInterface(CarInterfaceBase):
|
||||
|
||||
@staticmethod
|
||||
def init(CP, logcan, sendcan):
|
||||
if CP.openpilotLongitudinalControl:
|
||||
if CP.openpilotLongitudinalControl and CP.carFingerprint not in CAMERA_SCC_CAR:
|
||||
addr, bus = 0x7d0, 0
|
||||
if CP.flags & HyundaiFlags.CANFD_HDA2.value:
|
||||
addr, bus = 0x730, 5
|
||||
|
||||
Reference in New Issue
Block a user