mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-02 03:52:11 +08:00
ae77b7edc7
* Add VMCU address for EV6 * Rename vmcu * add to tests add to tests * rename to more generic name * more explicit * remove print * Like this much better, removes subtle fingerprinting problems * clean up * add test and clean up * remove hyundai stuffs * global * Fpv2Config class * fix missing fw versions from import order * unused * revert for now * test for fpv2 configs with subtests * subtests don't work that way * do toyota as an example * revert revert * do chrysler * do rest * stash * much smaller of a diff than the alternative * remove unused test * fix tests * remove brand from Request * Make StandardQueries class * add missing_ecus clean up * rename file * unused * test implemented * add comment and rename add comment and rename add comment and rename * should be impossible now * this is a fixme * rename to fw_query * rename this too * and this * move vin queries to class * order * can use p16! * formatting * whoops, this wasn't gated on not len(found_versions) * make this clear * Standardize manufacturer software version query old-commit-hash: 0ef6bb48df63fa07609c170b61584a1d3ef8c320
54 lines
1.1 KiB
Python
54 lines
1.1 KiB
Python
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
|
|
|
|
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
|
|
|
|
|
|
class CAR:
|
|
BODY = "COMMA BODY"
|
|
|
|
|
|
CAR_INFO: Dict[str, CarInfo] = {
|
|
CAR.BODY: CarInfo("comma body", package="All"),
|
|
}
|
|
|
|
FW_QUERY_CONFIG = FwQueryConfig(
|
|
requests=[
|
|
Request(
|
|
[StdQueries.TESTER_PRESENT_REQUEST, StdQueries.UDS_VERSION_REQUEST],
|
|
[StdQueries.TESTER_PRESENT_RESPONSE, StdQueries.UDS_VERSION_RESPONSE],
|
|
bus=0,
|
|
),
|
|
],
|
|
)
|
|
|
|
FW_VERSIONS = {
|
|
CAR.BODY: {
|
|
(Ecu.engine, 0x720, None): [
|
|
b'0.0.01',
|
|
b'02/27/2022'
|
|
],
|
|
(Ecu.debug, 0x721, None): [
|
|
b'166bd860' # git hash of the firmware used
|
|
],
|
|
},
|
|
}
|
|
|
|
DBC = {
|
|
CAR.BODY: dbc_dict('comma_body', None),
|
|
}
|