From 562d1098bcae4ee79bc1350413dd548ac97a769a Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 16 Aug 2024 16:49:41 -0700 Subject: [PATCH] rename selfdrive.car imports to opendbc.car --- opendbc/car/__init__.py | 8 +++--- opendbc/car/body/carcontroller.py | 10 +++---- opendbc/car/body/carstate.py | 6 ++--- opendbc/car/body/fingerprints.py | 4 +-- opendbc/car/body/interface.py | 6 ++--- opendbc/car/body/radar_interface.py | 2 +- opendbc/car/body/values.py | 8 +++--- opendbc/car/car_helpers.py | 18 ++++++------- opendbc/car/chrysler/carcontroller.py | 8 +++--- opendbc/car/chrysler/carstate.py | 8 +++--- opendbc/car/chrysler/chryslercan.py | 4 +-- opendbc/car/chrysler/fingerprints.py | 4 +-- opendbc/car/chrysler/interface.py | 6 ++--- opendbc/car/chrysler/radar_interface.py | 6 ++--- opendbc/car/chrysler/values.py | 8 +++--- opendbc/car/disable_ecu.py | 4 +-- opendbc/car/docs.py | 10 +++---- opendbc/car/docs_definitions.py | 4 +-- opendbc/car/ecu_addrs.py | 6 ++--- opendbc/car/fingerprints.py | 26 +++++++++---------- opendbc/car/ford/carcontroller.py | 10 +++---- opendbc/car/ford/carstate.py | 10 +++---- opendbc/car/ford/fingerprints.py | 4 +-- opendbc/car/ford/fordcan.py | 2 +- opendbc/car/ford/interface.py | 10 +++---- opendbc/car/ford/radar_interface.py | 10 +++---- .../car/ford/tests/print_platform_codes.py | 6 ++--- opendbc/car/ford/tests/test_ford.py | 8 +++--- opendbc/car/ford/values.py | 8 +++--- opendbc/car/fw_query_definitions.py | 2 +- opendbc/car/fw_versions.py | 16 ++++++------ opendbc/car/gm/carcontroller.py | 12 ++++----- opendbc/car/gm/carstate.py | 10 +++---- opendbc/car/gm/fingerprints.py | 2 +- opendbc/car/gm/gmcan.py | 4 +-- opendbc/car/gm/interface.py | 12 ++++----- opendbc/car/gm/radar_interface.py | 8 +++--- opendbc/car/gm/tests/test_gm.py | 4 +-- opendbc/car/gm/values.py | 8 +++--- opendbc/car/honda/carcontroller.py | 10 +++---- opendbc/car/honda/carstate.py | 12 ++++----- opendbc/car/honda/fingerprints.py | 4 +-- opendbc/car/honda/hondacan.py | 6 ++--- opendbc/car/honda/interface.py | 14 +++++----- opendbc/car/honda/radar_interface.py | 6 ++--- opendbc/car/honda/tests/test_honda.py | 2 +- opendbc/car/honda/values.py | 8 +++--- opendbc/car/hyundai/carcontroller.py | 16 ++++++------ opendbc/car/hyundai/carstate.py | 10 +++---- opendbc/car/hyundai/fingerprints.py | 4 +-- opendbc/car/hyundai/hyundaican.py | 2 +- opendbc/car/hyundai/hyundaicanfd.py | 6 ++--- opendbc/car/hyundai/interface.py | 12 ++++----- opendbc/car/hyundai/radar_interface.py | 6 ++--- .../car/hyundai/tests/print_platform_codes.py | 6 ++--- opendbc/car/hyundai/tests/test_hyundai.py | 14 +++++----- opendbc/car/hyundai/values.py | 10 +++---- opendbc/car/interfaces.py | 18 ++++++------- opendbc/car/isotp_parallel_query.py | 6 ++--- opendbc/car/mazda/carcontroller.py | 8 +++--- opendbc/car/mazda/carstate.py | 8 +++--- opendbc/car/mazda/fingerprints.py | 4 +-- opendbc/car/mazda/interface.py | 8 +++--- opendbc/car/mazda/mazdacan.py | 2 +- opendbc/car/mazda/radar_interface.py | 2 +- opendbc/car/mazda/values.py | 10 +++---- opendbc/car/mock/carcontroller.py | 2 +- opendbc/car/mock/carstate.py | 4 +-- opendbc/car/mock/interface.py | 4 +-- opendbc/car/mock/radar_interface.py | 2 +- opendbc/car/mock/values.py | 2 +- opendbc/car/nissan/carcontroller.py | 8 +++--- opendbc/car/nissan/carstate.py | 8 +++--- opendbc/car/nissan/fingerprints.py | 4 +-- opendbc/car/nissan/interface.py | 6 ++--- opendbc/car/nissan/nissancan.py | 2 +- opendbc/car/nissan/radar_interface.py | 2 +- opendbc/car/nissan/values.py | 8 +++--- opendbc/car/subaru/carcontroller.py | 10 +++---- opendbc/car/subaru/carstate.py | 10 +++---- opendbc/car/subaru/fingerprints.py | 4 +-- opendbc/car/subaru/interface.py | 8 +++--- opendbc/car/subaru/radar_interface.py | 2 +- opendbc/car/subaru/subarucan.py | 4 +-- opendbc/car/subaru/tests/test_subaru.py | 2 +- opendbc/car/subaru/values.py | 8 +++--- opendbc/car/tests/__init__.py | 0 opendbc/car/toyota/carcontroller.py | 12 ++++----- opendbc/car/toyota/carstate.py | 12 ++++----- opendbc/car/toyota/fingerprints.py | 4 +-- opendbc/car/toyota/interface.py | 8 +++--- opendbc/car/toyota/radar_interface.py | 6 ++--- .../car/toyota/tests/print_platform_codes.py | 4 +-- opendbc/car/toyota/tests/test_toyota.py | 8 +++--- opendbc/car/toyota/toyotacan.py | 2 +- opendbc/car/toyota/values.py | 10 +++---- opendbc/car/values.py | 24 ++++++++--------- opendbc/car/vin.py | 6 ++--- opendbc/car/volkswagen/carcontroller.py | 12 ++++----- opendbc/car/volkswagen/carstate.py | 8 +++--- opendbc/car/volkswagen/fingerprints.py | 4 +-- opendbc/car/volkswagen/interface.py | 6 ++--- opendbc/car/volkswagen/radar_interface.py | 2 +- .../car/volkswagen/tests/test_volkswagen.py | 6 ++--- opendbc/car/volkswagen/values.py | 10 +++---- 105 files changed, 380 insertions(+), 380 deletions(-) create mode 100644 opendbc/car/tests/__init__.py diff --git a/opendbc/car/__init__.py b/opendbc/car/__init__.py index e6a195d7c9..7809dce5da 100644 --- a/opendbc/car/__init__.py +++ b/opendbc/car/__init__.py @@ -6,10 +6,10 @@ from dataclasses import replace from panda.python.uds import SERVICE_TYPE -from openpilot.selfdrive.car import structs -from openpilot.selfdrive.car.can_definitions import CanData -from openpilot.selfdrive.car.docs_definitions import CarDocs -from openpilot.selfdrive.car.common.numpy_fast import clip, interp +from opendbc.car import structs +from opendbc.car.can_definitions import CanData +from opendbc.car.docs_definitions import CarDocs +from opendbc.car.common.numpy_fast import clip, interp # set up logging carlog = logging.getLogger('carlog') diff --git a/opendbc/car/body/carcontroller.py b/opendbc/car/body/carcontroller.py index 9411473968..a311304ed0 100644 --- a/opendbc/car/body/carcontroller.py +++ b/opendbc/car/body/carcontroller.py @@ -3,11 +3,11 @@ from numbers import Number from opendbc.can.packer import CANPacker -from openpilot.selfdrive.car import DT_CTRL -from openpilot.selfdrive.car.common.numpy_fast import clip, interp -from openpilot.selfdrive.car.body import bodycan -from openpilot.selfdrive.car.body.values import SPEED_FROM_RPM -from openpilot.selfdrive.car.interfaces import CarControllerBase +from opendbc.car import DT_CTRL +from opendbc.car.common.numpy_fast import clip, interp +from opendbc.car.body import bodycan +from opendbc.car.body.values import SPEED_FROM_RPM +from opendbc.car.interfaces import CarControllerBase class PIController: diff --git a/opendbc/car/body/carstate.py b/opendbc/car/body/carstate.py index 7ce0ef1920..68cfb2072f 100644 --- a/opendbc/car/body/carstate.py +++ b/opendbc/car/body/carstate.py @@ -1,7 +1,7 @@ from opendbc.can.parser import CANParser -from openpilot.selfdrive.car import structs -from openpilot.selfdrive.car.interfaces import CarStateBase -from openpilot.selfdrive.car.body.values import DBC +from opendbc.car import structs +from opendbc.car.interfaces import CarStateBase +from opendbc.car.body.values import DBC class CarState(CarStateBase): diff --git a/opendbc/car/body/fingerprints.py b/opendbc/car/body/fingerprints.py index 9c4b29d827..3f5665029b 100644 --- a/opendbc/car/body/fingerprints.py +++ b/opendbc/car/body/fingerprints.py @@ -1,6 +1,6 @@ # ruff: noqa: E501 -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.body.values import CAR +from opendbc.car.structs import CarParams +from opendbc.car.body.values import CAR Ecu = CarParams.Ecu diff --git a/opendbc/car/body/interface.py b/opendbc/car/body/interface.py index 9d3e1ccab6..f720c4a7d6 100644 --- a/opendbc/car/body/interface.py +++ b/opendbc/car/body/interface.py @@ -1,7 +1,7 @@ import math -from openpilot.selfdrive.car import get_safety_config, structs -from openpilot.selfdrive.car.interfaces import CarInterfaceBase -from openpilot.selfdrive.car.body.values import SPEED_FROM_RPM +from opendbc.car import get_safety_config, structs +from opendbc.car.interfaces import CarInterfaceBase +from opendbc.car.body.values import SPEED_FROM_RPM class CarInterface(CarInterfaceBase): diff --git a/opendbc/car/body/radar_interface.py b/opendbc/car/body/radar_interface.py index e654bd61fd..6e552bf618 100644 --- a/opendbc/car/body/radar_interface.py +++ b/opendbc/car/body/radar_interface.py @@ -1,4 +1,4 @@ -from openpilot.selfdrive.car.interfaces import RadarInterfaceBase +from opendbc.car.interfaces import RadarInterfaceBase class RadarInterface(RadarInterfaceBase): pass diff --git a/opendbc/car/body/values.py b/opendbc/car/body/values.py index 73d65a9f67..3c221548c3 100644 --- a/opendbc/car/body/values.py +++ b/opendbc/car/body/values.py @@ -1,7 +1,7 @@ -from openpilot.selfdrive.car import CarSpecs, PlatformConfig, Platforms, dbc_dict -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.docs_definitions import CarDocs -from openpilot.selfdrive.car.fw_query_definitions import FwQueryConfig, Request, StdQueries +from opendbc.car import CarSpecs, PlatformConfig, Platforms, dbc_dict +from opendbc.car.structs import CarParams +from opendbc.car.docs_definitions import CarDocs +from opendbc.car.fw_query_definitions import FwQueryConfig, Request, StdQueries Ecu = CarParams.Ecu diff --git a/opendbc/car/car_helpers.py b/opendbc/car/car_helpers.py index 0981689b31..72f4f04ad3 100644 --- a/opendbc/car/car_helpers.py +++ b/opendbc/car/car_helpers.py @@ -1,14 +1,14 @@ import os import time -from openpilot.selfdrive.car import carlog, gen_empty_fingerprint -from openpilot.selfdrive.car.can_definitions import CanRecvCallable, CanSendCallable -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.fingerprints import eliminate_incompatible_cars, all_legacy_fingerprint_cars -from openpilot.selfdrive.car.fw_versions import ObdCallback, get_fw_versions_ordered, get_present_ecus, match_fw_to_car -from openpilot.selfdrive.car.interfaces import get_interface_attr -from openpilot.selfdrive.car.mock.values import CAR as MOCK -from openpilot.selfdrive.car.vin import get_vin, is_valid_vin, VIN_UNKNOWN +from opendbc.car import carlog, gen_empty_fingerprint +from opendbc.car.can_definitions import CanRecvCallable, CanSendCallable +from opendbc.car.structs import CarParams +from opendbc.car.fingerprints import eliminate_incompatible_cars, all_legacy_fingerprint_cars +from opendbc.car.fw_versions import ObdCallback, get_fw_versions_ordered, get_present_ecus, match_fw_to_car +from opendbc.car.interfaces import get_interface_attr +from opendbc.car.mock.values import CAR as MOCK +from opendbc.car.vin import get_vin, is_valid_vin, VIN_UNKNOWN FRAME_FINGERPRINT = 100 # 1s @@ -16,7 +16,7 @@ def load_interfaces(brand_names): ret = {} for brand_name in brand_names: - path = f'openpilot.selfdrive.car.{brand_name}' + path = f'opendbc.car.{brand_name}' CarInterface = __import__(path + '.interface', fromlist=['CarInterface']).CarInterface CarState = __import__(path + '.carstate', fromlist=['CarState']).CarState CarController = __import__(path + '.carcontroller', fromlist=['CarController']).CarController diff --git a/opendbc/car/chrysler/carcontroller.py b/opendbc/car/chrysler/carcontroller.py index b9b1a9f4cb..4bc35d3397 100644 --- a/opendbc/car/chrysler/carcontroller.py +++ b/opendbc/car/chrysler/carcontroller.py @@ -1,9 +1,9 @@ import copy from opendbc.can.packer import CANPacker -from openpilot.selfdrive.car import DT_CTRL, apply_meas_steer_torque_limits -from openpilot.selfdrive.car.chrysler import chryslercan -from openpilot.selfdrive.car.chrysler.values import RAM_CARS, CarControllerParams, ChryslerFlags -from openpilot.selfdrive.car.interfaces import CarControllerBase +from opendbc.car import DT_CTRL, apply_meas_steer_torque_limits +from opendbc.car.chrysler import chryslercan +from opendbc.car.chrysler.values import RAM_CARS, CarControllerParams, ChryslerFlags +from opendbc.car.interfaces import CarControllerBase class CarController(CarControllerBase): diff --git a/opendbc/car/chrysler/carstate.py b/opendbc/car/chrysler/carstate.py index 6d76ddd8ec..ab37008204 100644 --- a/opendbc/car/chrysler/carstate.py +++ b/opendbc/car/chrysler/carstate.py @@ -1,9 +1,9 @@ from opendbc.can.parser import CANParser from opendbc.can.can_define import CANDefine -from openpilot.selfdrive.car import create_button_events, structs -from openpilot.selfdrive.car.chrysler.values import DBC, STEER_THRESHOLD, RAM_CARS -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.interfaces import CarStateBase +from opendbc.car import create_button_events, structs +from opendbc.car.chrysler.values import DBC, STEER_THRESHOLD, RAM_CARS +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.interfaces import CarStateBase ButtonType = structs.CarState.ButtonEvent.Type diff --git a/opendbc/car/chrysler/chryslercan.py b/opendbc/car/chrysler/chryslercan.py index 9fefeef8fb..8a0755ac5d 100644 --- a/opendbc/car/chrysler/chryslercan.py +++ b/opendbc/car/chrysler/chryslercan.py @@ -1,5 +1,5 @@ -from openpilot.selfdrive.car import structs -from openpilot.selfdrive.car.chrysler.values import RAM_CARS +from opendbc.car import structs +from opendbc.car.chrysler.values import RAM_CARS GearShifter = structs.CarState.GearShifter VisualAlert = structs.CarControl.HUDControl.VisualAlert diff --git a/opendbc/car/chrysler/fingerprints.py b/opendbc/car/chrysler/fingerprints.py index aac12c1149..072eafb1d0 100644 --- a/opendbc/car/chrysler/fingerprints.py +++ b/opendbc/car/chrysler/fingerprints.py @@ -1,5 +1,5 @@ -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.chrysler.values import CAR +from opendbc.car.structs import CarParams +from opendbc.car.chrysler.values import CAR Ecu = CarParams.Ecu diff --git a/opendbc/car/chrysler/interface.py b/opendbc/car/chrysler/interface.py index 9092e92313..a5c7f5bd2c 100755 --- a/opendbc/car/chrysler/interface.py +++ b/opendbc/car/chrysler/interface.py @@ -1,8 +1,8 @@ #!/usr/bin/env python3 from panda import Panda -from openpilot.selfdrive.car import get_safety_config, structs -from openpilot.selfdrive.car.chrysler.values import CAR, RAM_HD, RAM_DT, RAM_CARS, ChryslerFlags -from openpilot.selfdrive.car.interfaces import CarInterfaceBase +from opendbc.car import get_safety_config, structs +from opendbc.car.chrysler.values import CAR, RAM_HD, RAM_DT, RAM_CARS, ChryslerFlags +from opendbc.car.interfaces import CarInterfaceBase class CarInterface(CarInterfaceBase): diff --git a/opendbc/car/chrysler/radar_interface.py b/opendbc/car/chrysler/radar_interface.py index c386274c5c..3528373f8d 100755 --- a/opendbc/car/chrysler/radar_interface.py +++ b/opendbc/car/chrysler/radar_interface.py @@ -1,8 +1,8 @@ #!/usr/bin/env python3 from opendbc.can.parser import CANParser -from openpilot.selfdrive.car import structs -from openpilot.selfdrive.car.interfaces import RadarInterfaceBase -from openpilot.selfdrive.car.chrysler.values import DBC +from opendbc.car import structs +from opendbc.car.interfaces import RadarInterfaceBase +from opendbc.car.chrysler.values import DBC RADAR_MSGS_C = list(range(0x2c2, 0x2d4+2, 2)) # c_ messages 706,...,724 RADAR_MSGS_D = list(range(0x2a2, 0x2b4+2, 2)) # d_ messages diff --git a/opendbc/car/chrysler/values.py b/opendbc/car/chrysler/values.py index e568c8af1d..abe14279cc 100644 --- a/opendbc/car/chrysler/values.py +++ b/opendbc/car/chrysler/values.py @@ -2,10 +2,10 @@ from dataclasses import dataclass, field from panda.python import uds -from openpilot.selfdrive.car import CarSpecs, DbcDict, PlatformConfig, Platforms, dbc_dict -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.docs_definitions import CarHarness, CarDocs, CarParts -from openpilot.selfdrive.car.fw_query_definitions import FwQueryConfig, Request, p16 +from opendbc.car import CarSpecs, DbcDict, PlatformConfig, Platforms, dbc_dict +from opendbc.car.structs import CarParams +from opendbc.car.docs_definitions import CarHarness, CarDocs, CarParts +from opendbc.car.fw_query_definitions import FwQueryConfig, Request, p16 Ecu = CarParams.Ecu diff --git a/opendbc/car/disable_ecu.py b/opendbc/car/disable_ecu.py index ad5f492383..1e3f412449 100644 --- a/opendbc/car/disable_ecu.py +++ b/opendbc/car/disable_ecu.py @@ -1,5 +1,5 @@ -from openpilot.selfdrive.car import carlog -from openpilot.selfdrive.car.isotp_parallel_query import IsoTpParallelQuery +from opendbc.car import carlog +from opendbc.car.isotp_parallel_query import IsoTpParallelQuery EXT_DIAG_REQUEST = b'\x10\x03' EXT_DIAG_RESPONSE = b'\x50\x03' diff --git a/opendbc/car/docs.py b/opendbc/car/docs.py index a9e9c7ee83..b44c873c3c 100644 --- a/opendbc/car/docs.py +++ b/opendbc/car/docs.py @@ -3,11 +3,11 @@ from enum import Enum from natsort import natsorted -from openpilot.selfdrive.car import gen_empty_fingerprint -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.docs_definitions import CarDocs, Column, CommonFootnote, PartType -from openpilot.selfdrive.car.car_helpers import interfaces, get_interface_attr -from openpilot.selfdrive.car.values import PLATFORMS +from opendbc.car import gen_empty_fingerprint +from opendbc.car.structs import CarParams +from opendbc.car.docs_definitions import CarDocs, Column, CommonFootnote, PartType +from opendbc.car.car_helpers import interfaces, get_interface_attr +from opendbc.car.values import PLATFORMS def get_all_footnotes() -> dict[Enum, int]: diff --git a/opendbc/car/docs_definitions.py b/opendbc/car/docs_definitions.py index cf047445bb..db022f9143 100644 --- a/opendbc/car/docs_definitions.py +++ b/opendbc/car/docs_definitions.py @@ -4,8 +4,8 @@ from dataclasses import dataclass, field from enum import Enum -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.structs import CarParams +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.structs import CarParams GOOD_TORQUE_THRESHOLD = 1.0 # m/s^2 MODEL_YEARS_RE = r"(?<= )((\d{4}-\d{2})|(\d{4}))(,|$)" diff --git a/opendbc/car/ecu_addrs.py b/opendbc/car/ecu_addrs.py index 6eba864c46..1334a6e864 100644 --- a/opendbc/car/ecu_addrs.py +++ b/opendbc/car/ecu_addrs.py @@ -1,9 +1,9 @@ import time from panda.python.uds import SERVICE_TYPE -from openpilot.selfdrive.car import make_tester_present_msg, carlog -from openpilot.selfdrive.car.can_definitions import CanData, CanRecvCallable, CanSendCallable -from openpilot.selfdrive.car.fw_query_definitions import EcuAddrBusType +from opendbc.car import make_tester_present_msg, carlog +from opendbc.car.can_definitions import CanData, CanRecvCallable, CanSendCallable +from opendbc.car.fw_query_definitions import EcuAddrBusType def _is_tester_present_response(msg: CanData, subaddr: int = None) -> bool: diff --git a/opendbc/car/fingerprints.py b/opendbc/car/fingerprints.py index 460bb5c90d..1670ac6342 100644 --- a/opendbc/car/fingerprints.py +++ b/opendbc/car/fingerprints.py @@ -1,16 +1,16 @@ -from openpilot.selfdrive.car.interfaces import get_interface_attr -from openpilot.selfdrive.car.body.values import CAR as BODY -from openpilot.selfdrive.car.chrysler.values import CAR as CHRYSLER -from openpilot.selfdrive.car.ford.values import CAR as FORD -from openpilot.selfdrive.car.gm.values import CAR as GM -from openpilot.selfdrive.car.honda.values import CAR as HONDA -from openpilot.selfdrive.car.hyundai.values import CAR as HYUNDAI -from openpilot.selfdrive.car.mazda.values import CAR as MAZDA -from openpilot.selfdrive.car.mock.values import CAR as MOCK -from openpilot.selfdrive.car.nissan.values import CAR as NISSAN -from openpilot.selfdrive.car.subaru.values import CAR as SUBARU -from openpilot.selfdrive.car.toyota.values import CAR as TOYOTA -from openpilot.selfdrive.car.volkswagen.values import CAR as VW +from opendbc.car.interfaces import get_interface_attr +from opendbc.car.body.values import CAR as BODY +from opendbc.car.chrysler.values import CAR as CHRYSLER +from opendbc.car.ford.values import CAR as FORD +from opendbc.car.gm.values import CAR as GM +from opendbc.car.honda.values import CAR as HONDA +from opendbc.car.hyundai.values import CAR as HYUNDAI +from opendbc.car.mazda.values import CAR as MAZDA +from opendbc.car.mock.values import CAR as MOCK +from opendbc.car.nissan.values import CAR as NISSAN +from opendbc.car.subaru.values import CAR as SUBARU +from opendbc.car.toyota.values import CAR as TOYOTA +from opendbc.car.volkswagen.values import CAR as VW FW_VERSIONS = get_interface_attr('FW_VERSIONS', combine_brands=True, ignore_none=True) _FINGERPRINTS = get_interface_attr('FINGERPRINTS', combine_brands=True, ignore_none=True) diff --git a/opendbc/car/ford/carcontroller.py b/opendbc/car/ford/carcontroller.py index e4e7bc5040..2556d44ad6 100644 --- a/opendbc/car/ford/carcontroller.py +++ b/opendbc/car/ford/carcontroller.py @@ -1,10 +1,10 @@ import copy from opendbc.can.packer import CANPacker -from openpilot.selfdrive.car import apply_std_steer_angle_limits, structs -from openpilot.selfdrive.car.ford import fordcan -from openpilot.selfdrive.car.ford.values import CarControllerParams, FordFlags -from openpilot.selfdrive.car.common.numpy_fast import clip -from openpilot.selfdrive.car.interfaces import CarControllerBase, V_CRUISE_MAX +from opendbc.car import apply_std_steer_angle_limits, structs +from opendbc.car.ford import fordcan +from opendbc.car.ford.values import CarControllerParams, FordFlags +from opendbc.car.common.numpy_fast import clip +from opendbc.car.interfaces import CarControllerBase, V_CRUISE_MAX LongCtrlState = structs.CarControl.Actuators.LongControlState VisualAlert = structs.CarControl.HUDControl.VisualAlert diff --git a/opendbc/car/ford/carstate.py b/opendbc/car/ford/carstate.py index 4e06b65617..8b631e8dee 100644 --- a/opendbc/car/ford/carstate.py +++ b/opendbc/car/ford/carstate.py @@ -1,10 +1,10 @@ from opendbc.can.can_define import CANDefine from opendbc.can.parser import CANParser -from openpilot.selfdrive.car import create_button_events, structs -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.ford.fordcan import CanBus -from openpilot.selfdrive.car.ford.values import DBC, CarControllerParams, FordFlags -from openpilot.selfdrive.car.interfaces import CarStateBase +from opendbc.car import create_button_events, structs +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.ford.fordcan import CanBus +from opendbc.car.ford.values import DBC, CarControllerParams, FordFlags +from opendbc.car.interfaces import CarStateBase ButtonType = structs.CarState.ButtonEvent.Type GearShifter = structs.CarState.GearShifter diff --git a/opendbc/car/ford/fingerprints.py b/opendbc/car/ford/fingerprints.py index a9e4ed9a5e..c14c836669 100644 --- a/opendbc/car/ford/fingerprints.py +++ b/opendbc/car/ford/fingerprints.py @@ -1,5 +1,5 @@ -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.ford.values import CAR +from opendbc.car.structs import CarParams +from opendbc.car.ford.values import CAR Ecu = CarParams.Ecu diff --git a/opendbc/car/ford/fordcan.py b/opendbc/car/ford/fordcan.py index b2cbe945c3..61263099c7 100644 --- a/opendbc/car/ford/fordcan.py +++ b/opendbc/car/ford/fordcan.py @@ -1,4 +1,4 @@ -from openpilot.selfdrive.car import CanBusBase, structs +from opendbc.car import CanBusBase, structs HUDControl = structs.CarControl.HUDControl diff --git a/opendbc/car/ford/interface.py b/opendbc/car/ford/interface.py index 8f644b65a8..fbd027a2dc 100644 --- a/opendbc/car/ford/interface.py +++ b/opendbc/car/ford/interface.py @@ -1,9 +1,9 @@ from panda import Panda -from openpilot.selfdrive.car import get_safety_config, structs -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.ford.fordcan import CanBus -from openpilot.selfdrive.car.ford.values import Ecu, FordFlags -from openpilot.selfdrive.car.interfaces import CarInterfaceBase +from opendbc.car import get_safety_config, structs +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.ford.fordcan import CanBus +from opendbc.car.ford.values import Ecu, FordFlags +from opendbc.car.interfaces import CarInterfaceBase TransmissionType = structs.CarParams.TransmissionType diff --git a/opendbc/car/ford/radar_interface.py b/opendbc/car/ford/radar_interface.py index 55cd2bd8d3..efe3bef7d5 100644 --- a/opendbc/car/ford/radar_interface.py +++ b/opendbc/car/ford/radar_interface.py @@ -1,10 +1,10 @@ from math import cos, sin from opendbc.can.parser import CANParser -from openpilot.selfdrive.car import structs -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.ford.fordcan import CanBus -from openpilot.selfdrive.car.ford.values import DBC, RADAR -from openpilot.selfdrive.car.interfaces import RadarInterfaceBase +from opendbc.car import structs +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.ford.fordcan import CanBus +from opendbc.car.ford.values import DBC, RADAR +from opendbc.car.interfaces import RadarInterfaceBase DELPHI_ESR_RADAR_MSGS = list(range(0x500, 0x540)) diff --git a/opendbc/car/ford/tests/print_platform_codes.py b/opendbc/car/ford/tests/print_platform_codes.py index 1384985779..dfb93c06fd 100755 --- a/opendbc/car/ford/tests/print_platform_codes.py +++ b/opendbc/car/ford/tests/print_platform_codes.py @@ -1,9 +1,9 @@ #!/usr/bin/env python3 from collections import defaultdict -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.ford.values import get_platform_codes -from openpilot.selfdrive.car.ford.fingerprints import FW_VERSIONS +from opendbc.car.structs import CarParams +from opendbc.car.ford.values import get_platform_codes +from opendbc.car.ford.fingerprints import FW_VERSIONS Ecu = CarParams.Ecu diff --git a/opendbc/car/ford/tests/test_ford.py b/opendbc/car/ford/tests/test_ford.py index 4d3a9a53bc..149fa4956f 100644 --- a/opendbc/car/ford/tests/test_ford.py +++ b/opendbc/car/ford/tests/test_ford.py @@ -4,10 +4,10 @@ from hypothesis import settings, given, strategies as st from parameterized import parameterized -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.fw_versions import build_fw_dict -from openpilot.selfdrive.car.ford.values import CAR, FW_QUERY_CONFIG, FW_PATTERN, get_platform_codes -from openpilot.selfdrive.car.ford.fingerprints import FW_VERSIONS +from opendbc.car.structs import CarParams +from opendbc.car.fw_versions import build_fw_dict +from opendbc.car.ford.values import CAR, FW_QUERY_CONFIG, FW_PATTERN, get_platform_codes +from opendbc.car.ford.fingerprints import FW_VERSIONS Ecu = CarParams.Ecu diff --git a/opendbc/car/ford/values.py b/opendbc/car/ford/values.py index 5b415a44ec..a899e95de2 100644 --- a/opendbc/car/ford/values.py +++ b/opendbc/car/ford/values.py @@ -4,11 +4,11 @@ from enum import Enum, IntFlag import panda.python.uds as uds -from openpilot.selfdrive.car import AngleRateLimit, CarSpecs, dbc_dict, DbcDict, PlatformConfig, Platforms -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.docs_definitions import CarFootnote, CarHarness, CarDocs, CarParts, Column, \ +from opendbc.car import AngleRateLimit, CarSpecs, dbc_dict, DbcDict, PlatformConfig, Platforms +from opendbc.car.structs import CarParams +from opendbc.car.docs_definitions import CarFootnote, CarHarness, CarDocs, CarParts, Column, \ Device -from openpilot.selfdrive.car.fw_query_definitions import FwQueryConfig, LiveFwVersions, OfflineFwVersions, Request, StdQueries, p16 +from opendbc.car.fw_query_definitions import FwQueryConfig, LiveFwVersions, OfflineFwVersions, Request, StdQueries, p16 Ecu = CarParams.Ecu diff --git a/opendbc/car/fw_query_definitions.py b/opendbc/car/fw_query_definitions.py index a39cd889ab..a8f26d0874 100644 --- a/opendbc/car/fw_query_definitions.py +++ b/opendbc/car/fw_query_definitions.py @@ -5,7 +5,7 @@ import panda.python.uds as uds -from openpilot.selfdrive.car.structs import CarParams +from opendbc.car.structs import CarParams AddrType = tuple[int, int | None] EcuAddrBusType = tuple[int, int | None, int] diff --git a/opendbc/car/fw_versions.py b/opendbc/car/fw_versions.py index 71278505c6..e991d25c47 100644 --- a/opendbc/car/fw_versions.py +++ b/opendbc/car/fw_versions.py @@ -5,14 +5,14 @@ from tqdm import tqdm import panda.python.uds as uds -from openpilot.selfdrive.car import carlog -from openpilot.selfdrive.car.can_definitions import CanRecvCallable, CanSendCallable -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.ecu_addrs import get_ecu_addrs -from openpilot.selfdrive.car.fingerprints import FW_VERSIONS -from openpilot.selfdrive.car.fw_query_definitions import AddrType, EcuAddrBusType, FwQueryConfig, LiveFwVersions, OfflineFwVersions -from openpilot.selfdrive.car.interfaces import get_interface_attr -from openpilot.selfdrive.car.isotp_parallel_query import IsoTpParallelQuery +from opendbc.car import carlog +from opendbc.car.can_definitions import CanRecvCallable, CanSendCallable +from opendbc.car.structs import CarParams +from opendbc.car.ecu_addrs import get_ecu_addrs +from opendbc.car.fingerprints import FW_VERSIONS +from opendbc.car.fw_query_definitions import AddrType, EcuAddrBusType, FwQueryConfig, LiveFwVersions, OfflineFwVersions +from opendbc.car.interfaces import get_interface_attr +from opendbc.car.isotp_parallel_query import IsoTpParallelQuery Ecu = CarParams.Ecu ESSENTIAL_ECUS = [Ecu.engine, Ecu.eps, Ecu.abs, Ecu.fwdRadar, Ecu.fwdCamera, Ecu.vsa] diff --git a/opendbc/car/gm/carcontroller.py b/opendbc/car/gm/carcontroller.py index ab9db94bae..0d006f8673 100644 --- a/opendbc/car/gm/carcontroller.py +++ b/opendbc/car/gm/carcontroller.py @@ -1,11 +1,11 @@ import copy from opendbc.can.packer import CANPacker -from openpilot.selfdrive.car import DT_CTRL, apply_driver_steer_torque_limits, structs -from openpilot.selfdrive.car.gm import gmcan -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.gm.values import DBC, CanBus, CarControllerParams, CruiseButtons -from openpilot.selfdrive.car.common.numpy_fast import interp -from openpilot.selfdrive.car.interfaces import CarControllerBase +from opendbc.car import DT_CTRL, apply_driver_steer_torque_limits, structs +from opendbc.car.gm import gmcan +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.gm.values import DBC, CanBus, CarControllerParams, CruiseButtons +from opendbc.car.common.numpy_fast import interp +from opendbc.car.interfaces import CarControllerBase VisualAlert = structs.CarControl.HUDControl.VisualAlert NetworkLocation = structs.CarParams.NetworkLocation diff --git a/opendbc/car/gm/carstate.py b/opendbc/car/gm/carstate.py index ba44910d3c..cd30639787 100644 --- a/opendbc/car/gm/carstate.py +++ b/opendbc/car/gm/carstate.py @@ -1,11 +1,11 @@ import copy from opendbc.can.can_define import CANDefine from opendbc.can.parser import CANParser -from openpilot.selfdrive.car import create_button_events, structs -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.common.numpy_fast import mean -from openpilot.selfdrive.car.interfaces import CarStateBase -from openpilot.selfdrive.car.gm.values import DBC, AccState, CanBus, CruiseButtons, STEER_THRESHOLD +from opendbc.car import create_button_events, structs +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.common.numpy_fast import mean +from opendbc.car.interfaces import CarStateBase +from opendbc.car.gm.values import DBC, AccState, CanBus, CruiseButtons, STEER_THRESHOLD ButtonType = structs.CarState.ButtonEvent.Type TransmissionType = structs.CarParams.TransmissionType diff --git a/opendbc/car/gm/fingerprints.py b/opendbc/car/gm/fingerprints.py index 3752fbb8d3..57dbff41b6 100644 --- a/opendbc/car/gm/fingerprints.py +++ b/opendbc/car/gm/fingerprints.py @@ -1,5 +1,5 @@ # ruff: noqa: E501 -from openpilot.selfdrive.car.gm.values import CAR +from opendbc.car.gm.values import CAR # Trailblazer also matches as a SILVERADO, TODO: split with fw versions # FIXME: There are Equinox users with different message lengths, specifically 304 and 320 diff --git a/opendbc/car/gm/gmcan.py b/opendbc/car/gm/gmcan.py index 0b7ada3151..6c583fe336 100644 --- a/opendbc/car/gm/gmcan.py +++ b/opendbc/car/gm/gmcan.py @@ -1,5 +1,5 @@ -from openpilot.selfdrive.car.can_definitions import CanData -from openpilot.selfdrive.car.gm.values import CAR +from opendbc.car.can_definitions import CanData +from opendbc.car.gm.values import CAR def create_buttons(packer, bus, idx, button): diff --git a/opendbc/car/gm/interface.py b/opendbc/car/gm/interface.py index 902ffe5e76..ec1e1253b2 100755 --- a/opendbc/car/gm/interface.py +++ b/opendbc/car/gm/interface.py @@ -3,12 +3,12 @@ from math import fabs, exp from panda import Panda -from openpilot.selfdrive.car import get_safety_config, get_friction, structs -from openpilot.selfdrive.car.common.basedir import BASEDIR -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.gm.radar_interface import RADAR_HEADER_MSG -from openpilot.selfdrive.car.gm.values import CAR, CarControllerParams, EV_CAR, CAMERA_ACC_CAR, CanBus -from openpilot.selfdrive.car.interfaces import CarInterfaceBase, TorqueFromLateralAccelCallbackType, FRICTION_THRESHOLD, LatControlInputs, NanoFFModel +from opendbc.car import get_safety_config, get_friction, structs +from opendbc.car.common.basedir import BASEDIR +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.gm.radar_interface import RADAR_HEADER_MSG +from opendbc.car.gm.values import CAR, CarControllerParams, EV_CAR, CAMERA_ACC_CAR, CanBus +from opendbc.car.interfaces import CarInterfaceBase, TorqueFromLateralAccelCallbackType, FRICTION_THRESHOLD, LatControlInputs, NanoFFModel TransmissionType = structs.CarParams.TransmissionType NetworkLocation = structs.CarParams.NetworkLocation diff --git a/opendbc/car/gm/radar_interface.py b/opendbc/car/gm/radar_interface.py index 9831e692c5..78f6a89a94 100755 --- a/opendbc/car/gm/radar_interface.py +++ b/opendbc/car/gm/radar_interface.py @@ -1,10 +1,10 @@ #!/usr/bin/env python3 import math from opendbc.can.parser import CANParser -from openpilot.selfdrive.car import structs -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.gm.values import DBC, CanBus -from openpilot.selfdrive.car.interfaces import RadarInterfaceBase +from opendbc.car import structs +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.gm.values import DBC, CanBus +from opendbc.car.interfaces import RadarInterfaceBase RADAR_HEADER_MSG = 1120 SLOT_1_MSG = RADAR_HEADER_MSG + 1 diff --git a/opendbc/car/gm/tests/test_gm.py b/opendbc/car/gm/tests/test_gm.py index a0a4a94ffa..c14b9bd243 100644 --- a/opendbc/car/gm/tests/test_gm.py +++ b/opendbc/car/gm/tests/test_gm.py @@ -1,7 +1,7 @@ from parameterized import parameterized -from openpilot.selfdrive.car.gm.fingerprints import FINGERPRINTS -from openpilot.selfdrive.car.gm.values import CAMERA_ACC_CAR, GM_RX_OFFSET +from opendbc.car.gm.fingerprints import FINGERPRINTS +from opendbc.car.gm.values import CAMERA_ACC_CAR, GM_RX_OFFSET CAMERA_DIAGNOSTIC_ADDRESS = 0x24b diff --git a/opendbc/car/gm/values.py b/opendbc/car/gm/values.py index ff669b3940..1fbee8c256 100644 --- a/opendbc/car/gm/values.py +++ b/opendbc/car/gm/values.py @@ -1,9 +1,9 @@ from dataclasses import dataclass, field -from openpilot.selfdrive.car import dbc_dict, PlatformConfig, DbcDict, Platforms, CarSpecs -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.docs_definitions import CarHarness, CarDocs, CarParts -from openpilot.selfdrive.car.fw_query_definitions import FwQueryConfig, Request, StdQueries +from opendbc.car import dbc_dict, PlatformConfig, DbcDict, Platforms, CarSpecs +from opendbc.car.structs import CarParams +from opendbc.car.docs_definitions import CarHarness, CarDocs, CarParts +from opendbc.car.fw_query_definitions import FwQueryConfig, Request, StdQueries Ecu = CarParams.Ecu diff --git a/opendbc/car/honda/carcontroller.py b/opendbc/car/honda/carcontroller.py index b088f775ea..20358c67fb 100644 --- a/opendbc/car/honda/carcontroller.py +++ b/opendbc/car/honda/carcontroller.py @@ -2,11 +2,11 @@ from collections import namedtuple from opendbc.can.packer import CANPacker -from openpilot.selfdrive.car import DT_CTRL, rate_limit, make_tester_present_msg, structs -from openpilot.selfdrive.car.common.numpy_fast import clip, interp -from openpilot.selfdrive.car.honda import hondacan -from openpilot.selfdrive.car.honda.values import CruiseButtons, VISUAL_HUD, HONDA_BOSCH, HONDA_BOSCH_RADARLESS, HONDA_NIDEC_ALT_PCM_ACCEL, CarControllerParams -from openpilot.selfdrive.car.interfaces import CarControllerBase +from opendbc.car import DT_CTRL, rate_limit, make_tester_present_msg, structs +from opendbc.car.common.numpy_fast import clip, interp +from opendbc.car.honda import hondacan +from opendbc.car.honda.values import CruiseButtons, VISUAL_HUD, HONDA_BOSCH, HONDA_BOSCH_RADARLESS, HONDA_NIDEC_ALT_PCM_ACCEL, CarControllerParams +from opendbc.car.interfaces import CarControllerBase VisualAlert = structs.CarControl.HUDControl.VisualAlert LongCtrlState = structs.CarControl.Actuators.LongControlState diff --git a/opendbc/car/honda/carstate.py b/opendbc/car/honda/carstate.py index 7452630eb9..5039fb1245 100644 --- a/opendbc/car/honda/carstate.py +++ b/opendbc/car/honda/carstate.py @@ -2,14 +2,14 @@ from opendbc.can.can_define import CANDefine from opendbc.can.parser import CANParser -from openpilot.selfdrive.car import create_button_events, structs -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.common.numpy_fast import interp -from openpilot.selfdrive.car.honda.hondacan import CanBus, get_cruise_speed_conversion -from openpilot.selfdrive.car.honda.values import CAR, DBC, STEER_THRESHOLD, HONDA_BOSCH, \ +from opendbc.car import create_button_events, structs +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.common.numpy_fast import interp +from opendbc.car.honda.hondacan import CanBus, get_cruise_speed_conversion +from opendbc.car.honda.values import CAR, DBC, STEER_THRESHOLD, HONDA_BOSCH, \ HONDA_NIDEC_ALT_SCM_MESSAGES, HONDA_BOSCH_RADARLESS, \ HondaFlags, CruiseButtons, CruiseSettings -from openpilot.selfdrive.car.interfaces import CarStateBase +from opendbc.car.interfaces import CarStateBase TransmissionType = structs.CarParams.TransmissionType ButtonType = structs.CarState.ButtonEvent.Type diff --git a/opendbc/car/honda/fingerprints.py b/opendbc/car/honda/fingerprints.py index 9160031ab4..11472d6373 100644 --- a/opendbc/car/honda/fingerprints.py +++ b/opendbc/car/honda/fingerprints.py @@ -1,5 +1,5 @@ -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.honda.values import CAR +from opendbc.car.structs import CarParams +from opendbc.car.honda.values import CAR Ecu = CarParams.Ecu diff --git a/opendbc/car/honda/hondacan.py b/opendbc/car/honda/hondacan.py index 63ca8b43d1..f843d35708 100644 --- a/opendbc/car/honda/hondacan.py +++ b/opendbc/car/honda/hondacan.py @@ -1,6 +1,6 @@ -from openpilot.selfdrive.car import CanBusBase -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.honda.values import HondaFlags, HONDA_BOSCH, HONDA_BOSCH_RADARLESS, CAR, CarControllerParams +from opendbc.car import CanBusBase +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.honda.values import HondaFlags, HONDA_BOSCH, HONDA_BOSCH_RADARLESS, CAR, CarControllerParams # CAN bus layout with relay # 0 = ACC-CAN - radar side diff --git a/opendbc/car/honda/interface.py b/opendbc/car/honda/interface.py index 61443b8ada..9f2036e1cb 100755 --- a/opendbc/car/honda/interface.py +++ b/opendbc/car/honda/interface.py @@ -1,13 +1,13 @@ #!/usr/bin/env python3 from panda import Panda -from openpilot.selfdrive.car import get_safety_config, structs -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.common.numpy_fast import interp -from openpilot.selfdrive.car.honda.hondacan import CanBus -from openpilot.selfdrive.car.honda.values import CarControllerParams, HondaFlags, CAR, HONDA_BOSCH, \ +from opendbc.car import get_safety_config, structs +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.common.numpy_fast import interp +from opendbc.car.honda.hondacan import CanBus +from opendbc.car.honda.values import CarControllerParams, HondaFlags, CAR, HONDA_BOSCH, \ HONDA_NIDEC_ALT_SCM_MESSAGES, HONDA_BOSCH_RADARLESS -from openpilot.selfdrive.car.interfaces import CarInterfaceBase -from openpilot.selfdrive.car.disable_ecu import disable_ecu +from opendbc.car.interfaces import CarInterfaceBase +from opendbc.car.disable_ecu import disable_ecu TransmissionType = structs.CarParams.TransmissionType diff --git a/opendbc/car/honda/radar_interface.py b/opendbc/car/honda/radar_interface.py index 8dd1ddd529..a47cc70e7f 100755 --- a/opendbc/car/honda/radar_interface.py +++ b/opendbc/car/honda/radar_interface.py @@ -1,8 +1,8 @@ #!/usr/bin/env python3 from opendbc.can.parser import CANParser -from openpilot.selfdrive.car import structs -from openpilot.selfdrive.car.interfaces import RadarInterfaceBase -from openpilot.selfdrive.car.honda.values import DBC +from opendbc.car import structs +from opendbc.car.interfaces import RadarInterfaceBase +from opendbc.car.honda.values import DBC def _create_nidec_can_parser(car_fingerprint): diff --git a/opendbc/car/honda/tests/test_honda.py b/opendbc/car/honda/tests/test_honda.py index b8ad7872b2..946f496d10 100644 --- a/opendbc/car/honda/tests/test_honda.py +++ b/opendbc/car/honda/tests/test_honda.py @@ -1,6 +1,6 @@ import re -from openpilot.selfdrive.car.honda.fingerprints import FW_VERSIONS +from opendbc.car.honda.fingerprints import FW_VERSIONS HONDA_FW_VERSION_RE = br"[A-Z0-9]{5}-[A-Z0-9]{3}(-|,)[A-Z0-9]{4}(\x00){2}$" diff --git a/opendbc/car/honda/values.py b/opendbc/car/honda/values.py index f6357f6cb3..6ffd84e977 100644 --- a/opendbc/car/honda/values.py +++ b/opendbc/car/honda/values.py @@ -2,10 +2,10 @@ from enum import Enum, IntFlag from panda.python import uds -from openpilot.selfdrive.car import CarSpecs, PlatformConfig, Platforms, dbc_dict, structs -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.docs_definitions import CarFootnote, CarHarness, CarDocs, CarParts, Column -from openpilot.selfdrive.car.fw_query_definitions import FwQueryConfig, Request, StdQueries, p16 +from opendbc.car import CarSpecs, PlatformConfig, Platforms, dbc_dict, structs +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.docs_definitions import CarFootnote, CarHarness, CarDocs, CarParts, Column +from opendbc.car.fw_query_definitions import FwQueryConfig, Request, StdQueries, p16 Ecu = structs.CarParams.Ecu VisualAlert = structs.CarControl.HUDControl.VisualAlert diff --git a/opendbc/car/hyundai/carcontroller.py b/opendbc/car/hyundai/carcontroller.py index 059c7dd849..7533a401ef 100644 --- a/opendbc/car/hyundai/carcontroller.py +++ b/opendbc/car/hyundai/carcontroller.py @@ -1,13 +1,13 @@ import copy from opendbc.can.packer import CANPacker -from openpilot.selfdrive.car import DT_CTRL, apply_driver_steer_torque_limits, common_fault_avoidance, make_tester_present_msg, structs -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.common.numpy_fast import clip -from openpilot.selfdrive.car.hyundai import hyundaicanfd, hyundaican -from openpilot.selfdrive.car.hyundai.carstate import CarState -from openpilot.selfdrive.car.hyundai.hyundaicanfd import CanBus -from openpilot.selfdrive.car.hyundai.values import HyundaiFlags, Buttons, CarControllerParams, CANFD_CAR, CAR -from openpilot.selfdrive.car.interfaces import CarControllerBase +from opendbc.car import DT_CTRL, apply_driver_steer_torque_limits, common_fault_avoidance, make_tester_present_msg, structs +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.common.numpy_fast import clip +from opendbc.car.hyundai import hyundaicanfd, hyundaican +from opendbc.car.hyundai.carstate import CarState +from opendbc.car.hyundai.hyundaicanfd import CanBus +from opendbc.car.hyundai.values import HyundaiFlags, Buttons, CarControllerParams, CANFD_CAR, CAR +from opendbc.car.interfaces import CarControllerBase VisualAlert = structs.CarControl.HUDControl.VisualAlert LongCtrlState = structs.CarControl.Actuators.LongControlState diff --git a/opendbc/car/hyundai/carstate.py b/opendbc/car/hyundai/carstate.py index 4d716aac80..a8f4bd9c39 100644 --- a/opendbc/car/hyundai/carstate.py +++ b/opendbc/car/hyundai/carstate.py @@ -4,12 +4,12 @@ from opendbc.can.parser import CANParser from opendbc.can.can_define import CANDefine -from openpilot.selfdrive.car import create_button_events, structs -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.hyundai.hyundaicanfd import CanBus -from openpilot.selfdrive.car.hyundai.values import HyundaiFlags, CAR, DBC, CAN_GEARS, CAMERA_SCC_CAR, \ +from opendbc.car import create_button_events, structs +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.hyundai.hyundaicanfd import CanBus +from opendbc.car.hyundai.values import HyundaiFlags, CAR, DBC, CAN_GEARS, CAMERA_SCC_CAR, \ CANFD_CAR, Buttons, CarControllerParams -from openpilot.selfdrive.car.interfaces import CarStateBase +from opendbc.car.interfaces import CarStateBase ButtonType = structs.CarState.ButtonEvent.Type diff --git a/opendbc/car/hyundai/fingerprints.py b/opendbc/car/hyundai/fingerprints.py index 22172a2a1f..d243ec566d 100644 --- a/opendbc/car/hyundai/fingerprints.py +++ b/opendbc/car/hyundai/fingerprints.py @@ -1,5 +1,5 @@ -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.hyundai.values import CAR +from opendbc.car.structs import CarParams +from opendbc.car.hyundai.values import CAR Ecu = CarParams.Ecu diff --git a/opendbc/car/hyundai/hyundaican.py b/opendbc/car/hyundai/hyundaican.py index d2002e23e0..0b65a8aed8 100644 --- a/opendbc/car/hyundai/hyundaican.py +++ b/opendbc/car/hyundai/hyundaican.py @@ -1,5 +1,5 @@ import crcmod -from openpilot.selfdrive.car.hyundai.values import CAR, HyundaiFlags +from opendbc.car.hyundai.values import CAR, HyundaiFlags hyundai_checksum = crcmod.mkCrcFun(0x11D, initCrc=0xFD, rev=False, xorOut=0xdf) diff --git a/opendbc/car/hyundai/hyundaicanfd.py b/opendbc/car/hyundai/hyundaicanfd.py index 10c3095b9d..82ed0828b7 100644 --- a/opendbc/car/hyundai/hyundaicanfd.py +++ b/opendbc/car/hyundai/hyundaicanfd.py @@ -1,6 +1,6 @@ -from openpilot.selfdrive.car import CanBusBase -from openpilot.selfdrive.car.common.numpy_fast import clip -from openpilot.selfdrive.car.hyundai.values import HyundaiFlags +from opendbc.car import CanBusBase +from opendbc.car.common.numpy_fast import clip +from opendbc.car.hyundai.values import HyundaiFlags class CanBus(CanBusBase): diff --git a/opendbc/car/hyundai/interface.py b/opendbc/car/hyundai/interface.py index 4530704ed2..ae42e9a949 100644 --- a/opendbc/car/hyundai/interface.py +++ b/opendbc/car/hyundai/interface.py @@ -1,12 +1,12 @@ from panda import Panda -from openpilot.selfdrive.car import get_safety_config, structs -from openpilot.selfdrive.car.hyundai.hyundaicanfd import CanBus -from openpilot.selfdrive.car.hyundai.values import HyundaiFlags, CAR, DBC, CANFD_CAR, CAMERA_SCC_CAR, CANFD_RADAR_SCC_CAR, \ +from opendbc.car import get_safety_config, structs +from opendbc.car.hyundai.hyundaicanfd import CanBus +from opendbc.car.hyundai.values import HyundaiFlags, CAR, DBC, CANFD_CAR, CAMERA_SCC_CAR, CANFD_RADAR_SCC_CAR, \ CANFD_UNSUPPORTED_LONGITUDINAL_CAR, EV_CAR, HYBRID_CAR, LEGACY_SAFETY_MODE_CAR, \ UNSUPPORTED_LONGITUDINAL_CAR, Buttons -from openpilot.selfdrive.car.hyundai.radar_interface import RADAR_START_ADDR -from openpilot.selfdrive.car.interfaces import CarInterfaceBase -from openpilot.selfdrive.car.disable_ecu import disable_ecu +from opendbc.car.hyundai.radar_interface import RADAR_START_ADDR +from opendbc.car.interfaces import CarInterfaceBase +from opendbc.car.disable_ecu import disable_ecu Ecu = structs.CarParams.Ecu diff --git a/opendbc/car/hyundai/radar_interface.py b/opendbc/car/hyundai/radar_interface.py index 1a5915f298..a9078749d6 100644 --- a/opendbc/car/hyundai/radar_interface.py +++ b/opendbc/car/hyundai/radar_interface.py @@ -1,9 +1,9 @@ import math from opendbc.can.parser import CANParser -from openpilot.selfdrive.car import structs -from openpilot.selfdrive.car.interfaces import RadarInterfaceBase -from openpilot.selfdrive.car.hyundai.values import DBC +from opendbc.car import structs +from opendbc.car.interfaces import RadarInterfaceBase +from opendbc.car.hyundai.values import DBC RADAR_START_ADDR = 0x500 RADAR_MSG_COUNT = 32 diff --git a/opendbc/car/hyundai/tests/print_platform_codes.py b/opendbc/car/hyundai/tests/print_platform_codes.py index d719f73e37..325b020f9b 100755 --- a/opendbc/car/hyundai/tests/print_platform_codes.py +++ b/opendbc/car/hyundai/tests/print_platform_codes.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.hyundai.values import PLATFORM_CODE_ECUS, get_platform_codes -from openpilot.selfdrive.car.hyundai.fingerprints import FW_VERSIONS +from opendbc.car.structs import CarParams +from opendbc.car.hyundai.values import PLATFORM_CODE_ECUS, get_platform_codes +from opendbc.car.hyundai.fingerprints import FW_VERSIONS Ecu = CarParams.Ecu diff --git a/opendbc/car/hyundai/tests/test_hyundai.py b/opendbc/car/hyundai/tests/test_hyundai.py index 3c008e3ebb..9fc28827e1 100644 --- a/opendbc/car/hyundai/tests/test_hyundai.py +++ b/opendbc/car/hyundai/tests/test_hyundai.py @@ -2,16 +2,16 @@ import pytest -from openpilot.selfdrive.car import gen_empty_fingerprint -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.fw_versions import build_fw_dict -from openpilot.selfdrive.car.hyundai.interface import CarInterface -from openpilot.selfdrive.car.hyundai.radar_interface import RADAR_START_ADDR -from openpilot.selfdrive.car.hyundai.values import CAMERA_SCC_CAR, CANFD_CAR, CAN_GEARS, CAR, CHECKSUM, DATE_FW_ECUS, \ +from opendbc.car import gen_empty_fingerprint +from opendbc.car.structs import CarParams +from opendbc.car.fw_versions import build_fw_dict +from opendbc.car.hyundai.interface import CarInterface +from opendbc.car.hyundai.radar_interface import RADAR_START_ADDR +from opendbc.car.hyundai.values import CAMERA_SCC_CAR, CANFD_CAR, CAN_GEARS, CAR, CHECKSUM, DATE_FW_ECUS, \ HYBRID_CAR, EV_CAR, FW_QUERY_CONFIG, LEGACY_SAFETY_MODE_CAR, CANFD_FUZZY_WHITELIST, \ UNSUPPORTED_LONGITUDINAL_CAR, PLATFORM_CODE_ECUS, HYUNDAI_VERSION_REQUEST_LONG, \ HyundaiFlags, get_platform_codes -from openpilot.selfdrive.car.hyundai.fingerprints import FW_VERSIONS +from opendbc.car.hyundai.fingerprints import FW_VERSIONS Ecu = CarParams.Ecu diff --git a/opendbc/car/hyundai/values.py b/opendbc/car/hyundai/values.py index 25267d7e9b..ef9470ce4d 100644 --- a/opendbc/car/hyundai/values.py +++ b/opendbc/car/hyundai/values.py @@ -3,11 +3,11 @@ from enum import Enum, IntFlag from panda.python import uds -from openpilot.selfdrive.car import CarSpecs, DbcDict, PlatformConfig, Platforms, dbc_dict -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.docs_definitions import CarFootnote, CarHarness, CarDocs, CarParts, Column -from openpilot.selfdrive.car.fw_query_definitions import FwQueryConfig, Request, p16 +from opendbc.car import CarSpecs, DbcDict, PlatformConfig, Platforms, dbc_dict +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.structs import CarParams +from opendbc.car.docs_definitions import CarFootnote, CarHarness, CarDocs, CarParts, Column +from opendbc.car.fw_query_definitions import FwQueryConfig, Request, p16 Ecu = CarParams.Ecu diff --git a/opendbc/car/interfaces.py b/opendbc/car/interfaces.py index b918302a4a..ffa06d16a2 100644 --- a/opendbc/car/interfaces.py +++ b/opendbc/car/interfaces.py @@ -8,14 +8,14 @@ from collections.abc import Callable from functools import cache -from openpilot.selfdrive.car import DT_CTRL, apply_hysteresis, gen_empty_fingerprint, scale_rot_inertia, scale_tire_stiffness, get_friction, STD_CARGO_KG -from openpilot.selfdrive.car import structs -from openpilot.selfdrive.car.can_definitions import CanData, CanRecvCallable, CanSendCallable -from openpilot.selfdrive.car.common.basedir import BASEDIR -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.common.simple_kalman import KF1D, get_kalman_gain -from openpilot.selfdrive.car.common.numpy_fast import clip -from openpilot.selfdrive.car.values import PLATFORMS +from opendbc.car import DT_CTRL, apply_hysteresis, gen_empty_fingerprint, scale_rot_inertia, scale_tire_stiffness, get_friction, STD_CARGO_KG +from opendbc.car import structs +from opendbc.car.can_definitions import CanData, CanRecvCallable, CanSendCallable +from opendbc.car.common.basedir import BASEDIR +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.common.simple_kalman import KF1D, get_kalman_gain +from opendbc.car.common.numpy_fast import clip +from opendbc.car.values import PLATFORMS GearShifter = structs.CarState.GearShifter @@ -401,7 +401,7 @@ def get_interface_attr(attr: str, combine_brands: bool = False, ignore_none: boo for car_folder in sorted([x[0] for x in os.walk(BASEDIR)]): try: brand_name = car_folder.split('/')[-1] - brand_values = __import__(f'openpilot.selfdrive.car.{brand_name}.{INTERFACE_ATTR_FILE.get(attr, "values")}', fromlist=[attr]) + brand_values = __import__(f'opendbc.car.{brand_name}.{INTERFACE_ATTR_FILE.get(attr, "values")}', fromlist=[attr]) if hasattr(brand_values, attr) or not ignore_none: attr_data = getattr(brand_values, attr, None) else: diff --git a/opendbc/car/isotp_parallel_query.py b/opendbc/car/isotp_parallel_query.py index 8ec0a340e3..465a42f6e3 100644 --- a/opendbc/car/isotp_parallel_query.py +++ b/opendbc/car/isotp_parallel_query.py @@ -2,9 +2,9 @@ from collections import defaultdict from functools import partial -from openpilot.selfdrive.car import carlog -from openpilot.selfdrive.car.can_definitions import CanData, CanRecvCallable, CanSendCallable -from openpilot.selfdrive.car.fw_query_definitions import AddrType +from opendbc.car import carlog +from opendbc.car.can_definitions import CanData, CanRecvCallable, CanSendCallable +from opendbc.car.fw_query_definitions import AddrType from panda.python.uds import CanClient, IsoTpMessage, FUNCTIONAL_ADDRS, get_rx_addr_for_tx_addr diff --git a/opendbc/car/mazda/carcontroller.py b/opendbc/car/mazda/carcontroller.py index db52c07dea..08b829004f 100644 --- a/opendbc/car/mazda/carcontroller.py +++ b/opendbc/car/mazda/carcontroller.py @@ -1,9 +1,9 @@ import copy from opendbc.can.packer import CANPacker -from openpilot.selfdrive.car import apply_driver_steer_torque_limits, structs -from openpilot.selfdrive.car.interfaces import CarControllerBase -from openpilot.selfdrive.car.mazda import mazdacan -from openpilot.selfdrive.car.mazda.values import CarControllerParams, Buttons +from opendbc.car import apply_driver_steer_torque_limits, structs +from opendbc.car.interfaces import CarControllerBase +from opendbc.car.mazda import mazdacan +from opendbc.car.mazda.values import CarControllerParams, Buttons VisualAlert = structs.CarControl.HUDControl.VisualAlert diff --git a/opendbc/car/mazda/carstate.py b/opendbc/car/mazda/carstate.py index c3b3394734..7e69beb132 100644 --- a/opendbc/car/mazda/carstate.py +++ b/opendbc/car/mazda/carstate.py @@ -1,9 +1,9 @@ from opendbc.can.can_define import CANDefine from opendbc.can.parser import CANParser -from openpilot.selfdrive.car import create_button_events, structs -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.interfaces import CarStateBase -from openpilot.selfdrive.car.mazda.values import DBC, LKAS_LIMITS, MazdaFlags +from opendbc.car import create_button_events, structs +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.interfaces import CarStateBase +from opendbc.car.mazda.values import DBC, LKAS_LIMITS, MazdaFlags ButtonType = structs.CarState.ButtonEvent.Type diff --git a/opendbc/car/mazda/fingerprints.py b/opendbc/car/mazda/fingerprints.py index 41c1e7fb62..d7c430bc78 100644 --- a/opendbc/car/mazda/fingerprints.py +++ b/opendbc/car/mazda/fingerprints.py @@ -1,5 +1,5 @@ -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.mazda.values import CAR +from opendbc.car.structs import CarParams +from opendbc.car.mazda.values import CAR Ecu = CarParams.Ecu diff --git a/opendbc/car/mazda/interface.py b/opendbc/car/mazda/interface.py index 3da5e8e1b0..b9a6932bb7 100755 --- a/opendbc/car/mazda/interface.py +++ b/opendbc/car/mazda/interface.py @@ -1,8 +1,8 @@ #!/usr/bin/env python3 -from openpilot.selfdrive.car import get_safety_config, structs -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.mazda.values import CAR, LKAS_LIMITS -from openpilot.selfdrive.car.interfaces import CarInterfaceBase +from opendbc.car import get_safety_config, structs +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.mazda.values import CAR, LKAS_LIMITS +from opendbc.car.interfaces import CarInterfaceBase diff --git a/opendbc/car/mazda/mazdacan.py b/opendbc/car/mazda/mazdacan.py index 74f6af04c5..0605d980f8 100644 --- a/opendbc/car/mazda/mazdacan.py +++ b/opendbc/car/mazda/mazdacan.py @@ -1,4 +1,4 @@ -from openpilot.selfdrive.car.mazda.values import Buttons, MazdaFlags +from opendbc.car.mazda.values import Buttons, MazdaFlags def create_steering_control(packer, CP, frame, apply_steer, lkas): diff --git a/opendbc/car/mazda/radar_interface.py b/opendbc/car/mazda/radar_interface.py index b461fcd5f8..56bda583e2 100755 --- a/opendbc/car/mazda/radar_interface.py +++ b/opendbc/car/mazda/radar_interface.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from openpilot.selfdrive.car.interfaces import RadarInterfaceBase +from opendbc.car.interfaces import RadarInterfaceBase class RadarInterface(RadarInterfaceBase): pass diff --git a/opendbc/car/mazda/values.py b/opendbc/car/mazda/values.py index 3f71a4db32..47cf43ca06 100644 --- a/opendbc/car/mazda/values.py +++ b/opendbc/car/mazda/values.py @@ -1,11 +1,11 @@ from dataclasses import dataclass, field from enum import IntFlag -from openpilot.selfdrive.car import CarSpecs, DbcDict, PlatformConfig, Platforms, dbc_dict -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.docs_definitions import CarHarness, CarDocs, CarParts -from openpilot.selfdrive.car.fw_query_definitions import FwQueryConfig, Request, StdQueries +from opendbc.car import CarSpecs, DbcDict, PlatformConfig, Platforms, dbc_dict +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.structs import CarParams +from opendbc.car.docs_definitions import CarHarness, CarDocs, CarParts +from opendbc.car.fw_query_definitions import FwQueryConfig, Request, StdQueries Ecu = CarParams.Ecu diff --git a/opendbc/car/mock/carcontroller.py b/opendbc/car/mock/carcontroller.py index cd1d67747e..6318cb7c34 100644 --- a/opendbc/car/mock/carcontroller.py +++ b/opendbc/car/mock/carcontroller.py @@ -1,4 +1,4 @@ -from openpilot.selfdrive.car.interfaces import CarControllerBase +from opendbc.car.interfaces import CarControllerBase class CarController(CarControllerBase): diff --git a/opendbc/car/mock/carstate.py b/opendbc/car/mock/carstate.py index 4fbebf5a4f..9cbdf99e91 100644 --- a/opendbc/car/mock/carstate.py +++ b/opendbc/car/mock/carstate.py @@ -1,5 +1,5 @@ -from openpilot.selfdrive.car import structs -from openpilot.selfdrive.car.interfaces import CarStateBase +from opendbc.car import structs +from opendbc.car.interfaces import CarStateBase class CarState(CarStateBase): diff --git a/opendbc/car/mock/interface.py b/opendbc/car/mock/interface.py index d33cc7d164..f7c755c22b 100755 --- a/opendbc/car/mock/interface.py +++ b/opendbc/car/mock/interface.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -from openpilot.selfdrive.car import structs -from openpilot.selfdrive.car.interfaces import CarInterfaceBase +from opendbc.car import structs +from opendbc.car.interfaces import CarInterfaceBase # mocked car interface for dashcam mode diff --git a/opendbc/car/mock/radar_interface.py b/opendbc/car/mock/radar_interface.py index e654bd61fd..6e552bf618 100644 --- a/opendbc/car/mock/radar_interface.py +++ b/opendbc/car/mock/radar_interface.py @@ -1,4 +1,4 @@ -from openpilot.selfdrive.car.interfaces import RadarInterfaceBase +from opendbc.car.interfaces import RadarInterfaceBase class RadarInterface(RadarInterfaceBase): pass diff --git a/opendbc/car/mock/values.py b/opendbc/car/mock/values.py index f98aac2ee3..aa844de4c5 100644 --- a/opendbc/car/mock/values.py +++ b/opendbc/car/mock/values.py @@ -1,4 +1,4 @@ -from openpilot.selfdrive.car import CarSpecs, PlatformConfig, Platforms +from opendbc.car import CarSpecs, PlatformConfig, Platforms class CAR(Platforms): diff --git a/opendbc/car/nissan/carcontroller.py b/opendbc/car/nissan/carcontroller.py index e0e0389866..9e38312550 100644 --- a/opendbc/car/nissan/carcontroller.py +++ b/opendbc/car/nissan/carcontroller.py @@ -1,9 +1,9 @@ import copy from opendbc.can.packer import CANPacker -from openpilot.selfdrive.car import apply_std_steer_angle_limits, structs -from openpilot.selfdrive.car.interfaces import CarControllerBase -from openpilot.selfdrive.car.nissan import nissancan -from openpilot.selfdrive.car.nissan.values import CAR, CarControllerParams +from opendbc.car import apply_std_steer_angle_limits, structs +from opendbc.car.interfaces import CarControllerBase +from opendbc.car.nissan import nissancan +from opendbc.car.nissan.values import CAR, CarControllerParams VisualAlert = structs.CarControl.HUDControl.VisualAlert diff --git a/opendbc/car/nissan/carstate.py b/opendbc/car/nissan/carstate.py index 1298315942..040fb1934f 100644 --- a/opendbc/car/nissan/carstate.py +++ b/opendbc/car/nissan/carstate.py @@ -2,10 +2,10 @@ from collections import deque from opendbc.can.can_define import CANDefine from opendbc.can.parser import CANParser -from openpilot.selfdrive.car import create_button_events, structs -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.interfaces import CarStateBase -from openpilot.selfdrive.car.nissan.values import CAR, DBC, CarControllerParams +from opendbc.car import create_button_events, structs +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.interfaces import CarStateBase +from opendbc.car.nissan.values import CAR, DBC, CarControllerParams ButtonType = structs.CarState.ButtonEvent.Type diff --git a/opendbc/car/nissan/fingerprints.py b/opendbc/car/nissan/fingerprints.py index 0ba4140fb7..9cef01cec4 100644 --- a/opendbc/car/nissan/fingerprints.py +++ b/opendbc/car/nissan/fingerprints.py @@ -1,6 +1,6 @@ # ruff: noqa: E501 -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.nissan.values import CAR +from opendbc.car.structs import CarParams +from opendbc.car.nissan.values import CAR Ecu = CarParams.Ecu diff --git a/opendbc/car/nissan/interface.py b/opendbc/car/nissan/interface.py index 4a9b31dacf..14255338b9 100644 --- a/opendbc/car/nissan/interface.py +++ b/opendbc/car/nissan/interface.py @@ -1,7 +1,7 @@ from panda import Panda -from openpilot.selfdrive.car import get_safety_config, structs -from openpilot.selfdrive.car.interfaces import CarInterfaceBase -from openpilot.selfdrive.car.nissan.values import CAR +from opendbc.car import get_safety_config, structs +from opendbc.car.interfaces import CarInterfaceBase +from opendbc.car.nissan.values import CAR class CarInterface(CarInterfaceBase): diff --git a/opendbc/car/nissan/nissancan.py b/opendbc/car/nissan/nissancan.py index 28fb01d7e3..555020d858 100644 --- a/opendbc/car/nissan/nissancan.py +++ b/opendbc/car/nissan/nissancan.py @@ -1,5 +1,5 @@ import crcmod -from openpilot.selfdrive.car.nissan.values import CAR +from opendbc.car.nissan.values import CAR # TODO: add this checksum to the CANPacker nissan_checksum = crcmod.mkCrcFun(0x11d, initCrc=0x00, rev=False, xorOut=0xff) diff --git a/opendbc/car/nissan/radar_interface.py b/opendbc/car/nissan/radar_interface.py index e654bd61fd..6e552bf618 100644 --- a/opendbc/car/nissan/radar_interface.py +++ b/opendbc/car/nissan/radar_interface.py @@ -1,4 +1,4 @@ -from openpilot.selfdrive.car.interfaces import RadarInterfaceBase +from opendbc.car.interfaces import RadarInterfaceBase class RadarInterface(RadarInterfaceBase): pass diff --git a/opendbc/car/nissan/values.py b/opendbc/car/nissan/values.py index e50ffbd94b..c11c9fbcc7 100644 --- a/opendbc/car/nissan/values.py +++ b/opendbc/car/nissan/values.py @@ -1,10 +1,10 @@ from dataclasses import dataclass, field from panda.python import uds -from openpilot.selfdrive.car import AngleRateLimit, CarSpecs, DbcDict, PlatformConfig, Platforms, dbc_dict -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.docs_definitions import CarDocs, CarHarness, CarParts -from openpilot.selfdrive.car.fw_query_definitions import FwQueryConfig, Request, StdQueries +from opendbc.car import AngleRateLimit, CarSpecs, DbcDict, PlatformConfig, Platforms, dbc_dict +from opendbc.car.structs import CarParams +from opendbc.car.docs_definitions import CarDocs, CarHarness, CarParts +from opendbc.car.fw_query_definitions import FwQueryConfig, Request, StdQueries Ecu = CarParams.Ecu diff --git a/opendbc/car/subaru/carcontroller.py b/opendbc/car/subaru/carcontroller.py index 2b8de77cb1..4ee3655268 100644 --- a/opendbc/car/subaru/carcontroller.py +++ b/opendbc/car/subaru/carcontroller.py @@ -1,10 +1,10 @@ import copy from opendbc.can.packer import CANPacker -from openpilot.selfdrive.car import apply_driver_steer_torque_limits, common_fault_avoidance, make_tester_present_msg -from openpilot.selfdrive.car.common.numpy_fast import clip, interp -from openpilot.selfdrive.car.interfaces import CarControllerBase -from openpilot.selfdrive.car.subaru import subarucan -from openpilot.selfdrive.car.subaru.values import DBC, GLOBAL_ES_ADDR, CanBus, CarControllerParams, SubaruFlags +from opendbc.car import apply_driver_steer_torque_limits, common_fault_avoidance, make_tester_present_msg +from opendbc.car.common.numpy_fast import clip, interp +from opendbc.car.interfaces import CarControllerBase +from opendbc.car.subaru import subarucan +from opendbc.car.subaru.values import DBC, GLOBAL_ES_ADDR, CanBus, CarControllerParams, SubaruFlags # FIXME: These limits aren't exact. The real limit is more than likely over a larger time period and # involves the total steering angle change rather than rate, but these limits work well for now diff --git a/opendbc/car/subaru/carstate.py b/opendbc/car/subaru/carstate.py index cabf2c5c56..84fa215815 100644 --- a/opendbc/car/subaru/carstate.py +++ b/opendbc/car/subaru/carstate.py @@ -1,11 +1,11 @@ import copy from opendbc.can.can_define import CANDefine from opendbc.can.parser import CANParser -from openpilot.selfdrive.car import structs -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.interfaces import CarStateBase -from openpilot.selfdrive.car.subaru.values import DBC, CanBus, SubaruFlags -from openpilot.selfdrive.car import CanSignalRateCalculator +from opendbc.car import structs +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.interfaces import CarStateBase +from opendbc.car.subaru.values import DBC, CanBus, SubaruFlags +from opendbc.car import CanSignalRateCalculator class CarState(CarStateBase): diff --git a/opendbc/car/subaru/fingerprints.py b/opendbc/car/subaru/fingerprints.py index 340844e561..3c61915fc5 100644 --- a/opendbc/car/subaru/fingerprints.py +++ b/opendbc/car/subaru/fingerprints.py @@ -1,5 +1,5 @@ -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.subaru.values import CAR +from opendbc.car.structs import CarParams +from opendbc.car.subaru.values import CAR Ecu = CarParams.Ecu diff --git a/opendbc/car/subaru/interface.py b/opendbc/car/subaru/interface.py index d392edc60b..782f73e8c6 100644 --- a/opendbc/car/subaru/interface.py +++ b/opendbc/car/subaru/interface.py @@ -1,8 +1,8 @@ from panda import Panda -from openpilot.selfdrive.car import get_safety_config, structs -from openpilot.selfdrive.car.disable_ecu import disable_ecu -from openpilot.selfdrive.car.interfaces import CarInterfaceBase -from openpilot.selfdrive.car.subaru.values import CAR, GLOBAL_ES_ADDR, SubaruFlags +from opendbc.car import get_safety_config, structs +from opendbc.car.disable_ecu import disable_ecu +from opendbc.car.interfaces import CarInterfaceBase +from opendbc.car.subaru.values import CAR, GLOBAL_ES_ADDR, SubaruFlags class CarInterface(CarInterfaceBase): diff --git a/opendbc/car/subaru/radar_interface.py b/opendbc/car/subaru/radar_interface.py index e654bd61fd..6e552bf618 100644 --- a/opendbc/car/subaru/radar_interface.py +++ b/opendbc/car/subaru/radar_interface.py @@ -1,4 +1,4 @@ -from openpilot.selfdrive.car.interfaces import RadarInterfaceBase +from opendbc.car.interfaces import RadarInterfaceBase class RadarInterface(RadarInterfaceBase): pass diff --git a/opendbc/car/subaru/subarucan.py b/opendbc/car/subaru/subarucan.py index fd6644c22c..83340dc1f8 100644 --- a/opendbc/car/subaru/subarucan.py +++ b/opendbc/car/subaru/subarucan.py @@ -1,5 +1,5 @@ -from openpilot.selfdrive.car import structs -from openpilot.selfdrive.car.subaru.values import CanBus +from opendbc.car import structs +from opendbc.car.subaru.values import CanBus VisualAlert = structs.CarControl.HUDControl.VisualAlert diff --git a/opendbc/car/subaru/tests/test_subaru.py b/opendbc/car/subaru/tests/test_subaru.py index f81c392679..7f3d9bb3c5 100644 --- a/opendbc/car/subaru/tests/test_subaru.py +++ b/opendbc/car/subaru/tests/test_subaru.py @@ -1,4 +1,4 @@ -from openpilot.selfdrive.car.subaru.fingerprints import FW_VERSIONS +from opendbc.car.subaru.fingerprints import FW_VERSIONS class TestSubaruFingerprint: diff --git a/opendbc/car/subaru/values.py b/opendbc/car/subaru/values.py index 655627159d..8ed9639b01 100644 --- a/opendbc/car/subaru/values.py +++ b/opendbc/car/subaru/values.py @@ -2,10 +2,10 @@ from enum import Enum, IntFlag from panda.python import uds -from openpilot.selfdrive.car import CarSpecs, DbcDict, PlatformConfig, Platforms, dbc_dict -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.docs_definitions import CarFootnote, CarHarness, CarDocs, CarParts, Tool, Column -from openpilot.selfdrive.car.fw_query_definitions import FwQueryConfig, Request, StdQueries, p16 +from opendbc.car import CarSpecs, DbcDict, PlatformConfig, Platforms, dbc_dict +from opendbc.car.structs import CarParams +from opendbc.car.docs_definitions import CarFootnote, CarHarness, CarDocs, CarParts, Tool, Column +from opendbc.car.fw_query_definitions import FwQueryConfig, Request, StdQueries, p16 Ecu = CarParams.Ecu diff --git a/opendbc/car/tests/__init__.py b/opendbc/car/tests/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/opendbc/car/toyota/carcontroller.py b/opendbc/car/toyota/carcontroller.py index aaaf072de7..bb6dc4cfc4 100644 --- a/opendbc/car/toyota/carcontroller.py +++ b/opendbc/car/toyota/carcontroller.py @@ -1,10 +1,10 @@ import copy -from openpilot.selfdrive.car import apply_meas_steer_torque_limits, apply_std_steer_angle_limits, common_fault_avoidance, make_tester_present_msg, structs -from openpilot.selfdrive.car.can_definitions import CanData -from openpilot.selfdrive.car.common.numpy_fast import clip -from openpilot.selfdrive.car.interfaces import CarControllerBase -from openpilot.selfdrive.car.toyota import toyotacan -from openpilot.selfdrive.car.toyota.values import CAR, STATIC_DSU_MSGS, NO_STOP_TIMER_CAR, TSS2_CAR, \ +from opendbc.car import apply_meas_steer_torque_limits, apply_std_steer_angle_limits, common_fault_avoidance, make_tester_present_msg, structs +from opendbc.car.can_definitions import CanData +from opendbc.car.common.numpy_fast import clip +from opendbc.car.interfaces import CarControllerBase +from opendbc.car.toyota import toyotacan +from opendbc.car.toyota.values import CAR, STATIC_DSU_MSGS, NO_STOP_TIMER_CAR, TSS2_CAR, \ CarControllerParams, ToyotaFlags, \ UNSUPPORTED_DSU_CAR from opendbc.can.packer import CANPacker diff --git a/opendbc/car/toyota/carstate.py b/opendbc/car/toyota/carstate.py index 924388eab8..b6d03f9291 100644 --- a/opendbc/car/toyota/carstate.py +++ b/opendbc/car/toyota/carstate.py @@ -2,12 +2,12 @@ from opendbc.can.can_define import CANDefine from opendbc.can.parser import CANParser -from openpilot.selfdrive.car import DT_CTRL, create_button_events, structs -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.common.filter_simple import FirstOrderFilter -from openpilot.selfdrive.car.common.numpy_fast import mean -from openpilot.selfdrive.car.interfaces import CarStateBase -from openpilot.selfdrive.car.toyota.values import ToyotaFlags, CAR, DBC, STEER_THRESHOLD, NO_STOP_TIMER_CAR, \ +from opendbc.car import DT_CTRL, create_button_events, structs +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.common.filter_simple import FirstOrderFilter +from opendbc.car.common.numpy_fast import mean +from opendbc.car.interfaces import CarStateBase +from opendbc.car.toyota.values import ToyotaFlags, CAR, DBC, STEER_THRESHOLD, NO_STOP_TIMER_CAR, \ TSS2_CAR, RADAR_ACC_CAR, EPS_SCALE, UNSUPPORTED_DSU_CAR ButtonType = structs.CarState.ButtonEvent.Type diff --git a/opendbc/car/toyota/fingerprints.py b/opendbc/car/toyota/fingerprints.py index 6a0bbbdf94..03c4958e0e 100644 --- a/opendbc/car/toyota/fingerprints.py +++ b/opendbc/car/toyota/fingerprints.py @@ -1,5 +1,5 @@ -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.toyota.values import CAR +from opendbc.car.structs import CarParams +from opendbc.car.toyota.values import CAR Ecu = CarParams.Ecu diff --git a/opendbc/car/toyota/interface.py b/opendbc/car/toyota/interface.py index 39586a8de8..1b8caccce2 100644 --- a/opendbc/car/toyota/interface.py +++ b/opendbc/car/toyota/interface.py @@ -1,10 +1,10 @@ from panda import Panda from panda.python import uds -from openpilot.selfdrive.car import structs, get_safety_config -from openpilot.selfdrive.car.toyota.values import Ecu, CAR, DBC, ToyotaFlags, CarControllerParams, TSS2_CAR, RADAR_ACC_CAR, NO_DSU_CAR, \ +from opendbc.car import structs, get_safety_config +from opendbc.car.toyota.values import Ecu, CAR, DBC, ToyotaFlags, CarControllerParams, TSS2_CAR, RADAR_ACC_CAR, NO_DSU_CAR, \ MIN_ACC_SPEED, EPS_SCALE, UNSUPPORTED_DSU_CAR, NO_STOP_TIMER_CAR, ANGLE_CONTROL_CAR -from openpilot.selfdrive.car.disable_ecu import disable_ecu -from openpilot.selfdrive.car.interfaces import CarInterfaceBase +from opendbc.car.disable_ecu import disable_ecu +from opendbc.car.interfaces import CarInterfaceBase SteerControlType = structs.CarParams.SteerControlType diff --git a/opendbc/car/toyota/radar_interface.py b/opendbc/car/toyota/radar_interface.py index 162b8a891d..922dbac278 100755 --- a/opendbc/car/toyota/radar_interface.py +++ b/opendbc/car/toyota/radar_interface.py @@ -1,8 +1,8 @@ #!/usr/bin/env python3 from opendbc.can.parser import CANParser -from openpilot.selfdrive.car.structs import RadarData -from openpilot.selfdrive.car.toyota.values import DBC, TSS2_CAR -from openpilot.selfdrive.car.interfaces import RadarInterfaceBase +from opendbc.car.structs import RadarData +from opendbc.car.toyota.values import DBC, TSS2_CAR +from opendbc.car.interfaces import RadarInterfaceBase def _create_radar_can_parser(car_fingerprint): diff --git a/opendbc/car/toyota/tests/print_platform_codes.py b/opendbc/car/toyota/tests/print_platform_codes.py index 495a9f7242..333e7dca26 100755 --- a/opendbc/car/toyota/tests/print_platform_codes.py +++ b/opendbc/car/toyota/tests/print_platform_codes.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 from collections import defaultdict -from openpilot.selfdrive.car.toyota.values import PLATFORM_CODE_ECUS, get_platform_codes -from openpilot.selfdrive.car.toyota.fingerprints import FW_VERSIONS +from opendbc.car.toyota.values import PLATFORM_CODE_ECUS, get_platform_codes +from opendbc.car.toyota.fingerprints import FW_VERSIONS if __name__ == "__main__": parts_for_ecu: dict = defaultdict(set) diff --git a/opendbc/car/toyota/tests/test_toyota.py b/opendbc/car/toyota/tests/test_toyota.py index 6648e56cef..94c6b7df3a 100644 --- a/opendbc/car/toyota/tests/test_toyota.py +++ b/opendbc/car/toyota/tests/test_toyota.py @@ -1,9 +1,9 @@ from hypothesis import given, settings, strategies as st -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.fw_versions import build_fw_dict -from openpilot.selfdrive.car.toyota.fingerprints import FW_VERSIONS -from openpilot.selfdrive.car.toyota.values import CAR, DBC, TSS2_CAR, ANGLE_CONTROL_CAR, RADAR_ACC_CAR, \ +from opendbc.car.structs import CarParams +from opendbc.car.fw_versions import build_fw_dict +from opendbc.car.toyota.fingerprints import FW_VERSIONS +from opendbc.car.toyota.values import CAR, DBC, TSS2_CAR, ANGLE_CONTROL_CAR, RADAR_ACC_CAR, \ FW_QUERY_CONFIG, PLATFORM_CODE_ECUS, FUZZY_EXCLUDED_PLATFORMS, \ get_platform_codes diff --git a/opendbc/car/toyota/toyotacan.py b/opendbc/car/toyota/toyotacan.py index 8068b8e143..3d97a00db7 100644 --- a/opendbc/car/toyota/toyotacan.py +++ b/opendbc/car/toyota/toyotacan.py @@ -1,4 +1,4 @@ -from openpilot.selfdrive.car.structs import CarParams +from opendbc.car.structs import CarParams SteerControlType = CarParams.SteerControlType diff --git a/opendbc/car/toyota/values.py b/opendbc/car/toyota/values.py index 45b6f7a03d..89acaf29ed 100644 --- a/opendbc/car/toyota/values.py +++ b/opendbc/car/toyota/values.py @@ -3,11 +3,11 @@ from dataclasses import dataclass, field from enum import Enum, IntFlag -from openpilot.selfdrive.car import CarSpecs, PlatformConfig, Platforms, AngleRateLimit, dbc_dict -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.docs_definitions import CarFootnote, CarDocs, Column, CarParts, CarHarness -from openpilot.selfdrive.car.fw_query_definitions import FwQueryConfig, Request, StdQueries +from opendbc.car import CarSpecs, PlatformConfig, Platforms, AngleRateLimit, dbc_dict +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.structs import CarParams +from opendbc.car.docs_definitions import CarFootnote, CarDocs, Column, CarParts, CarHarness +from opendbc.car.fw_query_definitions import FwQueryConfig, Request, StdQueries Ecu = CarParams.Ecu MIN_ACC_SPEED = 19. * CV.MPH_TO_MS diff --git a/opendbc/car/values.py b/opendbc/car/values.py index 0622339f8a..e2e378d8f9 100644 --- a/opendbc/car/values.py +++ b/opendbc/car/values.py @@ -1,16 +1,16 @@ from typing import get_args -from openpilot.selfdrive.car.body.values import CAR as BODY -from openpilot.selfdrive.car.chrysler.values import CAR as CHRYSLER -from openpilot.selfdrive.car.ford.values import CAR as FORD -from openpilot.selfdrive.car.gm.values import CAR as GM -from openpilot.selfdrive.car.honda.values import CAR as HONDA -from openpilot.selfdrive.car.hyundai.values import CAR as HYUNDAI -from openpilot.selfdrive.car.mazda.values import CAR as MAZDA -from openpilot.selfdrive.car.mock.values import CAR as MOCK -from openpilot.selfdrive.car.nissan.values import CAR as NISSAN -from openpilot.selfdrive.car.subaru.values import CAR as SUBARU -from openpilot.selfdrive.car.toyota.values import CAR as TOYOTA -from openpilot.selfdrive.car.volkswagen.values import CAR as VOLKSWAGEN +from opendbc.car.body.values import CAR as BODY +from opendbc.car.chrysler.values import CAR as CHRYSLER +from opendbc.car.ford.values import CAR as FORD +from opendbc.car.gm.values import CAR as GM +from opendbc.car.honda.values import CAR as HONDA +from opendbc.car.hyundai.values import CAR as HYUNDAI +from opendbc.car.mazda.values import CAR as MAZDA +from opendbc.car.mock.values import CAR as MOCK +from opendbc.car.nissan.values import CAR as NISSAN +from opendbc.car.subaru.values import CAR as SUBARU +from opendbc.car.toyota.values import CAR as TOYOTA +from opendbc.car.volkswagen.values import CAR as VOLKSWAGEN Platform = BODY | CHRYSLER | FORD | GM | HONDA | HYUNDAI | MAZDA | MOCK | NISSAN | SUBARU | TOYOTA | VOLKSWAGEN BRANDS = get_args(Platform) diff --git a/opendbc/car/vin.py b/opendbc/car/vin.py index 9660e35cec..e12a53bfe4 100644 --- a/opendbc/car/vin.py +++ b/opendbc/car/vin.py @@ -1,9 +1,9 @@ import re from panda.python.uds import get_rx_addr_for_tx_addr, FUNCTIONAL_ADDRS -from openpilot.selfdrive.car import carlog -from openpilot.selfdrive.car.isotp_parallel_query import IsoTpParallelQuery -from openpilot.selfdrive.car.fw_query_definitions import STANDARD_VIN_ADDRS, StdQueries +from opendbc.car import carlog +from opendbc.car.isotp_parallel_query import IsoTpParallelQuery +from opendbc.car.fw_query_definitions import STANDARD_VIN_ADDRS, StdQueries VIN_UNKNOWN = "0" * 17 VIN_RE = "[A-HJ-NPR-Z0-9]{17}" diff --git a/opendbc/car/volkswagen/carcontroller.py b/opendbc/car/volkswagen/carcontroller.py index 1f46520cb9..8f42ca35be 100644 --- a/opendbc/car/volkswagen/carcontroller.py +++ b/opendbc/car/volkswagen/carcontroller.py @@ -1,11 +1,11 @@ import copy from opendbc.can.packer import CANPacker -from openpilot.selfdrive.car import DT_CTRL, apply_driver_steer_torque_limits, structs -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.common.numpy_fast import clip -from openpilot.selfdrive.car.interfaces import CarControllerBase -from openpilot.selfdrive.car.volkswagen import mqbcan, pqcan -from openpilot.selfdrive.car.volkswagen.values import CANBUS, CarControllerParams, VolkswagenFlags +from opendbc.car import DT_CTRL, apply_driver_steer_torque_limits, structs +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.common.numpy_fast import clip +from opendbc.car.interfaces import CarControllerBase +from opendbc.car.volkswagen import mqbcan, pqcan +from opendbc.car.volkswagen.values import CANBUS, CarControllerParams, VolkswagenFlags VisualAlert = structs.CarControl.HUDControl.VisualAlert LongCtrlState = structs.CarControl.Actuators.LongControlState diff --git a/opendbc/car/volkswagen/carstate.py b/opendbc/car/volkswagen/carstate.py index b441c73f3e..b98f4ae06c 100644 --- a/opendbc/car/volkswagen/carstate.py +++ b/opendbc/car/volkswagen/carstate.py @@ -1,9 +1,9 @@ import numpy as np from opendbc.can.parser import CANParser -from openpilot.selfdrive.car import structs -from openpilot.selfdrive.car.interfaces import CarStateBase -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car.volkswagen.values import DBC, CANBUS, NetworkLocation, TransmissionType, GearShifter, \ +from opendbc.car import structs +from opendbc.car.interfaces import CarStateBase +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car.volkswagen.values import DBC, CANBUS, NetworkLocation, TransmissionType, GearShifter, \ CarControllerParams, VolkswagenFlags diff --git a/opendbc/car/volkswagen/fingerprints.py b/opendbc/car/volkswagen/fingerprints.py index 4c17b9113f..83756830a6 100644 --- a/opendbc/car/volkswagen/fingerprints.py +++ b/opendbc/car/volkswagen/fingerprints.py @@ -1,5 +1,5 @@ -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.volkswagen.values import CAR +from opendbc.car.structs import CarParams +from opendbc.car.volkswagen.values import CAR Ecu = CarParams.Ecu diff --git a/opendbc/car/volkswagen/interface.py b/opendbc/car/volkswagen/interface.py index 96f3493fe8..2361062fa5 100644 --- a/opendbc/car/volkswagen/interface.py +++ b/opendbc/car/volkswagen/interface.py @@ -1,7 +1,7 @@ from panda import Panda -from openpilot.selfdrive.car import get_safety_config, structs -from openpilot.selfdrive.car.interfaces import CarInterfaceBase -from openpilot.selfdrive.car.volkswagen.values import CAR, NetworkLocation, TransmissionType, VolkswagenFlags +from opendbc.car import get_safety_config, structs +from opendbc.car.interfaces import CarInterfaceBase +from opendbc.car.volkswagen.values import CAR, NetworkLocation, TransmissionType, VolkswagenFlags class CarInterface(CarInterfaceBase): diff --git a/opendbc/car/volkswagen/radar_interface.py b/opendbc/car/volkswagen/radar_interface.py index e654bd61fd..6e552bf618 100644 --- a/opendbc/car/volkswagen/radar_interface.py +++ b/opendbc/car/volkswagen/radar_interface.py @@ -1,4 +1,4 @@ -from openpilot.selfdrive.car.interfaces import RadarInterfaceBase +from opendbc.car.interfaces import RadarInterfaceBase class RadarInterface(RadarInterfaceBase): pass diff --git a/opendbc/car/volkswagen/tests/test_volkswagen.py b/opendbc/car/volkswagen/tests/test_volkswagen.py index ba27806dda..cc046e5720 100644 --- a/opendbc/car/volkswagen/tests/test_volkswagen.py +++ b/opendbc/car/volkswagen/tests/test_volkswagen.py @@ -1,9 +1,9 @@ import random import re -from openpilot.selfdrive.car.structs import CarParams -from openpilot.selfdrive.car.volkswagen.values import CAR, FW_QUERY_CONFIG, WMI -from openpilot.selfdrive.car.volkswagen.fingerprints import FW_VERSIONS +from opendbc.car.structs import CarParams +from opendbc.car.volkswagen.values import CAR, FW_QUERY_CONFIG, WMI +from opendbc.car.volkswagen.fingerprints import FW_VERSIONS Ecu = CarParams.Ecu diff --git a/opendbc/car/volkswagen/values.py b/opendbc/car/volkswagen/values.py index 53161e98a1..e69deedd83 100644 --- a/opendbc/car/volkswagen/values.py +++ b/opendbc/car/volkswagen/values.py @@ -4,12 +4,12 @@ from panda.python import uds from opendbc.can.can_define import CANDefine -from openpilot.selfdrive.car import dbc_dict, CarSpecs, DbcDict, PlatformConfig, Platforms -from openpilot.selfdrive.car.common.conversions import Conversions as CV -from openpilot.selfdrive.car import structs -from openpilot.selfdrive.car.docs_definitions import CarFootnote, CarHarness, CarDocs, CarParts, Column, \ +from opendbc.car import dbc_dict, CarSpecs, DbcDict, PlatformConfig, Platforms +from opendbc.car.common.conversions import Conversions as CV +from opendbc.car import structs +from opendbc.car.docs_definitions import CarFootnote, CarHarness, CarDocs, CarParts, Column, \ Device -from openpilot.selfdrive.car.fw_query_definitions import EcuAddrSubAddr, FwQueryConfig, Request, p16 +from opendbc.car.fw_query_definitions import EcuAddrSubAddr, FwQueryConfig, Request, p16 Ecu = structs.CarParams.Ecu NetworkLocation = structs.CarParams.NetworkLocation