selfdrive.car.subaru package

Submodules

selfdrive.car.subaru.carcontroller module

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

Bases: CarControllerBase

update(CC, CS, now_nanos)[source]

selfdrive.car.subaru.carstate module

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

Bases: CarStateBase

static get_body_can_parser(CP)[source]
static get_cam_can_parser(CP)[source]
static get_can_parser(CP)[source]
static get_common_global_body_messages(CP)[source]
static get_common_global_es_messages(CP)[source]
static get_common_preglobal_body_messages()[source]
update(cp, cp_cam, cp_body)[source]

selfdrive.car.subaru.fingerprints module

selfdrive.car.subaru.interface module

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

Bases: CarInterfaceBase

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

selfdrive.car.subaru.radar_interface module

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

Bases: RadarInterfaceBase

selfdrive.car.subaru.subarucan module

selfdrive.car.subaru.subarucan.create_es_brake(packer, frame, es_brake_msg, long_enabled, long_active, brake_value)[source]
selfdrive.car.subaru.subarucan.create_es_dashstatus(packer, frame, dashstatus_msg, enabled, long_enabled, long_active, lead_visible)[source]
selfdrive.car.subaru.subarucan.create_es_distance(packer, frame, es_distance_msg, bus, pcm_cancel_cmd, long_enabled=False, brake_cmd=False, cruise_throttle=0)[source]
selfdrive.car.subaru.subarucan.create_es_highbeamassist(packer)[source]
selfdrive.car.subaru.subarucan.create_es_infotainment(packer, frame, es_infotainment_msg, visual_alert)[source]
selfdrive.car.subaru.subarucan.create_es_lkas_state(packer, frame, es_lkas_state_msg, enabled, visual_alert, left_line, right_line, left_lane_depart, right_lane_depart)[source]
selfdrive.car.subaru.subarucan.create_es_static_1(packer)[source]
selfdrive.car.subaru.subarucan.create_es_static_2(packer)[source]
selfdrive.car.subaru.subarucan.create_es_status(packer, frame, es_status_msg, long_enabled, long_active, cruise_rpm)[source]
selfdrive.car.subaru.subarucan.create_preglobal_es_distance(packer, cruise_button, es_distance_msg)[source]
selfdrive.car.subaru.subarucan.create_preglobal_steering_control(packer, frame, apply_steer, steer_req)[source]
selfdrive.car.subaru.subarucan.create_steering_control(packer, apply_steer, steer_req)[source]
selfdrive.car.subaru.subarucan.create_steering_control_angle(packer, apply_steer, steer_req)[source]
selfdrive.car.subaru.subarucan.create_steering_status(packer)[source]
selfdrive.car.subaru.subarucan.subaru_preglobal_checksum(packer, values, addr, checksum_byte=7)[source]

selfdrive.car.subaru.values module

class selfdrive.car.subaru.values.CAR(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Platforms

SUBARU_ASCENT = 'SUBARU_ASCENT'
SUBARU_ASCENT_2023 = 'SUBARU_ASCENT_2023'
SUBARU_CROSSTREK_HYBRID = 'SUBARU_CROSSTREK_HYBRID'
SUBARU_FORESTER = 'SUBARU_FORESTER'
SUBARU_FORESTER_2022 = 'SUBARU_FORESTER_2022'
SUBARU_FORESTER_HYBRID = 'SUBARU_FORESTER_HYBRID'
SUBARU_FORESTER_PREGLOBAL = 'SUBARU_FORESTER_PREGLOBAL'
SUBARU_IMPREZA = 'SUBARU_IMPREZA'
SUBARU_IMPREZA_2020 = 'SUBARU_IMPREZA_2020'
SUBARU_LEGACY = 'SUBARU_LEGACY'
SUBARU_LEGACY_PREGLOBAL = 'SUBARU_LEGACY_PREGLOBAL'
SUBARU_OUTBACK = 'SUBARU_OUTBACK'
SUBARU_OUTBACK_2023 = 'SUBARU_OUTBACK_2023'
SUBARU_OUTBACK_PREGLOBAL = 'SUBARU_OUTBACK_PREGLOBAL'
SUBARU_OUTBACK_PREGLOBAL_2018 = 'SUBARU_OUTBACK_PREGLOBAL_2018'
config: PlatformConfig
class selfdrive.car.subaru.values.CanBus[source]

Bases: object

alt = 1
camera = 2
main = 0
class selfdrive.car.subaru.values.CarControllerParams(CP)[source]

Bases: object

BRAKE_LOOKUP_BP = [-3.5, 0]
BRAKE_LOOKUP_V = [600, 0]
BRAKE_MAX = 600
BRAKE_MIN = 0
RPM_INACTIVE = 600
RPM_LOOKUP_BP = [0, 2]
RPM_LOOKUP_V = [600, 3600]
RPM_MAX = 3600
RPM_MIN = 0
THROTTLE_ENGINE_BRAKE = 808
THROTTLE_INACTIVE = 1818
THROTTLE_LOOKUP_BP = [0, 2]
THROTTLE_LOOKUP_V = [1818, 3400]
THROTTLE_MAX = 3400
THROTTLE_MIN = 808
class selfdrive.car.subaru.values.Footnote(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

EXP_LONG = ('Enabling longitudinal control (alpha) will disable all EyeSight functionality, including AEB, LDW, and RAB.', Column.LONGITUDINAL, False, False)
GLOBAL = ('In the non-US market, openpilot requires the car to come equipped with EyeSight with Lane Keep Assistance.', Column.PACKAGE, False, False)
class selfdrive.car.subaru.values.SubaruCarDocs(name: str, package: str = 'EyeSight Driver Assistance', 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

car_parts: CarParts
footnotes: list[Enum]
init_make(CP: <capnp.lib.capnp._StructModule object at 0x7f9f6d668290>)[source]

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

package: str = 'EyeSight Driver Assistance'
class selfdrive.car.subaru.values.SubaruFlags(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntFlag

DISABLE_EYESIGHT = 2
GLOBAL_GEN2 = 4
HYBRID = 32
LKAS_ANGLE = 64
PREGLOBAL = 16
SEND_INFOTAINMENT = 1
STEER_RATE_LIMITED = 8
class selfdrive.car.subaru.values.SubaruGen2PlatformConfig(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: SubaruPlatformConfig

init()[source]
class selfdrive.car.subaru.values.SubaruPlatformConfig(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]

Module contents