diff --git a/selfdrive/car/data_structures.py b/selfdrive/car/data_structures.py new file mode 100644 index 0000000000..77ec98d055 --- /dev/null +++ b/selfdrive/car/data_structures.py @@ -0,0 +1,34 @@ +from enum import StrEnum, auto + + +class Ecu(StrEnum): + eps = auto() + abs = auto() + fwdRadar = auto() + fwdCamera = auto() + engine = auto() + unknown = auto() + transmission = auto() # Transmission Control Module + hybrid = auto() # hybrid control unit, e.g. Chrysler's HCP, Honda's IMA Control Unit, Toyota's hybrid control computer + srs = auto() # airbag + gateway = auto() # can gateway + hud = auto() # heads up display + combinationMeter = auto() # instrument cluster + electricBrakeBooster = auto() + shiftByWire = auto() + adas = auto() + cornerRadar = auto() + hvac = auto() + parkingAdas = auto() # parking assist system ECU, e.g. Toyota's IPAS, Hyundai's RSPA, etc. + epb = auto() # electronic parking brake + telematics = auto() + body = auto() # body control module + + # Toyota only + dsu = auto() + + # Honda only + vsa = auto() # Vehicle Stability Assist + programmedFuelInjection = auto() + + debug = auto() diff --git a/selfdrive/car/toyota/values.py b/selfdrive/car/toyota/values.py index ca422c73ef..74fbd69939 100644 --- a/selfdrive/car/toyota/values.py +++ b/selfdrive/car/toyota/values.py @@ -3,13 +3,12 @@ from collections import defaultdict from dataclasses import dataclass, field from enum import Enum, IntFlag -from cereal import car from openpilot.selfdrive.car import CarSpecs, PlatformConfig, Platforms, AngleRateLimit, dbc_dict +from openpilot.selfdrive.car.data_structures import Ecu from openpilot.selfdrive.car.conversions import Conversions as CV from openpilot.selfdrive.car.docs_definitions import CarFootnote, CarDocs, Column, CarParts, CarHarness from openpilot.selfdrive.car.fw_query_definitions import FwQueryConfig, Request, StdQueries -Ecu = car.CarParams.Ecu MIN_ACC_SPEED = 19. * CV.MPH_TO_MS PEDAL_TRANSITION = 10. * CV.MPH_TO_MS