selfdrive.car.hyundai package

Subpackages

Submodules

selfdrive.car.hyundai.carcontroller module

class selfdrive.car.hyundai.carcontroller.CarController(dbc_name, CP, VM)[source]

Bases: CarControllerBase

create_button_messages(CC: <capnp.lib.capnp._StructModule object at 0x7f3810d52b50>, CS: <capnp.lib.capnp._StructModule object at 0x7f3810d50590>, use_clu11: bool)[source]
update(CC, CS, now_nanos)[source]
selfdrive.car.hyundai.carcontroller.process_hud_alert(enabled, fingerprint, hud_control)[source]

selfdrive.car.hyundai.carstate module

class selfdrive.car.hyundai.carstate.CarState(CP)[source]

Bases: CarStateBase

static get_cam_can_parser(CP)[source]
static get_cam_can_parser_canfd(CP)[source]
get_can_parser(CP)[source]
get_can_parser_canfd(CP)[source]
update(cp, cp_cam)[source]
update_canfd(cp, cp_cam)[source]

selfdrive.car.hyundai.fingerprints module

selfdrive.car.hyundai.hyundaican module

selfdrive.car.hyundai.hyundaican.create_acc_commands(packer, enabled, accel, upper_jerk, idx, hud_control, set_speed, stopping, long_override, use_fca)[source]
selfdrive.car.hyundai.hyundaican.create_acc_opt(packer)[source]
selfdrive.car.hyundai.hyundaican.create_clu11(packer, frame, clu11, button, CP)[source]
selfdrive.car.hyundai.hyundaican.create_frt_radar_opt(packer)[source]
selfdrive.car.hyundai.hyundaican.create_lfahda_mfc(packer, enabled, hda_set_speed=0)[source]
selfdrive.car.hyundai.hyundaican.create_lkas11(packer, frame, CP, apply_steer, steer_req, torque_fault, lkas11, sys_warning, sys_state, enabled, left_lane, right_lane, left_lane_depart, right_lane_depart)[source]

selfdrive.car.hyundai.hyundaicanfd module

class selfdrive.car.hyundai.hyundaicanfd.CanBus(CP, hda2=None, fingerprint=None)[source]

Bases: CanBusBase

property ACAN
property CAM
property ECAN
selfdrive.car.hyundai.hyundaicanfd.create_acc_cancel(packer, CP, CAN, cruise_info_copy)[source]
selfdrive.car.hyundai.hyundaicanfd.create_acc_control(packer, CAN, enabled, accel_last, accel, stopping, gas_override, set_speed, hud_control)[source]
selfdrive.car.hyundai.hyundaicanfd.create_adrv_messages(packer, CAN, frame)[source]
selfdrive.car.hyundai.hyundaicanfd.create_buttons(packer, CP, CAN, cnt, btn)[source]
selfdrive.car.hyundai.hyundaicanfd.create_lfahda_cluster(packer, CAN, enabled)[source]
selfdrive.car.hyundai.hyundaicanfd.create_spas_messages(packer, CAN, frame, left_blink, right_blink)[source]
selfdrive.car.hyundai.hyundaicanfd.create_steering_messages(packer, CP, CAN, enabled, lat_active, apply_steer)[source]
selfdrive.car.hyundai.hyundaicanfd.create_suppress_lfa(packer, CAN, hda2_lfa_block_msg, hda2_alt_steering)[source]

selfdrive.car.hyundai.interface module

class selfdrive.car.hyundai.interface.CarInterface(CP, CarController, CarState)[source]

Bases: CarInterfaceBase

static init(CP, logcan, sendcan)[source]

selfdrive.car.hyundai.radar_interface module

class selfdrive.car.hyundai.radar_interface.RadarInterface(CP)[source]

Bases: RadarInterfaceBase

update(can_strings)[source]
selfdrive.car.hyundai.radar_interface.get_radar_can_parser(CP)[source]

selfdrive.car.hyundai.values module

class selfdrive.car.hyundai.values.Buttons[source]

Bases: object

