mirror of https://github.com/commaai/openpilot.git
add openpilot prefix to imports (#29498)
* add openpilot prefix to imports * more * more * fix docs * fix linter * bump submodules * fix patched tests * update dynamic imports * debug * Revert "debug" This reverts commitdb5e13b991
. * fix pm test old-commit-hash:a9626f95b6
This commit is contained in:
parent
51634f52dc
commit
16ec56398c
|
@ -10,6 +10,7 @@ WORKDIR ${OPENPILOT_PATH}
|
|||
|
||||
COPY SConstruct ${OPENPILOT_PATH}
|
||||
|
||||
COPY ./openpilot ${OPENPILOT_PATH}/openpilot
|
||||
COPY ./third_party ${OPENPILOT_PATH}/third_party
|
||||
COPY ./site_scons ${OPENPILOT_PATH}/site_scons
|
||||
COPY ./laika ${OPENPILOT_PATH}/laika
|
||||
|
|
|
@ -2,8 +2,8 @@ import jwt
|
|||
import os
|
||||
import requests
|
||||
from datetime import datetime, timedelta
|
||||
from common.basedir import PERSIST
|
||||
from system.version import get_version
|
||||
from openpilot.common.basedir import PERSIST
|
||||
from openpilot.system.version import get_version
|
||||
|
||||
API_HOST = os.getenv('API_HOST', 'https://api.commadotai.com')
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from system.hardware import PC
|
||||
from openpilot.system.hardware import PC
|
||||
|
||||
BASEDIR = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../"))
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# pylint: skip-file
|
||||
from common.kalman.simple_kalman_impl import KF1D as KF1D
|
||||
from openpilot.common.kalman.simple_kalman_impl import KF1D as KF1D
|
||||
assert KF1D
|
||||
|
|
|
@ -3,8 +3,8 @@ import random
|
|||
import timeit
|
||||
import numpy as np
|
||||
|
||||
from common.kalman.simple_kalman import KF1D
|
||||
from common.kalman.simple_kalman_old import KF1D as KF1D_old
|
||||
from openpilot.common.kalman.simple_kalman import KF1D
|
||||
from openpilot.common.kalman.simple_kalman_old import KF1D as KF1D_old
|
||||
|
||||
|
||||
class TestSimpleKalman(unittest.TestCase):
|
||||
|
@ -54,8 +54,8 @@ class TestSimpleKalman(unittest.TestCase):
|
|||
setup = """
|
||||
import numpy as np
|
||||
|
||||
from common.kalman.simple_kalman import KF1D
|
||||
from common.kalman.simple_kalman_old import KF1D as KF1D_old
|
||||
from openpilot.common.kalman.simple_kalman import KF1D
|
||||
from openpilot.common.kalman.simple_kalman_old import KF1D as KF1D_old
|
||||
|
||||
dt = 0.01
|
||||
x0_0 = 0.0
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
from common.params_pyx import Params, ParamKeyType, UnknownKeyName, put_nonblocking, put_bool_nonblocking # pylint: disable=no-name-in-module, import-error
|
||||
from openpilot.common.params_pyx import Params, ParamKeyType, UnknownKeyName, put_nonblocking, \
|
||||
put_bool_nonblocking # pylint: disable=no-name-in-module, import-error
|
||||
assert Params
|
||||
assert ParamKeyType
|
||||
assert UnknownKeyName
|
||||
|
|
|
@ -7,7 +7,7 @@ from typing import Optional, List, Union
|
|||
|
||||
from setproctitle import getproctitle
|
||||
|
||||
from system.hardware import PC
|
||||
from openpilot.system.hardware import PC
|
||||
|
||||
|
||||
# time step for each process
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import os
|
||||
import subprocess
|
||||
from common.basedir import BASEDIR
|
||||
from openpilot.common.basedir import BASEDIR
|
||||
|
||||
|
||||
class Spinner():
|
||||
|
|
|
@ -2,8 +2,8 @@ import os
|
|||
import unittest
|
||||
from uuid import uuid4
|
||||
|
||||
from common.file_helpers import atomic_write_on_fs_tmp
|
||||
from common.file_helpers import atomic_write_in_dir
|
||||
from openpilot.common.file_helpers import atomic_write_on_fs_tmp
|
||||
from openpilot.common.file_helpers import atomic_write_in_dir
|
||||
|
||||
|
||||
class TestFileHelpers(unittest.TestCase):
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import numpy as np
|
||||
import unittest
|
||||
|
||||
from common.numpy_fast import interp
|
||||
from openpilot.common.numpy_fast import interp
|
||||
|
||||
|
||||
class InterpTest(unittest.TestCase):
|
||||
|
|
|
@ -6,7 +6,7 @@ import shutil
|
|||
import uuid
|
||||
import unittest
|
||||
|
||||
from common.params import Params, ParamKeyType, UnknownKeyName, put_nonblocking, put_bool_nonblocking
|
||||
from openpilot.common.params import Params, ParamKeyType, UnknownKeyName, put_nonblocking, put_bool_nonblocking
|
||||
|
||||
class TestParams(unittest.TestCase):
|
||||
def setUp(self):
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import os
|
||||
import time
|
||||
import subprocess
|
||||
from common.basedir import BASEDIR
|
||||
from openpilot.common.basedir import BASEDIR
|
||||
|
||||
|
||||
class TextWindow:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import numpy as np
|
||||
|
||||
import common.transformations.orientation as orient
|
||||
import openpilot.common.transformations.orientation as orient
|
||||
|
||||
## -- hardcoded hardware params --
|
||||
eon_f_focal_length = 910.0
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# pylint: skip-file
|
||||
from common.transformations.orientation import numpy_wrap
|
||||
from common.transformations.transformations import (ecef2geodetic_single,
|
||||
from openpilot.common.transformations.orientation import numpy_wrap
|
||||
from openpilot.common.transformations.transformations import (ecef2geodetic_single,
|
||||
geodetic2ecef_single)
|
||||
from common.transformations.transformations import LocalCoord as LocalCoord_single
|
||||
from openpilot.common.transformations.transformations import LocalCoord as LocalCoord_single
|
||||
|
||||
|
||||
class LocalCoord(LocalCoord_single):
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import numpy as np
|
||||
|
||||
from common.transformations.camera import (FULL_FRAME_SIZE,
|
||||
from openpilot.common.transformations.camera import (FULL_FRAME_SIZE,
|
||||
get_view_frame_from_calib_frame)
|
||||
|
||||
# segnet
|
||||
|
@ -61,8 +61,8 @@ medmodel_frame_from_bigmodel_frame = np.dot(medmodel_intrinsics, np.linalg.inv(b
|
|||
### This function mimics the update_calibration logic in modeld.cc
|
||||
### Manually verified to give similar results to xx.uncommon.utils.transform_img
|
||||
def get_warp_matrix(rpy_calib, wide_cam=False, big_model=False, tici=True):
|
||||
from common.transformations.orientation import rot_from_euler
|
||||
from common.transformations.camera import view_frame_from_device_frame, eon_fcam_intrinsics, tici_ecam_intrinsics, tici_fcam_intrinsics
|
||||
from openpilot.common.transformations.orientation import rot_from_euler
|
||||
from openpilot.common.transformations.camera import view_frame_from_device_frame, eon_fcam_intrinsics, tici_ecam_intrinsics, tici_fcam_intrinsics
|
||||
|
||||
if tici and wide_cam:
|
||||
intrinsics = tici_ecam_intrinsics
|
||||
|
@ -85,8 +85,8 @@ def get_warp_matrix(rpy_calib, wide_cam=False, big_model=False, tici=True):
|
|||
|
||||
### This is old, just for debugging
|
||||
def get_warp_matrix_old(rpy_calib, wide_cam=False, big_model=False, tici=True):
|
||||
from common.transformations.orientation import rot_from_euler
|
||||
from common.transformations.camera import view_frame_from_device_frame, eon_fcam_intrinsics, tici_ecam_intrinsics, tici_fcam_intrinsics
|
||||
from openpilot.common.transformations.orientation import rot_from_euler
|
||||
from openpilot.common.transformations.camera import view_frame_from_device_frame, eon_fcam_intrinsics, tici_ecam_intrinsics, tici_fcam_intrinsics
|
||||
|
||||
|
||||
def get_view_frame_from_road_frame(roll, pitch, yaw, height):
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import numpy as np
|
||||
from typing import Callable
|
||||
|
||||
from common.transformations.transformations import (ecef_euler_from_ned_single,
|
||||
from openpilot.common.transformations.transformations import (ecef_euler_from_ned_single,
|
||||
euler2quat_single,
|
||||
euler2rot_single,
|
||||
ned_euler_from_ecef_single,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import numpy as np
|
||||
import unittest
|
||||
|
||||
import common.transformations.coordinates as coord
|
||||
import openpilot.common.transformations.coordinates as coord
|
||||
|
||||
geodetic_positions = np.array([[37.7610403, -122.4778699, 115],
|
||||
[27.4840915, -68.5867592, 2380],
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import numpy as np
|
||||
import unittest
|
||||
|
||||
from common.transformations.orientation import euler2quat, quat2euler, euler2rot, rot2euler, \
|
||||
from openpilot.common.transformations.orientation import euler2quat, quat2euler, euler2rot, rot2euler, \
|
||||
rot2quat, quat2rot, \
|
||||
ned_euler_from_ecef
|
||||
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
# distutils: language = c++
|
||||
# cython: language_level = 3
|
||||
from common.transformations.transformations cimport Matrix3, Vector3, Quaternion
|
||||
from common.transformations.transformations cimport ECEF, NED, Geodetic
|
||||
from openpilot.common.transformations.transformations cimport Matrix3, Vector3, Quaternion
|
||||
from openpilot.common.transformations.transformations cimport ECEF, NED, Geodetic
|
||||
|
||||
from common.transformations.transformations cimport euler2quat as euler2quat_c
|
||||
from common.transformations.transformations cimport quat2euler as quat2euler_c
|
||||
from common.transformations.transformations cimport quat2rot as quat2rot_c
|
||||
from common.transformations.transformations cimport rot2quat as rot2quat_c
|
||||
from common.transformations.transformations cimport euler2rot as euler2rot_c
|
||||
from common.transformations.transformations cimport rot2euler as rot2euler_c
|
||||
from common.transformations.transformations cimport rot_matrix as rot_matrix_c
|
||||
from common.transformations.transformations cimport ecef_euler_from_ned as ecef_euler_from_ned_c
|
||||
from common.transformations.transformations cimport ned_euler_from_ecef as ned_euler_from_ecef_c
|
||||
from common.transformations.transformations cimport geodetic2ecef as geodetic2ecef_c
|
||||
from common.transformations.transformations cimport ecef2geodetic as ecef2geodetic_c
|
||||
from common.transformations.transformations cimport LocalCoord_c
|
||||
from openpilot.common.transformations.transformations cimport euler2quat as euler2quat_c
|
||||
from openpilot.common.transformations.transformations cimport quat2euler as quat2euler_c
|
||||
from openpilot.common.transformations.transformations cimport quat2rot as quat2rot_c
|
||||
from openpilot.common.transformations.transformations cimport rot2quat as rot2quat_c
|
||||
from openpilot.common.transformations.transformations cimport euler2rot as euler2rot_c
|
||||
from openpilot.common.transformations.transformations cimport rot2euler as rot2euler_c
|
||||
from openpilot.common.transformations.transformations cimport rot_matrix as rot_matrix_c
|
||||
from openpilot.common.transformations.transformations cimport ecef_euler_from_ned as ecef_euler_from_ned_c
|
||||
from openpilot.common.transformations.transformations cimport ned_euler_from_ecef as ned_euler_from_ecef_c
|
||||
from openpilot.common.transformations.transformations cimport geodetic2ecef as geodetic2ecef_c
|
||||
from openpilot.common.transformations.transformations cimport ecef2geodetic as ecef2geodetic_c
|
||||
from openpilot.common.transformations.transformations cimport LocalCoord_c
|
||||
|
||||
|
||||
import cython
|
||||
|
|
|
@ -17,8 +17,8 @@ import os
|
|||
import sys
|
||||
from os.path import exists
|
||||
|
||||
from common.basedir import BASEDIR
|
||||
from system.version import get_version
|
||||
from openpilot.common.basedir import BASEDIR
|
||||
from openpilot.system.version import get_version
|
||||
|
||||
sys.path.insert(0, os.path.abspath('.'))
|
||||
sys.path.insert(0, os.path.abspath('..'))
|
||||
|
|
|
@ -11,6 +11,7 @@ WORKDIR ${OPENPILOT_PATH}
|
|||
|
||||
COPY SConstruct ${OPENPILOT_PATH}
|
||||
|
||||
COPY ./openpilot ${OPENPILOT_PATH}/openpilot
|
||||
COPY ./body ${OPENPILOT_PATH}/body
|
||||
COPY ./third_party ${OPENPILOT_PATH}/third_party
|
||||
COPY ./site_scons ${OPENPILOT_PATH}/site_scons
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit ef21c612f4b0d68c790b4b1a6d637cd5fce7732e
|
||||
Subproject commit 65901a1e6c7c7940d8c97027d3edaca7d0132253
|
2
panda
2
panda
|
@ -1 +1 @@
|
|||
Subproject commit aed103d5372d1e5b3fb686d2aa8f111081b37fd0
|
||||
Subproject commit 57ec466a91d1e2d51b43d54417091a50f0c9dc78
|
|
@ -15,6 +15,9 @@ docs/INTEGRATION.md
|
|||
docs/LIMITATIONS.md
|
||||
site_scons/site_tools/cython.py
|
||||
|
||||
openpilot/__init__.py
|
||||
openpilot/**
|
||||
|
||||
common/.gitignore
|
||||
common/__init__.py
|
||||
common/conversions.py
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
from collections import Counter
|
||||
from pprint import pprint
|
||||
|
||||
from selfdrive.car.docs import get_all_car_info
|
||||
from openpilot.selfdrive.car.docs import get_all_car_info
|
||||
|
||||
if __name__ == "__main__":
|
||||
cars = get_all_car_info()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
from system.hardware import HARDWARE
|
||||
from openpilot.system.hardware import HARDWARE
|
||||
|
||||
if __name__ == "__main__":
|
||||
HARDWARE.set_power_save(False)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
from PyQt5.QtWidgets import QApplication, QLabel # pylint: disable=no-name-in-module, import-error
|
||||
from selfdrive.ui.qt.python_helpers import set_main_window
|
||||
from openpilot.selfdrive.ui.qt.python_helpers import set_main_window
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
@ -3,10 +3,10 @@ import os
|
|||
import time
|
||||
import numpy as np
|
||||
from multiprocessing import Process
|
||||
from setproctitle import setproctitle # pylint: disable=no-name-in-module
|
||||
from setproctitle import setproctitle
|
||||
|
||||
def waste(core):
|
||||
os.sched_setaffinity(0, [core,]) # pylint: disable=no-member
|
||||
os.sched_setaffinity(0, [core,])
|
||||
|
||||
m1 = np.zeros((200, 200)) + 0.8
|
||||
m2 = np.zeros((200, 200)) + 1.2
|
||||
|
|
|
@ -30,17 +30,17 @@ from websocket import (ABNF, WebSocket, WebSocketException, WebSocketTimeoutExce
|
|||
import cereal.messaging as messaging
|
||||
from cereal import log
|
||||
from cereal.services import service_list
|
||||
from common.api import Api
|
||||
from common.basedir import PERSIST
|
||||
from common.file_helpers import CallbackReader
|
||||
from common.params import Params
|
||||
from common.realtime import set_core_affinity
|
||||
from system.hardware import HARDWARE, PC, AGNOS
|
||||
from system.loggerd.config import ROOT
|
||||
from system.loggerd.xattr_cache import getxattr, setxattr
|
||||
from selfdrive.statsd import STATS_DIR
|
||||
from system.swaglog import SWAGLOG_DIR, cloudlog
|
||||
from system.version import get_commit, get_origin, get_short_branch, get_version
|
||||
from openpilot.common.api import Api
|
||||
from openpilot.common.basedir import PERSIST
|
||||
from openpilot.common.file_helpers import CallbackReader
|
||||
from openpilot.common.params import Params
|
||||
from openpilot.common.realtime import set_core_affinity
|
||||
from openpilot.system.hardware import HARDWARE, PC, AGNOS
|
||||
from openpilot.system.loggerd.config import ROOT
|
||||
from openpilot.system.loggerd.xattr_cache import getxattr, setxattr
|
||||
from openpilot.selfdrive.statsd import STATS_DIR
|
||||
from openpilot.system.swaglog import SWAGLOG_DIR, cloudlog
|
||||
from openpilot.system.version import get_commit, get_origin, get_short_branch, get_version
|
||||
|
||||
|
||||
# TODO: use socket constant when mypy recognizes this as a valid attribute
|
||||
|
@ -552,7 +552,7 @@ def getNetworks():
|
|||
|
||||
@dispatcher.add_method
|
||||
def takeSnapshot() -> Optional[Union[str, Dict[str, str]]]:
|
||||
from system.camerad.snapshot.snapshot import jpeg_write, snapshot
|
||||
from openpilot.system.camerad.snapshot.snapshot import jpeg_write, snapshot
|
||||
ret = snapshot()
|
||||
if ret is not None:
|
||||
def b64jpeg(x):
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
import time
|
||||
from multiprocessing import Process
|
||||
|
||||
from common.params import Params
|
||||
from selfdrive.manager.process import launcher
|
||||
from system.swaglog import cloudlog
|
||||
from system.version import get_version, is_dirty
|
||||
from openpilot.common.params import Params
|
||||
from openpilot.selfdrive.manager.process import launcher
|
||||
from openpilot.system.swaglog import cloudlog
|
||||
from openpilot.system.version import get_version, is_dirty
|
||||
|
||||
ATHENA_MGR_PID_PARAM = "AthenadPid"
|
||||
|
||||
|
|
|
@ -6,13 +6,13 @@ from pathlib import Path
|
|||
from typing import Optional
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
from common.api import api_get
|
||||
from common.params import Params
|
||||
from common.spinner import Spinner
|
||||
from common.basedir import PERSIST
|
||||
from selfdrive.controls.lib.alertmanager import set_offroad_alert
|
||||
from system.hardware import HARDWARE, PC
|
||||
from system.swaglog import cloudlog
|
||||
from openpilot.common.api import api_get
|
||||
from openpilot.common.params import Params
|
||||
from openpilot.common.spinner import Spinner
|
||||
from openpilot.common.basedir import PERSIST
|
||||
from openpilot.selfdrive.controls.lib.alertmanager import set_offroad_alert
|
||||
from openpilot.system.hardware import HARDWARE, PC
|
||||
from openpilot.system.swaglog import cloudlog
|
||||
|
||||
|
||||
UNREGISTERED_DONGLE_ID = "UnregisteredDevice"
|
||||
|
|
|
@ -6,7 +6,7 @@ import time
|
|||
from functools import wraps
|
||||
from multiprocessing import Process
|
||||
|
||||
from common.timeout import Timeout
|
||||
from openpilot.common.timeout import Timeout
|
||||
|
||||
|
||||
class MockResponse:
|
||||
|
|
|
@ -18,10 +18,10 @@ from unittest import mock
|
|||
from websocket import ABNF
|
||||
from websocket._exceptions import WebSocketConnectionClosedException
|
||||
|
||||
from system import swaglog
|
||||
from selfdrive.athena import athenad
|
||||
from selfdrive.athena.athenad import MAX_RETRY_COUNT, dispatcher
|
||||
from selfdrive.athena.tests.helpers import MockWebsocket, MockParams, MockApi, EchoSocket, with_http_server
|
||||
from openpilot.system import swaglog
|
||||
from openpilot.selfdrive.athena import athenad
|
||||
from openpilot.selfdrive.athena.athenad import MAX_RETRY_COUNT, dispatcher
|
||||
from openpilot.selfdrive.athena.tests.helpers import MockWebsocket, MockParams, MockApi, EchoSocket, with_http_server
|
||||
from cereal import messaging
|
||||
|
||||
|
||||
|
@ -351,7 +351,7 @@ class TestAthenadMethods(unittest.TestCase):
|
|||
self.assertEqual(athenad.upload_queue.qsize(), 1)
|
||||
self.assertDictEqual(asdict(athenad.upload_queue.queue[-1]), asdict(item1))
|
||||
|
||||
@mock.patch('selfdrive.athena.athenad.create_connection')
|
||||
@mock.patch('openpilot.selfdrive.athena.athenad.create_connection')
|
||||
def test_startLocalProxy(self, mock_create_connection):
|
||||
end_event = threading.Event()
|
||||
|
||||
|
|
|
@ -6,11 +6,11 @@ import unittest
|
|||
from typing import Callable, cast, Optional
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
from common.params import Params
|
||||
from common.timeout import Timeout
|
||||
from selfdrive.athena import athenad
|
||||
from selfdrive.manager.helpers import write_onroad_params
|
||||
from system.hardware import TICI
|
||||
from openpilot.common.params import Params
|
||||
from openpilot.common.timeout import Timeout
|
||||
from openpilot.selfdrive.athena import athenad
|
||||
from openpilot.selfdrive.manager.helpers import write_onroad_params
|
||||
from openpilot.system.hardware import TICI
|
||||
|
||||
|
||||
def wifi_radio(on: bool) -> None:
|
||||
|
|
|
@ -7,9 +7,9 @@ from Crypto.PublicKey import RSA
|
|||
from pathlib import Path
|
||||
from unittest import mock
|
||||
|
||||
from common.params import Params
|
||||
from selfdrive.athena.registration import register, UNREGISTERED_DONGLE_ID
|
||||
from selfdrive.athena.tests.helpers import MockResponse
|
||||
from openpilot.common.params import Params
|
||||
from openpilot.selfdrive.athena.registration import register, UNREGISTERED_DONGLE_ID
|
||||
from openpilot.selfdrive.athena.tests.helpers import MockResponse
|
||||
|
||||
|
||||
class TestRegistration(unittest.TestCase):
|
||||
|
@ -23,7 +23,7 @@ class TestRegistration(unittest.TestCase):
|
|||
os.mkdir(os.path.join(self.persist.name, "comma"))
|
||||
self.priv_key = Path(os.path.join(self.persist.name, "comma/id_rsa"))
|
||||
self.pub_key = Path(os.path.join(self.persist.name, "comma/id_rsa.pub"))
|
||||
self.persist_patcher = mock.patch("selfdrive.athena.registration.PERSIST", self.persist.name)
|
||||
self.persist_patcher = mock.patch("openpilot.selfdrive.athena.registration.PERSIST", self.persist.name)
|
||||
self.persist_patcher.start()
|
||||
|
||||
def tearDown(self):
|
||||
|
@ -44,7 +44,7 @@ class TestRegistration(unittest.TestCase):
|
|||
self.params.put("HardwareSerial", "serial")
|
||||
self._generate_keys()
|
||||
|
||||
with mock.patch("selfdrive.athena.registration.api_get", autospec=True) as m:
|
||||
with mock.patch("openpilot.selfdrive.athena.registration.api_get", autospec=True) as m:
|
||||
dongle = "DONGLE_ID_123"
|
||||
self.params.put("DongleId", dongle)
|
||||
self.assertEqual(register(), dongle)
|
||||
|
@ -52,7 +52,7 @@ class TestRegistration(unittest.TestCase):
|
|||
|
||||
def test_no_keys(self):
|
||||
# missing pubkey
|
||||
with mock.patch("selfdrive.athena.registration.api_get", autospec=True) as m:
|
||||
with mock.patch("openpilot.selfdrive.athena.registration.api_get", autospec=True) as m:
|
||||
dongle = register()
|
||||
self.assertEqual(m.call_count, 0)
|
||||
self.assertEqual(dongle, UNREGISTERED_DONGLE_ID)
|
||||
|
@ -61,7 +61,7 @@ class TestRegistration(unittest.TestCase):
|
|||
def test_missing_cache(self):
|
||||
# keys exist but no dongle id
|
||||
self._generate_keys()
|
||||
with mock.patch("selfdrive.athena.registration.api_get", autospec=True) as m:
|
||||
with mock.patch("openpilot.selfdrive.athena.registration.api_get", autospec=True) as m:
|
||||
dongle = "DONGLE_ID_123"
|
||||
m.return_value = MockResponse(json.dumps({'dongle_id': dongle}), 200)
|
||||
self.assertEqual(register(), dongle)
|
||||
|
@ -75,7 +75,7 @@ class TestRegistration(unittest.TestCase):
|
|||
def test_unregistered(self):
|
||||
# keys exist, but unregistered
|
||||
self._generate_keys()
|
||||
with mock.patch("selfdrive.athena.registration.api_get", autospec=True) as m:
|
||||
with mock.patch("openpilot.selfdrive.athena.registration.api_get", autospec=True) as m:
|
||||
m.return_value = MockResponse(None, 402)
|
||||
dongle = register()
|
||||
self.assertEqual(m.call_count, 1)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# pylint: skip-file
|
||||
|
||||
# Cython, now uses scons to build
|
||||
from selfdrive.boardd.boardd_api_impl import can_list_to_can_capnp
|
||||
from openpilot.selfdrive.boardd.boardd_api_impl import can_list_to_can_capnp
|
||||
assert can_list_to_can_capnp
|
||||
|
||||
def can_capnp_to_can_list(can, src_filter=None):
|
||||
|
|
|
@ -9,11 +9,11 @@ from typing import List, NoReturn
|
|||
from functools import cmp_to_key
|
||||
|
||||
from panda import Panda, PandaDFU, PandaProtocolMismatch, FW_PATH
|
||||
from common.basedir import BASEDIR
|
||||
from common.params import Params
|
||||
from selfdrive.boardd.set_time import set_time
|
||||
from system.hardware import HARDWARE
|
||||
from system.swaglog import cloudlog
|
||||
from openpilot.common.basedir import BASEDIR
|
||||
from openpilot.common.params import Params
|
||||
from openpilot.selfdrive.boardd.set_time import set_time
|
||||
from openpilot.system.hardware import HARDWARE
|
||||
from openpilot.system.swaglog import cloudlog
|
||||
|
||||
|
||||
def get_expected_signature(panda: Panda) -> bytes:
|
||||
|
|
|
@ -3,7 +3,7 @@ import os
|
|||
import datetime
|
||||
from panda import Panda
|
||||
|
||||
from common.time import MIN_DATE
|
||||
from openpilot.common.time import MIN_DATE
|
||||
|
||||
def set_time(logger):
|
||||
sys_time = datetime.datetime.today()
|
||||
|
|
|
@ -9,12 +9,12 @@ from pprint import pprint
|
|||
|
||||
import cereal.messaging as messaging
|
||||
from cereal import car, log
|
||||
from common.params import Params
|
||||
from common.timeout import Timeout
|
||||
from selfdrive.boardd.boardd import can_list_to_can_capnp
|
||||
from selfdrive.car import make_can_msg
|
||||
from system.hardware import TICI
|
||||
from selfdrive.test.helpers import phone_only, with_processes
|
||||
from openpilot.common.params import Params
|
||||
from openpilot.common.timeout import Timeout
|
||||
from openpilot.selfdrive.boardd.boardd import can_list_to_can_capnp
|
||||
from openpilot.selfdrive.car import make_can_msg
|
||||
from openpilot.system.hardware import TICI
|
||||
from openpilot.selfdrive.test.helpers import phone_only, with_processes
|
||||
|
||||
|
||||
class TestBoardd(unittest.TestCase):
|
||||
|
|
|
@ -5,13 +5,13 @@ import unittest
|
|||
|
||||
import cereal.messaging as messaging
|
||||
from cereal import log
|
||||
from common.gpio import gpio_set, gpio_init
|
||||
from common.params import Params
|
||||
from openpilot.common.gpio import gpio_set, gpio_init
|
||||
from openpilot.common.params import Params
|
||||
from panda import Panda, PandaDFU, PandaProtocolMismatch
|
||||
from selfdrive.test.helpers import phone_only
|
||||
from selfdrive.manager.process_config import managed_processes
|
||||
from system.hardware import HARDWARE
|
||||
from system.hardware.tici.pins import GPIO
|
||||
from openpilot.selfdrive.test.helpers import phone_only
|
||||
from openpilot.selfdrive.manager.process_config import managed_processes
|
||||
from openpilot.system.hardware import HARDWARE
|
||||
from openpilot.system.hardware.tici.pins import GPIO
|
||||
|
||||
HERE = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ from typing import Dict, Optional
|
|||
import capnp
|
||||
|
||||
from cereal import car
|
||||
from common.numpy_fast import clip, interp
|
||||
from openpilot.common.numpy_fast import clip, interp
|
||||
|
||||
|
||||
# kg of standard extra cargo to count for drive, gas, etc...
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import numpy as np
|
||||
|
||||
from common.params import Params
|
||||
from common.realtime import DT_CTRL
|
||||
from openpilot.common.params import Params
|
||||
from openpilot.common.realtime import DT_CTRL
|
||||
from opendbc.can.packer import CANPacker
|
||||
from selfdrive.car.body import bodycan
|
||||
from selfdrive.car.body.values import SPEED_FROM_RPM
|
||||
from selfdrive.controls.lib.pid import PIDController
|
||||
from openpilot.selfdrive.car.body import bodycan
|
||||
from openpilot.selfdrive.car.body.values import SPEED_FROM_RPM
|
||||
from openpilot.selfdrive.controls.lib.pid import PIDController
|
||||
|
||||
|
||||
MAX_TORQUE = 500
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from cereal import car
|
||||
from opendbc.can.parser import CANParser
|
||||
from selfdrive.car.interfaces import CarStateBase
|
||||
from selfdrive.car.body.values import DBC
|
||||
from openpilot.selfdrive.car.interfaces import CarStateBase
|
||||
from openpilot.selfdrive.car.body.values import DBC
|
||||
|
||||
STARTUP_TICKS = 100
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#!/usr/bin/env python3
|
||||
import math
|
||||
from cereal import car
|
||||
from common.realtime import DT_CTRL
|
||||
from selfdrive.car import get_safety_config
|
||||
from selfdrive.car.interfaces import CarInterfaceBase
|
||||
from selfdrive.car.body.values import SPEED_FROM_RPM
|
||||
from openpilot.common.realtime import DT_CTRL
|
||||
from openpilot.selfdrive.car import get_safety_config
|
||||
from openpilot.selfdrive.car.interfaces import CarInterfaceBase
|
||||
from openpilot.selfdrive.car.body.values import SPEED_FROM_RPM
|
||||
|
||||
class CarInterface(CarInterfaceBase):
|
||||
@staticmethod
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
from selfdrive.car.interfaces import RadarInterfaceBase
|
||||
from openpilot.selfdrive.car.interfaces import RadarInterfaceBase
|
||||
|
||||
class RadarInterface(RadarInterfaceBase):
|
||||
pass
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
from typing import Dict
|
||||
|
||||
from cereal import car
|
||||
from selfdrive.car import dbc_dict
|
||||
from selfdrive.car.docs_definitions import CarInfo
|
||||
from selfdrive.car.fw_query_definitions import FwQueryConfig, Request, StdQueries
|
||||
from openpilot.selfdrive.car import dbc_dict
|
||||
from openpilot.selfdrive.car.docs_definitions import CarInfo
|
||||
from openpilot.selfdrive.car.fw_query_definitions import FwQueryConfig, Request, StdQueries
|
||||
|
||||
Ecu = car.CarParams.Ecu
|
||||
|
||||
|
|
|
@ -2,16 +2,16 @@ import os
|
|||
from typing import Callable, Dict, List, Optional, Tuple
|
||||
|
||||
from cereal import car
|
||||
from common.params import Params
|
||||
from common.basedir import BASEDIR
|
||||
from system.version import is_comma_remote, is_tested_branch
|
||||
from selfdrive.car.interfaces import get_interface_attr
|
||||
from selfdrive.car.fingerprints import eliminate_incompatible_cars, all_legacy_fingerprint_cars
|
||||
from selfdrive.car.vin import get_vin, is_valid_vin, VIN_UNKNOWN
|
||||
from selfdrive.car.fw_versions import get_fw_versions_ordered, get_present_ecus, match_fw_to_car, set_obd_multiplexing
|
||||
from system.swaglog import cloudlog
|
||||
from openpilot.common.params import Params
|
||||
from openpilot.common.basedir import BASEDIR
|
||||
from openpilot.system.version import is_comma_remote, is_tested_branch
|
||||
from openpilot.selfdrive.car.interfaces import get_interface_attr
|
||||
from openpilot.selfdrive.car.fingerprints import eliminate_incompatible_cars, all_legacy_fingerprint_cars
|
||||
from openpilot.selfdrive.car.vin import get_vin, is_valid_vin, VIN_UNKNOWN
|
||||
from openpilot.selfdrive.car.fw_versions import get_fw_versions_ordered, get_present_ecus, match_fw_to_car, set_obd_multiplexing
|
||||
from openpilot.system.swaglog import cloudlog
|
||||
import cereal.messaging as messaging
|
||||
from selfdrive.car import gen_empty_fingerprint
|
||||
from openpilot.selfdrive.car import gen_empty_fingerprint
|
||||
|
||||
FRAME_FINGERPRINT = 100 # 1s
|
||||
|
||||
|
@ -44,7 +44,7 @@ def get_one_can(logcan):
|
|||
def load_interfaces(brand_names):
|
||||
ret = {}
|
||||
for brand_name in brand_names:
|
||||
path = f'selfdrive.car.{brand_name}'
|
||||
path = f'openpilot.selfdrive.car.{brand_name}'
|
||||
CarInterface = __import__(path + '.interface', fromlist=['CarInterface']).CarInterface
|
||||
|
||||
if os.path.exists(BASEDIR + '/' + path.replace('.', '/') + '/carstate.py'):
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
from opendbc.can.packer import CANPacker
|
||||
from common.realtime import DT_CTRL
|
||||
from selfdrive.car import apply_meas_steer_torque_limits
|
||||
from selfdrive.car.chrysler.chryslercan import create_lkas_hud, create_lkas_command, create_cruise_buttons
|
||||
from selfdrive.car.chrysler.values import RAM_CARS, CarControllerParams, ChryslerFlags
|
||||
from openpilot.common.realtime import DT_CTRL
|
||||
from openpilot.selfdrive.car import apply_meas_steer_torque_limits
|
||||
from openpilot.selfdrive.car.chrysler.chryslercan import create_lkas_hud, create_lkas_command, create_cruise_buttons
|
||||
from openpilot.selfdrive.car.chrysler.values import RAM_CARS, CarControllerParams, ChryslerFlags
|
||||
|
||||
|
||||
class CarController:
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
from cereal import car
|
||||
from common.conversions import Conversions as CV
|
||||
from openpilot.common.conversions import Conversions as CV
|
||||
from opendbc.can.parser import CANParser
|
||||
from opendbc.can.can_define import CANDefine
|
||||
from selfdrive.car.interfaces import CarStateBase
|
||||
from selfdrive.car.chrysler.values import DBC, STEER_THRESHOLD, RAM_CARS
|
||||
from openpilot.selfdrive.car.interfaces import CarStateBase
|
||||
from openpilot.selfdrive.car.chrysler.values import DBC, STEER_THRESHOLD, RAM_CARS
|
||||
|
||||
|
||||
class CarState(CarStateBase):
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from cereal import car
|
||||
from selfdrive.car.chrysler.values import RAM_CARS
|
||||
from openpilot.selfdrive.car.chrysler.values import RAM_CARS
|
||||
|
||||
GearShifter = car.CarState.GearShifter
|
||||
VisualAlert = car.CarControl.HUDControl.VisualAlert
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/env python3
|
||||
from cereal import car
|
||||
from panda import Panda
|
||||
from selfdrive.car import get_safety_config
|
||||
from selfdrive.car.chrysler.values import CAR, RAM_HD, RAM_DT, RAM_CARS, ChryslerFlags
|
||||
from selfdrive.car.interfaces import CarInterfaceBase
|
||||
from openpilot.selfdrive.car import get_safety_config
|
||||
from openpilot.selfdrive.car.chrysler.values import CAR, RAM_HD, RAM_DT, RAM_CARS, ChryslerFlags
|
||||
from openpilot.selfdrive.car.interfaces import CarInterfaceBase
|
||||
|
||||
|
||||
class CarInterface(CarInterfaceBase):
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!/usr/bin/env python3
|
||||
from opendbc.can.parser import CANParser
|
||||
from cereal import car
|
||||
from selfdrive.car.interfaces import RadarInterfaceBase
|
||||
from selfdrive.car.chrysler.values import DBC
|
||||
from openpilot.selfdrive.car.interfaces import RadarInterfaceBase
|
||||
from openpilot.selfdrive.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
|
||||
|
|
|
@ -5,9 +5,9 @@ from typing import Dict, List, Optional, Union
|
|||
|
||||
from cereal import car
|
||||
from panda.python import uds
|
||||
from selfdrive.car import dbc_dict
|
||||
from selfdrive.car.docs_definitions import CarHarness, CarInfo, CarParts
|
||||
from selfdrive.car.fw_query_definitions import FwQueryConfig, Request, p16
|
||||
from openpilot.selfdrive.car import dbc_dict
|
||||
from openpilot.selfdrive.car.docs_definitions import CarHarness, CarInfo, CarParts
|
||||
from openpilot.selfdrive.car.fw_query_definitions import FwQueryConfig, Request, p16
|
||||
|
||||
Ecu = car.CarParams.Ecu
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from selfdrive.car.isotp_parallel_query import IsoTpParallelQuery
|
||||
from system.swaglog import cloudlog
|
||||
from openpilot.selfdrive.car.isotp_parallel_query import IsoTpParallelQuery
|
||||
from openpilot.system.swaglog import cloudlog
|
||||
|
||||
EXT_DIAG_REQUEST = b'\x10\x03'
|
||||
EXT_DIAG_RESPONSE = b'\x50\x03'
|
||||
|
|
|
@ -8,10 +8,10 @@ from natsort import natsorted
|
|||
from typing import Dict, List
|
||||
|
||||
from cereal import car
|
||||
from common.basedir import BASEDIR
|
||||
from selfdrive.car import gen_empty_fingerprint
|
||||
from selfdrive.car.docs_definitions import CarInfo, Column, CommonFootnote, PartType
|
||||
from selfdrive.car.car_helpers import interfaces, get_interface_attr
|
||||
from openpilot.common.basedir import BASEDIR
|
||||
from openpilot.selfdrive.car import gen_empty_fingerprint
|
||||
from openpilot.selfdrive.car.docs_definitions import CarInfo, Column, CommonFootnote, PartType
|
||||
from openpilot.selfdrive.car.car_helpers import interfaces, get_interface_attr
|
||||
|
||||
|
||||
def get_all_footnotes() -> Dict[Enum, int]:
|
||||
|
|
|
@ -6,7 +6,7 @@ from enum import Enum
|
|||
from typing import Dict, List, Optional, Tuple, Union
|
||||
|
||||
from cereal import car
|
||||
from common.conversions import Conversions as CV
|
||||
from openpilot.common.conversions import Conversions as CV
|
||||
|
||||
GOOD_TORQUE_THRESHOLD = 1.0 # m/s^2
|
||||
MODEL_YEARS_RE = r"(?<= )((\d{4}-\d{2})|(\d{4}))(,|$)"
|
||||
|
|
|
@ -5,10 +5,10 @@ from typing import Optional, Set
|
|||
|
||||
import cereal.messaging as messaging
|
||||
from panda.python.uds import SERVICE_TYPE
|
||||
from selfdrive.car import make_can_msg
|
||||
from selfdrive.car.fw_query_definitions import EcuAddrBusType
|
||||
from selfdrive.boardd.boardd import can_list_to_can_capnp
|
||||
from system.swaglog import cloudlog
|
||||
from openpilot.selfdrive.car import make_can_msg
|
||||
from openpilot.selfdrive.car.fw_query_definitions import EcuAddrBusType
|
||||
from openpilot.selfdrive.boardd.boardd import can_list_to_can_capnp
|
||||
from openpilot.system.swaglog import cloudlog
|
||||
|
||||
|
||||
def make_tester_present_msg(addr, bus, subaddr=None):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from selfdrive.car.interfaces import get_interface_attr
|
||||
from openpilot.selfdrive.car.interfaces import get_interface_attr
|
||||
|
||||
|
||||
FW_VERSIONS = get_interface_attr('FW_VERSIONS', combine_brands=True, ignore_none=True)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
from cereal import car
|
||||
from common.numpy_fast import clip
|
||||
from openpilot.common.numpy_fast import clip
|
||||
from opendbc.can.packer import CANPacker
|
||||
from selfdrive.car import apply_std_steer_angle_limits
|
||||
from selfdrive.car.ford.fordcan import CanBus, create_acc_msg, create_acc_ui_msg, create_button_msg, \
|
||||
from openpilot.selfdrive.car import apply_std_steer_angle_limits
|
||||
from openpilot.selfdrive.car.ford.fordcan import CanBus, create_acc_msg, create_acc_ui_msg, create_button_msg, \
|
||||
create_lat_ctl_msg, create_lat_ctl2_msg, create_lka_msg, create_lkas_ui_msg
|
||||
from selfdrive.car.ford.values import CANFD_CAR, CarControllerParams
|
||||
from openpilot.selfdrive.car.ford.values import CANFD_CAR, CarControllerParams
|
||||
|
||||
LongCtrlState = car.CarControl.Actuators.LongControlState
|
||||
VisualAlert = car.CarControl.HUDControl.VisualAlert
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
from cereal import car
|
||||
from common.conversions import Conversions as CV
|
||||
from openpilot.common.conversions import Conversions as CV
|
||||
from opendbc.can.can_define import CANDefine
|
||||
from opendbc.can.parser import CANParser
|
||||
from selfdrive.car.interfaces import CarStateBase
|
||||
from selfdrive.car.ford.fordcan import CanBus
|
||||
from selfdrive.car.ford.values import CANFD_CAR, CarControllerParams, DBC
|
||||
from openpilot.selfdrive.car.interfaces import CarStateBase
|
||||
from openpilot.selfdrive.car.ford.fordcan import CanBus
|
||||
from openpilot.selfdrive.car.ford.values import CANFD_CAR, CarControllerParams, DBC
|
||||
|
||||
GearShifter = car.CarState.GearShifter
|
||||
TransmissionType = car.CarParams.TransmissionType
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from cereal import car
|
||||
from selfdrive.car import CanBusBase
|
||||
from openpilot.selfdrive.car import CanBusBase
|
||||
|
||||
HUDControl = car.CarControl.HUDControl
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#!/usr/bin/env python3
|
||||
from cereal import car
|
||||
from panda import Panda
|
||||
from common.conversions import Conversions as CV
|
||||
from selfdrive.car import get_safety_config
|
||||
from selfdrive.car.ford.fordcan import CanBus
|
||||
from selfdrive.car.ford.values import CANFD_CAR, CAR, Ecu
|
||||
from selfdrive.car.interfaces import CarInterfaceBase
|
||||
from openpilot.common.conversions import Conversions as CV
|
||||
from openpilot.selfdrive.car import get_safety_config
|
||||
from openpilot.selfdrive.car.ford.fordcan import CanBus
|
||||
from openpilot.selfdrive.car.ford.values import CANFD_CAR, CAR, Ecu
|
||||
from openpilot.selfdrive.car.interfaces import CarInterfaceBase
|
||||
|
||||
TransmissionType = car.CarParams.TransmissionType
|
||||
GearShifter = car.CarState.GearShifter
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
from math import cos, sin
|
||||
from cereal import car
|
||||
from opendbc.can.parser import CANParser
|
||||
from common.conversions import Conversions as CV
|
||||
from selfdrive.car.ford.fordcan import CanBus
|
||||
from selfdrive.car.ford.values import DBC, RADAR
|
||||
from selfdrive.car.interfaces import RadarInterfaceBase
|
||||
from openpilot.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
|
||||
|
||||
DELPHI_ESR_RADAR_MSGS = list(range(0x500, 0x540))
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@ from enum import Enum
|
|||
from typing import Dict, List, Union
|
||||
|
||||
from cereal import car
|
||||
from selfdrive.car import AngleRateLimit, dbc_dict
|
||||
from selfdrive.car.docs_definitions import CarFootnote, CarHarness, CarInfo, CarParts, Column, \
|
||||
from openpilot.selfdrive.car import AngleRateLimit, dbc_dict
|
||||
from openpilot.selfdrive.car.docs_definitions import CarFootnote, CarHarness, CarInfo, CarParts, Column, \
|
||||
Device
|
||||
from selfdrive.car.fw_query_definitions import FwQueryConfig, Request, StdQueries
|
||||
from openpilot.selfdrive.car.fw_query_definitions import FwQueryConfig, Request, StdQueries
|
||||
|
||||
Ecu = car.CarParams.Ecu
|
||||
|
||||
|
|
|
@ -6,13 +6,13 @@ import capnp
|
|||
|
||||
import panda.python.uds as uds
|
||||
from cereal import car
|
||||
from common.params import Params
|
||||
from selfdrive.car.ecu_addrs import get_ecu_addrs
|
||||
from selfdrive.car.fw_query_definitions import AddrType, EcuAddrBusType
|
||||
from selfdrive.car.interfaces import get_interface_attr
|
||||
from selfdrive.car.fingerprints import FW_VERSIONS
|
||||
from selfdrive.car.isotp_parallel_query import IsoTpParallelQuery
|
||||
from system.swaglog import cloudlog
|
||||
from openpilot.common.params import Params
|
||||
from openpilot.selfdrive.car.ecu_addrs import get_ecu_addrs
|
||||
from openpilot.selfdrive.car.fw_query_definitions import AddrType, EcuAddrBusType
|
||||
from openpilot.selfdrive.car.interfaces import get_interface_attr
|
||||
from openpilot.selfdrive.car.fingerprints import FW_VERSIONS
|
||||
from openpilot.selfdrive.car.isotp_parallel_query import IsoTpParallelQuery
|
||||
from openpilot.system.swaglog import cloudlog
|
||||
|
||||
Ecu = car.CarParams.Ecu
|
||||
ESSENTIAL_ECUS = [Ecu.engine, Ecu.eps, Ecu.abs, Ecu.fwdRadar, Ecu.fwdCamera, Ecu.vsa]
|
||||
|
@ -338,7 +338,7 @@ if __name__ == "__main__":
|
|||
import time
|
||||
import argparse
|
||||
import cereal.messaging as messaging
|
||||
from selfdrive.car.vin import get_vin
|
||||
from openpilot.selfdrive.car.vin import get_vin
|
||||
|
||||
parser = argparse.ArgumentParser(description='Get firmware version of ECUs')
|
||||
parser.add_argument('--scan', action='store_true')
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
from cereal import car
|
||||
from common.conversions import Conversions as CV
|
||||
from common.numpy_fast import interp
|
||||
from common.realtime import DT_CTRL
|
||||
from openpilot.common.conversions import Conversions as CV
|
||||
from openpilot.common.numpy_fast import interp
|
||||
from openpilot.common.realtime import DT_CTRL
|
||||
from opendbc.can.packer import CANPacker
|
||||
from selfdrive.car import apply_driver_steer_torque_limits
|
||||
from selfdrive.car.gm import gmcan
|
||||
from selfdrive.car.gm.values import DBC, CanBus, CarControllerParams, CruiseButtons
|
||||
from openpilot.selfdrive.car import apply_driver_steer_torque_limits
|
||||
from openpilot.selfdrive.car.gm import gmcan
|
||||
from openpilot.selfdrive.car.gm.values import DBC, CanBus, CarControllerParams, CruiseButtons
|
||||
|
||||
VisualAlert = car.CarControl.HUDControl.VisualAlert
|
||||
NetworkLocation = car.CarParams.NetworkLocation
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import copy
|
||||
from cereal import car
|
||||
from common.conversions import Conversions as CV
|
||||
from common.numpy_fast import mean
|
||||
from openpilot.common.conversions import Conversions as CV
|
||||
from openpilot.common.numpy_fast import mean
|
||||
from opendbc.can.can_define import CANDefine
|
||||
from opendbc.can.parser import CANParser
|
||||
from selfdrive.car.interfaces import CarStateBase
|
||||
from selfdrive.car.gm.values import DBC, AccState, CanBus, STEER_THRESHOLD
|
||||
from openpilot.selfdrive.car.interfaces import CarStateBase
|
||||
from openpilot.selfdrive.car.gm.values import DBC, AccState, CanBus, STEER_THRESHOLD
|
||||
|
||||
TransmissionType = car.CarParams.TransmissionType
|
||||
NetworkLocation = car.CarParams.NetworkLocation
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from selfdrive.car import make_can_msg
|
||||
from selfdrive.car.gm.values import CAR
|
||||
from openpilot.selfdrive.car import make_can_msg
|
||||
from openpilot.selfdrive.car.gm.values import CAR
|
||||
|
||||
|
||||
def create_buttons(packer, bus, idx, button):
|
||||
|
|
|
@ -3,12 +3,12 @@ from cereal import car
|
|||
from math import fabs, exp
|
||||
from panda import Panda
|
||||
|
||||
from common.conversions import Conversions as CV
|
||||
from selfdrive.car import create_button_event, get_safety_config
|
||||
from selfdrive.car.gm.radar_interface import RADAR_HEADER_MSG
|
||||
from selfdrive.car.gm.values import CAR, CruiseButtons, CarControllerParams, EV_CAR, CAMERA_ACC_CAR, CanBus
|
||||
from selfdrive.car.interfaces import CarInterfaceBase, TorqueFromLateralAccelCallbackType, FRICTION_THRESHOLD
|
||||
from selfdrive.controls.lib.drive_helpers import get_friction
|
||||
from openpilot.common.conversions import Conversions as CV
|
||||
from openpilot.selfdrive.car import create_button_event, get_safety_config
|
||||
from openpilot.selfdrive.car.gm.radar_interface import RADAR_HEADER_MSG
|
||||
from openpilot.selfdrive.car.gm.values import CAR, CruiseButtons, CarControllerParams, EV_CAR, CAMERA_ACC_CAR, CanBus
|
||||
from openpilot.selfdrive.car.interfaces import CarInterfaceBase, TorqueFromLateralAccelCallbackType, FRICTION_THRESHOLD
|
||||
from openpilot.selfdrive.controls.lib.drive_helpers import get_friction
|
||||
|
||||
ButtonType = car.CarState.ButtonEvent.Type
|
||||
EventName = car.CarEvent.EventName
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#!/usr/bin/env python3
|
||||
import math
|
||||
from cereal import car
|
||||
from common.conversions import Conversions as CV
|
||||
from openpilot.common.conversions import Conversions as CV
|
||||
from opendbc.can.parser import CANParser
|
||||
from selfdrive.car.gm.values import DBC, CanBus
|
||||
from selfdrive.car.interfaces import RadarInterfaceBase
|
||||
from openpilot.selfdrive.car.gm.values import DBC, CanBus
|
||||
from openpilot.selfdrive.car.interfaces import RadarInterfaceBase
|
||||
|
||||
RADAR_HEADER_MSG = 1120
|
||||
SLOT_1_MSG = RADAR_HEADER_MSG + 1
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
from parameterized import parameterized
|
||||
import unittest
|
||||
|
||||
from selfdrive.car.gm.values import CAMERA_ACC_CAR, CAR, FINGERPRINTS, GM_RX_OFFSET
|
||||
from openpilot.selfdrive.car.gm.values import CAMERA_ACC_CAR, CAR, FINGERPRINTS, GM_RX_OFFSET
|
||||
|
||||
CAMERA_DIAGNOSTIC_ADDRESS = 0x24b
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ from enum import Enum
|
|||
from typing import Dict, List, Union
|
||||
|
||||
from cereal import car
|
||||
from selfdrive.car import dbc_dict
|
||||
from selfdrive.car.docs_definitions import CarFootnote, CarHarness, CarInfo, CarParts, Column
|
||||
from openpilot.selfdrive.car import dbc_dict
|
||||
from openpilot.selfdrive.car.docs_definitions import CarFootnote, CarHarness, CarInfo, CarParts, Column
|
||||
Ecu = car.CarParams.Ecu
|
||||
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
from collections import namedtuple
|
||||
|
||||
from cereal import car
|
||||
from common.numpy_fast import clip, interp
|
||||
from common.realtime import DT_CTRL
|
||||
from openpilot.common.numpy_fast import clip, interp
|
||||
from openpilot.common.realtime import DT_CTRL
|
||||
from opendbc.can.packer import CANPacker
|
||||
from selfdrive.car import create_gas_interceptor_command
|
||||
from selfdrive.car.honda import hondacan
|
||||
from selfdrive.car.honda.values import CruiseButtons, VISUAL_HUD, HONDA_BOSCH, HONDA_BOSCH_RADARLESS, HONDA_NIDEC_ALT_PCM_ACCEL, CarControllerParams
|
||||
from selfdrive.controls.lib.drive_helpers import rate_limit
|
||||
from openpilot.selfdrive.car import create_gas_interceptor_command
|
||||
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.controls.lib.drive_helpers import rate_limit
|
||||
|
||||
VisualAlert = car.CarControl.HUDControl.VisualAlert
|
||||
LongCtrlState = car.CarControl.Actuators.LongControlState
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
from collections import defaultdict
|
||||
|
||||
from cereal import car
|
||||
from common.conversions import Conversions as CV
|
||||
from common.numpy_fast import interp
|
||||
from openpilot.common.conversions import Conversions as CV
|
||||
from openpilot.common.numpy_fast import interp
|
||||
from opendbc.can.can_define import CANDefine
|
||||
from opendbc.can.parser import CANParser
|
||||
from selfdrive.car.honda.hondacan import get_cruise_speed_conversion, get_pt_bus
|
||||
from selfdrive.car.honda.values import CAR, DBC, STEER_THRESHOLD, HONDA_BOSCH, HONDA_NIDEC_ALT_SCM_MESSAGES, HONDA_BOSCH_ALT_BRAKE_SIGNAL, HONDA_BOSCH_RADARLESS
|
||||
from selfdrive.car.interfaces import CarStateBase
|
||||
from openpilot.selfdrive.car.honda.hondacan import get_cruise_speed_conversion, get_pt_bus
|
||||
from openpilot.selfdrive.car.honda.values import CAR, DBC, STEER_THRESHOLD, HONDA_BOSCH, \
|
||||
HONDA_NIDEC_ALT_SCM_MESSAGES, HONDA_BOSCH_ALT_BRAKE_SIGNAL, \
|
||||
HONDA_BOSCH_RADARLESS
|
||||
from openpilot.selfdrive.car.interfaces import CarStateBase
|
||||
|
||||
TransmissionType = car.CarParams.TransmissionType
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from common.conversions import Conversions as CV
|
||||
from selfdrive.car.honda.values import HondaFlags, HONDA_BOSCH, HONDA_BOSCH_RADARLESS, CAR, CarControllerParams
|
||||
from openpilot.common.conversions import Conversions as CV
|
||||
from openpilot.selfdrive.car.honda.values import HondaFlags, HONDA_BOSCH, HONDA_BOSCH_RADARLESS, CAR, CarControllerParams
|
||||
|
||||
# CAN bus layout with relay
|
||||
# 0 = ACC-CAN - radar side
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#!/usr/bin/env python3
|
||||
from cereal import car
|
||||
from panda import Panda
|
||||
from common.conversions import Conversions as CV
|
||||
from common.numpy_fast import interp
|
||||
from selfdrive.car.honda.values import CarControllerParams, CruiseButtons, HondaFlags, CAR, HONDA_BOSCH, HONDA_NIDEC_ALT_SCM_MESSAGES, \
|
||||
from openpilot.common.conversions import Conversions as CV
|
||||
from openpilot.common.numpy_fast import interp
|
||||
from openpilot.selfdrive.car.honda.values import CarControllerParams, CruiseButtons, HondaFlags, CAR, HONDA_BOSCH, HONDA_NIDEC_ALT_SCM_MESSAGES, \
|
||||
HONDA_BOSCH_ALT_BRAKE_SIGNAL, HONDA_BOSCH_RADARLESS
|
||||
from selfdrive.car import create_button_event, get_safety_config
|
||||
from selfdrive.car.interfaces import CarInterfaceBase
|
||||
from selfdrive.car.disable_ecu import disable_ecu
|
||||
from openpilot.selfdrive.car import create_button_event, get_safety_config
|
||||
from openpilot.selfdrive.car.interfaces import CarInterfaceBase
|
||||
from openpilot.selfdrive.car.disable_ecu import disable_ecu
|
||||
|
||||
|
||||
ButtonType = car.CarState.ButtonEvent.Type
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!/usr/bin/env python3
|
||||
from cereal import car
|
||||
from opendbc.can.parser import CANParser
|
||||
from selfdrive.car.interfaces import RadarInterfaceBase
|
||||
from selfdrive.car.honda.values import DBC
|
||||
from openpilot.selfdrive.car.interfaces import RadarInterfaceBase
|
||||
from openpilot.selfdrive.car.honda.values import DBC
|
||||
|
||||
|
||||
def _create_nidec_can_parser(car_fingerprint):
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import re
|
||||
import unittest
|
||||
|
||||
from selfdrive.car.honda.values import FW_VERSIONS
|
||||
from openpilot.selfdrive.car.honda.values import FW_VERSIONS
|
||||
|
||||
HONDA_FW_VERSION_RE = br"\d{5}-[A-Z0-9]{3}(-|,)[A-Z0-9]{4}(\x00){2}$"
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@ from enum import Enum, IntFlag
|
|||
from typing import Dict, List, Optional, Union
|
||||
|
||||
from cereal import car
|
||||
from common.conversions import Conversions as CV
|
||||
from openpilot.common.conversions import Conversions as CV
|
||||
from panda.python import uds
|
||||
from selfdrive.car import dbc_dict
|
||||
from selfdrive.car.docs_definitions import CarFootnote, CarHarness, CarInfo, CarParts, Column
|
||||
from selfdrive.car.fw_query_definitions import FwQueryConfig, Request, StdQueries, p16
|
||||
from openpilot.selfdrive.car import dbc_dict
|
||||
from openpilot.selfdrive.car.docs_definitions import CarFootnote, CarHarness, CarInfo, CarParts, Column
|
||||
from openpilot.selfdrive.car.fw_query_definitions import FwQueryConfig, Request, StdQueries, p16
|
||||
|
||||
Ecu = car.CarParams.Ecu
|
||||
VisualAlert = car.CarControl.HUDControl.VisualAlert
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
from cereal import car
|
||||
from common.conversions import Conversions as CV
|
||||
from common.numpy_fast import clip
|
||||
from common.realtime import DT_CTRL
|
||||
from openpilot.common.conversions import Conversions as CV
|
||||
from openpilot.common.numpy_fast import clip
|
||||
from openpilot.common.realtime import DT_CTRL
|
||||
from opendbc.can.packer import CANPacker
|
||||
from selfdrive.car import apply_driver_steer_torque_limits, common_fault_avoidance
|
||||
from selfdrive.car.hyundai import hyundaicanfd, hyundaican
|
||||
from selfdrive.car.hyundai.hyundaicanfd import CanBus
|
||||
from selfdrive.car.hyundai.values import HyundaiFlags, Buttons, CarControllerParams, CANFD_CAR, CAR
|
||||
from openpilot.selfdrive.car import apply_driver_steer_torque_limits, common_fault_avoidance
|
||||
from openpilot.selfdrive.car.hyundai import hyundaicanfd, hyundaican
|
||||
from openpilot.selfdrive.car.hyundai.hyundaicanfd import CanBus
|
||||
from openpilot.selfdrive.car.hyundai.values import HyundaiFlags, Buttons, CarControllerParams, CANFD_CAR, CAR
|
||||
|
||||
VisualAlert = car.CarControl.HUDControl.VisualAlert
|
||||
LongCtrlState = car.CarControl.Actuators.LongControlState
|
||||
|
|
|
@ -3,12 +3,13 @@ import copy
|
|||
import math
|
||||
|
||||
from cereal import car
|
||||
from common.conversions import Conversions as CV
|
||||
from openpilot.common.conversions import Conversions as CV
|
||||
from opendbc.can.parser import CANParser
|
||||
from opendbc.can.can_define import CANDefine
|
||||
from selfdrive.car.hyundai.hyundaicanfd import CanBus
|
||||
from selfdrive.car.hyundai.values import HyundaiFlags, CAR, DBC, CAN_GEARS, CAMERA_SCC_CAR, CANFD_CAR, EV_CAR, HYBRID_CAR, Buttons, CarControllerParams
|
||||
from selfdrive.car.interfaces import CarStateBase
|
||||
from openpilot.selfdrive.car.hyundai.hyundaicanfd import CanBus
|
||||
from openpilot.selfdrive.car.hyundai.values import HyundaiFlags, CAR, DBC, CAN_GEARS, CAMERA_SCC_CAR, \
|
||||
CANFD_CAR, EV_CAR, HYBRID_CAR, Buttons, CarControllerParams
|
||||
from openpilot.selfdrive.car.interfaces import CarStateBase
|
||||
|
||||
PREV_BUTTON_SAMPLES = 8
|
||||
CLUSTER_SAMPLE_RATE = 20 # frames
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import crcmod
|
||||
from selfdrive.car.hyundai.values import CAR, CHECKSUM, CAMERA_SCC_CAR
|
||||
from openpilot.selfdrive.car.hyundai.values import CAR, CHECKSUM, CAMERA_SCC_CAR
|
||||
|
||||
hyundai_checksum = crcmod.mkCrcFun(0x11D, initCrc=0xFD, rev=False, xorOut=0xdf)
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from common.numpy_fast import clip
|
||||
from selfdrive.car import CanBusBase
|
||||
from selfdrive.car.hyundai.values import HyundaiFlags
|
||||
from openpilot.common.numpy_fast import clip
|
||||
from openpilot.selfdrive.car import CanBusBase
|
||||
from openpilot.selfdrive.car.hyundai.values import HyundaiFlags
|
||||
|
||||
|
||||
class CanBus(CanBusBase):
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
#!/usr/bin/env python3
|
||||
from cereal import car
|
||||
from panda import Panda
|
||||
from common.conversions import Conversions as CV
|
||||
from selfdrive.car.hyundai.hyundaicanfd import CanBus
|
||||
from selfdrive.car.hyundai.values import HyundaiFlags, CAR, DBC, CANFD_CAR, CAMERA_SCC_CAR, CANFD_RADAR_SCC_CAR, \
|
||||
from openpilot.common.conversions import Conversions as CV
|
||||
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, \
|
||||
EV_CAR, HYBRID_CAR, LEGACY_SAFETY_MODE_CAR, UNSUPPORTED_LONGITUDINAL_CAR, \
|
||||
Buttons
|
||||
from selfdrive.car.hyundai.radar_interface import RADAR_START_ADDR
|
||||
from selfdrive.car import create_button_event, get_safety_config
|
||||
from selfdrive.car.interfaces import CarInterfaceBase
|
||||
from selfdrive.car.disable_ecu import disable_ecu
|
||||
from openpilot.selfdrive.car.hyundai.radar_interface import RADAR_START_ADDR
|
||||
from openpilot.selfdrive.car import create_button_event, get_safety_config
|
||||
from openpilot.selfdrive.car.interfaces import CarInterfaceBase
|
||||
from openpilot.selfdrive.car.disable_ecu import disable_ecu
|
||||
|
||||
Ecu = car.CarParams.Ecu
|
||||
ButtonType = car.CarState.ButtonEvent.Type
|
||||
|
|
|
@ -3,8 +3,8 @@ import math
|
|||
|
||||
from cereal import car
|
||||
from opendbc.can.parser import CANParser
|
||||
from selfdrive.car.interfaces import RadarInterfaceBase
|
||||
from selfdrive.car.hyundai.values import DBC
|
||||
from openpilot.selfdrive.car.interfaces import RadarInterfaceBase
|
||||
from openpilot.selfdrive.car.hyundai.values import DBC
|
||||
|
||||
RADAR_START_ADDR = 0x500
|
||||
RADAR_MSG_COUNT = 32
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
from cereal import car
|
||||
from selfdrive.car.hyundai.values import FW_VERSIONS, PLATFORM_CODE_ECUS, get_platform_codes
|
||||
from openpilot.selfdrive.car.hyundai.values import FW_VERSIONS, PLATFORM_CODE_ECUS, get_platform_codes
|
||||
|
||||
Ecu = car.CarParams.Ecu
|
||||
ECU_NAME = {v: k for k, v in Ecu.schema.enumerants.items()}
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
import unittest
|
||||
|
||||
from cereal import car
|
||||
from selfdrive.car.fw_versions import build_fw_dict
|
||||
from selfdrive.car.hyundai.values import CAMERA_SCC_CAR, CANFD_CAR, CAN_GEARS, CAR, CHECKSUM, DATE_FW_ECUS, \
|
||||
from openpilot.selfdrive.car.fw_versions import build_fw_dict
|
||||
from openpilot.selfdrive.car.hyundai.values import CAMERA_SCC_CAR, CANFD_CAR, CAN_GEARS, CAR, CHECKSUM, DATE_FW_ECUS, \
|
||||
EV_CAR, FW_QUERY_CONFIG, FW_VERSIONS, LEGACY_SAFETY_MODE_CAR, \
|
||||
UNSUPPORTED_LONGITUDINAL_CAR, PLATFORM_CODE_ECUS, get_platform_codes
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ from typing import Dict, List, Optional, Set, Tuple, Union
|
|||
|
||||
from cereal import car
|
||||
from panda.python import uds
|
||||
from common.conversions import Conversions as CV
|
||||
from selfdrive.car import dbc_dict
|
||||
from selfdrive.car.docs_definitions import CarFootnote, CarHarness, CarInfo, CarParts, Column
|
||||
from selfdrive.car.fw_query_definitions import FwQueryConfig, Request, p16
|
||||
from openpilot.common.conversions import Conversions as CV
|
||||
from openpilot.selfdrive.car import dbc_dict
|
||||
from openpilot.selfdrive.car.docs_definitions import CarFootnote, CarHarness, CarInfo, CarParts, Column
|
||||
from openpilot.selfdrive.car.fw_query_definitions import FwQueryConfig, Request, p16
|
||||
|
||||
Ecu = car.CarParams.Ecu
|
||||
|
||||
|
|
|
@ -5,15 +5,15 @@ from abc import abstractmethod, ABC
|
|||
from typing import Any, Dict, Optional, Tuple, List, Callable
|
||||
|
||||
from cereal import car
|
||||
from common.basedir import BASEDIR
|
||||
from common.conversions import Conversions as CV
|
||||
from common.kalman.simple_kalman import KF1D
|
||||
from common.numpy_fast import clip
|
||||
from common.realtime import DT_CTRL
|
||||
from selfdrive.car import apply_hysteresis, gen_empty_fingerprint, scale_rot_inertia, scale_tire_stiffness, STD_CARGO_KG
|
||||
from selfdrive.controls.lib.drive_helpers import V_CRUISE_MAX, get_friction
|
||||
from selfdrive.controls.lib.events import Events
|
||||
from selfdrive.controls.lib.vehicle_model import VehicleModel
|
||||
from openpilot.common.basedir import BASEDIR
|
||||
from openpilot.common.conversions import Conversions as CV
|
||||
from openpilot.common.kalman.simple_kalman import KF1D
|
||||
from openpilot.common.numpy_fast import clip
|
||||
from openpilot.common.realtime import DT_CTRL
|
||||
from openpilot.selfdrive.car import apply_hysteresis, gen_empty_fingerprint, scale_rot_inertia, scale_tire_stiffness, STD_CARGO_KG
|
||||
from openpilot.selfdrive.controls.lib.drive_helpers import V_CRUISE_MAX, get_friction
|
||||
from openpilot.selfdrive.controls.lib.events import Events
|
||||
from openpilot.selfdrive.controls.lib.vehicle_model import VehicleModel
|
||||
|
||||
ButtonType = car.CarState.ButtonEvent.Type
|
||||
GearShifter = car.CarState.GearShifter
|
||||
|
@ -441,7 +441,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 + '/selfdrive/car')]):
|
||||
try:
|
||||
brand_name = car_folder.split('/')[-1]
|
||||
brand_values = __import__(f'selfdrive.car.{brand_name}.values', fromlist=[attr])
|
||||
brand_values = __import__(f'openpilot.selfdrive.car.{brand_name}.values', fromlist=[attr])
|
||||
if hasattr(brand_values, attr) or not ignore_none:
|
||||
attr_data = getattr(brand_values, attr, None)
|
||||
else:
|
||||
|
|
|
@ -3,8 +3,8 @@ from collections import defaultdict
|
|||
from functools import partial
|
||||
|
||||
import cereal.messaging as messaging
|
||||
from system.swaglog import cloudlog
|
||||
from selfdrive.boardd.boardd import can_list_to_can_capnp
|
||||
from openpilot.system.swaglog import cloudlog
|
||||
from openpilot.selfdrive.boardd.boardd import can_list_to_can_capnp
|
||||
from panda.python.uds import CanClient, IsoTpMessage, FUNCTIONAL_ADDRS, get_rx_addr_for_tx_addr
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
from cereal import car
|
||||
from opendbc.can.packer import CANPacker
|
||||
from selfdrive.car import apply_driver_steer_torque_limits
|
||||
from selfdrive.car.mazda import mazdacan
|
||||
from selfdrive.car.mazda.values import CarControllerParams, Buttons
|
||||
from openpilot.selfdrive.car import apply_driver_steer_torque_limits
|
||||
from openpilot.selfdrive.car.mazda import mazdacan
|
||||
from openpilot.selfdrive.car.mazda.values import CarControllerParams, Buttons
|
||||
|
||||
VisualAlert = car.CarControl.HUDControl.VisualAlert
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
from cereal import car
|
||||
from common.conversions import Conversions as CV
|
||||
from openpilot.common.conversions import Conversions as CV
|
||||
from opendbc.can.can_define import CANDefine
|
||||
from opendbc.can.parser import CANParser
|
||||
from selfdrive.car.interfaces import CarStateBase
|
||||
from selfdrive.car.mazda.values import DBC, LKAS_LIMITS, GEN1
|
||||
from openpilot.selfdrive.car.interfaces import CarStateBase
|
||||
from openpilot.selfdrive.car.mazda.values import DBC, LKAS_LIMITS, GEN1
|
||||
|
||||
class CarState(CarStateBase):
|
||||
def __init__(self, CP):
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/env python3
|
||||
from cereal import car
|
||||
from common.conversions import Conversions as CV
|
||||
from selfdrive.car.mazda.values import CAR, LKAS_LIMITS
|
||||
from selfdrive.car import get_safety_config
|
||||
from selfdrive.car.interfaces import CarInterfaceBase
|
||||
from openpilot.common.conversions import Conversions as CV
|
||||
from openpilot.selfdrive.car.mazda.values import CAR, LKAS_LIMITS
|
||||
from openpilot.selfdrive.car import get_safety_config
|
||||
from openpilot.selfdrive.car.interfaces import CarInterfaceBase
|
||||
|
||||
ButtonType = car.CarState.ButtonEvent.Type
|
||||
EventName = car.CarEvent.EventName
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from selfdrive.car.mazda.values import GEN1, Buttons
|
||||
from openpilot.selfdrive.car.mazda.values import GEN1, Buttons
|
||||
|
||||
|
||||
def create_steering_control(packer, car_fingerprint, frame, apply_steer, lkas):
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
from selfdrive.car.interfaces import RadarInterfaceBase
|
||||
from openpilot.selfdrive.car.interfaces import RadarInterfaceBase
|
||||
|
||||
class RadarInterface(RadarInterfaceBase):
|
||||
pass
|
||||
|
|
|
@ -2,9 +2,9 @@ from dataclasses import dataclass, field
|
|||
from typing import Dict, List, Union
|
||||
|
||||
from cereal import car
|
||||
from selfdrive.car import dbc_dict
|
||||
from selfdrive.car.docs_definitions import CarHarness, CarInfo, CarParts
|
||||
from selfdrive.car.fw_query_definitions import FwQueryConfig, Request, StdQueries
|
||||
from openpilot.selfdrive.car import dbc_dict
|
||||
from openpilot.selfdrive.car.docs_definitions import CarHarness, CarInfo, CarParts
|
||||
from openpilot.selfdrive.car.fw_query_definitions import FwQueryConfig, Request, StdQueries
|
||||
|
||||
Ecu = car.CarParams.Ecu
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/env python3
|
||||
from cereal import car
|
||||
from system.swaglog import cloudlog
|
||||
from openpilot.system.swaglog import cloudlog
|
||||
import cereal.messaging as messaging
|
||||
from selfdrive.car import get_safety_config
|
||||
from selfdrive.car.interfaces import CarInterfaceBase
|
||||
from openpilot.selfdrive.car import get_safety_config
|
||||
from openpilot.selfdrive.car.interfaces import CarInterfaceBase
|
||||
|
||||
|
||||
# mocked car interface to work with chffrplus
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
from selfdrive.car.interfaces import RadarInterfaceBase
|
||||
from openpilot.selfdrive.car.interfaces import RadarInterfaceBase
|
||||
|
||||
class RadarInterface(RadarInterfaceBase):
|
||||
pass
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from typing import Dict, List, Optional, Union
|
||||
|
||||
from selfdrive.car.docs_definitions import CarInfo
|
||||
from openpilot.selfdrive.car.docs_definitions import CarInfo
|
||||
|
||||
|
||||
class CAR:
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
from cereal import car
|
||||
from opendbc.can.packer import CANPacker
|
||||
from selfdrive.car import apply_std_steer_angle_limits
|
||||
from selfdrive.car.nissan import nissancan
|
||||
from selfdrive.car.nissan.values import CAR, CarControllerParams
|
||||
from openpilot.selfdrive.car import apply_std_steer_angle_limits
|
||||
from openpilot.selfdrive.car.nissan import nissancan
|
||||
from openpilot.selfdrive.car.nissan.values import CAR, CarControllerParams
|
||||
|
||||
VisualAlert = car.CarControl.HUDControl.VisualAlert
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue