mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-24 02:32:22 +08:00
77d6d1a8f1
* get platform_str from the enum name * fix tests * add migration table * remove impossible todo * Add link to PR in MIGRATION table Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Remove useless brand name comments and rename RAM_1500 to RAM_1500_5TH_GEN * rename RAM_HD to RAM_HD_5TH_GEN * rename references to RAM_HD and RAM_1500 * change "mock" to "MOCK" and rename torque data of Nissan Leaf 2018 IC * remove MOCK from fingerprints.py * change hard-coded car model in test_can_fingerprint.py/test_timing * migration * update ref * space * prius --------- Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> Co-authored-by: justin newberry <justin@comma.ai> Co-authored-by: Justin Newberry <jnewberry0502@gmail.com> old-commit-hash: 489528dcae3888311f92075ba9e0f68626725121
41 lines
1.1 KiB
Python
41 lines
1.1 KiB
Python
from cereal import car
|
|
from openpilot.selfdrive.car import CarSpecs, PlatformConfig, Platforms, dbc_dict
|
|
from openpilot.selfdrive.car.docs_definitions import CarDocs
|
|
from openpilot.selfdrive.car.fw_query_definitions import FwQueryConfig, Request, StdQueries
|
|
|
|
Ecu = car.CarParams.Ecu
|
|
|
|
SPEED_FROM_RPM = 0.008587
|
|
|
|
|
|
class CarControllerParams:
|
|
ANGLE_DELTA_BP = [0., 5., 15.]
|
|
ANGLE_DELTA_V = [5., .8, .15] # windup limit
|
|
ANGLE_DELTA_VU = [5., 3.5, 0.4] # unwind limit
|
|
LKAS_MAX_TORQUE = 1 # A value of 1 is easy to overpower
|
|
STEER_THRESHOLD = 1.0
|
|
|
|
def __init__(self, CP):
|
|
pass
|
|
|
|
|
|
class CAR(Platforms):
|
|
BODY = PlatformConfig(
|
|
[CarDocs("comma body", package="All")],
|
|
CarSpecs(mass=9, wheelbase=0.406, steerRatio=0.5, centerToFrontRatio=0.44),
|
|
dbc_dict('comma_body', None),
|
|
)
|
|
|
|
|
|
FW_QUERY_CONFIG = FwQueryConfig(
|
|
requests=[
|
|
Request(
|
|
[StdQueries.TESTER_PRESENT_REQUEST, StdQueries.UDS_VERSION_REQUEST],
|
|
[StdQueries.TESTER_PRESENT_RESPONSE, StdQueries.UDS_VERSION_RESPONSE],
|
|
bus=0,
|
|
),
|
|
],
|
|
)
|
|
|
|
DBC = CAR.create_dbc_map()
|