CANCEL = 4
GAP_DIST = 3
NONE = 0
RES_ACCEL = 1
SET_DECEL = 2
class selfdrive.car.hyundai.values.CAR(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Platforms

GENESIS_G70 = 'GENESIS_G70'
GENESIS_G70_2020 = 'GENESIS_G70_2020'
GENESIS_G80 = 'GENESIS_G80'
GENESIS_G90 = 'GENESIS_G90'
GENESIS_GV60_EV_1ST_GEN = 'GENESIS_GV60_EV_1ST_GEN'
GENESIS_GV70_1ST_GEN = 'GENESIS_GV70_1ST_GEN'
GENESIS_GV80 = 'GENESIS_GV80'
HYUNDAI_AZERA_6TH_GEN = 'HYUNDAI_AZERA_6TH_GEN'
HYUNDAI_AZERA_HEV_6TH_GEN = 'HYUNDAI_AZERA_HEV_6TH_GEN'
HYUNDAI_CUSTIN_1ST_GEN = 'HYUNDAI_CUSTIN_1ST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HYBRID = 'HYUNDAI_SONATA_HYBRID'
HYUNDAI_SONATA_LF = 'HYUNDAI_SONATA_LF'
HYUNDAI_STARIA_4TH_GEN = 'HYUNDAI_STARIA_4TH_GEN'
HYUNDAI_TUCSON = 'HYUNDAI_TUCSON'
HYUNDAI_TUCSON_4TH_GEN = 'HYUNDAI_TUCSON_4TH_GEN'
HYUNDAI_VELOSTER = 'HYUNDAI_VELOSTER'
KIA_CARNIVAL_4TH_GEN = 'KIA_CARNIVAL_4TH_GEN'
KIA_CEED = 'KIA_CEED'
KIA_EV6 = 'KIA_EV6'
KIA_FORTE = 'KIA_FORTE'
KIA_K5_2021 = 'KIA_K5_2021'
KIA_K5_HEV_2020 = 'KIA_K5_HEV_2020'
KIA_K8_HEV_1ST_GEN = 'KIA_K8_HEV_1ST_GEN'
KIA_NIRO_EV = 'KIA_NIRO_EV'
KIA_NIRO_EV_2ND_GEN = 'KIA_NIRO_EV_2ND_GEN'
KIA_NIRO_HEV_2021 = 'KIA_NIRO_HEV_2021'
KIA_NIRO_HEV_2ND_GEN = 'KIA_NIRO_HEV_2ND_GEN'
KIA_NIRO_PHEV = 'KIA_NIRO_PHEV'
KIA_NIRO_PHEV_2022 = 'KIA_NIRO_PHEV_2022'
KIA_OPTIMA_G4 = 'KIA_OPTIMA_G4'
KIA_OPTIMA_G4_FL = 'KIA_OPTIMA_G4_FL'
KIA_OPTIMA_H = 'KIA_OPTIMA_H'
KIA_OPTIMA_H_G4_FL = 'KIA_OPTIMA_H_G4_FL'
KIA_SELTOS = 'KIA_SELTOS'
KIA_SORENTO = 'KIA_SORENTO'
KIA_SORENTO_4TH_GEN = 'KIA_SORENTO_4TH_GEN'
KIA_SORENTO_HEV_4TH_GEN = 'KIA_SORENTO_HEV_4TH_GEN'
KIA_SPORTAGE_5TH_GEN = 'KIA_SPORTAGE_5TH_GEN'
KIA_STINGER = 'KIA_STINGER'
KIA_STINGER_2022 = 'KIA_STINGER_2022'
config: PlatformConfig
class selfdrive.car.hyundai.values.CarControllerParams(CP)[source]

Bases: object

ACCEL_MAX = 2.0
ACCEL_MIN = -3.5
class selfdrive.car.hyundai.values.Footnote(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

CANFD = ('Requires a <a href="https://comma.ai/shop/can-fd-panda-kit" target="_blank">CAN FD panda kit</a> if not using comma 3X for this <a href="https://en.wikipedia.org/wiki/CAN_FD" target="_blank">CAN FD car</a>.', Column.MODEL, False, False)
class selfdrive.car.hyundai.values.HyundaiCanFDPlatformConfig(car_docs: list[openpilot.selfdrive.car.docs_definitions.CarDocs], specs: openpilot.selfdrive.car.CarSpecs, dbc_dict: dict[str, str] = <factory>, flags: int = 0, platform_str: str | None = None)[source]

Bases: PlatformConfig

dbc_dict: dict[str, str]
init()[source]
class selfdrive.car.hyundai.values.HyundaiCarDocs(name: str, package: str = 'Smart Cruise Control (SCC)', requirements: str | None = None, video_link: str | None = None, footnotes: list[enum.Enum] = <factory>, min_steer_speed: float | None = None, min_enable_speed: float | None = None, auto_resume: bool | None = None, car_parts: openpilot.selfdrive.car.docs_definitions.CarParts = <factory>)[source]

Bases: CarDocs

init_make(CP: <capnp.lib.capnp._StructModule object at 0x7f3810d53d10>)[source]

CarDocs subclasses can add make-specific logic for harness selection, footnotes, etc.

package: str = 'Smart Cruise Control (SCC)'
class selfdrive.car.hyundai.values.HyundaiFlags(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntFlag

ALT_LIMITS = 16
CAMERA_SCC = 32768
CANFD = 8192
CANFD_ALT_BUTTONS = 2
CANFD_ALT_GEARS = 4
CANFD_ALT_GEARS_2 = 64
CANFD_CAMERA_SCC = 8
CANFD_HDA2 = 1
CANFD_HDA2_ALT_STEERING = 512
CANFD_NO_RADAR_DISABLE = 1048576
CHECKSUM_6B = 131072
CHECKSUM_CRC8 = 65536
CLUSTER_GEARS = 2097152
ENABLE_BLINKERS = 32
EV = 2048
HYBRID = 1024
LEGACY = 262144
MANDO_RADAR = 4096
MIN_STEER_32_MPH = 8388608
RADAR_SCC = 16384
SEND_LFA = 128
TCU_GEARS = 4194304
UNSUPPORTED_LONGITUDINAL = 524288
USE_FCA = 256
class selfdrive.car.hyundai.values.HyundaiPlatformConfig(car_docs: list[openpilot.selfdrive.car.docs_definitions.CarDocs], specs: openpilot.selfdrive.car.CarSpecs, dbc_dict: dict[str, str] = <factory>, flags: int = 0, platform_str: str | None = None)[source]

Bases: PlatformConfig

dbc_dict: dict[str, str]
init()[source]
selfdrive.car.hyundai.values.get_platform_codes(fw_versions: list[bytes]) set[tuple[bytes, bytes | None]][source]
selfdrive.car.hyundai.values.match_fw_to_car_fuzzy(live_fw_versions, vin, offline_fw_versions) set[str][source]

Module contents