mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-19 00:02:08 +08:00
openpilot v0.9.0 release
date: 2022-11-16T06:35:40 master commit: 58b84fb401a804967aa0dd5ee66fafa90194fd30
This commit is contained in:
@@ -36,6 +36,7 @@ a.out
|
||||
config.json
|
||||
clcache
|
||||
compile_commands.json
|
||||
compare_runtime*.html
|
||||
|
||||
persist
|
||||
board/obj/
|
||||
@@ -82,3 +83,5 @@ selfdrive/modeld/models/*.thneed
|
||||
build/
|
||||
|
||||
!**/.gitkeep
|
||||
|
||||
poetry.toml
|
||||
|
||||
Vendored
+48
-13
@@ -59,7 +59,7 @@ pipeline {
|
||||
branch 'devel-staging'
|
||||
}
|
||||
steps {
|
||||
phone_steps("tici", [
|
||||
phone_steps("tici-needs-can", [
|
||||
["build release3-staging & dashcam3-staging", "PUSH=1 $SOURCE_DIR/release/build_release.sh"],
|
||||
])
|
||||
}
|
||||
@@ -111,7 +111,7 @@ pipeline {
|
||||
R3_PUSH = "${env.BRANCH_NAME == 'master' ? '1' : ' '}"
|
||||
}
|
||||
steps {
|
||||
phone_steps("tici", [
|
||||
phone_steps("tici-needs-can", [
|
||||
["build master-ci", "cd $SOURCE_DIR/release && TARGET_DIR=$TEST_DIR EXTRA_FILES='tools/' ./build_devel.sh"],
|
||||
["build openpilot", "cd selfdrive/manager && ./build.py"],
|
||||
["check dirty", "release/check-dirty.sh"],
|
||||
@@ -122,24 +122,33 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
stage('HW + Unit Tests') {
|
||||
stage('loopback-tests') {
|
||||
agent { docker { image 'ghcr.io/commaai/alpine-ssh'; args '--user=root' } }
|
||||
steps {
|
||||
phone_steps("tici2", [
|
||||
["build", "cd selfdrive/manager && ./build.py"],
|
||||
//["test power draw", "python system/hardware/tici/test_power_draw.py"],
|
||||
phone_steps("tici-loopback", [
|
||||
["build openpilot", "cd selfdrive/manager && ./build.py"],
|
||||
["test boardd loopback", "python selfdrive/boardd/tests/test_boardd_loopback.py"],
|
||||
["test loggerd", "python selfdrive/loggerd/tests/test_loggerd.py"],
|
||||
["test encoder", "LD_LIBRARY_PATH=/usr/local/lib python selfdrive/loggerd/tests/test_encoder.py"],
|
||||
["test sensord", "python selfdrive/sensord/test/test_sensord.py"],
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
stage('camerad') {
|
||||
stage('HW + Unit Tests') {
|
||||
agent { docker { image 'ghcr.io/commaai/alpine-ssh'; args '--user=root' } }
|
||||
steps {
|
||||
phone_steps("tici-party", [
|
||||
phone_steps("tici-common", [
|
||||
["build", "cd selfdrive/manager && ./build.py"],
|
||||
["test power draw", "python system/hardware/tici/test_power_draw.py"],
|
||||
["test loggerd", "python selfdrive/loggerd/tests/test_loggerd.py"],
|
||||
["test encoder", "LD_LIBRARY_PATH=/usr/local/lib python selfdrive/loggerd/tests/test_encoder.py"],
|
||||
["test pigeond", "python selfdrive/sensord/tests/test_pigeond.py"],
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
stage('camerad-ar') {
|
||||
agent { docker { image 'ghcr.io/commaai/alpine-ssh'; args '--user=root' } }
|
||||
steps {
|
||||
phone_steps("tici-ar0321", [
|
||||
["build", "cd selfdrive/manager && ./build.py"],
|
||||
["test camerad", "python system/camerad/test/test_camerad.py"],
|
||||
["test exposure", "python system/camerad/test/test_exposure.py"],
|
||||
@@ -147,17 +156,43 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
stage('camerad-ox') {
|
||||
agent { docker { image 'ghcr.io/commaai/alpine-ssh'; args '--user=root' } }
|
||||
steps {
|
||||
phone_steps("tici-ox03c10", [
|
||||
["build", "cd selfdrive/manager && ./build.py"],
|
||||
["test camerad", "python system/camerad/test/test_camerad.py"],
|
||||
["test exposure", "python system/camerad/test/test_exposure.py"],
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
stage('sensord') {
|
||||
agent { docker { image 'ghcr.io/commaai/alpine-ssh'; args '--user=root' } }
|
||||
steps {
|
||||
phone_steps("tici-lsmc", [
|
||||
["build", "cd selfdrive/manager && ./build.py"],
|
||||
["test sensord", "cd selfdrive/sensord/tests && python -m unittest test_sensord.py"],
|
||||
])
|
||||
phone_steps("tici-bmx-lsm", [
|
||||
["build", "cd selfdrive/manager && ./build.py"],
|
||||
["test sensord", "cd selfdrive/sensord/tests && python -m unittest test_sensord.py"],
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
stage('replay') {
|
||||
agent { docker { image 'ghcr.io/commaai/alpine-ssh'; args '--user=root' } }
|
||||
steps {
|
||||
phone_steps("tici3", [
|
||||
phone_steps("tici-common", [
|
||||
["build", "cd selfdrive/manager && ./build.py"],
|
||||
["model replay", "cd selfdrive/test/process_replay && ./model_replay.py"],
|
||||
])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ To use openpilot in a car, you need four things
|
||||
* A supported device to run this software: a [comma three](https://comma.ai/shop/products/three).
|
||||
* This software. The setup procedure of the comma three allows the user to enter a URL for custom software.
|
||||
The URL, openpilot.comma.ai will install the release version of openpilot. To install openpilot master, you can use installer.comma.ai/commaai/master, and replacing commaai with another GitHub username can install a fork.
|
||||
* One of [the 150+ supported cars](docs/CARS.md). We support Honda, Toyota, Hyundai, Nissan, Kia, Chrysler, Lexus, Acura, Audi, VW, and more. If your car is not supported but has adaptive cruise control and lane-keeping assist, it's likely able to run openpilot.
|
||||
* One of [the 200+ supported cars](docs/CARS.md). We support Honda, Toyota, Hyundai, Nissan, Kia, Chrysler, Lexus, Acura, Audi, VW, and more. If your car is not supported but has adaptive cruise control and lane-keeping assist, it's likely able to run openpilot.
|
||||
* A [car harness](https://comma.ai/shop/products/car-harness) to connect to your car.
|
||||
|
||||
We have detailed instructions for [how to mount the device in a car](https://comma.ai/setup).
|
||||
@@ -50,7 +50,7 @@ We have detailed instructions for [how to mount the device in a car](https://com
|
||||
Running on PC
|
||||
------
|
||||
|
||||
All of openpilot's services can run as normal on a PC, even without special hardware or a car. To develop or experiment with openpilot you can run openpilot on recorded or simulated data.
|
||||
All openpilot services can run as usual on a PC without requiring special hardware or a car. You can also run openpilot on recorded or simulated data to develop or experiment with openpilot.
|
||||
|
||||
With openpilot's tools, you can plot logs, replay drives, and watch the full-res camera streams. See [the tools README](tools/README.md) for more information.
|
||||
|
||||
@@ -119,7 +119,7 @@ Directory Structure
|
||||
├── debug # Tools to help you debug and do car ports
|
||||
├── locationd # Precise localization and vehicle parameter estimation
|
||||
├── loggerd # Logger and uploader of car data
|
||||
├── manager # Deamon that starts/stops all other daemons as needed
|
||||
├── manager # Daemon that starts/stops all other daemons as needed
|
||||
├── modeld # Driving and monitoring model runners
|
||||
├── monitoring # Daemon to determine driver attention
|
||||
├── navd # Turn-by-turn navigation
|
||||
|
||||
+36
-3
@@ -1,3 +1,36 @@
|
||||
Version 0.9.0 (2022-11-21)
|
||||
========================
|
||||
* New driving model
|
||||
* Internal feature space information content increased tenfold during training to ~700 bits, which makes the model dramatically more accurate
|
||||
* Less reliance on previous frames makes model more reactive and snappy
|
||||
* Trained in new reprojective simulator
|
||||
* Trained in 36 hours from scratch, compared to one week for previous releases
|
||||
* Training now simulates both lateral and longitudinal behavior, which allows openpilot to slow down for turns, stop at traffic lights, and more in experimental mode
|
||||
* Experimental driving mode
|
||||
* End-to-end longitudinal control
|
||||
* Stops for traffic lights and stop signs
|
||||
* Slows down for turns
|
||||
* openpilot defaults to chill mode, enable experimental mode in settings
|
||||
* Driver monitoring updates
|
||||
* New bigger model with added end-to-end distracted trigger
|
||||
* Reduced false positives during driver calibration
|
||||
* Self-tuning torque controller: learns parameters live for each car
|
||||
* Torque controller used on all Toyota, Lexus, Hyundai, Kia, and Genesis models
|
||||
* UI updates
|
||||
* Matched speeds shown on car's dash
|
||||
* Multi-language in navigation
|
||||
* Improved update experience
|
||||
* Border turns grey while overriding steering
|
||||
* Bookmark events while driving; view them in comma connect
|
||||
* New onroad visualization for experimental mode
|
||||
* tools: new and improved cabana thanks to deanlee!
|
||||
* Experimental longitudinal support for Volkswagen, CAN-FD Hyundai, and new GM models
|
||||
* Genesis GV70 2022-23 support thanks to zunichky and sunnyhaibin!
|
||||
* Hyundai Santa Cruz 2021-22 support thanks to sunnyhaibin!
|
||||
* Kia Sportage 2023 support thanks to sunnyhaibin!
|
||||
* Kia Sportage Hybrid 2023 support thanks to sunnyhaibin!
|
||||
* Kia Stinger 2022 support thanks to sunnyhaibin!
|
||||
|
||||
Version 0.8.16 (2022-08-26)
|
||||
========================
|
||||
* New driving model
|
||||
@@ -73,7 +106,7 @@ Version 0.8.14 (2022-06-01)
|
||||
Version 0.8.13 (2022-02-18)
|
||||
========================
|
||||
* Improved driver monitoring
|
||||
* Retuned driver pose learner for relaxed driving positions
|
||||
* Re-tuned driver pose learner for relaxed driving positions
|
||||
* Added reliance on driving model to be more scene adaptive
|
||||
* Matched strictness between comma two and comma three
|
||||
* Improved performance in turns by compensating for the road bank angle
|
||||
@@ -219,7 +252,7 @@ Version 0.8.4 (2021-05-17)
|
||||
* Delay controls start until system is ready
|
||||
* Fuzzy car identification, enabled with Community Features toggle
|
||||
* Localizer optimized for increased precision and less CPU usage
|
||||
* Retuned lateral control to be more aggressive when model is confident
|
||||
* Re-tuned lateral control to be more aggressive when model is confident
|
||||
* Toyota Mirai 2021 support
|
||||
* Lexus NX 300 2020 support thanks to goesreallyfast!
|
||||
* Volkswagen Atlas 2018-19 support thanks to jyoung8607!
|
||||
@@ -384,7 +417,7 @@ Version 0.7 (2019-12-13)
|
||||
* Improve GM longitudinal control: proper computations for 15Hz radar
|
||||
* Move GM port, Toyota with DSU removed, comma pedal in community features; toggle switch required
|
||||
* Remove upload over cellular toggle: only upload qlog and qcamera files if not on wifi
|
||||
* Refactor Panda code towards ISO26262 and SIL2 compliancy
|
||||
* Refactor Panda code towards ISO26262 and SIL2 compliance
|
||||
* Forward stock FCW for Honda Nidec
|
||||
* Volkswagen port now standard: comma Harness intercepts stock camera
|
||||
|
||||
|
||||
+29
-13
@@ -10,10 +10,6 @@ AGNOS = TICI
|
||||
|
||||
Decider('MD5-timestamp')
|
||||
|
||||
AddOption('--test',
|
||||
action='store_true',
|
||||
help='build test files')
|
||||
|
||||
AddOption('--extras',
|
||||
action='store_true',
|
||||
help='build misc extras, like setup and installer files')
|
||||
@@ -53,6 +49,17 @@ AddOption('--no-thneed',
|
||||
dest='no_thneed',
|
||||
help='avoid using thneed')
|
||||
|
||||
AddOption('--pc-thneed',
|
||||
action='store_true',
|
||||
dest='pc_thneed',
|
||||
help='use thneed on pc')
|
||||
|
||||
AddOption('--no-test',
|
||||
action='store_false',
|
||||
dest='test',
|
||||
default=os.path.islink(Dir('#laika/').abspath),
|
||||
help='skip building test files')
|
||||
|
||||
real_arch = arch = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip()
|
||||
if platform.system() == "Darwin":
|
||||
arch = "Darwin"
|
||||
@@ -60,7 +67,6 @@ if platform.system() == "Darwin":
|
||||
if arch == "aarch64" and AGNOS:
|
||||
arch = "larch64"
|
||||
|
||||
USE_WEBCAM = os.getenv("USE_WEBCAM") is not None
|
||||
|
||||
lenv = {
|
||||
"PATH": os.environ['PATH'],
|
||||
@@ -69,7 +75,7 @@ lenv = {
|
||||
|
||||
"ACADOS_SOURCE_DIR": Dir("#third_party/acados/include/acados").abspath,
|
||||
"ACADOS_PYTHON_INTERFACE_PATH": Dir("#pyextra/acados_template").abspath,
|
||||
"TERA_PATH": Dir("#").abspath + f"/third_party/acados/{arch}/t_renderer",
|
||||
"TERA_PATH": Dir("#").abspath + f"/third_party/acados/{arch}/t_renderer"
|
||||
}
|
||||
|
||||
rpath = lenv["LD_LIBRARY_PATH"].copy()
|
||||
@@ -93,9 +99,6 @@ if arch == "larch64":
|
||||
"#third_party/libyuv/larch64/lib",
|
||||
"/usr/lib/aarch64-linux-gnu"
|
||||
]
|
||||
cpppath += [
|
||||
"#system/camerad/include",
|
||||
]
|
||||
cflags = ["-DQCOM2", "-mcpu=cortex-a57"]
|
||||
cxxflags = ["-DQCOM2", "-mcpu=cortex-a57"]
|
||||
rpath += ["/usr/local/lib"]
|
||||
@@ -106,6 +109,9 @@ else:
|
||||
|
||||
# MacOS
|
||||
if arch == "Darwin":
|
||||
if real_arch == "x86_64":
|
||||
lenv["TERA_PATH"] = Dir("#").abspath + f"/third_party/acados/Darwin_x86_64/t_renderer"
|
||||
|
||||
brew_prefix = subprocess.check_output(['brew', '--prefix'], encoding='utf8').strip()
|
||||
yuv_dir = "mac" if real_arch != "arm64" else "mac_arm64"
|
||||
libpath = [
|
||||
@@ -114,9 +120,13 @@ else:
|
||||
f"{brew_prefix}/Library",
|
||||
f"{brew_prefix}/opt/openssl/lib",
|
||||
f"{brew_prefix}/Cellar",
|
||||
f"#third_party/acados/{arch}/lib",
|
||||
"/System/Library/Frameworks/OpenGL.framework/Libraries",
|
||||
]
|
||||
if real_arch == "x86_64":
|
||||
libpath.append(f"#third_party/acados/Darwin_x86_64/lib")
|
||||
else:
|
||||
libpath.append(f"#third_party/acados/{arch}/lib")
|
||||
|
||||
cflags += ["-DGL_SILENCE_DEPRECATION"]
|
||||
cxxflags += ["-DGL_SILENCE_DEPRECATION"]
|
||||
cpppath += [
|
||||
@@ -253,7 +263,7 @@ def abspath(x):
|
||||
# rpath works elsewhere
|
||||
return x[0].path.rsplit("/", 1)[1][:-3]
|
||||
|
||||
# Cython build enviroment
|
||||
# Cython build environment
|
||||
py_include = sysconfig.get_paths()['include']
|
||||
envCython = env.Clone()
|
||||
envCython["CPPPATH"] += [py_include, np.get_include()]
|
||||
@@ -317,6 +327,7 @@ qt_flags = [
|
||||
qt_env['CXXFLAGS'] += qt_flags
|
||||
qt_env['LIBPATH'] += ['#selfdrive/ui']
|
||||
qt_env['LIBS'] = qt_libs
|
||||
qt_env['QT_MOCHPREFIX'] = cache_dir + '/moc_files/moc_'
|
||||
|
||||
if GetOption("clazy"):
|
||||
checks = [
|
||||
@@ -329,7 +340,7 @@ if GetOption("clazy"):
|
||||
qt_env['ENV']['CLAZY_IGNORE_DIRS'] = qt_dirs[0]
|
||||
qt_env['ENV']['CLAZY_CHECKS'] = ','.join(checks)
|
||||
|
||||
Export('env', 'qt_env', 'arch', 'real_arch', 'SHARED', 'USE_WEBCAM')
|
||||
Export('env', 'qt_env', 'arch', 'real_arch', 'SHARED')
|
||||
|
||||
SConscript(['common/SConscript'])
|
||||
Import('_common', '_gpucommon')
|
||||
@@ -421,7 +432,12 @@ SConscript(['selfdrive/sensord/SConscript'])
|
||||
SConscript(['selfdrive/ui/SConscript'])
|
||||
SConscript(['selfdrive/navd/SConscript'])
|
||||
|
||||
SConscript(['tools/replay/SConscript'])
|
||||
if arch in ['x86_64', 'Darwin'] or GetOption('extras'):
|
||||
SConscript(['tools/replay/SConscript'])
|
||||
|
||||
opendbc = abspath([File('opendbc/can/libdbc.so')])
|
||||
Export('opendbc')
|
||||
SConscript(['tools/cabana/SConscript'])
|
||||
|
||||
if GetOption('test'):
|
||||
SConscript('panda/tests/safety/SConscript')
|
||||
|
||||
+39
-21
@@ -17,7 +17,8 @@ struct CarEvent @0x9b1657f34caf3ad3 {
|
||||
immediateDisable @6 :Bool;
|
||||
preEnable @7 :Bool;
|
||||
permanent @8 :Bool; # alerts presented regardless of openpilot state
|
||||
override @9 :Bool;
|
||||
overrideLateral @10 :Bool;
|
||||
overrideLongitudinal @9 :Bool;
|
||||
|
||||
enum EventName @0xbaa8c5d505f727de {
|
||||
canError @0;
|
||||
@@ -35,6 +36,7 @@ struct CarEvent @0x9b1657f34caf3ad3 {
|
||||
pedalPressed @13; # exits active state
|
||||
pedalPressedPreEnable @73; # added during pre-enable state for either pedal
|
||||
gasPressedOverride @108; # added when user is pressing gas with no disengage on gas
|
||||
steerOverride @114;
|
||||
cruiseDisabled @14;
|
||||
speedTooLow @17;
|
||||
outOfSpace @18;
|
||||
@@ -64,6 +66,7 @@ struct CarEvent @0x9b1657f34caf3ad3 {
|
||||
lowBattery @48;
|
||||
vehicleModelInvalid @50;
|
||||
accFaulted @51;
|
||||
accFaultedTemp @115;
|
||||
sensorDataInvalid @52;
|
||||
commIssue @53;
|
||||
commIssueAvgFreq @109;
|
||||
@@ -165,6 +168,7 @@ struct CarState {
|
||||
# brake pedal, 0.0-1.0
|
||||
brake @5 :Float32; # this is user pedal only
|
||||
brakePressed @6 :Bool; # this is user pedal only
|
||||
regenBraking @45 :Bool; # this is user pedal only
|
||||
parkingBrake @39 :Bool;
|
||||
brakeHoldActive @38 :Bool;
|
||||
|
||||
@@ -340,8 +344,7 @@ struct CarControl {
|
||||
off @0;
|
||||
pid @1;
|
||||
stopping @2;
|
||||
|
||||
startingDEPRECATED @3;
|
||||
starting @3;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -349,6 +352,7 @@ struct CarControl {
|
||||
struct CruiseControl {
|
||||
cancel @0: Bool;
|
||||
resume @1: Bool;
|
||||
override @4: Bool;
|
||||
speedOverrideDEPRECATED @2: Float32;
|
||||
accelOverrideDEPRECATED @3: Float32;
|
||||
}
|
||||
@@ -414,23 +418,18 @@ struct CarParams {
|
||||
enableGasInterceptor @2 :Bool;
|
||||
pcmCruise @3 :Bool; # is openpilot's state tied to the PCM's cruise state?
|
||||
enableDsu @5 :Bool; # driving support unit
|
||||
enableApgs @6 :Bool; # advanced parking guidance system
|
||||
enableBsm @56 :Bool; # blind spot monitoring
|
||||
flags @64 :UInt32; # flags for car specific quirks
|
||||
experimentalLongitudinalAvailable @71 :Bool;
|
||||
|
||||
minEnableSpeed @7 :Float32;
|
||||
minSteerSpeed @8 :Float32;
|
||||
maxSteeringAngleDeg @54 :Float32;
|
||||
safetyConfigs @62 :List(SafetyConfig);
|
||||
alternativeExperience @65 :Int16; # panda flag for features like no disengage on gas
|
||||
maxLateralAccel @68 :Float32;
|
||||
|
||||
steerMaxBPDEPRECATED @11 :List(Float32);
|
||||
steerMaxVDEPRECATED @12 :List(Float32);
|
||||
gasMaxBPDEPRECATED @13 :List(Float32);
|
||||
gasMaxVDEPRECATED @14 :List(Float32);
|
||||
brakeMaxBPDEPRECATED @15 :List(Float32);
|
||||
brakeMaxVDEPRECATED @16 :List(Float32);
|
||||
# Car docs fields
|
||||
maxLateralAccel @68 :Float32;
|
||||
autoResumeSng @69 :Bool; # describes whether car can resume from a stop automatically
|
||||
|
||||
# things about the car in the manual
|
||||
mass @17 :Float32; # [kg] curb weight: all fluids no cargo
|
||||
@@ -458,12 +457,13 @@ struct CarParams {
|
||||
|
||||
vEgoStopping @29 :Float32; # Speed at which the car goes into stopping state
|
||||
vEgoStarting @59 :Float32; # Speed at which the car goes into starting state
|
||||
directAccelControl @30 :Bool; # Does the car have direct accel control or just gas/brake
|
||||
stoppingControl @31 :Bool; # Does the car allows full control even at lows speeds when stopping
|
||||
stopAccel @60 :Float32; # Required acceleraton to keep vehicle stationary
|
||||
stoppingControl @31 :Bool; # Does the car allow full control even at lows speeds when stopping
|
||||
steerControlType @34 :SteerControlType;
|
||||
radarOffCan @35 :Bool; # True when radar objects aren't visible on CAN
|
||||
stopAccel @60 :Float32; # Required acceleration to keep vehicle stationary
|
||||
stoppingDecelRate @52 :Float32; # m/s^2/s while trying to stop
|
||||
startAccel @32 :Float32; # Required acceleration to get car moving
|
||||
startingState @70 :Bool; # Does this car make use of special starting state
|
||||
|
||||
steerActuatorDelay @36 :Float32; # Steering wheel actuator delay in seconds
|
||||
longitudinalActuatorDelayLowerBound @61 :Float32; # Gas/Brake actuator delay in seconds, lower bound
|
||||
@@ -507,6 +507,8 @@ struct CarParams {
|
||||
friction @3 :Float32;
|
||||
kf @4 :Float32;
|
||||
steeringAngleDeadzoneDeg @5 :Float32;
|
||||
latAccelFactor @6 :Float32;
|
||||
latAccelOffset @7 :Float32;
|
||||
}
|
||||
|
||||
struct LongitudinalPIDTuning {
|
||||
@@ -575,8 +577,8 @@ struct CarParams {
|
||||
subaruLegacy @22; # pre-Global platform
|
||||
hyundaiLegacy @23;
|
||||
hyundaiCommunity @24;
|
||||
stellantis @25;
|
||||
faw @26;
|
||||
stellantisDEPRECATED @25; # Consolidated with Chrysler; may be recycled for the next new model
|
||||
hongqi @26;
|
||||
body @27;
|
||||
hyundaiCanfd @28;
|
||||
}
|
||||
@@ -607,7 +609,7 @@ struct CarParams {
|
||||
|
||||
enum Ecu {
|
||||
eps @0;
|
||||
esp @1;
|
||||
abs @1;
|
||||
fwdRadar @2;
|
||||
fwdCamera @3;
|
||||
engine @4;
|
||||
@@ -617,6 +619,10 @@ struct CarParams {
|
||||
gateway @10; # can gateway
|
||||
hud @11; # heads up display
|
||||
combinationMeter @12; # instrument cluster
|
||||
electricBrakeBooster @15;
|
||||
shiftByWire @16;
|
||||
adas @19;
|
||||
cornerRadar @21;
|
||||
|
||||
# Toyota only
|
||||
dsu @6;
|
||||
@@ -625,8 +631,12 @@ struct CarParams {
|
||||
# Honda only
|
||||
vsa @13; # Vehicle Stability Assist
|
||||
programmedFuelInjection @14;
|
||||
electricBrakeBooster @15;
|
||||
shiftByWire @16;
|
||||
|
||||
# Chrysler only
|
||||
hcp @18; # Hybrid Control Processor
|
||||
|
||||
# Hyundai only
|
||||
vcu @20; # Vehicle (Motor) Control Unit
|
||||
|
||||
debug @17;
|
||||
}
|
||||
@@ -643,6 +653,7 @@ struct CarParams {
|
||||
}
|
||||
|
||||
enableCameraDEPRECATED @4 :Bool;
|
||||
enableApgsDEPRECATED @6 :Bool;
|
||||
steerRateCostDEPRECATED @33 :Float32;
|
||||
isPandaBlackDEPRECATED @39 :Bool;
|
||||
hasStockCameraDEPRECATED @57 :Bool;
|
||||
@@ -650,7 +661,14 @@ struct CarParams {
|
||||
safetyModelDEPRECATED @9 :SafetyModel;
|
||||
safetyModelPassiveDEPRECATED @42 :SafetyModel = silent;
|
||||
minSpeedCanDEPRECATED @51 :Float32;
|
||||
startAccelDEPRECATED @32 :Float32;
|
||||
communityFeatureDEPRECATED @46: Bool;
|
||||
startingAccelRateDEPRECATED @53 :Float32;
|
||||
steerMaxBPDEPRECATED @11 :List(Float32);
|
||||
steerMaxVDEPRECATED @12 :List(Float32);
|
||||
gasMaxBPDEPRECATED @13 :List(Float32);
|
||||
gasMaxVDEPRECATED @14 :List(Float32);
|
||||
brakeMaxBPDEPRECATED @15 :List(Float32);
|
||||
brakeMaxVDEPRECATED @16 :List(Float32);
|
||||
directAccelControlDEPRECATED @30 :Bool;
|
||||
maxSteeringAngleDegDEPRECATED @54 :Float32;
|
||||
}
|
||||
|
||||
+130
-31
@@ -137,6 +137,7 @@ struct FrameData {
|
||||
gain @15 :Float32; # This includes highConversionGain if enabled
|
||||
measuredGreyFraction @21 :Float32;
|
||||
targetGreyFraction @22 :Float32;
|
||||
exposureValPercent @27 :Float32;
|
||||
|
||||
# Focus
|
||||
lensPos @11 :Int32;
|
||||
@@ -150,10 +151,7 @@ struct FrameData {
|
||||
|
||||
transform @10 :List(Float32);
|
||||
|
||||
androidCaptureResult @9 :AndroidCaptureResult;
|
||||
|
||||
image @6 :Data;
|
||||
globalGainDEPRECATED @5 :Int32;
|
||||
|
||||
temperaturesC @24 :List(Float32);
|
||||
|
||||
@@ -164,6 +162,15 @@ struct FrameData {
|
||||
front @3;
|
||||
}
|
||||
|
||||
sensor @26 :ImageSensor;
|
||||
enum ImageSensor {
|
||||
unknown @0;
|
||||
ar0321 @1;
|
||||
ox03c10 @2;
|
||||
}
|
||||
|
||||
globalGainDEPRECATED @5 :Int32;
|
||||
androidCaptureResultDEPRECATED @9 :AndroidCaptureResult;
|
||||
struct AndroidCaptureResult {
|
||||
sensitivity @0 :Int32;
|
||||
frameDuration @1 :Int64;
|
||||
@@ -220,9 +227,9 @@ struct SensorEventData {
|
||||
fiber @2;
|
||||
velodyne @3; # Velodyne IMU
|
||||
bno055 @4; # Bosch accelerometer
|
||||
lsm6ds3 @5; # accelerometer (c2)
|
||||
bmp280 @6; # barometer (c2)
|
||||
mmc3416x @7; # magnetometer (c2)
|
||||
lsm6ds3 @5; # includes LSM6DS3 and LSM6DS3TR, TR = tape reel
|
||||
bmp280 @6; # barometer
|
||||
mmc3416x @7; # magnetometer
|
||||
bmx055 @8;
|
||||
rpr0521 @9;
|
||||
lsm6ds3trc @10;
|
||||
@@ -290,7 +297,6 @@ struct CanData {
|
||||
}
|
||||
|
||||
struct DeviceState @0xa4d8b5af2aa492eb {
|
||||
usbOnline @12 :Bool;
|
||||
networkType @22 :NetworkType;
|
||||
networkInfo @31 :NetworkInfo;
|
||||
networkStrength @24 :NetworkStrength;
|
||||
@@ -308,10 +314,6 @@ struct DeviceState @0xa4d8b5af2aa492eb {
|
||||
cpuUsagePercent @34 :List(Int8); # per-core cpu usage
|
||||
|
||||
# power
|
||||
batteryPercent @8 :Int16;
|
||||
batteryCurrent @15 :Int32;
|
||||
chargingError @17 :Bool;
|
||||
chargingDisabled @18 :Bool;
|
||||
offroadPowerUsageUwh @23 :UInt32;
|
||||
carBatteryCapacityUwh @25 :UInt32;
|
||||
powerDrawW @40 :Float32;
|
||||
@@ -388,31 +390,44 @@ struct DeviceState @0xa4d8b5af2aa492eb {
|
||||
batteryStatusDEPRECATED @9 :Text;
|
||||
batteryVoltageDEPRECATED @16 :Int32;
|
||||
batteryTempCDEPRECATED @29 :Float32;
|
||||
batteryPercentDEPRECATED @8 :Int16;
|
||||
batteryCurrentDEPRECATED @15 :Int32;
|
||||
chargingErrorDEPRECATED @17 :Bool;
|
||||
chargingDisabledDEPRECATED @18 :Bool;
|
||||
usbOnlineDEPRECATED @12 :Bool;
|
||||
}
|
||||
|
||||
struct PandaState @0xa7649e2575e4591e {
|
||||
ignitionLine @2 :Bool;
|
||||
controlsAllowed @3 :Bool;
|
||||
gasInterceptorDetected @4 :Bool;
|
||||
canSendErrs @7 :UInt32;
|
||||
canFwdErrs @8 :UInt32;
|
||||
canRxErrs @19 :UInt32;
|
||||
rxBufferOverflow @7 :UInt32;
|
||||
txBufferOverflow @8 :UInt32;
|
||||
gmlanSendErrs @9 :UInt32;
|
||||
pandaType @10 :PandaType;
|
||||
ignitionCan @13 :Bool;
|
||||
safetyModel @14 :Car.CarParams.SafetyModel;
|
||||
safetyParam @27 :UInt16;
|
||||
alternativeExperience @23 :Int16;
|
||||
faultStatus @15 :FaultStatus;
|
||||
powerSaveEnabled @16 :Bool;
|
||||
uptime @17 :UInt32;
|
||||
faults @18 :List(FaultType);
|
||||
harnessStatus @21 :HarnessStatus;
|
||||
heartbeatLost @22 :Bool;
|
||||
blockedCnt @24 :UInt32;
|
||||
interruptLoad @25 :Float32;
|
||||
fanPower @28 :UInt8;
|
||||
|
||||
# can health
|
||||
canState0 @29 :PandaCanState;
|
||||
canState1 @30 :PandaCanState;
|
||||
canState2 @31 :PandaCanState;
|
||||
|
||||
# safety stuff
|
||||
controlsAllowed @3 :Bool;
|
||||
safetyRxInvalid @19 :UInt32;
|
||||
safetyTxBlocked @24 :UInt32;
|
||||
safetyModel @14 :Car.CarParams.SafetyModel;
|
||||
safetyParam @27 :UInt16;
|
||||
alternativeExperience @23 :Int16;
|
||||
safetyRxChecksInvalid @32 :Bool;
|
||||
|
||||
enum FaultStatus {
|
||||
none @0;
|
||||
faultTemp @1;
|
||||
@@ -443,6 +458,8 @@ struct PandaState @0xa7649e2575e4591e {
|
||||
interruptRateClockSource @20;
|
||||
interruptRateTick @21;
|
||||
interruptRateExti @22;
|
||||
interruptRateSpi @23;
|
||||
interruptRateUart7 @24;
|
||||
# Update max fault type in boardd when adding faults
|
||||
}
|
||||
|
||||
@@ -455,6 +472,8 @@ struct PandaState @0xa7649e2575e4591e {
|
||||
uno @5;
|
||||
dos @6;
|
||||
redPanda @7;
|
||||
redPandaV2 @8;
|
||||
tres @9;
|
||||
}
|
||||
|
||||
enum HarnessStatus {
|
||||
@@ -468,9 +487,44 @@ struct PandaState @0xa7649e2575e4591e {
|
||||
currentDEPRECATED @1 :UInt32;
|
||||
hasGpsDEPRECATED @6 :Bool;
|
||||
fanSpeedRpmDEPRECATED @11 :UInt16;
|
||||
usbPowerModeDEPRECATED @12 :PeripheralState.UsbPowerMode;
|
||||
usbPowerModeDEPRECATED @12 :PeripheralState.UsbPowerModeDEPRECATED;
|
||||
safetyParamDEPRECATED @20 :Int16;
|
||||
safetyParam2DEPRECATED @26 :UInt32;
|
||||
|
||||
struct PandaCanState {
|
||||
busOff @0 :Bool;
|
||||
busOffCnt @1 :UInt32;
|
||||
errorWarning @2 :Bool;
|
||||
errorPassive @3 :Bool;
|
||||
lastError @4 :LecErrorCode;
|
||||
lastStoredError @5 :LecErrorCode;
|
||||
lastDataError @6 :LecErrorCode;
|
||||
lastDataStoredError @7 :LecErrorCode;
|
||||
receiveErrorCnt @8 :UInt8;
|
||||
transmitErrorCnt @9 :UInt8;
|
||||
totalErrorCnt @10 :UInt32;
|
||||
totalTxLostCnt @11 :UInt32;
|
||||
totalRxLostCnt @12 :UInt32;
|
||||
totalTxCnt @13 :UInt32;
|
||||
totalRxCnt @14 :UInt32;
|
||||
totalFwdCnt @15 :UInt32;
|
||||
canSpeed @16 :UInt16;
|
||||
canDataSpeed @17 :UInt16;
|
||||
canfdEnabled @18 :Bool;
|
||||
brsEnabled @19 :Bool;
|
||||
canfdNonIso @20 :Bool;
|
||||
|
||||
enum LecErrorCode {
|
||||
noError @0;
|
||||
stuffError @1;
|
||||
formError @2;
|
||||
ackError @3;
|
||||
bit1Error @4;
|
||||
bit0Error @5;
|
||||
crcError @6;
|
||||
noChange @7;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct PeripheralState {
|
||||
@@ -478,9 +532,9 @@ struct PeripheralState {
|
||||
voltage @1 :UInt32;
|
||||
current @2 :UInt32;
|
||||
fanSpeedRpm @3 :UInt16;
|
||||
usbPowerMode @4 :UsbPowerMode;
|
||||
|
||||
enum UsbPowerMode @0xa8883583b32c9877 {
|
||||
usbPowerModeDEPRECATED @4 :UsbPowerModeDEPRECATED;
|
||||
enum UsbPowerModeDEPRECATED @0xa8883583b32c9877 {
|
||||
none @0;
|
||||
client @1;
|
||||
cdp @2;
|
||||
@@ -538,6 +592,7 @@ struct LiveCalibrationData {
|
||||
# the direction of travel vector in device frame
|
||||
rpyCalib @7 :List(Float32);
|
||||
rpyCalibSpread @8 :List(Float32);
|
||||
wideFromDeviceEuler @10 :List(Float32);
|
||||
|
||||
warpMatrixDEPRECATED @0 :List(Float32);
|
||||
warpMatrix2DEPRECATED @5 :List(Float32);
|
||||
@@ -567,6 +622,8 @@ struct ControlsState @0x97ff69c53601abf1 {
|
||||
enabled @19 :Bool;
|
||||
active @36 :Bool;
|
||||
|
||||
experimentalMode @64 :Bool;
|
||||
|
||||
longControlState @30 :Car.CarControl.Actuators.LongControlState;
|
||||
vPid @2 :Float32;
|
||||
vTargetLead @3 :Float32;
|
||||
@@ -608,7 +665,7 @@ struct ControlsState @0x97ff69c53601abf1 {
|
||||
preEnabled @1;
|
||||
enabled @2;
|
||||
softDisabling @3;
|
||||
overriding @4;
|
||||
overriding @4; # superset of overriding with steering or accelerator
|
||||
}
|
||||
|
||||
enum AlertStatus {
|
||||
@@ -753,6 +810,9 @@ struct ModelDataV2 {
|
||||
|
||||
meta @12 :MetaData;
|
||||
|
||||
# Model perceived motion
|
||||
temporalPose @21 :Pose;
|
||||
|
||||
# All SI units and in device frame
|
||||
struct XYZTData {
|
||||
x @0 :List(Float32);
|
||||
@@ -816,6 +876,13 @@ struct ModelDataV2 {
|
||||
brake4MetersPerSecondSquaredProbs @5 :List(Float32);
|
||||
brake5MetersPerSecondSquaredProbs @6 :List(Float32);
|
||||
}
|
||||
|
||||
struct Pose {
|
||||
trans @0 :List(Float32); # m/s in device frame
|
||||
rot @1 :List(Float32); # rad/s in device frame
|
||||
transStd @2 :List(Float32); # std m/s in device frame
|
||||
rotStd @3 :List(Float32); # std rad/s in device frame
|
||||
}
|
||||
}
|
||||
|
||||
struct EncodeIndex {
|
||||
@@ -917,11 +984,11 @@ struct LongitudinalPlan @0xe00b5b3eba12876c {
|
||||
|
||||
struct LateralPlan @0xe1e9318e2ae8b51e {
|
||||
modelMonoTime @31 :UInt64;
|
||||
laneWidth @0 :Float32;
|
||||
lProb @5 :Float32;
|
||||
rProb @7 :Float32;
|
||||
laneWidthDEPRECATED @0 :Float32;
|
||||
lProbDEPRECATED @5 :Float32;
|
||||
rProbDEPRECATED @7 :Float32;
|
||||
dPathPoints @20 :List(Float32);
|
||||
dProb @21 :Float32;
|
||||
dProbDEPRECATED @21 :Float32;
|
||||
|
||||
mpcSolutionValid @9 :Bool;
|
||||
desire @17 :Desire;
|
||||
@@ -1136,6 +1203,7 @@ struct GnssMeasurements {
|
||||
# Different ultra-rapid files:
|
||||
nasaUltraRapid @1;
|
||||
glonassIacUltraRapid @2;
|
||||
qcom @3;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1198,7 +1266,7 @@ struct UbloxGnss {
|
||||
carrierPhaseValid @1 :Bool;
|
||||
# half cycle valid
|
||||
halfCycleValid @2 :Bool;
|
||||
# half sycle subtracted from phase
|
||||
# half cycle subtracted from phase
|
||||
halfCycleSubtracted @3 :Bool;
|
||||
}
|
||||
}
|
||||
@@ -1329,7 +1397,7 @@ struct QcomGnss @0xde94674b07ae51c1 {
|
||||
unknown3 @3;
|
||||
unknown4 @4;
|
||||
unknown5 @5;
|
||||
unknown6 @6;
|
||||
sbas @6;
|
||||
}
|
||||
|
||||
enum SVObservationState @0xe81e829a0d6c83e9 {
|
||||
@@ -1752,6 +1820,22 @@ struct LiveParametersData {
|
||||
roll @14 :Float32;
|
||||
}
|
||||
|
||||
struct LiveTorqueParametersData {
|
||||
liveValid @0 :Bool;
|
||||
latAccelFactorRaw @1 :Float32;
|
||||
latAccelOffsetRaw @2 :Float32;
|
||||
frictionCoefficientRaw @3 :Float32;
|
||||
latAccelFactorFiltered @4 :Float32;
|
||||
latAccelOffsetFiltered @5 :Float32;
|
||||
frictionCoefficientFiltered @6 :Float32;
|
||||
totalBucketPoints @7 :Float32;
|
||||
decay @8 :Float32;
|
||||
maxResets @9 :Float32;
|
||||
points @10 :List(List(Float32));
|
||||
version @11 :Int32;
|
||||
useParams @12 :Bool;
|
||||
}
|
||||
|
||||
struct LiveMapDataDEPRECATED {
|
||||
speedLimitValid @0 :Bool;
|
||||
speedLimit @1 :Float32;
|
||||
@@ -1779,6 +1863,8 @@ struct CameraOdometry {
|
||||
rot @1 :List(Float32); # rad/s in device frame
|
||||
transStd @2 :List(Float32); # std m/s in device frame
|
||||
rotStd @3 :List(Float32); # std rad/s in device frame
|
||||
wideFromDeviceEuler @6 :List(Float32);
|
||||
wideFromDeviceEulerStd @7 :List(Float32);
|
||||
}
|
||||
|
||||
struct Sentinel {
|
||||
@@ -1792,6 +1878,10 @@ struct Sentinel {
|
||||
signal @1 :Int32;
|
||||
}
|
||||
|
||||
struct UIDebug {
|
||||
drawTimeMillis @0 :Float32;
|
||||
}
|
||||
|
||||
struct ManagerState {
|
||||
processes @0 :List(ProcessState);
|
||||
|
||||
@@ -1887,7 +1977,13 @@ struct Event {
|
||||
gpsNMEA @3 :GPSNMEAData;
|
||||
can @5 :List(CanData);
|
||||
controlsState @7 :ControlsState;
|
||||
sensorEvents @11 :List(SensorEventData);
|
||||
gyroscope @99 :SensorEventData;
|
||||
gyroscope2 @100 :SensorEventData;
|
||||
accelerometer @98 :SensorEventData;
|
||||
accelerometer2 @101 :SensorEventData;
|
||||
magnetometer @95 :SensorEventData;
|
||||
lightSensor @96 :SensorEventData;
|
||||
temperatureSensor @97 :SensorEventData;
|
||||
pandaStates @81 :List(PandaState);
|
||||
peripheralState @80 :PeripheralState;
|
||||
radarState @13 :RadarState;
|
||||
@@ -1905,6 +2001,7 @@ struct Event {
|
||||
gpsLocation @21 :GpsLocationData;
|
||||
gnssMeasurements @91 :GnssMeasurements;
|
||||
liveParameters @61 :LiveParametersData;
|
||||
liveTorqueParameters @94 :LiveTorqueParametersData;
|
||||
cameraOdometry @63 :CameraOdometry;
|
||||
thumbnail @66: Thumbnail;
|
||||
carEvents @68: List(Car.CarEvent);
|
||||
@@ -1938,8 +2035,9 @@ struct Event {
|
||||
navRoute @83 :NavRoute;
|
||||
navThumbnail @84: Thumbnail;
|
||||
|
||||
# user flags
|
||||
# UI services
|
||||
userFlag @93 :UserFlag;
|
||||
uiDebug @102 :UIDebug;
|
||||
|
||||
# *********** debug ***********
|
||||
testJoystick @52 :Joystick;
|
||||
@@ -1985,5 +2083,6 @@ struct Event {
|
||||
uiLayoutStateDEPRECATED @57 :Legacy.UiLayoutState;
|
||||
pandaStateDEPRECATED @12 :PandaState;
|
||||
driverStateDEPRECATED @59 :DriverStateDEPRECATED;
|
||||
sensorEventsDEPRECATED @11 :List(SensorEventData);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <atomic>
|
||||
|
||||
#define DEFAULT_SEGMENT_SIZE (10 * 1024 * 1024)
|
||||
#define NUM_READERS 10
|
||||
#define NUM_READERS 12
|
||||
#define ALIGN(n) ((n + (8 - 1)) & -8)
|
||||
|
||||
#define UNPACK64(higher, lower, input) do {uint64_t tmp = input; higher = tmp >> 32; lower = tmp & 0xFFFFFFFF;} while (0)
|
||||
|
||||
+9
-1
@@ -21,7 +21,13 @@ class Service:
|
||||
services = {
|
||||
# service: (should_log, frequency, qlog decimation (optional))
|
||||
# note: the "EncodeIdx" packets will still be in the log
|
||||
"sensorEvents": (True, 100., 100),
|
||||
"gyroscope": (True, 104., 104),
|
||||
"gyroscope2": (True, 100., 100),
|
||||
"accelerometer": (True, 104., 104),
|
||||
"accelerometer2": (True, 100., 100),
|
||||
"magnetometer": (True, 100., 100),
|
||||
"lightSensor": (True, 100., 100),
|
||||
"temperatureSensor": (True, 100., 100),
|
||||
"gpsNMEA": (True, 9.),
|
||||
"deviceState": (True, 2., 1),
|
||||
"can": (True, 100.),
|
||||
@@ -35,6 +41,7 @@ services = {
|
||||
"logMessage": (True, 0.),
|
||||
"errorLogMessage": (True, 0., 1),
|
||||
"liveCalibration": (True, 4., 4),
|
||||
"liveTorqueParameters": (True, 4., 1),
|
||||
"androidLog": (True, 0.),
|
||||
"carState": (True, 100., 10),
|
||||
"carControl": (True, 100., 10),
|
||||
@@ -71,6 +78,7 @@ services = {
|
||||
"userFlag": (True, 0., 1),
|
||||
|
||||
# debug
|
||||
"uiDebug": (True, 0., 1),
|
||||
"testJoystick": (True, 0.),
|
||||
"roadEncodeData": (False, 20.),
|
||||
"driverEncodeData": (False, 20.),
|
||||
|
||||
+3
-2
@@ -78,7 +78,8 @@ cl_program cl_program_from_file(cl_context ctx, cl_device_id device_id, const ch
|
||||
}
|
||||
|
||||
cl_program cl_program_from_source(cl_context ctx, cl_device_id device_id, const std::string& src, const char* args) {
|
||||
cl_program prg = CL_CHECK_ERR(clCreateProgramWithSource(ctx, 1, (const char*[]){src.c_str()}, NULL, &err));
|
||||
const char *csrc = src.c_str();
|
||||
cl_program prg = CL_CHECK_ERR(clCreateProgramWithSource(ctx, 1, &csrc, NULL, &err));
|
||||
if (int err = clBuildProgram(prg, 1, &device_id, args, NULL, NULL); err != 0) {
|
||||
cl_print_build_errors(prg, device_id);
|
||||
assert(0);
|
||||
@@ -87,7 +88,7 @@ cl_program cl_program_from_source(cl_context ctx, cl_device_id device_id, const
|
||||
}
|
||||
|
||||
cl_program cl_program_from_binary(cl_context ctx, cl_device_id device_id, const uint8_t* binary, size_t length, const char* args) {
|
||||
cl_program prg = CL_CHECK_ERR(clCreateProgramWithBinary(ctx, 1, &device_id, &length, (const uint8_t*[]){binary}, NULL, &err));
|
||||
cl_program prg = CL_CHECK_ERR(clCreateProgramWithBinary(ctx, 1, &device_id, &length, &binary, NULL, &err));
|
||||
if (int err = clBuildProgram(prg, 1, &device_id, args, NULL, NULL); err != 0) {
|
||||
cl_print_build_errors(prg, device_id);
|
||||
assert(0);
|
||||
|
||||
+36
-3
@@ -4,11 +4,11 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include <cstring>
|
||||
#include <linux/gpio.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include "common/util.h"
|
||||
|
||||
// We assume that all pins have already been exported on boot,
|
||||
// and that we have permission to write to them.
|
||||
#include "common/swaglog.h"
|
||||
|
||||
int gpio_init(int pin_nr, bool output) {
|
||||
char pin_dir_path[50];
|
||||
@@ -30,3 +30,36 @@ int gpio_set(int pin_nr, bool high) {
|
||||
}
|
||||
return util::write_file(pin_val_path, (void*)(high ? "1" : "0"), 1);
|
||||
}
|
||||
|
||||
int gpiochip_get_ro_value_fd(const char* consumer_label, int gpiochiop_id, int pin_nr) {
|
||||
|
||||
// Assumed that all interrupt pins are unexported and rights are given to
|
||||
// read from gpiochip0.
|
||||
std::string gpiochip_path = "/dev/gpiochip" + std::to_string(gpiochiop_id);
|
||||
int fd = open(gpiochip_path.c_str(), O_RDONLY);
|
||||
if (fd < 0) {
|
||||
LOGE("Error opening gpiochip0 fd")
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Setup event
|
||||
struct gpioevent_request rq;
|
||||
rq.lineoffset = pin_nr;
|
||||
rq.handleflags = GPIOHANDLE_REQUEST_INPUT;
|
||||
|
||||
/* Requesting both edges as the data ready pulse from the lsm6ds sensor is
|
||||
very short(75us) and is mostly detected as falling edge instead of rising.
|
||||
So if it is detected as rising the following falling edge is skipped. */
|
||||
rq.eventflags = GPIOEVENT_REQUEST_BOTH_EDGES;
|
||||
|
||||
strncpy(rq.consumer_label, consumer_label, std::size(rq.consumer_label) - 1);
|
||||
int ret = ioctl(fd, GPIO_GET_LINEEVENT_IOCTL, &rq);
|
||||
if (ret == -1) {
|
||||
LOGE("Unable to get line event from ioctl : %s", strerror(errno));
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
close(fd);
|
||||
return rq.fd;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,11 @@
|
||||
#define GPIO_UBLOX_PWR_EN 34
|
||||
#define GPIO_STM_RST_N 124
|
||||
#define GPIO_STM_BOOT0 134
|
||||
#define GPIO_BMX_ACCEL_INT 21
|
||||
#define GPIO_BMX_GYRO_INT 23
|
||||
#define GPIO_BMX_MAGN_INT 87
|
||||
#define GPIO_LSM_INT 84
|
||||
#define GPIOCHIP_INT 0
|
||||
#else
|
||||
#define GPIO_HUB_RST_N 0
|
||||
#define GPIO_UBLOX_RST_N 0
|
||||
@@ -15,7 +20,14 @@
|
||||
#define GPIO_UBLOX_PWR_EN 0
|
||||
#define GPIO_STM_RST_N 0
|
||||
#define GPIO_STM_BOOT0 0
|
||||
#define GPIO_BMX_ACCEL_INT 0
|
||||
#define GPIO_BMX_GYRO_INT 0
|
||||
#define GPIO_BMX_MAGN_INT 0
|
||||
#define GPIO_LSM_INT 0
|
||||
#define GPIOCHIP_INT 0
|
||||
#endif
|
||||
|
||||
int gpio_init(int pin_nr, bool output);
|
||||
int gpio_set(int pin_nr, bool high);
|
||||
|
||||
int gpiochip_get_ro_value_fd(const char* consumer_label, int gpiochiop_id, int pin_nr);
|
||||
|
||||
+12
-1
@@ -1,3 +1,5 @@
|
||||
from typing import Optional
|
||||
|
||||
def gpio_init(pin: int, output: bool) -> None:
|
||||
try:
|
||||
with open(f"/sys/class/gpio/gpio{pin}/direction", 'wb') as f:
|
||||
@@ -5,10 +7,19 @@ def gpio_init(pin: int, output: bool) -> None:
|
||||
except Exception as e:
|
||||
print(f"Failed to set gpio {pin} direction: {e}")
|
||||
|
||||
|
||||
def gpio_set(pin: int, high: bool) -> None:
|
||||
try:
|
||||
with open(f"/sys/class/gpio/gpio{pin}/value", 'wb') as f:
|
||||
f.write(b"1" if high else b"0")
|
||||
except Exception as e:
|
||||
print(f"Failed to set gpio {pin} value: {e}")
|
||||
|
||||
def gpio_read(pin: int) -> Optional[bool]:
|
||||
val = None
|
||||
try:
|
||||
with open(f"/sys/class/gpio/gpio{pin}/value", 'rb') as f:
|
||||
val = bool(int(f.read().strip()))
|
||||
except Exception as e:
|
||||
print(f"Failed to set gpio {pin} value: {e}")
|
||||
|
||||
return val
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
#include "common/mat.h"
|
||||
#include "system/hardware/hw.h"
|
||||
|
||||
const int TRAJECTORY_SIZE = 33;
|
||||
const int TRAJECTORY_SIZE = 33;
|
||||
const int LAT_MPC_N = 16;
|
||||
const int LON_MPC_N = 32;
|
||||
const float MIN_DRAW_DISTANCE = 10.0;
|
||||
|
||||
+37
-12
@@ -3,6 +3,7 @@
|
||||
#include <dirent.h>
|
||||
#include <sys/file.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <csignal>
|
||||
#include <unordered_map>
|
||||
|
||||
@@ -84,12 +85,16 @@ private:
|
||||
|
||||
std::unordered_map<std::string, uint32_t> keys = {
|
||||
{"AccessToken", CLEAR_ON_MANAGER_START | DONT_LOG},
|
||||
{"AssistNowToken", PERSISTENT},
|
||||
{"AthenadPid", PERSISTENT},
|
||||
{"AthenadUploadQueue", PERSISTENT},
|
||||
{"CalibrationParams", PERSISTENT},
|
||||
{"CameraDebugExpGain", CLEAR_ON_MANAGER_START},
|
||||
{"CameraDebugExpTime", CLEAR_ON_MANAGER_START},
|
||||
{"CarBatteryCapacity", PERSISTENT},
|
||||
{"CarParams", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_ON},
|
||||
{"CarParamsCache", CLEAR_ON_MANAGER_START},
|
||||
{"CarParamsPersistent", PERSISTENT},
|
||||
{"CarVin", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_ON},
|
||||
{"CompletedTrainingVersion", PERSISTENT},
|
||||
{"ControlsReady", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_ON},
|
||||
@@ -97,8 +102,9 @@ std::unordered_map<std::string, uint32_t> keys = {
|
||||
{"DashcamOverride", PERSISTENT},
|
||||
{"DisableLogging", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_ON},
|
||||
{"DisablePowerDown", PERSISTENT},
|
||||
{"DisableRadar_Allow", PERSISTENT},
|
||||
{"DisableRadar", PERSISTENT}, // WARNING: THIS DISABLES AEB
|
||||
{"ExperimentalMode", PERSISTENT},
|
||||
{"ExperimentalModeConfirmed", PERSISTENT},
|
||||
{"ExperimentalLongitudinalEnabled", PERSISTENT}, // WARNING: THIS MAY DISABLE AEB
|
||||
{"DisableUpdates", PERSISTENT},
|
||||
{"DisengageOnAccelerator", PERSISTENT},
|
||||
{"DongleId", PERSISTENT},
|
||||
@@ -113,6 +119,7 @@ std::unordered_map<std::string, uint32_t> keys = {
|
||||
{"GithubUsername", PERSISTENT},
|
||||
{"GitRemote", PERSISTENT},
|
||||
{"GsmApn", PERSISTENT},
|
||||
{"GsmMetered", PERSISTENT},
|
||||
{"GsmRoaming", PERSISTENT},
|
||||
{"HardwareSerial", PERSISTENT},
|
||||
{"HasAcceptedTerms", PERSISTENT},
|
||||
@@ -139,6 +146,8 @@ std::unordered_map<std::string, uint32_t> keys = {
|
||||
{"LastUpdateException", CLEAR_ON_MANAGER_START},
|
||||
{"LastUpdateTime", PERSISTENT},
|
||||
{"LiveParameters", PERSISTENT},
|
||||
{"LiveTorqueCarParams", PERSISTENT},
|
||||
{"LiveTorqueParameters", PERSISTENT | DONT_LOG},
|
||||
{"NavDestination", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_OFF},
|
||||
{"NavSettingTime24h", PERSISTENT},
|
||||
{"NavSettingLeftSide", PERSISTENT},
|
||||
@@ -150,18 +159,25 @@ std::unordered_map<std::string, uint32_t> keys = {
|
||||
{"PrimeType", PERSISTENT},
|
||||
{"RecordFront", PERSISTENT},
|
||||
{"RecordFrontLock", PERSISTENT}, // for the internal fleet
|
||||
{"ReleaseNotes", PERSISTENT},
|
||||
{"ReplayControlsState", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_ON},
|
||||
{"ShouldDoUpdate", CLEAR_ON_MANAGER_START},
|
||||
{"SnoozeUpdate", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_OFF},
|
||||
{"SshEnabled", PERSISTENT},
|
||||
{"SubscriberInfo", PERSISTENT},
|
||||
{"SwitchToBranch", CLEAR_ON_MANAGER_START},
|
||||
{"TermsVersion", PERSISTENT},
|
||||
{"Timezone", PERSISTENT},
|
||||
{"TrainingVersion", PERSISTENT},
|
||||
{"UbloxAvailable", PERSISTENT},
|
||||
{"UpdateAvailable", CLEAR_ON_MANAGER_START},
|
||||
{"UpdateFailedCount", CLEAR_ON_MANAGER_START},
|
||||
{"UpdaterState", CLEAR_ON_MANAGER_START},
|
||||
{"UpdaterFetchAvailable", CLEAR_ON_MANAGER_START},
|
||||
{"UpdaterTargetBranch", CLEAR_ON_MANAGER_START},
|
||||
{"UpdaterAvailableBranches", CLEAR_ON_MANAGER_START},
|
||||
{"UpdaterCurrentDescription", CLEAR_ON_MANAGER_START},
|
||||
{"UpdaterCurrentReleaseNotes", CLEAR_ON_MANAGER_START},
|
||||
{"UpdaterNewDescription", CLEAR_ON_MANAGER_START},
|
||||
{"UpdaterNewReleaseNotes", CLEAR_ON_MANAGER_START},
|
||||
{"Version", PERSISTENT},
|
||||
{"VisionRadarToggle", PERSISTENT},
|
||||
{"WideCameraOnly", PERSISTENT},
|
||||
@@ -187,10 +203,16 @@ std::unordered_map<std::string, uint32_t> keys = {
|
||||
|
||||
|
||||
Params::Params(const std::string &path) {
|
||||
const char* env = std::getenv("OPENPILOT_PREFIX");
|
||||
prefix = env ? "/" + std::string(env) : "/d";
|
||||
std::string default_param_path = ensure_params_path(prefix);
|
||||
params_path = path.empty() ? default_param_path : ensure_params_path(prefix, path);
|
||||
prefix = "/" + util::getenv("OPENPILOT_PREFIX", "d");
|
||||
params_path = ensure_params_path(prefix, path);
|
||||
}
|
||||
|
||||
std::vector<std::string> Params::allKeys() const {
|
||||
std::vector<std::string> ret;
|
||||
for (auto &p : keys) {
|
||||
ret.push_back(p.first);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool Params::checkKey(const std::string &key) {
|
||||
@@ -278,10 +300,13 @@ std::map<std::string, std::string> Params::readAll() {
|
||||
void Params::clearAll(ParamKeyType key_type) {
|
||||
FileLock file_lock(params_path + "/.lock");
|
||||
|
||||
std::string path;
|
||||
for (auto &[key, type] : keys) {
|
||||
if (type & key_type) {
|
||||
unlink(getParamPath(key).c_str());
|
||||
if (key_type == ALL) {
|
||||
util::remove_files_in_dir(getParamPath());
|
||||
} else {
|
||||
for (auto &[key, type] : keys) {
|
||||
if (type & key_type) {
|
||||
unlink(getParamPath(key).c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
enum ParamKeyType {
|
||||
PERSISTENT = 0x02,
|
||||
@@ -15,6 +16,7 @@ enum ParamKeyType {
|
||||
class Params {
|
||||
public:
|
||||
Params(const std::string &path = {});
|
||||
std::vector<std::string> allKeys() const;
|
||||
bool checkKey(const std::string &key);
|
||||
ParamKeyType getKeyType(const std::string &key);
|
||||
inline std::string getParamPath(const std::string &key = {}) {
|
||||
@@ -27,8 +29,8 @@ public:
|
||||
|
||||
// helpers for reading values
|
||||
std::string get(const std::string &key, bool block = false);
|
||||
inline bool getBool(const std::string &key) {
|
||||
return get(key) == "1";
|
||||
inline bool getBool(const std::string &key, bool block = false) {
|
||||
return get(key, block) == "1";
|
||||
}
|
||||
std::map<std::string, std::string> readAll();
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# cython: language_level = 3
|
||||
from libcpp cimport bool
|
||||
from libcpp.string cimport string
|
||||
from libcpp.vector cimport vector
|
||||
import threading
|
||||
|
||||
cdef extern from "common/params.h":
|
||||
@@ -15,13 +16,14 @@ cdef extern from "common/params.h":
|
||||
cdef cppclass c_Params "Params":
|
||||
c_Params(string) nogil
|
||||
string get(string, bool) nogil
|
||||
bool getBool(string) nogil
|
||||
bool getBool(string, bool) nogil
|
||||
int remove(string) nogil
|
||||
int put(string, string) nogil
|
||||
int putBool(string, bool) nogil
|
||||
bool checkKey(string) nogil
|
||||
string getParamPath(string) nogil
|
||||
void clearAll(ParamKeyType)
|
||||
vector[string] allKeys()
|
||||
|
||||
|
||||
def ensure_bytes(v):
|
||||
@@ -66,11 +68,11 @@ cdef class Params:
|
||||
|
||||
return val if encoding is None else val.decode(encoding)
|
||||
|
||||
def get_bool(self, key):
|
||||
def get_bool(self, key, bool block=False):
|
||||
cdef string k = self.check_key(key)
|
||||
cdef bool r
|
||||
with nogil:
|
||||
r = self.p.getBool(k)
|
||||
r = self.p.getBool(k, block)
|
||||
return r
|
||||
|
||||
def put(self, key, dat):
|
||||
@@ -90,7 +92,7 @@ cdef class Params:
|
||||
with nogil:
|
||||
self.p.putBool(k, val)
|
||||
|
||||
def delete(self, key):
|
||||
def remove(self, key):
|
||||
cdef string k = self.check_key(key)
|
||||
with nogil:
|
||||
self.p.remove(k)
|
||||
@@ -99,6 +101,9 @@ cdef class Params:
|
||||
cdef string key_bytes = ensure_bytes(key)
|
||||
return self.p.getParamPath(key_bytes).decode("utf-8")
|
||||
|
||||
def all_keys(self):
|
||||
return self.p.allKeys()
|
||||
|
||||
def put_nonblocking(key, val, d=""):
|
||||
threading.Thread(target=lambda: Params(d).put(key, val)).start()
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ class Priority:
|
||||
|
||||
def set_realtime_priority(level: int) -> None:
|
||||
if not PC:
|
||||
os.sched_setscheduler(0, os.SCHED_FIFO, os.sched_param(level)) # type: ignore[attr-defined] # pylint: disable=no-member
|
||||
os.sched_setscheduler(0, os.SCHED_FIFO, os.sched_param(level)) # pylint: disable=no-member
|
||||
|
||||
|
||||
def set_core_affinity(cores: List[int]) -> None:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "common/util.h"
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <dirent.h>
|
||||
|
||||
@@ -97,6 +98,22 @@ std::map<std::string, std::string> read_files_in_dir(const std::string &path) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
void remove_files_in_dir(const std::string &path) {
|
||||
DIR *d = opendir(path.c_str());
|
||||
if (!d) return;
|
||||
|
||||
std::string fn;
|
||||
struct dirent *de = NULL;
|
||||
while ((de = readdir(d))) {
|
||||
if (de->d_type != DT_DIR) {
|
||||
fn = path + "/" + de->d_name;
|
||||
unlink(fn.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
closedir(d);
|
||||
}
|
||||
|
||||
int write_file(const char* path, const void* data, size_t size, int flags, mode_t mode) {
|
||||
int fd = HANDLE_EINTR(open(path, flags, mode));
|
||||
if (fd == -1) {
|
||||
@@ -133,6 +150,14 @@ int safe_fflush(FILE *stream) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
int safe_ioctl(int fd, unsigned long request, void *argp) {
|
||||
int ret;
|
||||
do {
|
||||
ret = ioctl(fd, request, argp);
|
||||
} while ((ret == -1) && (errno == EINTR));
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::string readlink(const std::string &path) {
|
||||
char buff[4096];
|
||||
ssize_t len = ::readlink(path.c_str(), buff, sizeof(buff)-1);
|
||||
|
||||
@@ -80,11 +80,13 @@ std::string dir_name(std::string const& path);
|
||||
// **** file fhelpers *****
|
||||
std::string read_file(const std::string& fn);
|
||||
std::map<std::string, std::string> read_files_in_dir(const std::string& path);
|
||||
void remove_files_in_dir(const std::string& path);
|
||||
int write_file(const char* path, const void* data, size_t size, int flags = O_WRONLY, mode_t mode = 0664);
|
||||
|
||||
FILE* safe_fopen(const char* filename, const char* mode);
|
||||
size_t safe_fwrite(const void * ptr, size_t size, size_t count, FILE * stream);
|
||||
int safe_fflush(FILE *stream);
|
||||
int safe_ioctl(int fd, unsigned long request, void *argp);
|
||||
|
||||
std::string readlink(const std::string& path);
|
||||
bool file_exists(const std::string& fn);
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
#define COMMA_VERSION "0.8.16"
|
||||
#define COMMA_VERSION "0.9.0"
|
||||
|
||||
+235
-223
@@ -2,227 +2,238 @@
|
||||
|
||||
# Supported Cars
|
||||
|
||||
A supported vehicle is one that just works when you install a comma device. Every car performs differently with openpilot, but all supported cars should provide a better experience than any stock system.
|
||||
A supported vehicle is one that just works when you install a comma three. All supported cars provide a better experience than any stock system.
|
||||
|
||||
# 205 Supported Cars
|
||||
# 215 Supported Cars
|
||||
|
||||
|Make|Model|Supported Package|ACC|No ACC accel below|No ALC below|Steering Torque|Harness|
|
||||
|---|---|---|:---:|:---:|:---:|:---:|:---:|
|
||||
|Acura|ILX 2016-19|AcuraWatch Plus|openpilot|25 mph|25 mph|[](##)|Honda Nidec|
|
||||
|Acura|RDX 2016-18|AcuraWatch Plus|openpilot|25 mph|12 mph|[](##)|Honda Nidec|
|
||||
|Acura|RDX 2019-22|All|Stock|0 mph|3 mph|[](##)|Honda Bosch A|
|
||||
|Audi|A3 2014-19|ACC + Lane Assist|Stock|0 mph|0 mph|[](##)|VW|
|
||||
|Audi|A3 Sportback e-tron 2017-18|ACC + Lane Assist|Stock|0 mph|0 mph|[](##)|VW|
|
||||
|Audi|Q2 2018|ACC + Lane Assist|Stock|0 mph|0 mph|[](##)|VW|
|
||||
|Audi|Q3 2020-21|ACC + Lane Assist|Stock|0 mph|0 mph|[](##)|VW|
|
||||
|Audi|RS3 2018|ACC + Lane Assist|Stock|0 mph|0 mph|[](##)|VW|
|
||||
|Audi|S3 2015-17|ACC + Lane Assist|Stock|0 mph|0 mph|[](##)|VW|
|
||||
|Cadillac|Escalade ESV 2016[<sup>1</sup>](#footnotes)|Adaptive Cruise Control (ACC) & LKAS|openpilot|0 mph|7 mph|[](##)|OBD-II|
|
||||
|Chevrolet|Bolt EUV 2022-23|Premier or Premier Redline Trim without Super Cruise Package|Stock|0 mph|7 mph|[](##)|GM|
|
||||
|Chevrolet|Silverado 1500 2020-21|Safety Package II|Stock|0 mph|7 mph|[](##)|GM|
|
||||
|Chevrolet|Volt 2017-18[<sup>1</sup>](#footnotes)|Adaptive Cruise Control|openpilot|0 mph|7 mph|[](##)|OBD-II|
|
||||
|Chrysler|Pacifica 2017-18|Adaptive Cruise Control|Stock|0 mph|9 mph|[](##)|FCA|
|
||||
|Chrysler|Pacifica 2019-20|Adaptive Cruise Control|Stock|0 mph|39 mph|[](##)|FCA|
|
||||
|Chrysler|Pacifica 2021|All|Stock|0 mph|39 mph|[](##)|FCA|
|
||||
|Chrysler|Pacifica Hybrid 2017-18|Adaptive Cruise Control|Stock|0 mph|9 mph|[](##)|FCA|
|
||||
|Chrysler|Pacifica Hybrid 2019-22|Adaptive Cruise Control|Stock|0 mph|39 mph|[](##)|FCA|
|
||||
|comma|body|All|Stock|0 mph|0 mph|[](##)|None|
|
||||
|Genesis|G70 2018-19|All|Stock|0 mph|0 mph|[](##)|Hyundai F|
|
||||
|Genesis|G70 2020|All|openpilot|0 mph|0 mph|[](##)|Hyundai F|
|
||||
|Genesis|G80 2017-19|All|Stock|0 mph|0 mph|[](##)|Hyundai H|
|
||||
|Genesis|G90 2017-18|All|Stock|0 mph|0 mph|[](##)|Hyundai C|
|
||||
|GMC|Acadia 2018[<sup>1</sup>](#footnotes)|Adaptive Cruise Control|openpilot|0 mph|7 mph|[](##)|OBD-II|
|
||||
|GMC|Sierra 1500 2020-21|Driver Alert Package II|Stock|0 mph|7 mph|[](##)|GM|
|
||||
|Honda|Accord 2018-22|All|Stock|0 mph|3 mph|[](##)|Honda Bosch A|
|
||||
|Honda|Accord Hybrid 2018-22|All|Stock|0 mph|3 mph|[](##)|Honda Bosch A|
|
||||
|Honda|Civic 2016-18|Honda Sensing|openpilot|0 mph|12 mph|[](##)|Honda Nidec|
|
||||
|Honda|Civic 2019-21|All|Stock|0 mph|2 mph[<sup>2</sup>](#footnotes)|[](##)|Honda Bosch A|
|
||||
|Honda|Civic 2022|All|Stock|0 mph|0 mph|[](##)|Honda Bosch B|
|
||||
|Honda|Civic Hatchback 2017-21|Honda Sensing|Stock|0 mph|12 mph|[](##)|Honda Bosch A|
|
||||
|Honda|Civic Hatchback 2022|All|Stock|0 mph|0 mph|[](##)|Honda Bosch B|
|
||||
|Honda|CR-V 2015-16|Touring Trim|openpilot|25 mph|12 mph|[](##)|Honda Nidec|
|
||||
|Honda|CR-V 2017-22|Honda Sensing|Stock|0 mph|12 mph|[](##)|Honda Bosch A|
|
||||
|Honda|CR-V Hybrid 2017-19|Honda Sensing|Stock|0 mph|12 mph|[](##)|Honda Bosch A|
|
||||
|Honda|e 2020|All|Stock|0 mph|3 mph|[](##)|Honda Bosch A|
|
||||
|Honda|Fit 2018-20|Honda Sensing|openpilot|25 mph|12 mph|[](##)|Honda Nidec|
|
||||
|Honda|Freed 2020|Honda Sensing|openpilot|25 mph|12 mph|[](##)|Honda Nidec|
|
||||
|Honda|HR-V 2019-22|Honda Sensing|openpilot|25 mph|12 mph|[](##)|Honda Nidec|
|
||||
|Honda|Insight 2019-22|All|Stock|0 mph|3 mph|[](##)|Honda Bosch A|
|
||||
|Honda|Inspire 2018|All|Stock|0 mph|3 mph|[](##)|Honda Bosch A|
|
||||
|Honda|Odyssey 2018-20|Honda Sensing|openpilot|25 mph|0 mph|[](##)|Honda Nidec|
|
||||
|Honda|Passport 2019-21|All|openpilot|25 mph|12 mph|[](##)|Honda Nidec|
|
||||
|Honda|Pilot 2016-22|Honda Sensing|openpilot|25 mph|12 mph|[](##)|Honda Nidec|
|
||||
|Honda|Ridgeline 2017-22|Honda Sensing|openpilot|25 mph|12 mph|[](##)|Honda Nidec|
|
||||
|Hyundai|Elantra 2017-19|Smart Cruise Control (SCC) & LKAS|Stock|19 mph|32 mph|[](##)|Hyundai B|
|
||||
|Hyundai|Elantra 2021-22|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[](##)|Hyundai K|
|
||||
|Hyundai|Elantra Hybrid 2021-22|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[](##)|Hyundai K|
|
||||
|Hyundai|Genesis 2015-16|Smart Cruise Control (SCC) & LKAS|Stock|19 mph|37 mph|[](##)|Hyundai J|
|
||||
|Hyundai|Ioniq 5 2022|Highway Driving Assist II|Stock|0 mph|0 mph|[](##)|Hyundai Q|
|
||||
|Hyundai|Ioniq Electric 2019|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|32 mph|[](##)|Hyundai C|
|
||||
|Hyundai|Ioniq Electric 2020|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[](##)|Hyundai H|
|
||||
|Hyundai|Ioniq Hybrid 2017-19|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|32 mph|[](##)|Hyundai C|
|
||||
|Hyundai|Ioniq Hybrid 2020-22|Smart Cruise Control (SCC) & LFA|Stock|0 mph|0 mph|[](##)|Hyundai H|
|
||||
|Hyundai|Ioniq Plug-in Hybrid 2019|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|32 mph|[](##)|Hyundai C|
|
||||
|Hyundai|Ioniq Plug-in Hybrid 2020-21|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[](##)|Hyundai H|
|
||||
|Hyundai|Kona 2020|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[](##)|Hyundai B|
|
||||
|Hyundai|Kona Electric 2018-21|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[](##)|Hyundai G|
|
||||
|Hyundai|Kona Electric 2022|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[](##)|Hyundai O|
|
||||
|Hyundai|Kona Hybrid 2020|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[](##)|Hyundai I|
|
||||
|Hyundai|Palisade 2020-22|All|openpilot|0 mph|0 mph|[](##)|Hyundai H|
|
||||
|Hyundai|Santa Fe 2019-20|All|openpilot|0 mph|0 mph|[](##)|Hyundai D|
|
||||
|Hyundai|Santa Fe 2021-22|All|Stock|0 mph|0 mph|[](##)|Hyundai L|
|
||||
|Hyundai|Santa Fe Hybrid 2022|All|Stock|0 mph|0 mph|[](##)|Hyundai L|
|
||||
|Hyundai|Santa Fe Plug-in Hybrid 2022|All|Stock|0 mph|0 mph|[](##)|Hyundai L|
|
||||
|Hyundai|Sonata 2018-19|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[](##)|Hyundai E|
|
||||
|Hyundai|Sonata 2020-22|All|openpilot|0 mph|0 mph|[](##)|Hyundai A|
|
||||
|Hyundai|Sonata Hybrid 2020-22|All|openpilot|0 mph|0 mph|[](##)|Hyundai A|
|
||||
|Hyundai|Tucson 2021|Smart Cruise Control (SCC)|Stock|19 mph|0 mph|[](##)|Hyundai L|
|
||||
|Hyundai|Tucson Diesel 2019|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[](##)|Hyundai L|
|
||||
|Hyundai|Tucson Hybrid 2022|All|Stock|0 mph|0 mph|[](##)|Hyundai N|
|
||||
|Hyundai|Veloster 2019-20|Smart Cruise Control (SCC)|Stock|5 mph|0 mph|[](##)|Hyundai E|
|
||||
|Jeep|Grand Cherokee 2016-18|Adaptive Cruise Control|Stock|0 mph|9 mph|[](##)|FCA|
|
||||
|Jeep|Grand Cherokee 2019-21|Adaptive Cruise Control|Stock|0 mph|39 mph|[](##)|FCA|
|
||||
|Kia|Ceed 2019|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[](##)|Hyundai E|
|
||||
|Kia|EV6 2022|Highway Driving Assist II|Stock|0 mph|0 mph|[](##)|Hyundai P|
|
||||
|Kia|Forte 2018|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[](##)|Hyundai B|
|
||||
|Kia|Forte 2019-21|All|Stock|0 mph|0 mph|[](##)|Hyundai G|
|
||||
|Kia|K5 2021-22|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[](##)|Hyundai A|
|
||||
|Kia|Niro Electric 2019|All|openpilot|0 mph|0 mph|[](##)|Hyundai H|
|
||||
|Kia|Niro Electric 2020|All|openpilot|0 mph|0 mph|[](##)|Hyundai F|
|
||||
|Kia|Niro Electric 2021|All|openpilot|0 mph|0 mph|[](##)|Hyundai C|
|
||||
|Kia|Niro Electric 2022|All|openpilot|0 mph|0 mph|[](##)|Hyundai H|
|
||||
|Kia|Niro Hybrid 2021|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[](##)|Hyundai F|
|
||||
|Kia|Niro Hybrid 2022|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[](##)|Hyundai H|
|
||||
|Kia|Niro Plug-in Hybrid 2018-19|Smart Cruise Control (SCC) & LKAS|openpilot|10 mph|32 mph|[](##)|Hyundai C|
|
||||
|Kia|Optima 2017|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|32 mph|[](##)|Hyundai B|
|
||||
|Kia|Optima 2019|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[](##)|Hyundai G|
|
||||
|Kia|Seltos 2021|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[](##)|Hyundai A|
|
||||
|Kia|Sorento 2018|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[](##)|Hyundai C|
|
||||
|Kia|Sorento 2019|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[](##)|Hyundai E|
|
||||
|Kia|Stinger 2018-20|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[](##)|Hyundai C|
|
||||
|Kia|Telluride 2020|All|openpilot|0 mph|0 mph|[](##)|Hyundai H|
|
||||
|Lexus|CT Hybrid 2017-18|Lexus Safety System+|Stock[<sup>3</sup>](#footnotes)|0 mph|0 mph|[](##)|Toyota|
|
||||
|Lexus|ES 2019-22|All|openpilot|0 mph|0 mph|[](##)|Toyota|
|
||||
|Lexus|ES Hybrid 2017-18|Lexus Safety System+|Stock[<sup>3</sup>](#footnotes)|0 mph|0 mph|[](##)|Toyota|
|
||||
|Lexus|ES Hybrid 2019-22|All|openpilot|0 mph|0 mph|[](##)|Toyota|
|
||||
|Lexus|IS 2017-19|All|Stock|19 mph|0 mph|[](##)|Toyota|
|
||||
|Lexus|NX 2018-19|All|Stock[<sup>3</sup>](#footnotes)|0 mph|0 mph|[](##)|Toyota|
|
||||
|Lexus|NX 2020-21|All|openpilot|0 mph|0 mph|[](##)|Toyota|
|
||||
|Lexus|NX Hybrid 2018-19|All|Stock[<sup>3</sup>](#footnotes)|0 mph|0 mph|[](##)|Toyota|
|
||||
|Lexus|NX Hybrid 2020-21|All|openpilot|0 mph|0 mph|[](##)|Toyota|
|
||||
|Lexus|RC 2017-20|All|Stock|19 mph|0 mph|[](##)|Toyota|
|
||||
|Lexus|RX 2016-19|All|Stock[<sup>3</sup>](#footnotes)|0 mph|0 mph|[](##)|Toyota|
|
||||
|Lexus|RX 2020-22|All|openpilot|0 mph|0 mph|[](##)|Toyota|
|
||||
|Lexus|RX Hybrid 2016-19|All|Stock[<sup>3</sup>](#footnotes)|0 mph|0 mph|[](##)|Toyota|
|
||||
|Lexus|RX Hybrid 2020-21|All|openpilot|0 mph|0 mph|[](##)|Toyota|
|
||||
|Lexus|UX Hybrid 2019-22|All|openpilot|0 mph|0 mph|[](##)|Toyota|
|
||||
|Mazda|CX-5 2022|All|Stock|0 mph|0 mph|[](##)|Mazda|
|
||||
|Mazda|CX-9 2021-22|All|Stock|0 mph|28 mph|[](##)|Mazda|
|
||||
|Nissan|Altima 2019-20|ProPILOT Assist|Stock|0 mph|0 mph|[](##)|Nissan B|
|
||||
|Nissan|Leaf 2018-22|ProPILOT Assist|Stock|0 mph|0 mph|[](##)|Nissan A|
|
||||
|Nissan|Rogue 2018-20|ProPILOT Assist|Stock|0 mph|0 mph|[](##)|Nissan A|
|
||||
|Nissan|X-Trail 2017|ProPILOT Assist|Stock|0 mph|0 mph|[](##)|Nissan A|
|
||||
|Ram|1500 2019-22|Adaptive Cruise Control|Stock|0 mph|32 mph|[](##)|Ram|
|
||||
|SEAT|Ateca 2018|Driver Assistance|Stock|0 mph|0 mph|[](##)|VW|
|
||||
|SEAT|Leon 2014-20|Driver Assistance|Stock|0 mph|0 mph|[](##)|VW|
|
||||
|Subaru|Ascent 2019-21|All|Stock|0 mph|0 mph|[](##)|Subaru A|
|
||||
|Subaru|Crosstrek 2018-19|EyeSight Driver Assistance|Stock|0 mph|0 mph|[](##)|Subaru A|
|
||||
|Subaru|Crosstrek 2020-21|EyeSight Driver Assistance|Stock|0 mph|0 mph|[](##)|Subaru A|
|
||||
|Subaru|Forester 2019-21|All|Stock|0 mph|0 mph|[](##)|Subaru A|
|
||||
|Subaru|Impreza 2017-19|EyeSight Driver Assistance|Stock|0 mph|0 mph|[](##)|Subaru A|
|
||||
|Subaru|Impreza 2020-22|EyeSight Driver Assistance|Stock|0 mph|0 mph|[](##)|Subaru A|
|
||||
|Subaru|Legacy 2020-22|All|Stock|0 mph|0 mph|[](##)|Subaru B|
|
||||
|Subaru|Outback 2020-22|All|Stock|0 mph|0 mph|[](##)|Subaru B|
|
||||
|Subaru|XV 2018-19|EyeSight Driver Assistance|Stock|0 mph|0 mph|[](##)|Subaru A|
|
||||
|Subaru|XV 2020-21|EyeSight Driver Assistance|Stock|0 mph|0 mph|[](##)|Subaru A|
|
||||
|Škoda|Kamiq 2021[<sup>5</sup>](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[](##)|VW|
|
||||
|Škoda|Karoq 2019-21[<sup>7</sup>](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[](##)|VW|
|
||||
|Škoda|Kodiaq 2018-19|Driver Assistance|Stock|0 mph|0 mph|[](##)|VW|
|
||||
|Škoda|Octavia 2015, 2018-19|Driver Assistance|Stock|0 mph|0 mph|[](##)|VW|
|
||||
|Škoda|Octavia RS 2016|Driver Assistance|Stock|0 mph|0 mph|[](##)|VW|
|
||||
|Škoda|Scala 2020|Driver Assistance|Stock|0 mph|0 mph|[](##)|VW|
|
||||
|Škoda|Superb 2015-18|Driver Assistance|Stock|0 mph|0 mph|[](##)|VW|
|
||||
|Toyota|Alphard 2019-20|All|openpilot|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Alphard Hybrid 2021|All|openpilot|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Avalon 2016|Toyota Safety Sense P|Stock[<sup>3</sup>](#footnotes)|19 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Avalon 2017-18|All|Stock[<sup>3</sup>](#footnotes)|19 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Avalon 2019-21|All|Stock[<sup>3</sup>](#footnotes)|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Avalon 2022|All|openpilot|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Avalon Hybrid 2019-21|All|Stock[<sup>3</sup>](#footnotes)|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Avalon Hybrid 2022|All|openpilot|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|C-HR 2017-21|All|Stock|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|C-HR Hybrid 2017-19|All|Stock|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Camry 2018-20|All|Stock|0 mph[<sup>4</sup>](#footnotes)|0 mph|[](##)|Toyota|
|
||||
|Toyota|Camry 2021-22|All|openpilot|0 mph[<sup>4</sup>](#footnotes)|0 mph|[](##)|Toyota|
|
||||
|Toyota|Camry Hybrid 2018-20|All|Stock|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Camry Hybrid 2021-22|All|openpilot|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Corolla 2017-19|All|Stock[<sup>3</sup>](#footnotes)|19 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Corolla 2020-22|All|openpilot|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Corolla Cross (Non-US only) 2020-21|All|openpilot|17 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Corolla Cross Hybrid (Non-US only) 2020-22|All|openpilot|17 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Corolla Hatchback 2019-22|All|openpilot|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Corolla Hybrid 2020-22|All|openpilot|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Highlander 2017-19|All|Stock[<sup>3</sup>](#footnotes)|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Highlander 2020-22|All|openpilot|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Highlander Hybrid 2017-19|All|Stock[<sup>3</sup>](#footnotes)|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Highlander Hybrid 2020-22|All|openpilot|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Mirai 2021|All|openpilot|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Prius 2016|Toyota Safety Sense P|Stock[<sup>3</sup>](#footnotes)|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Prius 2017-20|All|Stock[<sup>3</sup>](#footnotes)|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Prius 2021-22|All|openpilot|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Prius Prime 2017-20|All|Stock[<sup>3</sup>](#footnotes)|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Prius Prime 2021-22|All|openpilot|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Prius v 2017|Toyota Safety Sense P|Stock[<sup>3</sup>](#footnotes)|19 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|RAV4 2016|Toyota Safety Sense P|Stock[<sup>3</sup>](#footnotes)|19 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|RAV4 2017-18|All|Stock[<sup>3</sup>](#footnotes)|19 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|RAV4 2019-21|All|openpilot|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|RAV4 2022|All|Stock|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|RAV4 Hybrid 2016|Toyota Safety Sense P|Stock[<sup>3</sup>](#footnotes)|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|RAV4 Hybrid 2017-18|All|Stock[<sup>3</sup>](#footnotes)|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|RAV4 Hybrid 2019-21|All|openpilot|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|RAV4 Hybrid 2022|All|Stock|0 mph|0 mph|[](##)|Toyota|
|
||||
|Toyota|Sienna 2018-20|All|Stock[<sup>3</sup>](#footnotes)|19 mph|0 mph|[](##)|Toyota|
|
||||
|Volkswagen|Arteon 2018-22[<sup>7,8</sup>](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[](##)|J533|
|
||||
|Volkswagen|Arteon eHybrid 2020-22[<sup>7,8</sup>](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[](##)|J533|
|
||||
|Volkswagen|Arteon R 2020-22[<sup>7,8</sup>](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[](##)|J533|
|
||||
|Volkswagen|Atlas 2018-22[<sup>7</sup>](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[](##)|J533|
|
||||
|Volkswagen|Atlas Cross Sport 2021-22[<sup>7</sup>](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[](##)|J533|
|
||||
|Volkswagen|California 2021[<sup>7</sup>](#footnotes)|Driver Assistance|Stock|0 mph|31 mph|[](##)|J533|
|
||||
|Volkswagen|Caravelle 2020[<sup>7</sup>](#footnotes)|Driver Assistance|Stock|0 mph|31 mph|[](##)|J533|
|
||||
|Volkswagen|CC 2018-22[<sup>7,8</sup>](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[](##)|J533|
|
||||
|Volkswagen|e-Golf 2014-20|Driver Assistance|Stock|0 mph|0 mph|[](##)|VW|
|
||||
|Volkswagen|Golf 2015-20[<sup>8</sup>](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[](##)|VW|
|
||||
|Volkswagen|Golf Alltrack 2015-19|Driver Assistance|Stock|0 mph|0 mph|[](##)|VW|
|
||||
|Volkswagen|Golf GTD 2015-20|Driver Assistance|Stock|0 mph|0 mph|[](##)|VW|
|
||||
|Volkswagen|Golf GTE 2015-20|Driver Assistance|Stock|0 mph|0 mph|[](##)|VW|
|
||||
|Volkswagen|Golf GTI 2015-21|Driver Assistance|Stock|0 mph|0 mph|[](##)|VW|
|
||||
|Volkswagen|Golf R 2015-19[<sup>8</sup>](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[](##)|VW|
|
||||
|Volkswagen|Golf SportsVan 2015-20|Driver Assistance|Stock|0 mph|0 mph|[](##)|VW|
|
||||
|Volkswagen|Jetta 2018-22[<sup>7</sup>](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[](##)|J533|
|
||||
|Volkswagen|Jetta GLI 2021-22[<sup>7</sup>](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[](##)|J533|
|
||||
|Volkswagen|Passat 2015-22[<sup>6,7,8</sup>](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[](##)|J533|
|
||||
|Volkswagen|Passat Alltrack 2015-22[<sup>7</sup>](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[](##)|J533|
|
||||
|Volkswagen|Passat GTE 2015-22[<sup>7,8</sup>](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[](##)|J533|
|
||||
|Volkswagen|Polo 2020-22[<sup>7</sup>](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[](##)|J533|
|
||||
|Volkswagen|Polo GTI 2020-22[<sup>7</sup>](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[](##)|J533|
|
||||
|Volkswagen|T-Cross 2021[<sup>7</sup>](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[](##)|J533|
|
||||
|Volkswagen|T-Roc 2021[<sup>7</sup>](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[](##)|J533|
|
||||
|Volkswagen|Taos 2022[<sup>7</sup>](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[](##)|J533|
|
||||
|Volkswagen|Teramont 2018-22[<sup>7</sup>](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[](##)|J533|
|
||||
|Volkswagen|Teramont Cross Sport 2021-22[<sup>7</sup>](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[](##)|J533|
|
||||
|Volkswagen|Teramont X 2021-22[<sup>7</sup>](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[](##)|J533|
|
||||
|Volkswagen|Tiguan 2019-22[<sup>7</sup>](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[](##)|J533|
|
||||
|Volkswagen|Touran 2017|Driver Assistance|Stock|0 mph|0 mph|[](##)|VW|
|
||||
|Make|Model|Supported Package|ACC|No ACC accel below|No ALC below|Steering Torque|Resume from stop|Harness|
|
||||
|---|---|---|:---:|:---:|:---:|:---:|:---:|:---:|
|
||||
|Acura|ILX 2016-19|AcuraWatch Plus|openpilot|25 mph|25 mph|[](##)|[](##)|Honda Nidec|
|
||||
|Acura|RDX 2016-18|AcuraWatch Plus|openpilot|25 mph|12 mph|[](##)|[](##)|Honda Nidec|
|
||||
|Acura|RDX 2019-22|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|3 mph|[](##)|[](##)|Honda Bosch A|
|
||||
|Audi|A3 2014-19|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Audi|A3 Sportback e-tron 2017-18|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Audi|Q2 2018|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Audi|Q3 2019-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Audi|RS3 2018|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Audi|S3 2015-17|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Cadillac|Escalade ESV 2016[<sup>3</sup>](#footnotes)|Adaptive Cruise Control (ACC) & LKAS|openpilot|0 mph|6 mph|[](##)|[](##)|OBD-II|
|
||||
|Chevrolet|Bolt EUV 2022-23|Premier or Premier Redline Trim without Super Cruise Package|openpilot available[<sup>1</sup>](#footnotes)|3 mph|6 mph|[](##)|[](##)|GM|
|
||||
|Chevrolet|Silverado 1500 2020-21|Safety Package II|openpilot available[<sup>1</sup>](#footnotes)|3 mph|6 mph|[](##)|[](##)|GM|
|
||||
|Chevrolet|Volt 2017-18[<sup>3</sup>](#footnotes)|Adaptive Cruise Control (ACC)|openpilot|0 mph|6 mph|[](##)|[](##)|OBD-II|
|
||||
|Chrysler|Pacifica 2017-18|Adaptive Cruise Control (ACC)|Stock|0 mph|9 mph|[](##)|[](##)|FCA|
|
||||
|Chrysler|Pacifica 2019-20|Adaptive Cruise Control (ACC)|Stock|0 mph|39 mph|[](##)|[](##)|FCA|
|
||||
|Chrysler|Pacifica 2021|All|Stock|0 mph|39 mph|[](##)|[](##)|FCA|
|
||||
|Chrysler|Pacifica Hybrid 2017-18|Adaptive Cruise Control (ACC)|Stock|0 mph|9 mph|[](##)|[](##)|FCA|
|
||||
|Chrysler|Pacifica Hybrid 2019-22|Adaptive Cruise Control (ACC)|Stock|0 mph|39 mph|[](##)|[](##)|FCA|
|
||||
|comma|body|All|openpilot|0 mph|0 mph|[](##)|[](##)|None|
|
||||
|Genesis|G70 2018-19|All|Stock|0 mph|0 mph|[](##)|[](##)|Hyundai F|
|
||||
|Genesis|G70 2020|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai F|
|
||||
|Genesis|G80 2017-19|All|Stock|0 mph|0 mph|[](##)|[](##)|Hyundai H|
|
||||
|Genesis|G90 2017-18|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai C|
|
||||
|Genesis|GV70 2022-23|All|Stock|0 mph|0 mph|[](##)|[](##)|Hyundai L|
|
||||
|GMC|Acadia 2018[<sup>3</sup>](#footnotes)|Adaptive Cruise Control (ACC)|openpilot|0 mph|6 mph|[](##)|[](##)|OBD-II|
|
||||
|GMC|Sierra 1500 2020-21|Driver Alert Package II|openpilot available[<sup>1</sup>](#footnotes)|3 mph|6 mph|[](##)|[](##)|GM|
|
||||
|Honda|Accord 2018-22|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|3 mph|[](##)|[](##)|Honda Bosch A|
|
||||
|Honda|Accord Hybrid 2018-22|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|3 mph|[](##)|[](##)|Honda Bosch A|
|
||||
|Honda|Civic 2016-18|Honda Sensing|openpilot|0 mph|12 mph|[](##)|[](##)|Honda Nidec|
|
||||
|Honda|Civic 2019-21|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|2 mph[<sup>4</sup>](#footnotes)|[](##)|[](##)|Honda Bosch A|
|
||||
|Honda|Civic 2022|All|Stock|0 mph|0 mph|[](##)|[](##)|Honda Bosch B|
|
||||
|Honda|Civic Hatchback 2017-21|Honda Sensing|openpilot available[<sup>1</sup>](#footnotes)|0 mph|12 mph|[](##)|[](##)|Honda Bosch A|
|
||||
|Honda|Civic Hatchback 2022|All|Stock|0 mph|0 mph|[](##)|[](##)|Honda Bosch B|
|
||||
|Honda|CR-V 2015-16|Touring Trim|openpilot|25 mph|12 mph|[](##)|[](##)|Honda Nidec|
|
||||
|Honda|CR-V 2017-22|Honda Sensing|openpilot available[<sup>1</sup>](#footnotes)|0 mph|12 mph|[](##)|[](##)|Honda Bosch A|
|
||||
|Honda|CR-V Hybrid 2017-19|Honda Sensing|openpilot available[<sup>1</sup>](#footnotes)|0 mph|12 mph|[](##)|[](##)|Honda Bosch A|
|
||||
|Honda|e 2020|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|3 mph|[](##)|[](##)|Honda Bosch A|
|
||||
|Honda|Fit 2018-20|Honda Sensing|openpilot|25 mph|12 mph|[](##)|[](##)|Honda Nidec|
|
||||
|Honda|Freed 2020|Honda Sensing|openpilot|25 mph|12 mph|[](##)|[](##)|Honda Nidec|
|
||||
|Honda|HR-V 2019-22|Honda Sensing|openpilot|25 mph|12 mph|[](##)|[](##)|Honda Nidec|
|
||||
|Honda|Insight 2019-22|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|3 mph|[](##)|[](##)|Honda Bosch A|
|
||||
|Honda|Inspire 2018|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|3 mph|[](##)|[](##)|Honda Bosch A|
|
||||
|Honda|Odyssey 2018-20|Honda Sensing|openpilot|25 mph|0 mph|[](##)|[](##)|Honda Nidec|
|
||||
|Honda|Passport 2019-21|All|openpilot|25 mph|12 mph|[](##)|[](##)|Honda Nidec|
|
||||
|Honda|Pilot 2016-22|Honda Sensing|openpilot|25 mph|12 mph|[](##)|[](##)|Honda Nidec|
|
||||
|Honda|Ridgeline 2017-22|Honda Sensing|openpilot|25 mph|12 mph|[](##)|[](##)|Honda Nidec|
|
||||
|Hyundai|Elantra 2017-19|Smart Cruise Control (SCC)|Stock|19 mph|32 mph|[](##)|[](##)|Hyundai B|
|
||||
|Hyundai|Elantra 2021-22|Smart Cruise Control (SCC)|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai K|
|
||||
|Hyundai|Elantra GT 2017-19|Smart Cruise Control (SCC)|Stock|0 mph|32 mph|[](##)|[](##)|Hyundai E|
|
||||
|Hyundai|Elantra Hybrid 2021-23|Smart Cruise Control (SCC)|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai K|
|
||||
|Hyundai|Genesis 2015-16|Smart Cruise Control (SCC)|Stock|19 mph|37 mph|[](##)|[](##)|Hyundai J|
|
||||
|Hyundai|i30 2019|Smart Cruise Control (SCC)|Stock|0 mph|32 mph|[](##)|[](##)|Hyundai E|
|
||||
|Hyundai|Ioniq 5 (with HDA II) 2022-23|Highway Driving Assist II|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai Q|
|
||||
|Hyundai|Ioniq 5 (without HDA II) 2022-23|Highway Driving Assist|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai K|
|
||||
|Hyundai|Ioniq Electric 2019|Smart Cruise Control (SCC)|Stock|0 mph|32 mph|[](##)|[](##)|Hyundai C|
|
||||
|Hyundai|Ioniq Electric 2020|All|Stock|0 mph|0 mph|[](##)|[](##)|Hyundai H|
|
||||
|Hyundai|Ioniq Hybrid 2017-19|Smart Cruise Control (SCC)|Stock|0 mph|32 mph|[](##)|[](##)|Hyundai C|
|
||||
|Hyundai|Ioniq Hybrid 2020-22|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[](##)|[](##)|Hyundai H|
|
||||
|Hyundai|Ioniq Plug-in Hybrid 2019|Smart Cruise Control (SCC)|openpilot available[<sup>1</sup>](#footnotes)|0 mph|32 mph|[](##)|[](##)|Hyundai C|
|
||||
|Hyundai|Ioniq Plug-in Hybrid 2020-21|All|Stock|0 mph|0 mph|[](##)|[](##)|Hyundai H|
|
||||
|Hyundai|Kona 2020|Smart Cruise Control (SCC)|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai B|
|
||||
|Hyundai|Kona Electric 2018-21|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[](##)|[](##)|Hyundai G|
|
||||
|Hyundai|Kona Electric 2022|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[](##)|[](##)|Hyundai O|
|
||||
|Hyundai|Kona Hybrid 2020|Smart Cruise Control (SCC)|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai I|
|
||||
|Hyundai|Palisade 2020-22|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai H|
|
||||
|Hyundai|Santa Cruz 2021-22|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[](##)|[](##)|Hyundai N|
|
||||
|Hyundai|Santa Fe 2019-20|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai D|
|
||||
|Hyundai|Santa Fe 2021-22|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai L|
|
||||
|Hyundai|Santa Fe Hybrid 2022|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai L|
|
||||
|Hyundai|Santa Fe Plug-in Hybrid 2022|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai L|
|
||||
|Hyundai|Sonata 2018-19|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[](##)|[](##)|Hyundai E|
|
||||
|Hyundai|Sonata 2020-22|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai A|
|
||||
|Hyundai|Sonata Hybrid 2020-22|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai A|
|
||||
|Hyundai|Tucson 2021|Smart Cruise Control (SCC)|openpilot available[<sup>1</sup>](#footnotes)|19 mph|0 mph|[](##)|[](##)|Hyundai L|
|
||||
|Hyundai|Tucson Diesel 2019|Smart Cruise Control (SCC)|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai L|
|
||||
|Hyundai|Tucson Hybrid 2022|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai N|
|
||||
|Hyundai|Veloster 2019-20|Smart Cruise Control (SCC)|Stock|5 mph|0 mph|[](##)|[](##)|Hyundai E|
|
||||
|Jeep|Grand Cherokee 2016-18|Adaptive Cruise Control (ACC)|Stock|0 mph|9 mph|[](##)|[](##)|FCA|
|
||||
|Jeep|Grand Cherokee 2019-21|Adaptive Cruise Control (ACC)|Stock|0 mph|39 mph|[](##)|[](##)|FCA|
|
||||
|Kia|Ceed 2019|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[](##)|[](##)|Hyundai E|
|
||||
|Kia|EV6 (with HDA II) 2022|Highway Driving Assist II|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai P|
|
||||
|Kia|EV6 (without HDA II) 2022|Highway Driving Assist|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai L|
|
||||
|Kia|Forte 2019-21|Smart Cruise Control (SCC)|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai G|
|
||||
|Kia|K5 2021-22|Smart Cruise Control (SCC)|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai A|
|
||||
|Kia|Niro EV 2019|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai H|
|
||||
|Kia|Niro EV 2020|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai F|
|
||||
|Kia|Niro EV 2021|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai C|
|
||||
|Kia|Niro EV 2022|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai H|
|
||||
|Kia|Niro Hybrid 2021|Smart Cruise Control (SCC)|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai F|
|
||||
|Kia|Niro Hybrid 2022|Smart Cruise Control (SCC)|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai H|
|
||||
|Kia|Niro Plug-in Hybrid 2018-19|All|openpilot available[<sup>1</sup>](#footnotes)|10 mph|32 mph|[](##)|[](##)|Hyundai C|
|
||||
|Kia|Optima 2017|Advanced Smart Cruise Control|Stock|0 mph|32 mph|[](##)|[](##)|Hyundai B|
|
||||
|Kia|Optima 2019-20|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[](##)|[](##)|Hyundai G|
|
||||
|Kia|Seltos 2021|Smart Cruise Control (SCC)|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai A|
|
||||
|Kia|Sorento 2018|Advanced Smart Cruise Control|Stock|0 mph|0 mph|[](##)|[](##)|Hyundai C|
|
||||
|Kia|Sorento 2019|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[](##)|[](##)|Hyundai E|
|
||||
|Kia|Sportage 2023|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[](##)|[](##)|Hyundai N|
|
||||
|Kia|Sportage Hybrid 2023|Smart Cruise Control (SCC)|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai N|
|
||||
|Kia|Stinger 2018-20|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[](##)|[](##)|Hyundai C|
|
||||
|Kia|Stinger 2022|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai K|
|
||||
|Kia|Telluride 2020-22|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Hyundai H|
|
||||
|Lexus|CT Hybrid 2017-18|Lexus Safety System+|openpilot available[<sup>2</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Lexus|ES 2019-22|All|openpilot|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Lexus|ES Hybrid 2017-18|Lexus Safety System+|openpilot available[<sup>2</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Lexus|ES Hybrid 2019-22|All|openpilot|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Lexus|IS 2017-19|All|Stock|19 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Lexus|NX 2018-19|All|openpilot available[<sup>2</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Lexus|NX 2020-21|All|openpilot|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Lexus|NX Hybrid 2018-19|All|openpilot available[<sup>2</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Lexus|NX Hybrid 2020-21|All|openpilot|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Lexus|RC 2017-20|All|Stock|19 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Lexus|RX 2016|Lexus Safety System+|openpilot available[<sup>2</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Lexus|RX 2017-19|All|openpilot available[<sup>2</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Lexus|RX 2020-22|All|openpilot|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Lexus|RX Hybrid 2016|Lexus Safety System+|openpilot available[<sup>2</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Lexus|RX Hybrid 2017-19|All|openpilot available[<sup>2</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Lexus|RX Hybrid 2020-21|All|openpilot|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Lexus|UX Hybrid 2019-22|All|openpilot|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Mazda|CX-5 2022-23|All|Stock|0 mph|0 mph|[](##)|[](##)|Mazda|
|
||||
|Mazda|CX-9 2021-22|All|Stock|0 mph|28 mph|[](##)|[](##)|Mazda|
|
||||
|Nissan|Altima 2019-20|ProPILOT Assist|Stock|0 mph|0 mph|[](##)|[](##)|Nissan B|
|
||||
|Nissan|Leaf 2018-22|ProPILOT Assist|Stock|0 mph|0 mph|[](##)|[](##)|Nissan A|
|
||||
|Nissan|Rogue 2018-20|ProPILOT Assist|Stock|0 mph|0 mph|[](##)|[](##)|Nissan A|
|
||||
|Nissan|X-Trail 2017|ProPILOT Assist|Stock|0 mph|0 mph|[](##)|[](##)|Nissan A|
|
||||
|Ram|1500 2019-22|Adaptive Cruise Control (ACC)|Stock|0 mph|32 mph|[](##)|[](##)|Ram|
|
||||
|SEAT|Ateca 2018|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|SEAT|Leon 2014-20|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Subaru|Ascent 2019-21|All|Stock|0 mph|0 mph|[](##)|[](##)|Subaru A|
|
||||
|Subaru|Crosstrek 2018-19|EyeSight Driver Assistance|Stock|0 mph|0 mph|[](##)|[](##)|Subaru A|
|
||||
|Subaru|Crosstrek 2020-21|EyeSight Driver Assistance|Stock|0 mph|0 mph|[](##)|[](##)|Subaru A|
|
||||
|Subaru|Forester 2019-21|All|Stock|0 mph|0 mph|[](##)|[](##)|Subaru A|
|
||||
|Subaru|Impreza 2017-19|EyeSight Driver Assistance|Stock|0 mph|0 mph|[](##)|[](##)|Subaru A|
|
||||
|Subaru|Impreza 2020-22|EyeSight Driver Assistance|Stock|0 mph|0 mph|[](##)|[](##)|Subaru A|
|
||||
|Subaru|Legacy 2020-22|All|Stock|0 mph|0 mph|[](##)|[](##)|Subaru B|
|
||||
|Subaru|Outback 2020-22|All|Stock|0 mph|0 mph|[](##)|[](##)|Subaru B|
|
||||
|Subaru|XV 2018-19|EyeSight Driver Assistance|Stock|0 mph|0 mph|[](##)|[](##)|Subaru A|
|
||||
|Subaru|XV 2020-21|EyeSight Driver Assistance|Stock|0 mph|0 mph|[](##)|[](##)|Subaru A|
|
||||
|Škoda|Kamiq 2021[<sup>6</sup>](#footnotes)|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533[<sup>9</sup>](#footnotes)|
|
||||
|Škoda|Karoq 2019-21|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Škoda|Kodiaq 2018-19|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Škoda|Octavia 2015, 2018-19|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Škoda|Octavia RS 2016|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Škoda|Scala 2020|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533[<sup>9</sup>](#footnotes)|
|
||||
|Škoda|Superb 2015-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Toyota|Alphard 2019-20|All|openpilot|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Alphard Hybrid 2021|All|openpilot|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Avalon 2016|Toyota Safety Sense P|openpilot available[<sup>2</sup>](#footnotes)|19 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Avalon 2017-18|All|openpilot available[<sup>2</sup>](#footnotes)|19 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Avalon 2019-21|All|openpilot available[<sup>2</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Avalon 2022|All|openpilot|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Avalon Hybrid 2019-21|All|openpilot available[<sup>2</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Avalon Hybrid 2022|All|openpilot|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|C-HR 2017-21|All|Stock|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|C-HR Hybrid 2017-19|All|Stock|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Camry 2018-20|All|Stock|0 mph[<sup>5</sup>](#footnotes)|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Camry 2021-22|All|openpilot|0 mph[<sup>5</sup>](#footnotes)|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Camry Hybrid 2018-20|All|Stock|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Camry Hybrid 2021-22|All|openpilot|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Corolla 2017-19|All|openpilot available[<sup>2</sup>](#footnotes)|19 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Corolla 2020-22|All|openpilot|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Corolla Cross (Non-US only) 2020-23|All|openpilot|17 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Corolla Cross Hybrid (Non-US only) 2020-22|All|openpilot|17 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Corolla Hatchback 2019-22|All|openpilot|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Corolla Hybrid 2020-22|All|openpilot|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Highlander 2017-19|All|openpilot available[<sup>2</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Highlander 2020-22|All|openpilot|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Highlander Hybrid 2017-19|All|openpilot available[<sup>2</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Highlander Hybrid 2020-22|All|openpilot|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Mirai 2021|All|openpilot|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Prius 2016|Toyota Safety Sense P|openpilot available[<sup>2</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Prius 2017-20|All|openpilot available[<sup>2</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Prius 2021-22|All|openpilot|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Prius Prime 2017-20|All|openpilot available[<sup>2</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Prius Prime 2021-22|All|openpilot|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Prius v 2017|Toyota Safety Sense P|openpilot available[<sup>2</sup>](#footnotes)|19 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|RAV4 2016|Toyota Safety Sense P|openpilot available[<sup>2</sup>](#footnotes)|19 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|RAV4 2017-18|All|openpilot available[<sup>2</sup>](#footnotes)|19 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|RAV4 2019-21|All|openpilot|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|RAV4 2022|All|Stock|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|RAV4 Hybrid 2016|Toyota Safety Sense P|openpilot available[<sup>2</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|RAV4 Hybrid 2017-18|All|openpilot available[<sup>2</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|RAV4 Hybrid 2019-21|All|openpilot|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|RAV4 Hybrid 2022|All|Stock|0 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Toyota|Sienna 2018-20|All|openpilot available[<sup>2</sup>](#footnotes)|19 mph|0 mph|[](##)|[](##)|Toyota|
|
||||
|Volkswagen|Arteon 2018-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|Arteon eHybrid 2020-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|Arteon R 2020-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|Atlas 2018-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|Atlas Cross Sport 2021-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|California 2021|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|31 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|Caravelle 2020|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|31 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|CC 2018-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|e-Golf 2014-20|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|Golf 2015-20|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|Golf Alltrack 2015-19|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|Golf GTD 2015-20|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|Golf GTE 2015-20|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|Golf GTI 2015-21|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|Golf R 2015-19|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|Golf SportsVan 2015-20|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|Jetta 2018-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|Jetta GLI 2021-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|Passat 2015-22[<sup>7</sup>](#footnotes)|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|Passat Alltrack 2015-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|Passat GTE 2015-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|Polo 2020-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533[<sup>9</sup>](#footnotes)|
|
||||
|Volkswagen|Polo GTI 2020-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533[<sup>9</sup>](#footnotes)|
|
||||
|Volkswagen|T-Cross 2021|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533[<sup>9</sup>](#footnotes)|
|
||||
|Volkswagen|T-Roc 2021|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533[<sup>9</sup>](#footnotes)|
|
||||
|Volkswagen|Taos 2022|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|Teramont 2018-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|Teramont Cross Sport 2021-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|Teramont X 2021-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|Tiguan 2019-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|Volkswagen|Touran 2017|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,8</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|J533|
|
||||
|
||||
<a id="footnotes"></a>
|
||||
<sup>1</sup>Requires a <a href="https://github.com/commaai/openpilot/wiki/GM#hardware">community built ASCM harness</a>. <b><i>NOTE: disconnecting the ASCM disables Automatic Emergency Braking (AEB).</i></b> <br />
|
||||
<sup>2</sup>2019 Honda Civic 1.6L Diesel Sedan does not have ALC below 12mph. <br />
|
||||
<sup>3</sup>When the Driver Support Unit (DSU) is disconnected, openpilot Adaptive Cruise Control (ACC) will replace stock Adaptive Cruise Control (ACC). <b><i>NOTE: disconnecting the DSU disables Automatic Emergency Braking (AEB).</i></b> <br />
|
||||
<sup>4</sup>openpilot operates above 28mph for Camry 4CYL L, 4CYL LE and 4CYL SE which don't have Full-Speed Range Dynamic Radar Cruise Control. <br />
|
||||
<sup>5</sup>Not including the China market Kamiq, which is based on the (currently) unsupported PQ34 platform. <br />
|
||||
<sup>6</sup>Refers only to the MQB-based European B8 Passat, not the NMS Passat in the USA/China/Mideast markets. <br />
|
||||
<sup>7</sup>Model-years 2021 and beyond may have a new camera harness design, which isn't yet available from the comma store. Before ordering, remove the Lane Assist camera cover and check to see if the connector is black (older design) or light brown (newer design). In the interim, if your car has a J533 connector CAN gateway inside the dashboard, choose "VW J533 Development" from the vehicle drop-down for a suitable harness. (Some newer models are also observed to not have a J533 connector.) <br />
|
||||
<sup>8</sup>Includes versions with extra rear cargo space (may be called Variant, Estate, SportWagen, Shooting Brake, etc.) <br />
|
||||
<sup>1</sup>Experimental openpilot longitudinal control is available behind a toggle; the toggle is only available in non-release branches such as `master-ci`. Using openpilot longitudinal may disable Automatic Emergency Braking (AEB). <br />
|
||||
<sup>2</sup>When the Driver Support Unit (DSU) is disconnected, openpilot Adaptive Cruise Control (ACC) will replace stock Adaptive Cruise Control (ACC). <b><i>NOTE: disconnecting the DSU disables Automatic Emergency Braking (AEB).</i></b> <br />
|
||||
<sup>3</sup>Requires a <a href="https://github.com/commaai/openpilot/wiki/GM#hardware">community built ASCM harness</a>. <b><i>NOTE: disconnecting the ASCM disables Automatic Emergency Braking (AEB).</i></b> <br />
|
||||
<sup>4</sup>2019 Honda Civic 1.6L Diesel Sedan does not have ALC below 12mph. <br />
|
||||
<sup>5</sup>openpilot operates above 28mph for Camry 4CYL L, 4CYL LE and 4CYL SE which don't have Full-Speed Range Dynamic Radar Cruise Control. <br />
|
||||
<sup>6</sup>Not including the China market Kamiq, which is based on the (currently) unsupported PQ34 platform. <br />
|
||||
<sup>7</sup>Refers only to the MQB-based European B8 Passat, not the NMS Passat in the USA/China/Mideast markets. <br />
|
||||
<sup>8</sup>Only available for vehicles using a gateway (J533) harness. At this time, vehicles using a camera harness are limited to using stock ACC. <br />
|
||||
<sup>9</sup>Model-years 2022 and beyond may have a combined CAN gateway and BCM, which is supported by openpilot in software, but doesn't yet have a harness available from the comma store. <br />
|
||||
|
||||
## Community Maintained Cars
|
||||
Although they're not upstream, the community has openpilot running on other makes and models. See the 'Community Supported Models' section of each make [on our wiki](https://wiki.comma.ai/).
|
||||
@@ -230,13 +241,13 @@ Although they're not upstream, the community has openpilot running on other make
|
||||
# Don't see your car here?
|
||||
|
||||
**openpilot can support many more cars than it currently does.** There are a few reasons your car may not be supported.
|
||||
If your car doesn't fit into any of the incompatibility criteria here, then there's a good chance it can be supported! We're adding support for new cars all the time. We don't have a roadmap for car support, and in fact, most car support comes from users like you!
|
||||
If your car doesn't fit into any of the incompatibility criteria here, then there's a good chance it can be supported! We're adding support for new cars all the time. **We don't have a roadmap for car support**, and in fact, most car support comes from users like you!
|
||||
|
||||
### Which cars are able to be supported?
|
||||
|
||||
openpilot uses the existing steering, gas, and brake interfaces in your car. If your car lacks any one of these interfaces, openpilot will not be able to control the car. If your car has any form of [LKAS](https://en.wikipedia.org/wiki/Automated_Lane_Keeping_Systems)/[LCA](https://en.wikipedia.org/wiki/Lane_centering) and [ACC](https://en.wikipedia.org/wiki/Adaptive_cruise_control), then it almost certainly has these interfaces. These interfaces generally started shipping on cars around 2016.
|
||||
openpilot uses the existing steering, gas, and brake interfaces in your car. If your car lacks any one of these interfaces, openpilot will not be able to control the car. If your car has [ACC](https://en.wikipedia.org/wiki/Adaptive_cruise_control) and any form of [LKAS](https://en.wikipedia.org/wiki/Automated_Lane_Keeping_Systems)/[LCA](https://en.wikipedia.org/wiki/Lane_centering), then it almost certainly has these interfaces. These features generally started shipping on cars around 2016. Note that manufacturers will often make their own [marketing terms](https://en.wikipedia.org/wiki/Adaptive_cruise_control#Vehicle_models_supporting_adaptive_cruise_control) for these features, such as Hyundai's "Smart Cruise Control" branding of Adaptive Cruise Control.
|
||||
|
||||
If your car has the following packages or features, then it's a good candidate for support. If it does not, then it's unlikely able to be supported.
|
||||
If your car has the following packages or features, then it's a good candidate for support.
|
||||
|
||||
| Make | Required Package/Features |
|
||||
| ---- | ------------------------- |
|
||||
@@ -254,8 +265,9 @@ All the cars that openpilot supports use a [CAN bus](https://en.wikipedia.org/wi
|
||||
|
||||
### Toyota Security
|
||||
|
||||
Specific new Toyota models are shipping with a new message authentication method that openpilot does not yet support.
|
||||
So far, this list includes:
|
||||
openpilot does not yet support these Toyota models due to a new message authentication method.
|
||||
[Vote](https://comma.ai/shop/products/vote) if you'd like to see openpilot support on these models.
|
||||
|
||||
* Toyota RAV4 Prime 2021+
|
||||
* Toyota Sienna 2021+
|
||||
* Toyota Venza 2021+
|
||||
@@ -264,4 +276,4 @@ So far, this list includes:
|
||||
* Toyota Corolla Cross 2022+ (only US model)
|
||||
* Lexus NX 2022+
|
||||
* Toyota bZ4x 2023+
|
||||
* Subaru Solterra 2023+
|
||||
* Subaru Solterra 2023+
|
||||
|
||||
+27
-28
@@ -11,8 +11,9 @@ from datetime import datetime
|
||||
from math import sin, cos, sqrt, fabs, atan2
|
||||
|
||||
from .gps_time import GPSTime, utc_to_gpst
|
||||
from .constants import SPEED_OF_LIGHT, SECS_IN_MIN, SECS_IN_HR, SECS_IN_DAY, EARTH_ROTATION_RATE, EARTH_GM
|
||||
from .helpers import get_constellation
|
||||
from .constants import SPEED_OF_LIGHT, SECS_IN_MIN, SECS_IN_HR, SECS_IN_DAY, \
|
||||
SECS_IN_WEEK, EARTH_ROTATION_RATE, EARTH_GM
|
||||
from .helpers import get_constellation, get_prn_from_nmea_id
|
||||
|
||||
|
||||
def read4(f, rinex_ver):
|
||||
@@ -74,7 +75,7 @@ class EphemerisType(IntEnum):
|
||||
FINAL_ORBIT = 1
|
||||
RAPID_ORBIT = 2
|
||||
ULTRA_RAPID_ORBIT = 3
|
||||
QCOM_POLY = 4 # Currently not supported
|
||||
QCOM_POLY = 4
|
||||
|
||||
@staticmethod
|
||||
def all_orbits():
|
||||
@@ -225,7 +226,8 @@ class GLONASSEphemeris(Ephemeris):
|
||||
|
||||
|
||||
class PolyEphemeris(Ephemeris):
|
||||
def __init__(self, prn: str, data, epoch: GPSTime, ephem_type: EphemerisType, file_epoch: GPSTime, file_name: str, healthy=True, tgd=0):
|
||||
def __init__(self, prn: str, data, epoch: GPSTime, ephem_type: EphemerisType,
|
||||
file_epoch: GPSTime=None, file_name: str=None, healthy=True, tgd=0):
|
||||
super().__init__(prn, data, epoch, ephem_type, healthy, max_time_diff=SECS_IN_HR, file_epoch=file_epoch, file_name=file_name)
|
||||
self.tgd = tgd
|
||||
self.to_json()
|
||||
@@ -530,28 +532,25 @@ def parse_rinex_nav_msg_glonass(file_name):
|
||||
return ephems
|
||||
|
||||
|
||||
'''
|
||||
def parse_qcom_ephem(qcom_poly, current_week):
|
||||
svId = qcom_poly.svId
|
||||
data = qcom_poly
|
||||
t0 = data.t0
|
||||
# fix glonass time
|
||||
prn = get_prn_from_nmea_id(svId)
|
||||
if prn == 'GLONASS':
|
||||
# TODO should handle leap seconds better
|
||||
epoch = GPSTime(current_week, (t0 + 3*SECS_IN_WEEK) % (SECS_IN_WEEK) + 18)
|
||||
else:
|
||||
epoch = GPSTime(current_week, t0)
|
||||
poly_data = {}
|
||||
poly_data['t0'] = epoch
|
||||
poly_data['xyz'] = np.array([
|
||||
[data.xyz0[0], data.xyzN[0], data.xyzN[1], data.xyzN[2]],
|
||||
[data.xyz0[1], data.xyzN[3], data.xyzN[4], data.xyzN[5]],
|
||||
[data.xyz0[2], data.xyzN[6], data.xyzN[7], data.xyzN[8]] ]).T
|
||||
|
||||
def parse_qcom_ephems(qcom_polys, current_week):
|
||||
ephems = []
|
||||
for qcom_poly in qcom_polys:
|
||||
svId = qcom_poly.qcomGnss.drSvPoly.svId
|
||||
data = qcom_poly.qcomGnss.drSvPoly
|
||||
t0 = data.t0
|
||||
# fix glonass time
|
||||
if get_constellation(svId) == 'GLONASS':
|
||||
# TODO should handle leap seconds better
|
||||
epoch = GPSTime(current_week, (t0 + 3*SECS_IN_WEEK) % (SECS_IN_WEEK) + 18)
|
||||
else:
|
||||
epoch = GPSTime(current_week, t0)
|
||||
poly_data = {}
|
||||
poly_data['t0'] = epoch
|
||||
poly_data['x'] = [data.xyzN[2], data.xyzN[1], data.xyzN[0], data.xyz0[0]]
|
||||
poly_data['y'] = [data.xyzN[5], data.xyzN[4], data.xyzN[3], data.xyz0[1]]
|
||||
poly_data['z'] = [data.xyzN[8], data.xyzN[7], data.xyzN[6], data.xyz0[2]]
|
||||
poly_data['clock'] = [1e-3*data.other[3], 1e-3*data.other[2], 1e-3*data.other[1], 1e-3*data.other[0]]
|
||||
poly_data['deg'] = 3
|
||||
poly_data['deg_t'] = 3
|
||||
ephems.append(PolyEphemeris(svId, poly_data, epoch, eph_type=EphemerisType.QCOM_POLY))
|
||||
return ephems
|
||||
'''
|
||||
poly_data['clock'] = [1e-3*data.other[3], 1e-3*data.other[2], 1e-3*data.other[1], 1e-3*data.other[0]]
|
||||
poly_data['deg'] = 3
|
||||
poly_data['deg_t'] = 3
|
||||
return PolyEphemeris(prn, poly_data, epoch, ephem_type=EphemerisType.QCOM_POLY)
|
||||
|
||||
+5
-3
@@ -32,11 +32,13 @@ class ConstellationId(IntEnum):
|
||||
def from_qcom_source(cls, report_source: int):
|
||||
if report_source == 0:
|
||||
return ConstellationId.GPS
|
||||
if report_source == 1:
|
||||
return ConstellationId.GLONASS
|
||||
if report_source == 2:
|
||||
return ConstellationId.BEIDOU
|
||||
if report_source == 6:
|
||||
return ConstellationId.SBAS
|
||||
elif report_source == 1:
|
||||
return ConstellationId.GLONASS
|
||||
raise NotImplementedError('Only GPS (0), SBAS (1) and GLONASS (6) are supported from qcom, not:', {report_source})
|
||||
raise NotImplementedError('Only GPS (0), GLONASS (1), BEIDOU (2) and SBAS (6) are supported from qcom, not:', {report_source})
|
||||
|
||||
|
||||
# From https://gpsd.gitlab.io/gpsd/NMEA.html#_satellite_ids
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ export OPENBLAS_NUM_THREADS=1
|
||||
export VECLIB_MAXIMUM_THREADS=1
|
||||
|
||||
if [ -z "$AGNOS_VERSION" ]; then
|
||||
export AGNOS_VERSION="5.2"
|
||||
export AGNOS_VERSION="6.2"
|
||||
fi
|
||||
|
||||
if [ -z "$PASSIVE" ]; then
|
||||
|
||||
@@ -72,6 +72,17 @@ struct DBC {
|
||||
std::vector<Val> vals;
|
||||
};
|
||||
|
||||
typedef struct ChecksumState {
|
||||
int checksum_size;
|
||||
int counter_size;
|
||||
int checksum_start_bit;
|
||||
int counter_start_bit;
|
||||
bool little_endian;
|
||||
SignalType checksum_type;
|
||||
unsigned int (*calc_checksum)(uint32_t address, const Signal &sig, const std::vector<uint8_t> &d);
|
||||
} ChecksumState;
|
||||
|
||||
DBC* dbc_parse(const std::string& dbc_path);
|
||||
DBC* dbc_parse_from_stream(const std::string &dbc_name, std::istream &stream, ChecksumState *checksum = nullptr);
|
||||
const DBC* dbc_lookup(const std::string& dbc_name);
|
||||
std::vector<std::string> get_dbc_names();
|
||||
|
||||
+13
-20
@@ -47,16 +47,6 @@ inline std::string& trim(std::string& s, const char* t = " \t\n\r\f\v") {
|
||||
return s.erase(0, s.find_first_not_of(t));
|
||||
}
|
||||
|
||||
typedef struct ChecksumState {
|
||||
int checksum_size;
|
||||
int counter_size;
|
||||
int checksum_start_bit;
|
||||
int counter_start_bit;
|
||||
bool little_endian;
|
||||
SignalType checksum_type;
|
||||
unsigned int (*calc_checksum)(uint32_t address, const Signal &sig, const std::vector<uint8_t> &d);
|
||||
} ChecksumState;
|
||||
|
||||
ChecksumState* get_checksum(const std::string& dbc_name) {
|
||||
ChecksumState* s = nullptr;
|
||||
if (startswith(dbc_name, {"honda_", "acura_"})) {
|
||||
@@ -107,14 +97,7 @@ void set_signal_type(Signal& s, ChecksumState* chk, const std::string& dbc_name,
|
||||
}
|
||||
}
|
||||
|
||||
DBC* dbc_parse(const std::string& dbc_path) {
|
||||
std::ifstream infile(dbc_path);
|
||||
if (!infile) return nullptr;
|
||||
|
||||
const std::string dbc_name = std::filesystem::path(dbc_path).filename();
|
||||
|
||||
std::unique_ptr<ChecksumState> checksum(get_checksum(dbc_name));
|
||||
|
||||
DBC* dbc_parse_from_stream(const std::string &dbc_name, std::istream &stream, ChecksumState *checksum) {
|
||||
uint32_t address = 0;
|
||||
std::set<uint32_t> address_set;
|
||||
std::set<std::string> msg_name_set;
|
||||
@@ -134,7 +117,7 @@ DBC* dbc_parse(const std::string& dbc_path) {
|
||||
int line_num = 0;
|
||||
std::smatch match;
|
||||
// TODO: see if we can speed up the regex statements in this loop, SG_ is specifically the slowest
|
||||
while (std::getline(infile, line)) {
|
||||
while (std::getline(stream, line)) {
|
||||
line = trim(line);
|
||||
line_num += 1;
|
||||
if (startswith(line, "BO_ ")) {
|
||||
@@ -168,7 +151,7 @@ DBC* dbc_parse(const std::string& dbc_path) {
|
||||
sig.is_signed = match[offset + 5].str() == "-";
|
||||
sig.factor = std::stod(match[offset + 6].str());
|
||||
sig.offset = std::stod(match[offset + 7].str());
|
||||
set_signal_type(sig, checksum.get(), dbc_name, line_num);
|
||||
set_signal_type(sig, checksum, dbc_name, line_num);
|
||||
if (sig.is_little_endian) {
|
||||
sig.lsb = sig.start_bit;
|
||||
sig.msb = sig.start_bit + sig.size - 1;
|
||||
@@ -213,6 +196,16 @@ DBC* dbc_parse(const std::string& dbc_path) {
|
||||
return dbc;
|
||||
}
|
||||
|
||||
DBC* dbc_parse(const std::string& dbc_path) {
|
||||
std::ifstream infile(dbc_path);
|
||||
if (!infile) return nullptr;
|
||||
|
||||
const std::string dbc_name = std::filesystem::path(dbc_path).filename();
|
||||
|
||||
std::unique_ptr<ChecksumState> checksum(get_checksum(dbc_name));
|
||||
return dbc_parse_from_stream(dbc_name, infile, checksum.get());
|
||||
}
|
||||
|
||||
const std::string get_dbc_root_path() {
|
||||
char *basedir = std::getenv("BASEDIR");
|
||||
if (basedir != NULL) {
|
||||
|
||||
@@ -21,7 +21,7 @@ int64_t get_raw_value(const std::vector<uint8_t> &msg, const Signal &sig) {
|
||||
int msb = (int)(sig.msb / 8) == i ? sig.msb : (i+1)*8 - 1;
|
||||
int size = msb - lsb + 1;
|
||||
|
||||
uint8_t d = (msg[i] >> (lsb - (i*8))) & ((1ULL << size) - 1);
|
||||
uint64_t d = (msg[i] >> (lsb - (i*8))) & ((1ULL << size) - 1);
|
||||
ret |= d << (bits - size);
|
||||
|
||||
bits -= size;
|
||||
@@ -127,7 +127,7 @@ CANParser::CANParser(int abus, const std::string& dbc_name,
|
||||
}
|
||||
|
||||
state.size = msg->size;
|
||||
assert(state.size < 64); // max signal size is 64 bytes
|
||||
assert(state.size <= 64); // max signal size is 64 bytes
|
||||
|
||||
// track checksums and counters for this message
|
||||
for (const auto& sig : msg->sigs) {
|
||||
@@ -287,10 +287,12 @@ void CANParser::UpdateValid(uint64_t sec) {
|
||||
const bool missing = state.last_seen_nanos == 0;
|
||||
const bool timed_out = (sec - state.last_seen_nanos) > state.check_threshold;
|
||||
if (state.check_threshold > 0 && (missing || timed_out)) {
|
||||
if (missing) {
|
||||
LOGE("0x%X MISSING", state.address);
|
||||
} else if (show_missing) {
|
||||
LOGE("0x%X TIMEOUT", state.address);
|
||||
if (show_missing && !bus_timeout) {
|
||||
if (missing) {
|
||||
LOGE("0x%X NOT SEEN", state.address);
|
||||
} else if (timed_out) {
|
||||
LOGE("0x%X TIMED OUT", state.address);
|
||||
}
|
||||
}
|
||||
_valid = false;
|
||||
}
|
||||
|
||||
+254
-253
@@ -1126,7 +1126,8 @@ BO_ 984 IPMA_Data: 8 IPMA_ADAS
|
||||
SG_ DasStats_D_Dsply : 47|2@0+ (1,0) [0|3] "SED" GWM
|
||||
SG_ DasWarn_D_Dsply : 44|2@0+ (1,0) [0|3] "SED" GWM
|
||||
SG_ AhbHiBeam_D_Rq : 59|2@0+ (1,0) [0|3] "SED" GWM
|
||||
SG_ Set_Me_X1 : 63|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ Passthru_63 : 63|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ Passthru_48 : 48|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 985 IPMA_Data2: 8 IPMA_ADAS
|
||||
SG_ LdwChime_B_Rq : 34|1@0+ (1,0) [0|1] "SED" GWM
|
||||
@@ -3645,6 +3646,258 @@ BO_TX_BU_ 357 : ECM_Diesel,PCM,PCM_HEV;
|
||||
BO_TX_BU_ 342 : ECM_Diesel,PCM,PCM_HEV;
|
||||
BO_TX_BU_ 71 : ECM_Diesel,PCM,PCM_HEV;
|
||||
|
||||
CM_ "New CAN FD network";
|
||||
CM_ BU_ CMR_DSMC "Driver Status Monitor Camera";
|
||||
CM_ BU_ IPMA_ADAS "Assist Driving Alert System";
|
||||
CM_ BU_ PSCM "Passenger Front Climate Control Seat Module";
|
||||
CM_ BU_ ABS_ESC "Anti-lock Brake / Traction Control Module";
|
||||
CM_ BU_ TCCM "Transfer Case Control Module, 4x4 Control Module";
|
||||
CM_ BU_ TCM_DSL "Transmission Control Module";
|
||||
CM_ BU_ PCM "Powertrain Control Module";
|
||||
CM_ BU_ ECM_Diesel "Diesel";
|
||||
CM_ BU_ GWM "Gateway Module CGEA1.3(Star Architecture)";
|
||||
CM_ BU_ TSTR "Diagnostic Tester";
|
||||
|
||||
CM_ SG_ 524 PrplWhlTotTqRqMxAwd_No_Cs "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 524 PrplWhlTotTqRqMxAwd_No_Cnt "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 1150 LocationServices_1 "Tx by HS3 APIM";
|
||||
CM_ SG_ 542 LocationServices_3 "Tx by HS3 APIM";
|
||||
CM_ SG_ 810 NtfyDrvTrgtDist_L_Rq "Object.SetTripRangeAlert_Rq This signal is meant to provide the customer settings for the target distance remote notification";
|
||||
CM_ SG_ 810 NtfyDrvSocLvl1_Pc_Rq "Object.SetCustomerLevelAlert_Rq This signal is meant to provide the customer settings for the SOC remote notification.";
|
||||
CM_ SG_ 810 PtRmtRprt_D_Stat "Object.RemoteDataReport_St";
|
||||
CM_ SG_ 550 PtWakeupActv1_B_Rq "ECG Application signal";
|
||||
CM_ SG_ 982 LatCtlPath_No_Cnt "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 982 LatCtlPath_No_Cs "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 1104 DrvEngageLevel_No_Cs "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 1104 DrvEngageLevel_No_Cnt "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 1085 ULoRgenTestMde_B_Stat "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 1085 PwSrcULoComm_B_Falt "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 1445 SOBDMC_AutoSarNMReserved4 "Signal not transmitted on gas and diesel variants.";
|
||||
CM_ SG_ 1445 SOBDMC_AutoSarNMReserved3 "Signal not transmitted on gas and diesel variants.";
|
||||
CM_ SG_ 1445 SOBDMC_AutoSarNMReserved2 "Signal not transmitted on gas and diesel variants.";
|
||||
CM_ SG_ 1445 SOBDMC_AutoSarNMReserved1 "Signal not transmitted on gas and diesel variants.";
|
||||
CM_ SG_ 1445 SOBDMC_AutoSarNMNodeId "Signal not transmitted on gas and diesel variants.";
|
||||
CM_ SG_ 1445 SOBDMC_AutoSarNMControl "Signal not transmitted on gas and diesel variants.";
|
||||
CM_ SG_ 1088 HvacPrecondMode2_D_Rq "Signal not transmitted on vehicles that do not have the Fuel operated heater feature.";
|
||||
CM_ SG_ 1088 HvacPrecondBlwr2_D_Rq "Signal not transmitted on vehicles that do not have the Fuel operated heater feature.";
|
||||
CM_ SG_ 786 ChrgStat_D_Dsply "Signal not transmitted by PCM_HEV";
|
||||
CM_ SG_ 66 immoControlData_T2 "Not transmitted on all vehicle variants";
|
||||
CM_ SG_ 66 immoControlCmd_T2 "Not transmitted on all vehicle variants";
|
||||
CM_ SG_ 549 BeltminderAudioMute "Object.MyKey.BeltMinderAudioMute.St";
|
||||
CM_ SG_ 549 Power_Up_Chime_Modules "Object.AlertMethod.IPC _Infotainment";
|
||||
CM_ SG_ 549 Chime_Source "Object.AlertMethod.IPC_infotainment";
|
||||
CM_ SG_ 611 AwdStat_D_RqDsply "Signal not transmitted on programs that do not have AWD.";
|
||||
CM_ SG_ 611 AwdSrvcRqd_B_Rq "Signal not transmitted on programs that do not have AWD.";
|
||||
CM_ SG_ 611 AwdLck_Tq_Rq "Signal not transmitted on programs that do not have AWD.";
|
||||
CM_ SG_ 130 VehVTrlrAid_B_Rq "VR session start- req. limit blower speed no more than X volts. CC restriction on time msg. will be honored.Double Event msg1st event to request limit, 2nd event to release limit, No msg. CC Grammar v7.xls";
|
||||
CM_ SG_ 130 SteMdule_U_Meas "DCR 1745 to update Tx from GWM to EP100ms. SteMdule_I_Est & SteMdule_U_Meas are used by BMS system & filtered. The filter uses standard periodic rate & changing to EP would adversely affect the filter.(jweinfur)";
|
||||
CM_ SG_ 130 SteMdule_I_Est "DCR 1745 to update Tx from GWM to EP100ms. SteMdule_I_Est & SteMdule_U_Meas are used by BMS system & filtered. The filter uses standard periodic rate & changing to EP would adversely affect the filter.(jweinfur)";
|
||||
CM_ SG_ 126 StePinRelInit_An_Sns "SASM will transmit these signals on vehicles with SASM and without PSCM. SCCM will not Tx this signal when SASM is present.";
|
||||
CM_ SG_ 126 StePinAn_No_Cs "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 1200 BrkTot_Tq_RqDrv "DCR 1836 to update Tx from GWM to EP100ms rejected due MPS6 TCM requires BrkTot_Tq_RqDrv at 20ms (bshu1).";
|
||||
CM_ SG_ 1046 TCMode "Signal data set to 0x0 for ABS only vehicle option content";
|
||||
CM_ SG_ 1046 DrvAntiLckLamp_D_Rq "update value table v8.34, not align w/GSDB, need etracker. ABS & IPC implemented as updated.";
|
||||
CM_ SG_ 1046 BpedMove_D_Actl "CCMGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 1044 StePinOffst_An_Est "SASM will transmit these signals on vehicles with SASM and without PSCM. SCCM will not Tx this signal when SASM is present.";
|
||||
CM_ SG_ 1044 StePinOffst_No_Cs "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 534 BrkObdData_No_Actl "Signal not transmitted on gas, diesel and HEV. Only supported on PHEV.";
|
||||
CM_ SG_ 534 BrkObdIndex_No_Actl "Signal not transmitted on gas, diesel and HEV. Only supported on PHEV.";
|
||||
CM_ SG_ 534 WhlRotatRr_No_Cnt "DCR 1833 to update Tx from GWM to EP100ms. Wheel Count signals are used by complex algorithm to determine Tire Pressure by Location & can't change from 20msec. (jweinfur)";
|
||||
CM_ SG_ 534 WhlRotatRl_No_Cnt "DCR 1833 to update Tx from GWM to EP100ms. Wheel Count signals are used by complex algorithm to determine Tire Pressure by Location & can't change from 20msec. (jweinfur)";
|
||||
CM_ SG_ 534 WhlRotatFr_No_Cnt "DCR 1833 to update Tx from GWM to EP100ms. Wheel Count signals are used by complex algorithm to determine Tire Pressure by Location & can't change from 20msec. (jweinfur)";
|
||||
CM_ SG_ 534 WhlRotatFl_No_Cnt "DCR 1833 to update Tx from GWM to EP100ms. Wheel Count signals are used by complex algorithm to determine Tire Pressure by Location & can't change from 20msec. (jweinfur)";
|
||||
CM_ SG_ 531 VehLongOvrGnd_A_Est "CCMGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 1034 VehicleGGCCData "RCMGenSigTimeout=6000";
|
||||
CM_ SG_ 1090 Mtr2State_D_ActlMntr "Signal Not transmitted on PCM_HEV variant";
|
||||
CM_ SG_ 1090 Inv1Ain_I_ActlMntr "Signal Not transmitted on PCM_HEV variant";
|
||||
CM_ SG_ 1090 VehElRnge_L_Dsply "Signal Not transmitted on HPCM variant";
|
||||
CM_ SG_ 374 TrnRng_D_Rq "Powersplit HEVs with HF45, HPCM will Tx this message. For all other programs it will be Tx by PCM or TCM. ";
|
||||
CM_ SG_ 374 TrnPrkSys_D_Actl "Powersplit HEVs with HF45, HPCM will Tx this message. For all other programs it will be Tx by PCM or TCM. ";
|
||||
CM_ SG_ 374 GearLvr_D_ActlDrv "Powersplit HEVs with HF45, HPCM will Tx this message. For all other programs it will be Tx by PCM or TCM. ";
|
||||
CM_ SG_ 374 GearPos_No_Cs "Powersplit HEVs with HF45, HPCM will Tx this message. For all other programs it will be Tx by PCM or TCM. ";
|
||||
CM_ SG_ 374 GearPos_D_Trg "Powersplit HEVs with HF45, HPCM will Tx this message. For all other programs it will be Tx by PCM or TCM. ";
|
||||
CM_ SG_ 374 GearPos_No_Cnt "Powersplit HEVs with HF45, HPCM will Tx this message. For all other programs it will be Tx by PCM or TCM. ";
|
||||
CM_ SG_ 374 GearPos_D_Actl "Powersplit HEVs with HF45, HPCM will Tx this message. For all other programs it will be Tx by PCM or TCM. ";
|
||||
CM_ SG_ 603 WhlDirAvgDrv_D_Actl "48V mHEV: ECM_HEVDSL is Tx, MHT HEV: PCM_HEV is Tx, Powersplit HEV: SOBDMC_HPCM is Tx";
|
||||
CM_ SG_ 603 PrplTqMnRgen_B_Actl "48V mHEV: ECM_HEVDSL is Tx, MHT HEV: PCM_HEV is Tx, Powersplit HEV: SOBDMC_HPCM is Tx";
|
||||
CM_ SG_ 603 BattTracCnnct_D_Rq "48V mHEV: ECM_HEVDSL is Tx, MHT HEV: PCM_HEV is Tx, Powersplit HEV: SOBDMC_HPCM is Tx";
|
||||
CM_ SG_ 872 HybMdeStat_D_Dsply "Signal not transmitted by HPCM";
|
||||
CM_ SG_ 560 SelDrvMdeSwtch_D_Stat3 "ECM_HEV, PCM & PCM_HEV do not support or Transmit signal.";
|
||||
CM_ SG_ 560 TrnSrvcRqd_B_Rq "Signal not transmitted on Diesel & HEV variants. MHT(U611/625) HPCM Rx 0x230 from PCM_HEV. Powersplit FWD HEVs(Cx482/3 430) HPCM Tx 0x230.";
|
||||
CM_ SG_ 560 TrnShifActv_B_Actl "Signal not transmitted on HEV variants. MHT(U611/625) HPCM Rx 0x230 from PCM_HEV. Powersplit FWD HEVs(Cx482/3 430) HPCM Tx 0x230.";
|
||||
CM_ SG_ 560 GboxOil_Te_Actl "Signal not transmitted on HEV variants. MHT(U611/625) HPCM Rx 0x230 from PCM_HEV. Powersplit FWD HEVs(Cx482/3 430) HPCM Tx 0x230.";
|
||||
CM_ SG_ 369 SeatWorkSrfc_B_Falt "Signal Not transmitted by TCM_DSL";
|
||||
CM_ SG_ 369 TrnIpcDsplyRng2_D_Actl "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 369 TrnIpcDsplyRng_D_Stat "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 92 TrnLvrV_D_Rq "Signal not transmitted on vehicles with PCM_HEV";
|
||||
CM_ SG_ 92 TrnSbwSysHlth_D_Actl "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 92 TrnGearNtmAllow_B_Stat "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 92 TrnDtpCmd_D_Actl "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 92 TrnGearCmd_No_Cs "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 92 TrnValidGear_D_Cnfm "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 92 TrnNtrlTowCmd_D_Actl "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 92 TrnGearCmd_Pc_ActlPt "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 92 TrnGear_D_RqPt "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 92 TrnCmdState_B_Actl "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 92 TrnCmdCnt_B_Actl "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 92 PrkBrkActv_D_RqTrnGear "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 92 TrnGearMsgTxt_D_Rq "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 92 TrnGearCmd_No_Cnt "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 1087 BattRgenLoChrg_D_RqEng "Signal not transmitted on diesel variant";
|
||||
CM_ SG_ 1087 BattRgenLoDChrg_D_RqEng "Signal not transmitted on diesel variant";
|
||||
CM_ SG_ 1087 FapLcInhbt_B_Rq "Signal not transmitted on diesel variant";
|
||||
CM_ SG_ 1100 EngExhMdeQuiet_D2_Stat "Signal not transmitted on HEV & Diesel programs";
|
||||
CM_ SG_ 1100 HvacCmprLim_D_Stat "Signal not transmitted on Diesel variants";
|
||||
CM_ SG_ 1100 WakeAlarm1_T_Rq "Signal not transmitted on Gas variants";
|
||||
CM_ SG_ 1100 WakeAlarm1_B_Typ "Signal not transmitted on Gas variants";
|
||||
CM_ SG_ 1100 Veh_V_DsplyTrailCtlSet "Signal not transmitted on HEV & Diesel programs";
|
||||
CM_ SG_ 1100 TrailCtlPt_B_Falt "Signal not transmitted on HEV & Diesel programs";
|
||||
CM_ SG_ 1100 AutoTowAllw_D_StatMnu "Signal not transmitted on Gas & Diesel variants";
|
||||
CM_ SG_ 1100 AutoTowActv_B_Stat "Signal not transmitted on Gas & Diesel variants";
|
||||
CM_ SG_ 1086 EngMnfld_P_Actl "Signal not transmitted on HEV & Diesel programs";
|
||||
CM_ SG_ 1086 ElLoadCtl_D_Rq "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 1071 CluPdl_PcRate_Actl "Signal not transmitted on HEV and Gas variants.";
|
||||
CM_ SG_ 1071 CluPdlPosPcMeas_D_Qf "Signal not transmitted on HEV and Gas variants.";
|
||||
CM_ SG_ 1071 CluPdlPos_Pc_Meas "Signal not transmitted on HEV and Gas variants.";
|
||||
CM_ SG_ 1071 EngAoutIdl_N_Ntrl "Signal not transmitted on HEV variants and diesel.";
|
||||
CM_ SG_ 1069 SlMde_D_Stat "IPC and HUD_ADV Receve from HS3 FGW 0x42D, not HS3 0x38A, MSG DCR 506. Signal not transmitted on Gas & HEV variants";
|
||||
CM_ SG_ 1069 SlMde_D_RqDsply "IPC and HUD_ADV Receve from HS3 FGW 0x42D, not HS3 0x38A, MSG DCR 506. Signal not transmitted on Gas & HEV variants";
|
||||
CM_ SG_ 1069 IsaOffst_D_Stat "Signal not transmitted on Gas & HEV variants";
|
||||
CM_ SG_ 1069 ObdWarmUp_B_Complt "Signal not transmitted on diesel variants.";
|
||||
CM_ SG_ 1069 EngMsgTxt_D_Rq "Signal not transmitted on diesel variants.";
|
||||
CM_ SG_ 1069 EngClnt_Te_ActlDiag "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 1069 EngLoad_Pc_CalcDiag "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 1069 ApedPos_Pc_ActlDiag "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 1060 RearDiffOilTeWarn_B_Rq "Signal not transmitted on HEV & Diesel programs";
|
||||
CM_ SG_ 1060 RearDiffOil_Te_Actl "Signal not transmitted on HEV & Diesel programs";
|
||||
CM_ SG_ 1057 FohEng_D_Rq "Signal not transmitted on vehicles that do not have the fuel operated heater feature. Signal not transmitted on HEV programs";
|
||||
CM_ SG_ 1057 EngIdlShutDown_D_Stat "Signal not transmitted on diesel variants.";
|
||||
CM_ SG_ 1057 FUEL_ALCOHOL_PERCNT "signal not transmitted on diesel and HEV variants.";
|
||||
CM_ SG_ 1057 TrnTotTq_Rt_Est "Signal not transmitted on gas and HEV variants.";
|
||||
CM_ SG_ 1057 TrnTotLss_Tq_Est "Signal not transmitted on gas and HEV variants.";
|
||||
CM_ SG_ 1057 VehVLimStat_D_Actl "Signal not transmitted on gas and HEV variants.";
|
||||
CM_ SG_ 1057 VehVLimActv_B_Actl "Signal not transmitted on gas and HEV variants.";
|
||||
CM_ SG_ 562 GearNtrl_No_Cs "Powersplit HEVs with HF45, HPCM will Tx this message. For all other programs it will be Tx by PCM or TCM. ";
|
||||
CM_ SG_ 562 GearNtrl_No_Cnt "Powersplit HEVs with HF45, HPCM will Tx this message. For all other programs it will be Tx by PCM or TCM. ";
|
||||
CM_ SG_ 516 EngAoutNActl_D_QF "Signal not transmitted on Gas & HEV variants";
|
||||
CM_ SG_ 516 EngAout3_N_Actl "Signal not transmitted on gas and diesel variants.";
|
||||
CM_ SG_ 516 ApedPos_Pc_ActlArb "ABSGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 516 ApedPosPcActl_No_Cnt "Signal not transmitted on gas and diesel variants.";
|
||||
CM_ SG_ 516 ApedPosPcActl_No_Cs "Signal not transmitted on gas and diesel variants.";
|
||||
CM_ SG_ 514 VehVTrlrAid_B_Avail "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 514 GearRvrse_D_Actl "Do not implement GearRvrse_D_Actl until eTracker 8804151 is approved, 11/24/09";
|
||||
CM_ SG_ 512 PrplWhlTotTqRq_No_Cs "Signal not transmitted on gas & Diesel variants.";
|
||||
CM_ SG_ 512 PrplWhlTotTqRq_No_Cnt "Signal not transmitted on gas & Diesel variants.";
|
||||
CM_ SG_ 512 PtDrvMde_D_Stat "Signal not transmitted on Gas & HEV variants.";
|
||||
CM_ SG_ 380 EngExhBrkOnLamp_B_Rq "Signal not transmitted on Gas variants";
|
||||
CM_ SG_ 380 EngExhBrkAutoLamp_B_Rq "Signal not transmitted on Gas variants";
|
||||
CM_ SG_ 380 EngAout_N_MxAllw "Signal not transmitted on Gas variants";
|
||||
CM_ SG_ 380 EngExhBrkMde_D_Actl "Signal not transmitted on Gas variants";
|
||||
CM_ SG_ 377 HvacAirFullOut_B_Rq "Signal not transmitted on diesel variant";
|
||||
CM_ SG_ 377 FuelFlw_Vl_Dsply "Signal not transmitted on diesel variants.";
|
||||
CM_ SG_ 377 FuelFillInlet_B_Dsply "Signal not transmitted on diesel variants.";
|
||||
CM_ SG_ 377 OdoCount "Signal not transmitted on diesel variants.";
|
||||
CM_ SG_ 377 EngOilLife_Pc_Actl "Signal not transmitted on diesel variants.";
|
||||
CM_ SG_ 377 FuelFilterLamp_B_Dsply "Signal not transmitted on Gas & HEV variants";
|
||||
CM_ SG_ 377 AirCondRec_B_Rq "Signal not transmitted on diesel variants.";
|
||||
CM_ SG_ 377 AirCondClutch_B_Stats "Signal not transmitted on diesel variants.";
|
||||
CM_ SG_ 376 GasPrtc_D_RqDsply "Signal not transmitted on HEV & Diesel variants.";
|
||||
CM_ SG_ 376 EngAout_Aa_Actl "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 376 AslIconDsply_D_Rq "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 376 AslChime_B_Rq "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 376 HvacHtrCore2_Te_Actl "Signal not transmitted on Gas & Diesel variants";
|
||||
CM_ SG_ 376 EcssLamp_D_RqDsply "Signal not transmitted on Gas & HEV variants";
|
||||
CM_ SG_ 376 AirAmb_Te_Actl "Signal not transmitted on Gas variants";
|
||||
CM_ SG_ 359 PrplWhlRgenMn_Tq_Actl "Signal not transmitted on Gas & Diesel variants";
|
||||
CM_ SG_ 359 ElPw_D_StatStrtStop "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 359 TrnAin_Tq_Actl "Signal not transmitted on HEV variances.";
|
||||
CM_ SG_ 359 PlgActvArb_B_Actl "Only supported on PHEV programs. PlgActvArb_B_Actl HPCM will Tx on Powersplit PHEVs, On MHT PHEVs the PCM_HEV will Tx and HPCM will Rx.";
|
||||
CM_ SG_ 359 TrnAinTq_D_Qf "Signal not transmitted on HEV variances.";
|
||||
CM_ SG_ 358 StopStrtStdby_D_Indic "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 358 StopStrtIODTxt_D_Rq "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 358 StopStrtDrvMde_D_Indic "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 358 StopStrtMsgTxt_D_Rq "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 358 HiElPwInhbt_B_Stat "Signal not transmitted on HEV programs";
|
||||
CM_ SG_ 358 AutoStopPtDelta_I_Est "Signal not transmitted on HEV variants. ";
|
||||
CM_ SG_ 357 BpedDrvAppl_D_Actl "CCMGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 357 CcStat_D_Actl "ABSGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 357 EngAout_N_MnAllw "Signal not transmitted on Gas & Diesel variants.";
|
||||
CM_ SG_ 357 AccStopMde_D_Rq "ABSGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 342 EngOvrhtMitgActv_D_Ind "Signal not transmitted on diesel.";
|
||||
CM_ SG_ 342 EngGoutLss_Tq_Est "Signal not transmitted on gas and diesel variants.";
|
||||
CM_ SG_ 342 EngOil_Te_Actl "Signal not transmitted on Gas & HEV variants. ";
|
||||
CM_ SG_ 954 GenericSwtch2_No_Actl "U625 Police Wig Wag feature";
|
||||
CM_ SG_ 935 SodRight_D_Stat "IPCGenSigTimeoutTime=1600";
|
||||
CM_ SG_ 935 Side_Detect_R_Illum "DDMGenSigTimeoutTime=2000";
|
||||
CM_ SG_ 935 SodSnsRight_D_Stat "IPCGenSigTimeoutTime=1600";
|
||||
CM_ SG_ 935 SodAlrtRight_D_Stat "DDMGenSigTimeoutTime=2000";
|
||||
CM_ SG_ 1112 BattTracClntPmp_D_Stat "48V mHEV: ECM_HEVDSL is Tx, MHT HEV: PCM_HEV is Tx, Powersplit HEV: SOBDMC_HPCM is Tx";
|
||||
CM_ SG_ 1050 Outside_Air_Temp_Stat "Filtered value, i.e. same as disply for customer";
|
||||
CM_ SG_ 1009 CenterStackRing_D_Actl "The Center Stack sends the CPLR a signal to turn On or Off the light Ring, This is a customer selectable preference switch";
|
||||
CM_ SG_ 1009 APIM_NumberofTracks_St "Object NumberofTracks";
|
||||
CM_ SG_ 1009 APIM_ActiveTrackNum_St "Object.ActiveTrackNum";
|
||||
CM_ SG_ 360 GsmSrvcRqd_B_Rq "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 360 TrnGearPwmFalt_B_Actl "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 360 GearButtnStuck_B_Actl "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGsmNtmState_D_Actl "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 DrQltyDrv_D_StatGsm "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnBtsiOvrrd_B_Stat "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnValidGearRq_D_Stat "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearRqCnt_B_Actl "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_U_Actl "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlR2 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlR1 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlR0 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlP2 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlP1 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlP0 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlN2 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlN1 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlN0 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlM2 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlM1 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlM0 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlD2 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlD1 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlD0 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGear_No_Cs "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGear_No_Cnt "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGear_D_RqDrv "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 BrkSwtchPos_B_ActlGsm "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 138 SteWhlRelCalib_An_Sns "Signal is not transmitted on vehicles where PSCM is transmitting the message that contains this signal. Signal data set to 0x0 for ABS only vehicle option content";
|
||||
CM_ SG_ 1093 StopLamp_B_RqTrlrBrk "Signal not transmitted on all variants.";
|
||||
CM_ SG_ 792 ElTrip_L_Dsply "Key cycle trip distance driven with the engine off (Trip EV Miles)";
|
||||
CM_ SG_ 792 ElLongTerm_L_Dsply "Long term distance distance driven with the engine off since the last long term reset (Long Term EV Miles).";
|
||||
CM_ SG_ 765 Mc_VehTimeFrmtUsrSel_St "Object.BodyInterface.Settings.VehicleTimeFormatUserSelection";
|
||||
CM_ SG_ 765 Mc_VehUntTrpCoUsrSel_St "Object.VehicleSettings.Disp_Miles_Kilometers.Rq";
|
||||
CM_ SG_ 765 Mc_VehUnitTempUsrSel_St "Object.VehicleSettings.Disp_Temperature.Rq";
|
||||
CM_ SG_ 765 Mc_VehLangUsrSel_St "Object.BodyInterface.Settings.VehicleLanguageUserSelection Object Vehicle Settings.Disp_LangSel";
|
||||
CM_ SG_ 934 Side_Detect_L_Illum "DDMGenSigTimeoutTime=2000";
|
||||
CM_ SG_ 934 SodLeft_D_Stat "IPCGenSigTimeoutTime=1600";
|
||||
CM_ SG_ 934 SodSnsLeft_D_Stat "IPCGenSigTimeoutTime=1600";
|
||||
CM_ SG_ 934 SodAlrtLeft_D_Stat "DDMGenSigTimeoutTime=2000";
|
||||
CM_ SG_ 1072 MetricActv_B_Actl "0 =Inactive(English), 1=Active(Metric)";
|
||||
CM_ SG_ 145 VehYaw_W_Actl "CCMGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 931 CrnkInhbt_No_Cs "Signal not transmitted on gas and HEV variants.";
|
||||
CM_ SG_ 931 CrnkInhbt_No_Cnt "Signal not transmitted on gas and HEV variants.";
|
||||
CM_ SG_ 947 Dimming_Lvl "Refer to Vehicle Interior Illum Dimming Ctrl Sys Eng Spec, Table 2";
|
||||
CM_ SG_ 947 PrkBrkActv_B_Actl "Signal not transmitted on vehicles with electric park brake. ";
|
||||
CM_ SG_ 394 HaDsply_No_Cs "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 394 HaDsply_No_Cnt "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 391 CmbbBrkDecel_A_Rq "ABSGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 391 CmbbBrkPrchg_D_Rq "ABSGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 391 CmbbBrkDecel_B_Rq "ABSGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 391 CmbbBaSens_D_Rq "ABSGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 390 AccBrkTot_A_Rq "ABSGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 390 AccBrkPrkEl_B_Rq "ABSGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 390 AccPrpl_A_Rq "PCMGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 390 AccBrkPrchg_B_Rq "ABSGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 390 AccBrkDecel_B_Rq "ABSGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 390 AccStopStat_B_Rq "ABSGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 942 PrkAidRdiusRight_L_Dsply "MSGDCR 679, set all signals to OnChange";
|
||||
CM_ SG_ 942 PrkAidRdiusLeft_L_Dsply "MSGDCR 679, set all signals to OnChange";
|
||||
CM_ SG_ 942 PrkAidDrvDir_D_Stat "MSGDCR 679, set all signals to OnChange";
|
||||
|
||||
BA_DEF_ BO_ "OvtpPushApplication" ENUM "FALSE","TRUE";
|
||||
BA_DEF_ BU_ "OvtpOperationMode" ENUM "SERVER","CLIENT";
|
||||
BA_DEF_ BU_ "OvtpEcuAddress" INT 0 1022;
|
||||
@@ -12440,255 +12693,3 @@ VAL_ 922 DcacRdy_D_Stat 7 "NotUsed_2" 6 "NotUsed_1" 5 "Faulted" 4 "ProtectionTem
|
||||
VAL_ 922 DcacPlugPrsnt_B_Stat 1 "Yes" 0 "No";
|
||||
VAL_ 922 DcacClntFlw_D_Rq 3 "High" 2 "Medium" 1 "Low" 0 "Off";
|
||||
VAL_ 922 CoolFanDcac_D_Rq 3 "High" 2 "Medium" 1 "Low" 0 "Off";
|
||||
|
||||
CM_ "New CAN FD network";
|
||||
CM_ BU_ CMR_DSMC "Driver Status Monitor Camera";
|
||||
CM_ BU_ IPMA_ADAS "Assist Driving Alert System";
|
||||
CM_ BU_ PSCM "Passenger Front Climate Control Seat Module";
|
||||
CM_ BU_ ABS_ESC "Anti-lock Brake / Traction Control Module";
|
||||
CM_ BU_ TCCM "Transfer Case Control Module, 4x4 Control Module";
|
||||
CM_ BU_ TCM_DSL "Transmission Control Module";
|
||||
CM_ BU_ PCM "Powertrain Control Module";
|
||||
CM_ BU_ ECM_Diesel "Diesel";
|
||||
CM_ BU_ GWM "Gateway Module CGEA1.3(Star Architecture)";
|
||||
CM_ BU_ TSTR "Diagnostic Tester";
|
||||
|
||||
CM_ SG_ 524 PrplWhlTotTqRqMxAwd_No_Cs "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 524 PrplWhlTotTqRqMxAwd_No_Cnt "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 1150 LocationServices_1 "Tx by HS3 APIM";
|
||||
CM_ SG_ 542 LocationServices_3 "Tx by HS3 APIM";
|
||||
CM_ SG_ 810 NtfyDrvTrgtDist_L_Rq "Object.SetTripRangeAlert_Rq This signal is meant to provide the customer settings for the target distance remote notification";
|
||||
CM_ SG_ 810 NtfyDrvSocLvl1_Pc_Rq "Object.SetCustomerLevelAlert_Rq This signal is meant to provide the customer settings for the SOC remote notification.";
|
||||
CM_ SG_ 810 PtRmtRprt_D_Stat "Object.RemoteDataReport_St";
|
||||
CM_ SG_ 550 PtWakeupActv1_B_Rq "ECG Application signal";
|
||||
CM_ SG_ 982 LatCtlPath_No_Cnt "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 982 LatCtlPath_No_Cs "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 1104 DrvEngageLevel_No_Cs "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 1104 DrvEngageLevel_No_Cnt "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 1085 ULoRgenTestMde_B_Stat "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 1085 PwSrcULoComm_B_Falt "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 1445 SOBDMC_AutoSarNMReserved4 "Signal not transmitted on gas and diesel variants.";
|
||||
CM_ SG_ 1445 SOBDMC_AutoSarNMReserved3 "Signal not transmitted on gas and diesel variants.";
|
||||
CM_ SG_ 1445 SOBDMC_AutoSarNMReserved2 "Signal not transmitted on gas and diesel variants.";
|
||||
CM_ SG_ 1445 SOBDMC_AutoSarNMReserved1 "Signal not transmitted on gas and diesel variants.";
|
||||
CM_ SG_ 1445 SOBDMC_AutoSarNMNodeId "Signal not transmitted on gas and diesel variants.";
|
||||
CM_ SG_ 1445 SOBDMC_AutoSarNMControl "Signal not transmitted on gas and diesel variants.";
|
||||
CM_ SG_ 1088 HvacPrecondMode2_D_Rq "Signal not transmitted on vehicles that do not have the Fuel operated heater feature.";
|
||||
CM_ SG_ 1088 HvacPrecondBlwr2_D_Rq "Signal not transmitted on vehicles that do not have the Fuel operated heater feature.";
|
||||
CM_ SG_ 786 ChrgStat_D_Dsply "Signal not transmitted by PCM_HEV";
|
||||
CM_ SG_ 66 immoControlData_T2 "Not transmitted on all vehicle variants";
|
||||
CM_ SG_ 66 immoControlCmd_T2 "Not transmitted on all vehicle variants";
|
||||
CM_ SG_ 549 BeltminderAudioMute "Object.MyKey.BeltMinderAudioMute.St";
|
||||
CM_ SG_ 549 Power_Up_Chime_Modules "Object.AlertMethod.IPC _Infotainment";
|
||||
CM_ SG_ 549 Chime_Source "Object.AlertMethod.IPC_infotainment";
|
||||
CM_ SG_ 611 AwdStat_D_RqDsply "Signal not transmitted on programs that do not have AWD.";
|
||||
CM_ SG_ 611 AwdSrvcRqd_B_Rq "Signal not transmitted on programs that do not have AWD.";
|
||||
CM_ SG_ 611 AwdLck_Tq_Rq "Signal not transmitted on programs that do not have AWD.";
|
||||
CM_ SG_ 130 VehVTrlrAid_B_Rq "VR session start- req. limit blower speed no more than X volts. CC restriction on time msg. will be honored.Double Event msg1st event to request limit, 2nd event to release limit, No msg. CC Grammar v7.xls";
|
||||
CM_ SG_ 130 SteMdule_U_Meas "DCR 1745 to update Tx from GWM to EP100ms. SteMdule_I_Est & SteMdule_U_Meas are used by BMS system & filtered. The filter uses standard periodic rate & changing to EP would adversely affect the filter.(jweinfur)";
|
||||
CM_ SG_ 130 SteMdule_I_Est "DCR 1745 to update Tx from GWM to EP100ms. SteMdule_I_Est & SteMdule_U_Meas are used by BMS system & filtered. The filter uses standard periodic rate & changing to EP would adversely affect the filter.(jweinfur)";
|
||||
CM_ SG_ 126 StePinRelInit_An_Sns "SASM will transmit these signals on vehicles with SASM and without PSCM. SCCM will not Tx this signal when SASM is present.";
|
||||
CM_ SG_ 126 StePinAn_No_Cs "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 1200 BrkTot_Tq_RqDrv "DCR 1836 to update Tx from GWM to EP100ms rejected due MPS6 TCM requires BrkTot_Tq_RqDrv at 20ms (bshu1).";
|
||||
CM_ SG_ 1046 TCMode "Signal data set to 0x0 for ABS only vehicle option content";
|
||||
CM_ SG_ 1046 DrvAntiLckLamp_D_Rq "update value table v8.34, not align w/GSDB, need etracker. ABS & IPC implemented as updated.";
|
||||
CM_ SG_ 1046 BpedMove_D_Actl "CCMGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 1044 StePinOffst_An_Est "SASM will transmit these signals on vehicles with SASM and without PSCM. SCCM will not Tx this signal when SASM is present.";
|
||||
CM_ SG_ 1044 StePinOffst_No_Cs "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 534 BrkObdData_No_Actl "Signal not transmitted on gas, diesel and HEV. Only supported on PHEV.";
|
||||
CM_ SG_ 534 BrkObdIndex_No_Actl "Signal not transmitted on gas, diesel and HEV. Only supported on PHEV.";
|
||||
CM_ SG_ 534 WhlRotatRr_No_Cnt "DCR 1833 to update Tx from GWM to EP100ms. Wheel Count signals are used by complex algorithm to determine Tire Pressure by Location & can't change from 20msec. (jweinfur)";
|
||||
CM_ SG_ 534 WhlRotatRl_No_Cnt "DCR 1833 to update Tx from GWM to EP100ms. Wheel Count signals are used by complex algorithm to determine Tire Pressure by Location & can't change from 20msec. (jweinfur)";
|
||||
CM_ SG_ 534 WhlRotatFr_No_Cnt "DCR 1833 to update Tx from GWM to EP100ms. Wheel Count signals are used by complex algorithm to determine Tire Pressure by Location & can't change from 20msec. (jweinfur)";
|
||||
CM_ SG_ 534 WhlRotatFl_No_Cnt "DCR 1833 to update Tx from GWM to EP100ms. Wheel Count signals are used by complex algorithm to determine Tire Pressure by Location & can't change from 20msec. (jweinfur)";
|
||||
CM_ SG_ 531 VehLongOvrGnd_A_Est "CCMGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 1034 VehicleGGCCData "RCMGenSigTimeout=6000";
|
||||
CM_ SG_ 1090 Mtr2State_D_ActlMntr "Signal Not transmitted on PCM_HEV variant";
|
||||
CM_ SG_ 1090 Inv1Ain_I_ActlMntr "Signal Not transmitted on PCM_HEV variant";
|
||||
CM_ SG_ 1090 VehElRnge_L_Dsply "Signal Not transmitted on HPCM variant";
|
||||
CM_ SG_ 374 TrnRng_D_Rq "Powersplit HEVs with HF45, HPCM will Tx this message. For all other programs it will be Tx by PCM or TCM. ";
|
||||
CM_ SG_ 374 TrnPrkSys_D_Actl "Powersplit HEVs with HF45, HPCM will Tx this message. For all other programs it will be Tx by PCM or TCM. ";
|
||||
CM_ SG_ 374 GearLvr_D_ActlDrv "Powersplit HEVs with HF45, HPCM will Tx this message. For all other programs it will be Tx by PCM or TCM. ";
|
||||
CM_ SG_ 374 GearPos_No_Cs "Powersplit HEVs with HF45, HPCM will Tx this message. For all other programs it will be Tx by PCM or TCM. ";
|
||||
CM_ SG_ 374 GearPos_D_Trg "Powersplit HEVs with HF45, HPCM will Tx this message. For all other programs it will be Tx by PCM or TCM. ";
|
||||
CM_ SG_ 374 GearPos_No_Cnt "Powersplit HEVs with HF45, HPCM will Tx this message. For all other programs it will be Tx by PCM or TCM. ";
|
||||
CM_ SG_ 374 GearPos_D_Actl "Powersplit HEVs with HF45, HPCM will Tx this message. For all other programs it will be Tx by PCM or TCM. ";
|
||||
CM_ SG_ 603 WhlDirAvgDrv_D_Actl "48V mHEV: ECM_HEVDSL is Tx, MHT HEV: PCM_HEV is Tx, Powersplit HEV: SOBDMC_HPCM is Tx";
|
||||
CM_ SG_ 603 PrplTqMnRgen_B_Actl "48V mHEV: ECM_HEVDSL is Tx, MHT HEV: PCM_HEV is Tx, Powersplit HEV: SOBDMC_HPCM is Tx";
|
||||
CM_ SG_ 603 BattTracCnnct_D_Rq "48V mHEV: ECM_HEVDSL is Tx, MHT HEV: PCM_HEV is Tx, Powersplit HEV: SOBDMC_HPCM is Tx";
|
||||
CM_ SG_ 872 HybMdeStat_D_Dsply "Signal not transmitted by HPCM";
|
||||
CM_ SG_ 560 SelDrvMdeSwtch_D_Stat3 "ECM_HEV, PCM & PCM_HEV do not support or Transmit signal.";
|
||||
CM_ SG_ 560 TrnSrvcRqd_B_Rq "Signal not transmitted on Diesel & HEV variants. MHT(U611/625) HPCM Rx 0x230 from PCM_HEV. Powersplit FWD HEVs(Cx482/3 430) HPCM Tx 0x230.";
|
||||
CM_ SG_ 560 TrnShifActv_B_Actl "Signal not transmitted on HEV variants. MHT(U611/625) HPCM Rx 0x230 from PCM_HEV. Powersplit FWD HEVs(Cx482/3 430) HPCM Tx 0x230.";
|
||||
CM_ SG_ 560 GboxOil_Te_Actl "Signal not transmitted on HEV variants. MHT(U611/625) HPCM Rx 0x230 from PCM_HEV. Powersplit FWD HEVs(Cx482/3 430) HPCM Tx 0x230.";
|
||||
CM_ SG_ 369 SeatWorkSrfc_B_Falt "Signal Not transmitted by TCM_DSL";
|
||||
CM_ SG_ 369 TrnIpcDsplyRng2_D_Actl "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 369 TrnIpcDsplyRng_D_Stat "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 92 TrnLvrV_D_Rq "Signal not transmitted on vehicles with PCM_HEV";
|
||||
CM_ SG_ 92 TrnSbwSysHlth_D_Actl "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 92 TrnGearNtmAllow_B_Stat "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 92 TrnDtpCmd_D_Actl "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 92 TrnGearCmd_No_Cs "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 92 TrnValidGear_D_Cnfm "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 92 TrnNtrlTowCmd_D_Actl "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 92 TrnGearCmd_Pc_ActlPt "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 92 TrnGear_D_RqPt "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 92 TrnCmdState_B_Actl "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 92 TrnCmdCnt_B_Actl "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 92 PrkBrkActv_D_RqTrnGear "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 92 TrnGearMsgTxt_D_Rq "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 92 TrnGearCmd_No_Cnt "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 1087 BattRgenLoChrg_D_RqEng "Signal not transmitted on diesel variant";
|
||||
CM_ SG_ 1087 BattRgenLoDChrg_D_RqEng "Signal not transmitted on diesel variant";
|
||||
CM_ SG_ 1087 FapLcInhbt_B_Rq "Signal not transmitted on diesel variant";
|
||||
CM_ SG_ 1100 EngExhMdeQuiet_D2_Stat "Signal not transmitted on HEV & Diesel programs";
|
||||
CM_ SG_ 1100 HvacCmprLim_D_Stat "Signal not transmitted on Diesel variants";
|
||||
CM_ SG_ 1100 WakeAlarm1_T_Rq "Signal not transmitted on Gas variants";
|
||||
CM_ SG_ 1100 WakeAlarm1_B_Typ "Signal not transmitted on Gas variants";
|
||||
CM_ SG_ 1100 Veh_V_DsplyTrailCtlSet "Signal not transmitted on HEV & Diesel programs";
|
||||
CM_ SG_ 1100 TrailCtlPt_B_Falt "Signal not transmitted on HEV & Diesel programs";
|
||||
CM_ SG_ 1100 AutoTowAllw_D_StatMnu "Signal not transmitted on Gas & Diesel variants";
|
||||
CM_ SG_ 1100 AutoTowActv_B_Stat "Signal not transmitted on Gas & Diesel variants";
|
||||
CM_ SG_ 1086 EngMnfld_P_Actl "Signal not transmitted on HEV & Diesel programs";
|
||||
CM_ SG_ 1086 ElLoadCtl_D_Rq "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 1071 CluPdl_PcRate_Actl "Signal not transmitted on HEV and Gas variants.";
|
||||
CM_ SG_ 1071 CluPdlPosPcMeas_D_Qf "Signal not transmitted on HEV and Gas variants.";
|
||||
CM_ SG_ 1071 CluPdlPos_Pc_Meas "Signal not transmitted on HEV and Gas variants.";
|
||||
CM_ SG_ 1071 EngAoutIdl_N_Ntrl "Signal not transmitted on HEV variants and diesel.";
|
||||
CM_ SG_ 1069 SlMde_D_Stat "IPC and HUD_ADV Receve from HS3 FGW 0x42D, not HS3 0x38A, MSG DCR 506. Signal not transmitted on Gas & HEV variants";
|
||||
CM_ SG_ 1069 SlMde_D_RqDsply "IPC and HUD_ADV Receve from HS3 FGW 0x42D, not HS3 0x38A, MSG DCR 506. Signal not transmitted on Gas & HEV variants";
|
||||
CM_ SG_ 1069 IsaOffst_D_Stat "Signal not transmitted on Gas & HEV variants";
|
||||
CM_ SG_ 1069 ObdWarmUp_B_Complt "Signal not transmitted on diesel variants.";
|
||||
CM_ SG_ 1069 EngMsgTxt_D_Rq "Signal not transmitted on diesel variants.";
|
||||
CM_ SG_ 1069 EngClnt_Te_ActlDiag "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 1069 EngLoad_Pc_CalcDiag "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 1069 ApedPos_Pc_ActlDiag "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 1060 RearDiffOilTeWarn_B_Rq "Signal not transmitted on HEV & Diesel programs";
|
||||
CM_ SG_ 1060 RearDiffOil_Te_Actl "Signal not transmitted on HEV & Diesel programs";
|
||||
CM_ SG_ 1057 FohEng_D_Rq "Signal not transmitted on vehicles that do not have the fuel operated heater feature. Signal not transmitted on HEV programs";
|
||||
CM_ SG_ 1057 EngIdlShutDown_D_Stat "Signal not transmitted on diesel variants.";
|
||||
CM_ SG_ 1057 FUEL_ALCOHOL_PERCNT "signal not transmitted on diesel and HEV variants.";
|
||||
CM_ SG_ 1057 TrnTotTq_Rt_Est "Signal not transmitted on gas and HEV variants.";
|
||||
CM_ SG_ 1057 TrnTotLss_Tq_Est "Signal not transmitted on gas and HEV variants.";
|
||||
CM_ SG_ 1057 VehVLimStat_D_Actl "Signal not transmitted on gas and HEV variants.";
|
||||
CM_ SG_ 1057 VehVLimActv_B_Actl "Signal not transmitted on gas and HEV variants.";
|
||||
CM_ SG_ 562 GearNtrl_No_Cs "Powersplit HEVs with HF45, HPCM will Tx this message. For all other programs it will be Tx by PCM or TCM. ";
|
||||
CM_ SG_ 562 GearNtrl_No_Cnt "Powersplit HEVs with HF45, HPCM will Tx this message. For all other programs it will be Tx by PCM or TCM. ";
|
||||
CM_ SG_ 516 EngAoutNActl_D_QF "Signal not transmitted on Gas & HEV variants";
|
||||
CM_ SG_ 516 EngAout3_N_Actl "Signal not transmitted on gas and diesel variants.";
|
||||
CM_ SG_ 516 ApedPos_Pc_ActlArb "ABSGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 516 ApedPosPcActl_No_Cnt "Signal not transmitted on gas and diesel variants.";
|
||||
CM_ SG_ 516 ApedPosPcActl_No_Cs "Signal not transmitted on gas and diesel variants.";
|
||||
CM_ SG_ 514 VehVTrlrAid_B_Avail "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 514 GearRvrse_D_Actl "Do not implement GearRvrse_D_Actl until eTracker 8804151 is approved, 11/24/09";
|
||||
CM_ SG_ 512 PrplWhlTotTqRq_No_Cs "Signal not transmitted on gas & Diesel variants.";
|
||||
CM_ SG_ 512 PrplWhlTotTqRq_No_Cnt "Signal not transmitted on gas & Diesel variants.";
|
||||
CM_ SG_ 512 PtDrvMde_D_Stat "Signal not transmitted on Gas & HEV variants.";
|
||||
CM_ SG_ 380 EngExhBrkOnLamp_B_Rq "Signal not transmitted on Gas variants";
|
||||
CM_ SG_ 380 EngExhBrkAutoLamp_B_Rq "Signal not transmitted on Gas variants";
|
||||
CM_ SG_ 380 EngAout_N_MxAllw "Signal not transmitted on Gas variants";
|
||||
CM_ SG_ 380 EngExhBrkMde_D_Actl "Signal not transmitted on Gas variants";
|
||||
CM_ SG_ 377 HvacAirFullOut_B_Rq "Signal not transmitted on diesel variant";
|
||||
CM_ SG_ 377 FuelFlw_Vl_Dsply "Signal not transmitted on diesel variants.";
|
||||
CM_ SG_ 377 FuelFillInlet_B_Dsply "Signal not transmitted on diesel variants.";
|
||||
CM_ SG_ 377 OdoCount "Signal not transmitted on diesel variants.";
|
||||
CM_ SG_ 377 EngOilLife_Pc_Actl "Signal not transmitted on diesel variants.";
|
||||
CM_ SG_ 377 FuelFilterLamp_B_Dsply "Signal not transmitted on Gas & HEV variants";
|
||||
CM_ SG_ 377 AirCondRec_B_Rq "Signal not transmitted on diesel variants.";
|
||||
CM_ SG_ 377 AirCondClutch_B_Stats "Signal not transmitted on diesel variants.";
|
||||
CM_ SG_ 376 GasPrtc_D_RqDsply "Signal not transmitted on HEV & Diesel variants.";
|
||||
CM_ SG_ 376 EngAout_Aa_Actl "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 376 AslIconDsply_D_Rq "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 376 AslChime_B_Rq "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 376 HvacHtrCore2_Te_Actl "Signal not transmitted on Gas & Diesel variants";
|
||||
CM_ SG_ 376 EcssLamp_D_RqDsply "Signal not transmitted on Gas & HEV variants";
|
||||
CM_ SG_ 376 AirAmb_Te_Actl "Signal not transmitted on Gas variants";
|
||||
CM_ SG_ 359 PrplWhlRgenMn_Tq_Actl "Signal not transmitted on Gas & Diesel variants";
|
||||
CM_ SG_ 359 ElPw_D_StatStrtStop "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 359 TrnAin_Tq_Actl "Signal not transmitted on HEV variances.";
|
||||
CM_ SG_ 359 PlgActvArb_B_Actl "Only supported on PHEV programs. PlgActvArb_B_Actl HPCM will Tx on Powersplit PHEVs, On MHT PHEVs the PCM_HEV will Tx and HPCM will Rx.";
|
||||
CM_ SG_ 359 TrnAinTq_D_Qf "Signal not transmitted on HEV variances.";
|
||||
CM_ SG_ 358 StopStrtStdby_D_Indic "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 358 StopStrtIODTxt_D_Rq "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 358 StopStrtDrvMde_D_Indic "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 358 StopStrtMsgTxt_D_Rq "Signal not transmitted on HEV variants.";
|
||||
CM_ SG_ 358 HiElPwInhbt_B_Stat "Signal not transmitted on HEV programs";
|
||||
CM_ SG_ 358 AutoStopPtDelta_I_Est "Signal not transmitted on HEV variants. ";
|
||||
CM_ SG_ 357 BpedDrvAppl_D_Actl "CCMGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 357 CcStat_D_Actl "ABSGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 357 EngAout_N_MnAllw "Signal not transmitted on Gas & Diesel variants.";
|
||||
CM_ SG_ 357 AccStopMde_D_Rq "ABSGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 342 EngOvrhtMitgActv_D_Ind "Signal not transmitted on diesel.";
|
||||
CM_ SG_ 342 EngGoutLss_Tq_Est "Signal not transmitted on gas and diesel variants.";
|
||||
CM_ SG_ 342 EngOil_Te_Actl "Signal not transmitted on Gas & HEV variants. ";
|
||||
CM_ SG_ 954 GenericSwtch2_No_Actl "U625 Police Wig Wag feature";
|
||||
CM_ SG_ 935 SodRight_D_Stat "IPCGenSigTimeoutTime=1600";
|
||||
CM_ SG_ 935 Side_Detect_R_Illum "DDMGenSigTimeoutTime=2000";
|
||||
CM_ SG_ 935 SodSnsRight_D_Stat "IPCGenSigTimeoutTime=1600";
|
||||
CM_ SG_ 935 SodAlrtRight_D_Stat "DDMGenSigTimeoutTime=2000";
|
||||
CM_ SG_ 1112 BattTracClntPmp_D_Stat "48V mHEV: ECM_HEVDSL is Tx, MHT HEV: PCM_HEV is Tx, Powersplit HEV: SOBDMC_HPCM is Tx";
|
||||
CM_ SG_ 1050 Outside_Air_Temp_Stat "Filtered value, i.e. same as disply for customer";
|
||||
CM_ SG_ 1009 CenterStackRing_D_Actl "The Center Stack sends the CPLR a signal to turn On or Off the light Ring, This is a customer selectable preference switch";
|
||||
CM_ SG_ 1009 APIM_NumberofTracks_St "Object NumberofTracks";
|
||||
CM_ SG_ 1009 APIM_ActiveTrackNum_St "Object.ActiveTrackNum";
|
||||
CM_ SG_ 360 GsmSrvcRqd_B_Rq "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 360 TrnGearPwmFalt_B_Actl "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 360 GearButtnStuck_B_Actl "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGsmNtmState_D_Actl "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 DrQltyDrv_D_StatGsm "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnBtsiOvrrd_B_Stat "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnValidGearRq_D_Stat "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearRqCnt_B_Actl "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_U_Actl "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlR2 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlR1 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlR0 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlP2 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlP1 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlP0 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlN2 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlN1 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlN0 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlM2 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlM1 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlM0 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlD2 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlD1 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGearButtn_B_ActlD0 "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGear_No_Cs "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGear_No_Cnt "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 TrnGear_D_RqDrv "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 90 BrkSwtchPos_B_ActlGsm "Signal not transmitted on vehicles that do not have shift by wire.";
|
||||
CM_ SG_ 138 SteWhlRelCalib_An_Sns "Signal is not transmitted on vehicles where PSCM is transmitting the message that contains this signal. Signal data set to 0x0 for ABS only vehicle option content";
|
||||
CM_ SG_ 1093 StopLamp_B_RqTrlrBrk "Signal not transmitted on all variants.";
|
||||
CM_ SG_ 792 ElTrip_L_Dsply "Key cycle trip distance driven with the engine off (Trip EV Miles)";
|
||||
CM_ SG_ 792 ElLongTerm_L_Dsply "Long term distance distance driven with the engine off since the last long term reset (Long Term EV Miles).";
|
||||
CM_ SG_ 765 Mc_VehTimeFrmtUsrSel_St "Object.BodyInterface.Settings.VehicleTimeFormatUserSelection";
|
||||
CM_ SG_ 765 Mc_VehUntTrpCoUsrSel_St "Object.VehicleSettings.Disp_Miles_Kilometers.Rq";
|
||||
CM_ SG_ 765 Mc_VehUnitTempUsrSel_St "Object.VehicleSettings.Disp_Temperature.Rq";
|
||||
CM_ SG_ 765 Mc_VehLangUsrSel_St "Object.BodyInterface.Settings.VehicleLanguageUserSelection Object Vehicle Settings.Disp_LangSel";
|
||||
CM_ SG_ 934 Side_Detect_L_Illum "DDMGenSigTimeoutTime=2000";
|
||||
CM_ SG_ 934 SodLeft_D_Stat "IPCGenSigTimeoutTime=1600";
|
||||
CM_ SG_ 934 SodSnsLeft_D_Stat "IPCGenSigTimeoutTime=1600";
|
||||
CM_ SG_ 934 SodAlrtLeft_D_Stat "DDMGenSigTimeoutTime=2000";
|
||||
CM_ SG_ 1072 MetricActv_B_Actl "0 =Inactive(English), 1=Active(Metric)";
|
||||
CM_ SG_ 145 VehYaw_W_Actl "CCMGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 931 CrnkInhbt_No_Cs "Signal not transmitted on gas and HEV variants.";
|
||||
CM_ SG_ 931 CrnkInhbt_No_Cnt "Signal not transmitted on gas and HEV variants.";
|
||||
CM_ SG_ 947 Dimming_Lvl "Refer to Vehicle Interior Illum Dimming Ctrl Sys Eng Spec, Table 2";
|
||||
CM_ SG_ 947 PrkBrkActv_B_Actl "Signal not transmitted on vehicles with electric park brake. ";
|
||||
CM_ SG_ 394 HaDsply_No_Cs "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 394 HaDsply_No_Cnt "Signal not transmitted on gas variants.";
|
||||
CM_ SG_ 391 CmbbBrkDecel_A_Rq "ABSGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 391 CmbbBrkPrchg_D_Rq "ABSGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 391 CmbbBrkDecel_B_Rq "ABSGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 391 CmbbBaSens_D_Rq "ABSGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 390 AccBrkTot_A_Rq "ABSGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 390 AccBrkPrkEl_B_Rq "ABSGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 390 AccPrpl_A_Rq "PCMGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 390 AccBrkPrchg_B_Rq "ABSGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 390 AccBrkDecel_B_Rq "ABSGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 390 AccStopStat_B_Rq "ABSGenSigTimeoutTime=1000";
|
||||
CM_ SG_ 942 PrkAidRdiusRight_L_Dsply "MSGDCR 679, set all signals to OnChange";
|
||||
CM_ SG_ 942 PrkAidRdiusLeft_L_Dsply "MSGDCR 679, set all signals to OnChange";
|
||||
CM_ SG_ 942 PrkAidDrvDir_D_Stat "MSGDCR 679, set all signals to OnChange";
|
||||
|
||||
@@ -91,7 +91,7 @@ BO_ 201 ECMEngineStatus: 8 K20_ECM
|
||||
SG_ EngineTPS : 39|8@0+ (0.392156863,0) [0|100.000000065] "%" NEO
|
||||
SG_ EngineRPM : 15|16@0+ (0.25,0) [0|0] "RPM" NEO
|
||||
SG_ CruiseMainOn : 29|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ Brake_Pressed : 40|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ BrakePressed : 40|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ Standstill : 2|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ CruiseActive : 31|2@0+ (1,0) [0|3] "" NEO
|
||||
|
||||
@@ -104,6 +104,7 @@ BO_ 209 EBCMBrakePedalSensors: 7 K17_EBCM
|
||||
SG_ BrakeNormalized2 : 47|8@0- (-1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 241 EBCMBrakePedalPosition: 6 K17_EBCM
|
||||
SG_ BrakePressed : 1|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BrakePedalPosition : 15|8@0+ (1,0) [0|255] "" NEO
|
||||
|
||||
BO_ 298 BCMDoorBeltStatus: 8 K9_BCM
|
||||
@@ -143,6 +144,8 @@ BO_ 388 PSCMStatus: 8 K43_PSCM
|
||||
SG_ LKADriverAppldTrq : 50|11@0- (0.01,0) [-10.24|10.23] "Nm" NEO
|
||||
SG_ LKATorqueDelivered : 18|11@0- (0.01,0) [0|1] "" NEO
|
||||
SG_ LKATotalTorqueDelivered : 2|11@0- (0.01,0) [-10.24|10.23] "Nm" NEO
|
||||
SG_ RollingCounter : 38|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ PSCMStatusChecksum : 33|10@0+ (1,0) [0|1023] "" XXX
|
||||
|
||||
BO_ 417 AcceleratorPedal: 7 XXX
|
||||
SG_ AcceleratorPedal : 55|8@0+ (1,0) [0|0] "" NEO
|
||||
@@ -184,6 +187,9 @@ BO_ 501 ECMPRDNL2: 8 K20_ECM
|
||||
SG_ PRNDL2 : 27|4@0+ (1,0) [0|255] "" NEO
|
||||
SG_ ManualMode : 41|1@0+ (1,0) [0|1] "" NEO
|
||||
|
||||
BO_ 532 BRAKE_RELATED: 6 XXX
|
||||
SG_ UserBrakePressure : 0|9@0+ (1,0) [0|511] "" XXX
|
||||
|
||||
BO_ 560 EPBStatus: 8 EPB
|
||||
SG_ EPBClosed : 12|1@0+ (1,0) [0|1] "" NEO
|
||||
|
||||
@@ -204,6 +210,9 @@ BO_ 715 ASCMGasRegenCmd: 8 K124_ASCM
|
||||
|
||||
BO_ 717 ASCM_2CD: 5 K124_ASCM
|
||||
|
||||
BO_ 761 BRAKE_RELATED_2: 7 XXX
|
||||
SG_ UserBrakePressure2 : 47|9@0+ (1,0) [0|511] "" XXX
|
||||
|
||||
BO_ 789 EBCMFrictionBrakeCmd: 5 K124_ASCM
|
||||
SG_ RollingCounter : 33|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ FrictionBrakeMode : 7|4@0+ (1,0) [0|0] "" NEO
|
||||
@@ -221,13 +230,17 @@ BO_ 810 TCICOnStarGPSPosition: 8 K73_TCIC
|
||||
SG_ GPSLongitude : 39|32@0+ (1,-2147483648) [0|0] "milliarcsecond" NEO
|
||||
SG_ GPSLatitude : 7|32@0+ (1,0) [0|0] "milliarcsecond" NEO
|
||||
|
||||
BO_ 840 EBCMWheelSpdFront: 4 K17_EBCM
|
||||
BO_ 840 EBCMWheelSpdFront: 5 K17_EBCM
|
||||
SG_ FLWheelSpd : 7|16@0+ (0.0311,0) [0|255] "km/h" NEO
|
||||
SG_ FRWheelSpd : 23|16@0+ (0.0311,0) [0|255] "km/h" NEO
|
||||
|
||||
BO_ 842 EBCMWheelSpdRear: 5 K17_EBCM
|
||||
SG_ RLWheelSpd : 7|16@0+ (0.0311,0) [0|255] "km/h" NEO
|
||||
SG_ RRWheelSpd : 23|16@0+ (0.0311,0) [0|255] "km/h" NEO
|
||||
SG_ MovingForward : 32|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ MovingBackward : 33|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ MovingForward2 : 35|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ MovingBackward2 : 36|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 869 ASCM_365: 4 K124_ASCM
|
||||
|
||||
@@ -241,6 +254,10 @@ BO_ 880 ASCMActiveCruiseControlStatus: 6 K124_ASCM
|
||||
SG_ ACCCmdActive : 23|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ FCWAlert : 41|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 977 ECMCruiseControl: 8 K20_ECM
|
||||
SG_ CruiseActive : 39|1@0+ (1,0) [0|3] "" NEO
|
||||
SG_ CruiseSetSpeed : 19|12@0+ (0.0625,0) [0|0] "km/h" NEO
|
||||
|
||||
BO_ 1001 ECMVehicleSpeed: 8 K20_ECM
|
||||
SG_ VehicleSpeed : 7|16@0+ (0.01,0) [0|0] "mph" NEO
|
||||
SG_ VehicleSpeedLeft : 39|16@0+ (0.01,0) [0|0] "mph" NEO
|
||||
@@ -283,11 +300,14 @@ CM_ BU_ K114B_HPCM "Hybrid Powertrain Control Module";
|
||||
CM_ BU_ NEO "Comma NEO";
|
||||
CM_ BU_ K124_ASCM "Active Safety Control Module";
|
||||
CM_ SG_ 381 MSG17D_AccPower "Need to investigate";
|
||||
CM_ BO_ 190 "Length varies from 6 to 8 bytes by car";
|
||||
CM_ SG_ 190 GasPedalAndAcc "ACC baseline is 62";
|
||||
CM_ SG_ 352 Ignition "Non-zero when ignition is on";
|
||||
CM_ SG_ 451 GasPedalAndAcc2 "ACC baseline is 62";
|
||||
CM_ SG_ 497 Ignition "Describes ignition + preconditioning mode, noisy";
|
||||
CM_ SG_ 501 PRNDL2 "When ManualMode is Active, Value is 13=L1 12=L2 11=L3 ... 4=L10";
|
||||
CM_ SG_ 532 UserBrakePressure "can be lower than other brake position signals when the brakes are pre-filled from ACC braking and the user presses on the brakes. user-only pressure?";
|
||||
CM_ SG_ 761 UserBrakePressure2 "Similar to BRAKE_RELATED->UserBrakePressure";
|
||||
CM_ SG_ 1001 VehicleSpeed "Spinouts show here on 2wd. Speed derived from right front wheel (drive tire)";
|
||||
BA_DEF_ "UseGMParameterIDs" INT 0 0;
|
||||
BA_DEF_ "ProtocolType" STRING ;
|
||||
|
||||
@@ -448,6 +448,7 @@ BO_ 432 STANDSTILL: 7 VSA
|
||||
BO_ 456 ACC_CONTROL: 8 XXX
|
||||
SG_ ACCEL_COMMAND : 7|12@0- (0.01,0) [0|0] "m/s^2" XXX
|
||||
SG_ CONTROL_OFF : 8|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ STANDSTILL : 9|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CONTROL_ON : 10|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BOH : 23|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ AEB_STATUS : 33|1@1+ (1,0) [0|7] "" XXX
|
||||
@@ -495,9 +496,8 @@ BO_ 254913108 LKAS_HUD_2: 8 ADAS
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" XXX
|
||||
|
||||
CM_ BO 456 "not sure which bit enables cruise";
|
||||
CM_ SG_ 456 ACCEL_COMMAND "seems to be m/s^2? need to verify";
|
||||
CM_ SG_ 456 BOH "could be cruise standstill?";
|
||||
CM_ BO_ 456 "not sure which bit enables cruise";
|
||||
CM_ SG_ 456 STANDSTILL "set to 1 when camera requests -4.0 m/s^2";
|
||||
|
||||
VAL_ 401 GEAR_SHIFTER 32 "L" 16 "S" 8 "D" 4 "N" 2 "R" 1 "P";
|
||||
VAL_ 401 GEAR 7 "L" 10 "S" 4 "D" 3 "N" 2 "R" 1 "P";
|
||||
|
||||
+259
-45
@@ -33,7 +33,7 @@ NS_ :
|
||||
|
||||
BS_:
|
||||
|
||||
BU_: XXX CAMERA
|
||||
BU_: XXX CAMERA FRONT_RADAR ADRV
|
||||
|
||||
|
||||
BO_ 53 ACCELERATOR: 32 XXX
|
||||
@@ -42,6 +42,11 @@ BO_ 53 ACCELERATOR: 32 XXX
|
||||
SG_ GEAR : 192|3@1+ (1,0) [0|7] "" XXX
|
||||
SG_ ACCELERATOR_PEDAL : 40|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 64 GEAR_ALT: 32 XXX
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ GEAR : 32|3@1+ (1,0) [0|7] "" XXX
|
||||
|
||||
BO_ 69 GEAR: 24 XXX
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
@@ -62,15 +67,23 @@ BO_ 80 LKAS: 16 XXX
|
||||
SG_ NEW_SIGNAL_2 : 70|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_1 : 80|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ NEW_SIGNAL_3 : 111|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ FCA_SYSWARN : 40|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 81 ADRV_0x51: 32 ADRV
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
|
||||
BO_ 96 ESP_STATUS: 32 XXX
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ ESP_DISABLED : 42|3@1+ (1,0) [0|63] "" XXX
|
||||
SG_ BRAKE_PRESSURE : 128|10@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ BRAKE_PRESSED : 148|1@1+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 101 BRAKE: 32 XXX
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ BRAKE_POSITION : 40|16@1- (1,0) [0|65535] "" XXX
|
||||
SG_ BRAKE_PRESSED : 57|1@1+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 160 WHEEL_SPEEDS: 24 XXX
|
||||
@@ -85,11 +98,18 @@ BO_ 234 MDPS: 24 XXX
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ LKA_ACTIVE : 48|1@0+ (1,0) [0|16777215] "" XXX
|
||||
SG_ LKA_FAULT : 54|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ STEERING_OUT_TORQUE : 64|12@1+ (0.1,-204.8) [0|65535] "" XXX
|
||||
SG_ STEERING_COL_TORQUE : 80|13@1+ (1,-4095) [0|4095] "" XXX
|
||||
SG_ STEERING_ANGLE : 96|16@1- (-0.1,0) [0|255] "deg" XXX
|
||||
SG_ STEERING_ANGLE_2 : 128|16@1- (-0.1,0) [0|65535] "deg" XXX
|
||||
|
||||
BO_ 256 ACCELERATOR_BRAKE_ALT: 32 XXX
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ BRAKE_PRESSED : 32|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ACCELERATOR_PEDAL_PRESSED : 176|1@1+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 261 ACCELERATOR_ALT: 32 XXX
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
@@ -98,10 +118,10 @@ BO_ 261 ACCELERATOR_ALT: 32 XXX
|
||||
BO_ 293 STEERING_SENSORS: 16 XXX
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ STEERING_RATE : 40|8@1- (-0.1,0) [0|255] "deg/s" XXX
|
||||
SG_ STEERING_RATE : 40|8@1+ (4,0) [0|1016] "deg/s" XXX
|
||||
SG_ STEERING_ANGLE : 24|16@1- (-0.1,0) [0|255] "deg" XXX
|
||||
|
||||
BO_ 298 LFA: 16 XXX
|
||||
BO_ 298 LFA: 16 ADRV
|
||||
SG_ STEER_REQ : 52|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ TORQUE_REQUEST : 41|11@1+ (1,-1024) [0|4095] "" XXX
|
||||
SG_ LKA_ICON : 38|2@1+ (1,0) [0|255] "" XXX
|
||||
@@ -124,15 +144,33 @@ BO_ 304 GEAR_SHIFTER: 16 XXX
|
||||
SG_ GEAR : 64|3@1+ (1,0) [0|7] "" XXX
|
||||
SG_ KNOB_POSITION : 40|3@1+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 373 SCC1: 24 XXX
|
||||
BO_ 373 TCS: 24 XXX
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ ACCEL_REQ : 48|13@1- (1,0) [0|1023] "" XXX
|
||||
SG_ CRUISE_ACTIVE : 68|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ NEW_SIGNAL_1 : 80|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ NEW_SIGNAL_2 : 74|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ NEW_SIGNAL_3 : 76|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ NEW_SIGNAL_4 : 24|7@1+ (1,0) [0|127] "" XXX
|
||||
SG_ aBasis : 32|11@1+ (0.01,-10.23) [0|7] "m/s^2" XXX
|
||||
SG_ NEW_SIGNAL_5 : 72|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ NEW_SIGNAL_6 : 128|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ NEW_SIGNAL_7 : 135|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ PROBABLY_EQUIP : 136|2@1+ (1,0) [0|3] "" XXX
|
||||
SG_ AEB_EQUIP_MAYBE : 96|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ EQUIP_MAYBE : 64|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DriverBraking : 81|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DriverBrakingLowSens : 84|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ACC_REQ : 68|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ ACCEL_REF_ACC : 48|11@1- (1,0) [0|1023] "" XXX
|
||||
|
||||
BO_ 352 CAM_0x160: 16 CAMERA
|
||||
BO_ 352 ADRV_0x160: 16 ADRV
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_FF : 64|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_FC : 72|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_2 : 56|8@1+ (1,0) [0|1] "" XXX
|
||||
SG_ AEB_SETTING : 24|2@1+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_9 : 80|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 384 CAM_0x180: 32 CAMERA
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
@@ -158,43 +196,43 @@ BO_ 389 CAM_0x185: 8 CAMERA
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 416 CRUISE_INFO: 32 XXX
|
||||
BO_ 416 SCC_CONTROL: 32 ADRV
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ BYTE3 : 24|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ BYTE4 : 32|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ BYTE5 : 40|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ BYTE6 : 48|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ BYTE7 : 56|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ NEW_SIGNAL_1 : 64|2@1+ (1,0) [0|3] "" XXX
|
||||
SG_ CRUISE_MAIN : 66|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ CRUISE_STATUS : 67|3@1+ (1,0) [0|7] "" XXX
|
||||
SG_ CRUISE_INACTIVE : 70|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ NEW_SIGNAL_2 : 71|5@1+ (1,0) [0|15] "" XXX
|
||||
SG_ NEW_SIGNAL_8 : 170|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ NEW_SIGNAL_10 : 156|5@0+ (1,0) [0|3] "" XXX
|
||||
SG_ ZEROS : 215|48@0+ (1,0) [0|281474976710655] "" XXX
|
||||
SG_ ZEROS_3 : 191|7@0+ (1,0) [0|127] "" XXX
|
||||
SG_ ZEROS_4 : 183|4@0+ (1,0) [0|63] "" XXX
|
||||
SG_ ZEROS_6 : 119|16@0+ (1,0) [0|65535] "" XXX
|
||||
SG_ ZEROS_8 : 95|5@0+ (1,0) [0|31] "" XXX
|
||||
SG_ NEW_SIGNAL_3 : 109|2@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_TMP_64 : 55|8@0+ (1,0) [0|63] "" XXX
|
||||
SG_ SET_ME_2 : 105|3@1+ (1,0) [0|7] "" XXX
|
||||
SG_ NEW_SIGNAL_6 : 104|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ ZEROS_9 : 71|5@1+ (1,0) [0|15] "" XXX
|
||||
SG_ ZEROS_10 : 111|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_3 : 45|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ ObjValid : 46|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ NEW_SIGNAL_2 : 168|2@1+ (1,0) [0|3] "" XXX
|
||||
SG_ OBJ_STATUS : 176|3@1+ (1,0) [0|7] "" XXX
|
||||
SG_ ACC_ObjDist : 24|11@1+ (0.1,0) [0|204.7] "m" XXX
|
||||
SG_ ZEROS_5 : 77|11@1+ (1,0) [0|2047] "" XXX
|
||||
SG_ DISTANCE_SETTING : 88|3@1+ (1,0) [0|3] "" XXX
|
||||
SG_ ZEROS_2 : 207|5@0+ (1,0) [0|63] "" XXX
|
||||
SG_ CRUISE_STANDSTILL : 76|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ NEW_SIGNAL_3 : 77|11@1+ (1,0) [0|2047] "" XXX
|
||||
SG_ BYTE11 : 88|8@1+ (1,0) [0|127] "" XXX
|
||||
SG_ SET_SPEED : 102|7@0+ (1,0) [0|127] "km/h or mph" XXX
|
||||
SG_ NEW_SIGNAL_4 : 103|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ BYTE13 : 104|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ BYTE14 : 112|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ BYTE15 : 120|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ BYTE16 : 128|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ BYTE17 : 136|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ BYTE18 : 144|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ BYTE19 : 152|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ BYTE20 : 160|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ BYTE21 : 168|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ BYTE22 : 176|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ BYTE23 : 184|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ BYTE24 : 192|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ BYTE25 : 200|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ BYTE26 : 208|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ BYTE27 : 216|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ BYTE28 : 224|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ BYTE29 : 232|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ BYTE30 : 240|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ BYTE31 : 248|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ aReqRaw : 140|11@1+ (0.01,-10.23) [-10.23|10.24] "m/s^2" XXX
|
||||
SG_ aReqValue : 128|11@1+ (0.01,-10.23) [-10.23|10.24] "m/s^2" XXX
|
||||
SG_ ZEROS_7 : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ NEW_SIGNAL_4 : 158|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ ACCMode : 68|3@1+ (1,0) [0|7] "" XXX
|
||||
SG_ NEW_SIGNAL_12 : 35|9@1+ (0.1,0) [0|255] "" XXX
|
||||
SG_ JerkLowerLimit : 166|7@0+ (0.1,0) [0|12.7] "m/s^3" XXX
|
||||
SG_ StopReq : 184|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ NEW_SIGNAL_15 : 192|11@1+ (0.1,0) [0|204.7] "m" XXX
|
||||
SG_ VSetDis : 103|8@0+ (1,0) [0|255] "km/h or mph" XXX
|
||||
SG_ MainMode_ACC : 66|1@1+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 426 CRUISE_BUTTONS_ALT: 16 XXX
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
@@ -247,16 +285,136 @@ BO_ 463 CRUISE_BUTTONS: 8 XXX
|
||||
SG_ COUNTER : 12|4@1+ (1,0) [0|255] "" XXX
|
||||
SG_ CRUISE_BUTTONS : 16|3@1+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 480 LFAHDA_CLUSTER: 16 XXX
|
||||
BO_ 474 ADRV_0x1da: 32 ADRV
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_22 : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_41 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 480 LFAHDA_CLUSTER: 16 ADRV
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ HDA_ICON : 31|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ LFA_ICON : 47|2@1+ (1,0) [0|3] "" XXX
|
||||
SG_ NEW_SIGNAL_1 : 32|3@1+ (1,0) [0|7] "" XXX
|
||||
SG_ NEW_SIGNAL_2 : 30|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ NEW_SIGNAL_3 : 49|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ NEW_SIGNAL_4 : 24|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 490 ADRV_0x1ea: 32 ADRV
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_1C : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ NEW_SIGNAL_1 : 32|2@1+ (1,0) [0|3] "" XXX
|
||||
SG_ NEW_SIGNAL_2 : 47|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ NEW_SIGNAL_3 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ NEW_SIGNAL_4 : 64|6@1+ (1,0) [0|31] "" XXX
|
||||
SG_ NEW_SIGNAL_5 : 72|2@1+ (1,0) [0|3] "" XXX
|
||||
SG_ NEW_SIGNAL_6 : 75|5@1+ (1,0) [0|31] "" XXX
|
||||
SG_ NEW_SIGNAL_7 : 80|5@1+ (1,0) [0|31] "" XXX
|
||||
SG_ NEW_SIGNAL_8 : 88|7@1+ (1,0) [0|127] "" XXX
|
||||
SG_ NEW_SIGNAL_9 : 96|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ NEW_SIGNAL_10 : 143|5@0+ (1,0) [0|31] "" XXX
|
||||
SG_ NEW_SIGNAL_11 : 144|3@1+ (1,0) [0|7] "" XXX
|
||||
SG_ NEW_SIGNAL_12 : 152|6@1+ (1,0) [0|63] "" XXX
|
||||
SG_ NEW_SIGNAL_13 : 160|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ NEW_SIGNAL_14 : 163|5@1+ (1,0) [0|31] "" XXX
|
||||
SG_ NEW_SIGNAL_15 : 175|4@0+ (1,0) [0|63] "" XXX
|
||||
SG_ NEW_SIGNAL_16 : 168|3@1+ (1,0) [0|7] "" XXX
|
||||
SG_ NEW_SIGNAL_17 : 176|2@1+ (1,0) [0|3] "" XXX
|
||||
SG_ NEW_SIGNAL_18 : 184|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ NEW_SIGNAL_19 : 208|3@1+ (1,0) [0|7] "" XXX
|
||||
SG_ NEW_SIGNAL_20 : 212|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_FF : 120|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_TMP_F : 232|5@1+ (1,0) [0|31] "" XXX
|
||||
SG_ SET_ME_TMP_F_2 : 240|5@1+ (1,0) [0|31] "" XXX
|
||||
|
||||
BO_ 507 CAM_0x1fb: 32 CAMERA
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 512 ADRV_0x200: 8 ADRV
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_E1 : 24|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_3A : 32|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 513 RADAR_0x201: 32 FRONT_RADAR
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 528 RADAR_0x210: 32 FRONT_RADAR
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 529 RADAR_0x211: 32 FRONT_RADAR
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 530 RADAR_0x212: 32 FRONT_RADAR
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 531 RADAR_0x213: 32 FRONT_RADAR
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 532 RADAR_0x214: 32 FRONT_RADAR
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 533 RADAR_0x215: 32 FRONT_RADAR
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 534 RADAR_0x216: 32 FRONT_RADAR
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 535 RADAR_0x217: 32 FRONT_RADAR
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 536 RADAR_0x218: 32 FRONT_RADAR
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 537 RADAR_0x219: 32 FRONT_RADAR
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 538 RADAR_0x21a: 32 FRONT_RADAR
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 539 RADAR_0x21b: 32 FRONT_RADAR
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 540 RADAR_0x21c: 32 FRONT_RADAR
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 541 RADAR_0x21d: 32 FRONT_RADAR
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 542 RADAR_0x21e: 32 FRONT_RADAR
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 543 RADAR_0x21f: 32 FRONT_RADAR
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 576 RADAR_0x240: 16 FRONT_RADAR
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 593 RADAR_0x251: 16 FRONT_RADAR
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 674 CAM_0x2a2: 32 CAMERA
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
@@ -306,6 +464,11 @@ BO_ 702 CAM_0x2be: 32 CAMERA
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 837 ADRV_0x345: 8 ADRV
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_15 : 24|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 961 BLINKER_STALKS: 8 XXX
|
||||
SG_ COUNTER_ALT : 15|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM_MAYBE : 7|8@0+ (1,0) [0|255] "" XXX
|
||||
@@ -329,19 +492,70 @@ BO_ 1043 BLINKERS: 8 XXX
|
||||
BO_ 1240 CLUSTER_INFO: 8 XXX
|
||||
SG_ DISTANCE_UNIT : 0|1@1+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 442 BLINDSPOTS_REAR_CORNERS: 24 XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ NEW_SIGNAL_2 : 96|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ COLLISION_AVOIDANCE_ACTIVE : 68|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ LEFT_MB : 30|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ LEFT_BLOCKED : 24|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ MORE_LEFT_PROB : 32|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ FL_INDICATOR : 46|6@0+ (1,0) [0|1] "" XXX
|
||||
SG_ FR_INDICATOR : 54|6@0+ (1,0) [0|63] "" XXX
|
||||
SG_ RIGHT_BLOCKED : 64|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 874 BLINDSPOTS_FRONT_CORNER_2: 16 XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
|
||||
BO_ 485 BLINDSPOTS_FRONT_CORNER_1: 16 XXX
|
||||
SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ NEW_SIGNAL_1 : 108|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ NEW_SIGNAL_2 : 96|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ NEW_SIGNAL_3 : 88|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ NEW_SIGNAL_4 : 80|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ NEW_SIGNAL_5 : 31|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ NEW_SIGNAL_6 : 24|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ NEW_SIGNAL_7 : 32|2@1+ (1,0) [0|3] "" XXX
|
||||
SG_ NEW_SIGNAL_8 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ NEW_SIGNAL_9 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 506 CLUSTER_SPEED_LIMIT: 32 XXX
|
||||
SG_ SPEED_LIMIT_3 : 119|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SPEED_LIMIT_2 : 47|7@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SPEED_LIMIT_1 : 39|7@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SPEED_CHANGE_BLINKING : 129|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ CHIME_2 : 122|2@1+ (1,0) [0|7] "" XXX
|
||||
SG_ CHIME_1 : 133|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ ARROW_DOWN : 120|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ ARROW_UP : 121|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SECONDARY_LIMIT_1 : 79|8@0+ (1,0) [0|127] "" XXX
|
||||
SG_ SECONDARY_LIMIT_2 : 103|8@0+ (1,0) [0|127] "" XXX
|
||||
SG_ SCHOOL_ZONE : 155|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
|
||||
|
||||
CM_ SG_ 96 BRAKE_PRESSURE "User applied brake pedal pressure. Ramps from computer applied pressure on falling edge of cruise. Cruise cancels if !=0";
|
||||
CM_ SG_ 101 BRAKE_POSITION "User applied brake pedal position, max is ~700. Signed on some vehicles";
|
||||
CM_ SG_ 373 PROBABLY_EQUIP "aeb equip?";
|
||||
CM_ SG_ 373 DriverBraking "Likely derived from BRAKE->BRAKE_POSITION";
|
||||
CM_ SG_ 373 DriverBrakingLowSens "Higher threshold version of DriverBraking";
|
||||
CM_ SG_ 352 SET_ME_9 "has something to do with AEB settings";
|
||||
CM_ SG_ 416 VSetDis "set speed in display units";
|
||||
CM_ SG_ 961 COUNTER_ALT "only increments on change";
|
||||
CM_ SG_ 1041 COUNTER_ALT "only increments on change";
|
||||
CM_ SG_ 1043 COUNTER_ALT "only increments on change";
|
||||
|
||||
VAL_ 53 GEAR 0 "P" 5 "D" 6 "N" 7 "R" ;
|
||||
VAL_ 64 GEAR 0 "P" 5 "D" 6 "N" 7 "R" ;
|
||||
VAL_ 69 GEAR 0 "P" 5 "D" 6 "N" 7 "R" ;
|
||||
VAL_ 304 GEAR 1 "P" 2 "R" 3 "N" 4 "D";
|
||||
VAL_ 80 LKA_ICON 0 "hidden" 1 "grey" 2 "green" 3 "flashing green" ;
|
||||
VAL_ 80 LKA_MODE 1 "warning only" 2 "assist" 6 "off" ;
|
||||
VAL_ 234 LKA_FAULT 0 "ok" 1 "lka fault" ;
|
||||
VAL_ 298 LKA_ICON 0 "hidden" 1 "grey" 2 "green" 3 "flashing green" ;
|
||||
VAL_ 298 LKA_MODE 1 "warning only" 2 "assist" 6 "off" ;
|
||||
VAL_ 416 CRUISE_STATUS 0 "cruise_inactive" 2 "cruise_active" 4 "driver_override" ;
|
||||
VAL_ 304 GEAR 1 "P" 2 "R" 3 "N" 4 "D" ;
|
||||
VAL_ 352 AEB_SETTING 1 "off" 2 "warning only" 3 "active assist" ;
|
||||
VAL_ 416 ACCMode 0 "off" 1 "enabled" 2 "driver_override" 3 "off_maybe_fault" 4 "cancelled" ;
|
||||
VAL_ 426 CRUISE_BUTTONS 0 "none" 1 "res_accel" 2 "set_decel" 3 "gap_distance" 4 "pause_resume" ;
|
||||
VAL_ 463 CRUISE_BUTTONS 0 "none" 1 "res_accel" 2 "set_decel" 3 "gap_distance" 4 "pause_resume" ;
|
||||
|
||||
@@ -1440,11 +1440,10 @@ BO_ 909 FCA11: 8 FCA
|
||||
SG_ FCA_DrvSetStatus : 22|3@1+ (1,0) [0|7] "" CLU,ESC
|
||||
SG_ CF_VSM_DecCmdAct : 31|1@1+ (1,0) [0|1] "" ESC
|
||||
SG_ FCA_Failinfo : 32|3@1+ (1,0) [0|7] "" ACU,CLU,ESC
|
||||
SG_ CR_FCA_Alive : 35|4@1+ (1,0) [0|15] "" ESC
|
||||
SG_ FCA_RelativeVelocity : 39|9@1+ (0.1,-25.5) [-25.5|25.5] "m/s" iBAU
|
||||
SG_ FCA_TimetoCollision : 48|8@1+ (10,0) [0|2540] "ms" iBAU
|
||||
SG_ CR_FCA_Alive : 56|4@1+ (1,0) [0|15] "" ESC
|
||||
SG_ CR_FCA_ChkSum : 60|4@1+ (1,0) [0|15] "" ESC
|
||||
SG_ Supplemental_Counter : 35|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ CR_FCA_ChkSum : 56|8@1+ (1,0) [0|255] "" ESC
|
||||
SG_ PAINT1_Status : 16|2@1+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1156 HDA11_MFC: 8 XXX
|
||||
@@ -1645,10 +1644,11 @@ CM_ "BO_ E_EMS11: All (plug-in) hybrids use this gas signal: CR_Vcu_AccPedDep_Po
|
||||
CM_ SG_ 1348 SpeedLim_Nav_Clu "Speed limit displayed on Nav, Cluster and HUD";
|
||||
|
||||
VAL_ 274 CUR_GR 1 "D" 2 "D" 3 "D" 4 "D" 5 "D" 6 "D" 7 "D" 8 "D" 14 "R" 0 "P";
|
||||
VAL_ 871 CF_Lvr_Gear 5 "D" 8 "S" 6 "N" 7 "R" 0 "P";
|
||||
VAL_ 871 CF_Lvr_Gear 12 "T" 5 "D" 8 "S" 6 "N" 7 "R" 0 "P";
|
||||
VAL_ 882 Elect_Gear_Shifter 5 "D" 8 "S" 6 "N" 7 "R" 0 "P";
|
||||
VAL_ 905 ACCMode 0 "off" 1 "enabled" 2 "driver_override" 3 "off_maybe_fault" 4 "cancelled";
|
||||
VAL_ 909 CF_VSM_Warn 2 "FCW" 3 "AEB";
|
||||
VAL_ 916 ACCEnable 0 "SCC ready" 1 "SCC temp fault" 2 "SCC permanent fault" 3 "SCC permanent fault, communication issue";
|
||||
VAL_ 1057 ACCMode 0 "off" 1 "enabled" 2 "driver_override" 3 "off_maybe_fault";
|
||||
VAL_ 1157 HDA_Icon_State 0 "no_hda" 1 "white_hda" 2 "green_hda";
|
||||
VAL_ 1157 LFA_SysWarning 0 "no_message" 1 "switching_to_hda" 2 "switching_to_scc" 3 "lfa_error" 4 "check_hda" 5 "keep_hands_on_wheel_orange" 6 "keep_hands_on_wheel_red";
|
||||
|
||||
+36
-65
@@ -1,3 +1,6 @@
|
||||
CM_ "AUTOGENERATED FILE, DO NOT EDIT";
|
||||
|
||||
CM_ "hyundai_kia_mando_front_radar.dbc starts here";
|
||||
|
||||
VERSION ""
|
||||
|
||||
@@ -35,8 +38,7 @@ NS_ :
|
||||
BS_:
|
||||
|
||||
BU_: XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1280 RADAR_TRACK_500: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -48,8 +50,7 @@ BO_ 1280 RADAR_TRACK_500: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1281 RADAR_TRACK_501: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -61,8 +62,7 @@ BO_ 1281 RADAR_TRACK_501: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1282 RADAR_TRACK_502: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -74,8 +74,7 @@ BO_ 1282 RADAR_TRACK_502: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1283 RADAR_TRACK_503: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -87,8 +86,7 @@ BO_ 1283 RADAR_TRACK_503: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1284 RADAR_TRACK_504: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -100,8 +98,7 @@ BO_ 1284 RADAR_TRACK_504: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1285 RADAR_TRACK_505: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -113,8 +110,7 @@ BO_ 1285 RADAR_TRACK_505: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1286 RADAR_TRACK_506: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -126,8 +122,7 @@ BO_ 1286 RADAR_TRACK_506: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1287 RADAR_TRACK_507: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -139,8 +134,7 @@ BO_ 1287 RADAR_TRACK_507: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1288 RADAR_TRACK_508: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -152,8 +146,7 @@ BO_ 1288 RADAR_TRACK_508: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1289 RADAR_TRACK_509: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -165,8 +158,7 @@ BO_ 1289 RADAR_TRACK_509: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1290 RADAR_TRACK_50a: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -178,8 +170,7 @@ BO_ 1290 RADAR_TRACK_50a: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1291 RADAR_TRACK_50b: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -191,8 +182,7 @@ BO_ 1291 RADAR_TRACK_50b: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1292 RADAR_TRACK_50c: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -204,8 +194,7 @@ BO_ 1292 RADAR_TRACK_50c: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1293 RADAR_TRACK_50d: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -217,8 +206,7 @@ BO_ 1293 RADAR_TRACK_50d: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1294 RADAR_TRACK_50e: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -230,8 +218,7 @@ BO_ 1294 RADAR_TRACK_50e: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1295 RADAR_TRACK_50f: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -243,8 +230,7 @@ BO_ 1295 RADAR_TRACK_50f: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1296 RADAR_TRACK_510: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -256,8 +242,7 @@ BO_ 1296 RADAR_TRACK_510: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1297 RADAR_TRACK_511: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -269,8 +254,7 @@ BO_ 1297 RADAR_TRACK_511: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1298 RADAR_TRACK_512: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -282,8 +266,7 @@ BO_ 1298 RADAR_TRACK_512: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1299 RADAR_TRACK_513: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -295,8 +278,7 @@ BO_ 1299 RADAR_TRACK_513: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1300 RADAR_TRACK_514: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -308,8 +290,7 @@ BO_ 1300 RADAR_TRACK_514: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1301 RADAR_TRACK_515: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -321,8 +302,7 @@ BO_ 1301 RADAR_TRACK_515: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1302 RADAR_TRACK_516: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -334,8 +314,7 @@ BO_ 1302 RADAR_TRACK_516: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1303 RADAR_TRACK_517: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -347,8 +326,7 @@ BO_ 1303 RADAR_TRACK_517: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1304 RADAR_TRACK_518: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -360,8 +338,7 @@ BO_ 1304 RADAR_TRACK_518: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1305 RADAR_TRACK_519: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -373,8 +350,7 @@ BO_ 1305 RADAR_TRACK_519: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1306 RADAR_TRACK_51a: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -386,8 +362,7 @@ BO_ 1306 RADAR_TRACK_51a: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1307 RADAR_TRACK_51b: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -399,8 +374,7 @@ BO_ 1307 RADAR_TRACK_51b: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1308 RADAR_TRACK_51c: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -412,8 +386,7 @@ BO_ 1308 RADAR_TRACK_51c: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1309 RADAR_TRACK_51d: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -425,8 +398,7 @@ BO_ 1309 RADAR_TRACK_51d: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1310 RADAR_TRACK_51e: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -438,8 +410,7 @@ BO_ 1310 RADAR_TRACK_51e: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
|
||||
BO_ 1311 RADAR_TRACK_51f: 8 RADAR
|
||||
SG_ UNKNOWN_1 : 7|8@0- (1,0) [-128|127] "" XXX
|
||||
SG_ AZIMUTH : 12|10@0- (0.2,0) [-102.4|102.2] "" XXX
|
||||
@@ -451,4 +422,4 @@ BO_ 1311 RADAR_TRACK_51f: 8 RADAR
|
||||
SG_ STATE_3 : 39|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REL_SPEED : 53|14@0- (0.01,0) [-81.92|81.92] "" XXX
|
||||
SG_ STATE_2 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ BO_ 1005 REVERSE_CAMERA_STATE: 2 BGM
|
||||
BO_ 1009 PCM_CRUISE_ALT: 8 XXX
|
||||
SG_ MAIN_ON : 13|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ CRUISE_STATE : 10|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_SPEED : 23|8@0+ (1,0) [0|255] "mph" XXX
|
||||
SG_ UI_SET_SPEED : 23|8@0+ (1,0) [0|255] "mph" XXX
|
||||
|
||||
BO_ 1020 SOLAR_SENSOR: 8 XXX
|
||||
SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX
|
||||
@@ -373,6 +373,7 @@ BO_ 1552 BODY_CONTROL_STATE_2: 8 XXX
|
||||
SG_ METER_SLIDER_BRIGHTNESS_PCT : 30|7@0+ (1,0) [12|100] "%" XXX
|
||||
SG_ METER_SLIDER_LOW_BRIGHTNESS : 37|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ METER_SLIDER_DIMMED : 38|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ UNITS : 63|3@0+ (1,0) [1|4] "" XXX
|
||||
|
||||
BO_ 1553 UI_SETTING: 8 XXX
|
||||
SG_ UNITS : 26|2@0+ (1,0) [0|3] "" XXX
|
||||
@@ -439,7 +440,7 @@ CM_ SG_ 865 CLUTCH_RELEASED "boolean of clutch for 6MT.";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in the vehicle's UI with the vehicle's unit";
|
||||
CM_ SG_ 951 BRAKE_LIGHTS_ACC "brake lights when ACC commands decel";
|
||||
CM_ SG_ 956 GEAR "on 6MT, only R shows.";
|
||||
CM_ SG_ 1009 SET_SPEED "units seem to be whatever the car is set to";
|
||||
CM_ SG_ 1009 UI_SET_SPEED "units seem to be whatever the car is set to";
|
||||
CM_ SG_ 1041 PCS_INDICATOR "Pre-Collision System Indicator";
|
||||
CM_ SG_ 1041 PCS_SENSITIVITY "Pre-Collision System Sensitivity";
|
||||
CM_ SG_ 1042 LDA_SA_TOGGLE "LDA Steering Assist Toggle";
|
||||
@@ -472,7 +473,7 @@ CM_ SG_ 1163 OVSPVALL "-5 at start then 2 after 2 seconds";
|
||||
CM_ SG_ 1163 OVSPVALM "-5 at start then 5 after 2 seconds";
|
||||
CM_ SG_ 1163 OVSPVALH "-5 at start then 10 after 2 seconds";
|
||||
CM_ SG_ 1163 TSRSPU "always 1";
|
||||
CM_ SG_ 1552 UI_SPEED "Vehicle's speedometer's display speed after Toyota's offset was applied, uses vehicle's unit";
|
||||
CM_ SG_ 1552 UI_SPEED "Does not appear to match dash";
|
||||
CM_ SG_ 1552 METER_SLIDER_BRIGHTNESS_PCT "Combination display brightness setting, scales from 12 per cent to 100 per cent, reflects combination meter settings only, not linked with headlight state";
|
||||
CM_ SG_ 1552 METER_SLIDER_LOW_BRIGHTNESS "Combination display low brightness mode, also controls footwell lighting";
|
||||
CM_ SG_ 1552 METER_SLIDER_DIMMED "Combination display slider not at max, reflects combination meter settings only, not linked with headlight state";
|
||||
@@ -524,6 +525,7 @@ VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highwa
|
||||
VAL_ 1162 SPLSGN3 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
VAL_ 1552 METER_SLIDER_LOW_BRIGHTNESS 1 "Low brightness mode, footwell lights off" 0 "Normal mode, footwell lights on";
|
||||
VAL_ 1552 METER_SLIDER_DIMMED 1 "Dimmed" 0 "Not Dimmed";
|
||||
VAL_ 1552 UNITS 1 "km (km/L)" 2 "km (L/100km)" 3 "miles (MPG US)" 4 "miles (MPG Imperial)";
|
||||
VAL_ 1553 UNITS 1 "km" 2 "miles";
|
||||
VAL_ 1556 TURN_SIGNALS 3 "none" 2 "right" 1 "left";
|
||||
VAL_ 1592 LOCK_STATUS 0 "locked" 1 "unlocked";
|
||||
|
||||
@@ -249,7 +249,7 @@ BO_ 1005 REVERSE_CAMERA_STATE: 2 BGM
|
||||
BO_ 1009 PCM_CRUISE_ALT: 8 XXX
|
||||
SG_ MAIN_ON : 13|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ CRUISE_STATE : 10|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_SPEED : 23|8@0+ (1,0) [0|255] "mph" XXX
|
||||
SG_ UI_SET_SPEED : 23|8@0+ (1,0) [0|255] "mph" XXX
|
||||
|
||||
BO_ 1020 SOLAR_SENSOR: 8 XXX
|
||||
SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX
|
||||
@@ -373,6 +373,7 @@ BO_ 1552 BODY_CONTROL_STATE_2: 8 XXX
|
||||
SG_ METER_SLIDER_BRIGHTNESS_PCT : 30|7@0+ (1,0) [12|100] "%" XXX
|
||||
SG_ METER_SLIDER_LOW_BRIGHTNESS : 37|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ METER_SLIDER_DIMMED : 38|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ UNITS : 63|3@0+ (1,0) [1|4] "" XXX
|
||||
|
||||
BO_ 1553 UI_SETTING: 8 XXX
|
||||
SG_ UNITS : 26|2@0+ (1,0) [0|3] "" XXX
|
||||
@@ -439,7 +440,7 @@ CM_ SG_ 865 CLUTCH_RELEASED "boolean of clutch for 6MT.";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in the vehicle's UI with the vehicle's unit";
|
||||
CM_ SG_ 951 BRAKE_LIGHTS_ACC "brake lights when ACC commands decel";
|
||||
CM_ SG_ 956 GEAR "on 6MT, only R shows.";
|
||||
CM_ SG_ 1009 SET_SPEED "units seem to be whatever the car is set to";
|
||||
CM_ SG_ 1009 UI_SET_SPEED "units seem to be whatever the car is set to";
|
||||
CM_ SG_ 1041 PCS_INDICATOR "Pre-Collision System Indicator";
|
||||
CM_ SG_ 1041 PCS_SENSITIVITY "Pre-Collision System Sensitivity";
|
||||
CM_ SG_ 1042 LDA_SA_TOGGLE "LDA Steering Assist Toggle";
|
||||
@@ -472,7 +473,7 @@ CM_ SG_ 1163 OVSPVALL "-5 at start then 2 after 2 seconds";
|
||||
CM_ SG_ 1163 OVSPVALM "-5 at start then 5 after 2 seconds";
|
||||
CM_ SG_ 1163 OVSPVALH "-5 at start then 10 after 2 seconds";
|
||||
CM_ SG_ 1163 TSRSPU "always 1";
|
||||
CM_ SG_ 1552 UI_SPEED "Vehicle's speedometer's display speed after Toyota's offset was applied, uses vehicle's unit";
|
||||
CM_ SG_ 1552 UI_SPEED "Does not appear to match dash";
|
||||
CM_ SG_ 1552 METER_SLIDER_BRIGHTNESS_PCT "Combination display brightness setting, scales from 12 per cent to 100 per cent, reflects combination meter settings only, not linked with headlight state";
|
||||
CM_ SG_ 1552 METER_SLIDER_LOW_BRIGHTNESS "Combination display low brightness mode, also controls footwell lighting";
|
||||
CM_ SG_ 1552 METER_SLIDER_DIMMED "Combination display slider not at max, reflects combination meter settings only, not linked with headlight state";
|
||||
@@ -524,6 +525,7 @@ VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highwa
|
||||
VAL_ 1162 SPLSGN3 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
VAL_ 1552 METER_SLIDER_LOW_BRIGHTNESS 1 "Low brightness mode, footwell lights off" 0 "Normal mode, footwell lights on";
|
||||
VAL_ 1552 METER_SLIDER_DIMMED 1 "Dimmed" 0 "Not Dimmed";
|
||||
VAL_ 1552 UNITS 1 "km (km/L)" 2 "km (L/100km)" 3 "miles (MPG US)" 4 "miles (MPG Imperial)";
|
||||
VAL_ 1553 UNITS 1 "km" 2 "miles";
|
||||
VAL_ 1556 TURN_SIGNALS 3 "none" 2 "right" 1 "left";
|
||||
VAL_ 1592 LOCK_STATUS 0 "locked" 1 "unlocked";
|
||||
|
||||
@@ -249,7 +249,7 @@ BO_ 1005 REVERSE_CAMERA_STATE: 2 BGM
|
||||
BO_ 1009 PCM_CRUISE_ALT: 8 XXX
|
||||
SG_ MAIN_ON : 13|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ CRUISE_STATE : 10|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_SPEED : 23|8@0+ (1,0) [0|255] "mph" XXX
|
||||
SG_ UI_SET_SPEED : 23|8@0+ (1,0) [0|255] "mph" XXX
|
||||
|
||||
BO_ 1020 SOLAR_SENSOR: 8 XXX
|
||||
SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX
|
||||
@@ -373,6 +373,7 @@ BO_ 1552 BODY_CONTROL_STATE_2: 8 XXX
|
||||
SG_ METER_SLIDER_BRIGHTNESS_PCT : 30|7@0+ (1,0) [12|100] "%" XXX
|
||||
SG_ METER_SLIDER_LOW_BRIGHTNESS : 37|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ METER_SLIDER_DIMMED : 38|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ UNITS : 63|3@0+ (1,0) [1|4] "" XXX
|
||||
|
||||
BO_ 1553 UI_SETTING: 8 XXX
|
||||
SG_ UNITS : 26|2@0+ (1,0) [0|3] "" XXX
|
||||
@@ -439,7 +440,7 @@ CM_ SG_ 865 CLUTCH_RELEASED "boolean of clutch for 6MT.";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in the vehicle's UI with the vehicle's unit";
|
||||
CM_ SG_ 951 BRAKE_LIGHTS_ACC "brake lights when ACC commands decel";
|
||||
CM_ SG_ 956 GEAR "on 6MT, only R shows.";
|
||||
CM_ SG_ 1009 SET_SPEED "units seem to be whatever the car is set to";
|
||||
CM_ SG_ 1009 UI_SET_SPEED "units seem to be whatever the car is set to";
|
||||
CM_ SG_ 1041 PCS_INDICATOR "Pre-Collision System Indicator";
|
||||
CM_ SG_ 1041 PCS_SENSITIVITY "Pre-Collision System Sensitivity";
|
||||
CM_ SG_ 1042 LDA_SA_TOGGLE "LDA Steering Assist Toggle";
|
||||
@@ -472,7 +473,7 @@ CM_ SG_ 1163 OVSPVALL "-5 at start then 2 after 2 seconds";
|
||||
CM_ SG_ 1163 OVSPVALM "-5 at start then 5 after 2 seconds";
|
||||
CM_ SG_ 1163 OVSPVALH "-5 at start then 10 after 2 seconds";
|
||||
CM_ SG_ 1163 TSRSPU "always 1";
|
||||
CM_ SG_ 1552 UI_SPEED "Vehicle's speedometer's display speed after Toyota's offset was applied, uses vehicle's unit";
|
||||
CM_ SG_ 1552 UI_SPEED "Does not appear to match dash";
|
||||
CM_ SG_ 1552 METER_SLIDER_BRIGHTNESS_PCT "Combination display brightness setting, scales from 12 per cent to 100 per cent, reflects combination meter settings only, not linked with headlight state";
|
||||
CM_ SG_ 1552 METER_SLIDER_LOW_BRIGHTNESS "Combination display low brightness mode, also controls footwell lighting";
|
||||
CM_ SG_ 1552 METER_SLIDER_DIMMED "Combination display slider not at max, reflects combination meter settings only, not linked with headlight state";
|
||||
@@ -524,6 +525,7 @@ VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highwa
|
||||
VAL_ 1162 SPLSGN3 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
VAL_ 1552 METER_SLIDER_LOW_BRIGHTNESS 1 "Low brightness mode, footwell lights off" 0 "Normal mode, footwell lights on";
|
||||
VAL_ 1552 METER_SLIDER_DIMMED 1 "Dimmed" 0 "Not Dimmed";
|
||||
VAL_ 1552 UNITS 1 "km (km/L)" 2 "km (L/100km)" 3 "miles (MPG US)" 4 "miles (MPG Imperial)";
|
||||
VAL_ 1553 UNITS 1 "km" 2 "miles";
|
||||
VAL_ 1556 TURN_SIGNALS 3 "none" 2 "right" 1 "left";
|
||||
VAL_ 1592 LOCK_STATUS 0 "locked" 1 "unlocked";
|
||||
|
||||
+32
-2
@@ -296,7 +296,9 @@ BO_ 1408 Motor_Flexia: 8 XXX
|
||||
SG_ Verschleissindex : 16|8@1+ (1,0) [0|254] "" XXX
|
||||
SG_ Russindex : 8|8@1+ (1,0) [0|254] "" XXX
|
||||
SG_ Verbrennungsart : 7|1@1+ (1,0) [0|0] "" XXX
|
||||
SG_ Frei_Motor_Flexia_1 : 4|3@1+ (1,0) [0|0] "" XXX
|
||||
SG_ Frei_Motor_Flexia_1 : 6|1@1+ (1,0) [0|0] "" XXX
|
||||
SG_ Warm_Up_Cycle : 5|1@1+ (1,0) [0|0] "" XXX
|
||||
SG_ Driving_Cycle : 4|1@1+ (1,0) [0|0] "" XXX
|
||||
SG_ Zaehler_Motor_Flexia : 1|3@1+ (1,0) [0|15] "" XXX
|
||||
SG_ Multiplex_Schalter_Motor_Flexia M : 0|1@1+ (1,0) [0|0] "" XXX
|
||||
|
||||
@@ -1121,7 +1123,7 @@ BO_ 208 Lenkhilfe_3: 6 XXX
|
||||
SG_ LH3_BLWValid : 45|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ LH3_Lenkungstyp : 46|2@1+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 978 Lenkhilfe_2: 8 XXX
|
||||
BO_ 978 Lenkhilfe_2: 7 XXX
|
||||
SG_ CHECKSUM : 0|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ COUNTER : 8|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ LH2_Geradeaus : 12|1@1+ (1,0) [0|1] "" XXX
|
||||
@@ -1457,19 +1459,28 @@ CM_ SG_ 640 Fahrerwunschmoment "Driver Requested Torque";
|
||||
CM_ SG_ 640 mechanisches_Motor_Verlustmomen "Mechanical Torque Loss";
|
||||
CM_ SG_ 640 Fahrpedalwert_oder_Drosselklapp "Accelerator Pedal or Throttle Position";
|
||||
CM_ SG_ 640 Motordrehzahl "Engine Speed";
|
||||
CM_ SG_ 640 Momentenangaben_ungenau "Approximate Torque Values";
|
||||
|
||||
CM_ SG_ 644 MOB_CHECKSUM "Checksum MOB";
|
||||
CM_ SG_ 644 MOB_COUNTER "Counter MOB";
|
||||
|
||||
CM_ SG_ 648 Minimales_Motormoment_bei_Zuend "Minimum Torque Adjustment";
|
||||
CM_ SG_ 648 Begrenzungsmoment "Maximum Inner Torque";
|
||||
CM_ SG_ 648 Bremstestschalter "Brake Test Switch";
|
||||
CM_ SG_ 648 Soll_Geschwindigkeit_bei_GRA_Be "Desired Vehicle Speed";
|
||||
CM_ SG_ 648 Bremslichtschalter "Brake Light Switch";
|
||||
CM_ SG_ 648 Leerlaufsolldrehzahl__Motor_2_ "Target Idle Speed";
|
||||
CM_ SG_ 648 Fahrzeuggeschwindigkeit "Vehicle Speed";
|
||||
CM_ SG_ 648 Kuehlmitteltemperatur__Motor_2_ "Coolant Temperature";
|
||||
|
||||
CM_ SG_ 896 Drosselklappenpoti "Throttle Position";
|
||||
CM_ SG_ 896 Motor_Wunschdrehzahl "Desired engine speed";
|
||||
CM_ SG_ 896 Motordrehzahlbeeinflussung "Shift Target Influence";
|
||||
CM_ SG_ 896 Fahrpedal_Rohsignal "Accelerator Pedal Position";
|
||||
CM_ SG_ 896 Ansauglufttemperatur "Intake Air Temperature";
|
||||
CM_ SG_ 896 Kein_E_Gas "ETB flag";
|
||||
CM_ SG_ 896 Kein_Start_Stop "Start/stop flag";
|
||||
CM_ SG_ 896 Rad_Wunschmoment "Desired wheel torque";
|
||||
|
||||
CM_ SG_ 912 GK1_Fa_Tuerkont "Status of the driver's door rotary latch";
|
||||
CM_ SG_ 912 BSK_HL_geoeffnet "Status of the rear left door rotary latch";
|
||||
@@ -1480,6 +1491,15 @@ CM_ SG_ 912 BSK_HD_Hauptraste "Status of trunk lid main detent";
|
||||
CM_ SG_ 1088 Zaehler_Getriebe_1 "Counter Getriebe_1";
|
||||
CM_ SG_ 1088 Waehlhebelposition__Getriebe_1_ "Gear Selector Position";
|
||||
|
||||
CM_ SG_ 1056 Fehlerstatus_Aussentemp__4_1 "ambient temp error";
|
||||
CM_ SG_ 1056 Fehlerstatus_Oeltemperatur_4_1 "oil temp error";
|
||||
CM_ SG_ 1056 Fehlerst__Kuehlmitteltemp__4_1 "water temp error";
|
||||
CM_ SG_ 1056 Aussentemperatur_gefiltert "outside temp, filtered";
|
||||
CM_ SG_ 1056 Oeltemperatur_4_1 "kombi oil temperature";
|
||||
CM_ SG_ 1056 Kuehlmitteltemp__4_1__Kombi_2_ "kombi coolant temperature";
|
||||
|
||||
CM_ SG_ 1096 Zaehler_Waehlhebel_1 "Counter Waehlhebel_1";
|
||||
|
||||
CM_ SG_ 1152 Checksumme_Motor_5 "Checksum Motor_5";
|
||||
|
||||
CM_ SG_ 1160 Zaehler_Motor_6 "Counter Motor_6";
|
||||
@@ -1492,6 +1512,16 @@ CM_ SG_ 1344 Zahler_Getriebe_2 "Counter Getriebe_2";
|
||||
|
||||
CM_ SG_ 1386 ACA_V_Wunsch "255=unset";
|
||||
|
||||
CM_ SG_ 1408 Zaehler_Motor_Flexia "Counter Motor_Flexia";
|
||||
CM_ SG_ 1408 Verbrennungsart "Type of combustion";
|
||||
CM_ SG_ 1408 Max_Drehmoment "Maximum torque";
|
||||
CM_ SG_ 1408 Drehzahl_MaxNorm "RPM of maximum torque";
|
||||
CM_ SG_ 1408 Hubraum "Displacement";
|
||||
CM_ SG_ 1408 Anzahl_Zylinder "Number of cylinders";
|
||||
CM_ SG_ 1408 Anzahl_Ventile "Number of valves";
|
||||
CM_ SG_ 1408 Ansaugsystem "Induction System";
|
||||
CM_ SG_ 1408 Motorleistung "Maximum engine power";
|
||||
|
||||
CM_ SG_ 1416 Ladedruck "Boost Pressure";
|
||||
|
||||
CM_ SG_ 1470 LDW_Direction "0=right,1=left";
|
||||
|
||||
+182
-71
@@ -36,39 +36,69 @@ BS_:
|
||||
BU_: Airbag_MQB BAP_Tester_MQB BMS_MQB Datenlogger_MQB Gateway_MQB Getriebe_DQ_Hybrid_MQB Getriebe_DQ_MQB LEH_MQB Motor_Diesel_MQB Motor_Hybrid_MQB Motor_Otto_MQB SAK_MQB Waehlhebel_MQB Vector__XXX l c i XXX
|
||||
|
||||
|
||||
BO_ 290 ACC_06: 8 Gateway_MQB
|
||||
SG_ CHECKSUM : 0|8@1+ (1,0) [0|255] "" Getriebe_DQ_Hybrid_MQB,Getriebe_DQ_MQB,Motor_Diesel_MQB,Motor_Hybrid_MQB,Motor_Otto_MQB
|
||||
SG_ COUNTER : 8|4@1+ (1,0) [0|15] "" Getriebe_DQ_Hybrid_MQB,Getriebe_DQ_MQB,Motor_Diesel_MQB,Motor_Hybrid_MQB,Motor_Otto_MQB
|
||||
SG_ ACC_limitierte_Anfahrdyn : 12|1@1+ (1,0) [0|1] "" Motor_Diesel_MQB,Motor_Hybrid_MQB,Motor_Otto_MQB
|
||||
SG_ ACC_zul_Regelabw_unten : 16|6@1+ (0.024,0) [0|1.512] "Unit_MeterPerSeconSquar" Getriebe_DQ_Hybrid_MQB,Getriebe_DQ_MQB,Motor_Diesel_MQB,Motor_Hybrid_MQB,Motor_Otto_MQB
|
||||
SG_ ACC_StartStopp_Info : 22|2@1+ (1,0) [0|3] "" Motor_Diesel_MQB,Motor_Otto_MQB
|
||||
SG_ ACC_Sollbeschleunigung_02 : 24|11@1+ (0.005,-7.22) [-7.22|3.005] "Unit_MeterPerSeconSquar" Getriebe_DQ_Hybrid_MQB,Getriebe_DQ_MQB,Motor_Diesel_MQB,Motor_Hybrid_MQB,Motor_Otto_MQB
|
||||
SG_ ACC_zul_Regelabw_oben : 35|5@1+ (0.0625,0) [0|1.9375] "Unit_MeterPerSeconSquar" Getriebe_DQ_Hybrid_MQB,Getriebe_DQ_MQB,Motor_Diesel_MQB,Motor_Hybrid_MQB,Motor_Otto_MQB
|
||||
SG_ ACC_neg_Sollbeschl_Grad_02 : 40|8@1+ (0.05,0) [0|12.75] "Unit_MeterPerCubicSecon" Motor_Diesel_MQB,Motor_Hybrid_MQB,Motor_Otto_MQB
|
||||
SG_ ACC_pos_Sollbeschl_Grad_02 : 48|8@1+ (0.05,0) [0|12.75] "Unit_MeterPerCubicSecon" Motor_Diesel_MQB,Motor_Hybrid_MQB,Motor_Otto_MQB
|
||||
SG_ ACC_Anfahren : 56|1@1+ (1,0) [0|1] "" Getriebe_DQ_Hybrid_MQB,Getriebe_DQ_MQB,Motor_Diesel_MQB,Motor_Hybrid_MQB,Motor_Otto_MQB
|
||||
SG_ ACC_Anhalten : 57|1@1+ (1,0) [0|1] "" Getriebe_DQ_Hybrid_MQB,Getriebe_DQ_MQB,Motor_Diesel_MQB,Motor_Hybrid_MQB,Motor_Otto_MQB
|
||||
SG_ ACC_Typ : 58|2@1+ (1,0) [0|3] "" Motor_Diesel_MQB,Motor_Hybrid_MQB,Motor_Otto_MQB
|
||||
SG_ ACC_Status_ACC : 60|3@1+ (1,0) [0|7] "" Getriebe_DQ_Hybrid_MQB,Getriebe_DQ_MQB,Motor_Diesel_MQB,Motor_Hybrid_MQB,Motor_Otto_MQB
|
||||
SG_ ACC_Minimale_Bremsung : 63|1@1+ (1,0) [0|1] "" Motor_Diesel_MQB,Motor_Hybrid_MQB,Motor_Otto_MQB
|
||||
BO_ 290 ACC_06: 8 XXX
|
||||
SG_ CHECKSUM : 0|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ COUNTER : 8|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ ACC_limitierte_Anfahrdyn : 12|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ACC_nachtr_Stopp_Anf : 13|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ACC_DynErhoehung : 14|1@1+ (1.0,0.0) [0.0|1] "" XXX
|
||||
SG_ ACC_Freilaufstrategie_TSK : 15|1@1+ (1.0,0.0) [0.0|1] "" XXX
|
||||
SG_ ACC_zul_Regelabw_unten : 16|6@1+ (0.024,0) [0|1.512] "Unit_MeterPerSeconSquar" XXX
|
||||
SG_ ACC_StartStopp_Info : 22|2@1+ (1,0) [0|3] "" XXX
|
||||
SG_ ACC_Sollbeschleunigung_02 : 24|11@1+ (0.005,-7.22) [-7.22|3.005] "Unit_MeterPerSeconSquar" XXX
|
||||
SG_ ACC_zul_Regelabw_oben : 35|5@1+ (0.0625,0) [0|1.9375] "Unit_MeterPerSeconSquar" XXX
|
||||
SG_ ACC_neg_Sollbeschl_Grad_02 : 40|8@1+ (0.05,0) [0|12.75] "Unit_MeterPerCubicSecon" XXX
|
||||
SG_ ACC_pos_Sollbeschl_Grad_02 : 48|8@1+ (0.05,0) [0|12.75] "Unit_MeterPerCubicSecon" XXX
|
||||
SG_ ACC_Anfahren : 56|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ACC_Anhalten : 57|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ACC_Typ : 58|2@1+ (1,0) [0|3] "" XXX
|
||||
SG_ ACC_Status_ACC : 60|3@1+ (1,0) [0|7] "" XXX
|
||||
SG_ ACC_Minimale_Bremsung : 63|1@1+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 279 ACC_10: 8 Gateway_MQB
|
||||
SG_ CHECKSUM : 0|8@1+ (1,0) [0|255] "" Airbag_MQB
|
||||
SG_ COUNTER : 8|4@1+ (1,0) [0|15] "" Airbag_MQB
|
||||
SG_ AWV1_Anf_Prefill : 16|1@1+ (1,0) [0|1] "" Airbag_MQB
|
||||
SG_ ANB_CM_Info : 17|1@1+ (1,0) [0|1] "" Vector__XXX
|
||||
SG_ AWV2_Freigabe : 18|1@1+ (1,0) [0|1] "" Airbag_MQB
|
||||
SG_ AWV1_HBA_Param : 19|2@1+ (1,0) [0|3] "" Vector__XXX
|
||||
SG_ AWV2_Ruckprofil : 21|3@1+ (1,0) [0|7] "" Vector__XXX
|
||||
SG_ AWV2_Priowarnung : 24|1@1+ (1,0) [0|1] "" Vector__XXX
|
||||
SG_ ANB_CM_Anforderung : 25|1@1+ (1,0) [0|1] "" Airbag_MQB
|
||||
SG_ ANB_Info_Teilbremsung : 26|1@1+ (1,0) [0|1] "" Vector__XXX
|
||||
SG_ ANB_Notfallblinken : 27|1@1+ (1,0) [0|1] "" Vector__XXX
|
||||
SG_ ANB_Teilbremsung_Freigabe : 28|1@1+ (1,0) [0|1] "" Airbag_MQB
|
||||
SG_ ANB_Zielbrems_Teilbrems_Verz_Anf : 29|10@1+ (0.024,-20.016) [-20.016|4.536] "Unit_MeterPerSeconSquar" Airbag_MQB
|
||||
SG_ ANB_Zielbremsung_Freigabe : 39|1@1+ (1,0) [0|1] "" Airbag_MQB
|
||||
SG_ AWV_Vorstufe : 40|1@1+ (1,0) [0|1] "" Vector__XXX
|
||||
SG_ AWV_Halten : 41|1@1+ (1,0) [0|1] "" Vector__XXX
|
||||
BO_ 279 ACC_10: 8 XXX
|
||||
SG_ CHECKSUM : 0|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ COUNTER : 8|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ AWV1_Anf_Prefill : 16|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ANB_CM_Info : 17|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ AWV2_Freigabe : 18|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ AWV1_HBA_Param : 19|2@1+ (1,0) [0|3] "" XXX
|
||||
SG_ AWV2_Ruckprofil : 21|3@1+ (1,0) [0|7] "" XXX
|
||||
SG_ AWV2_Priowarnung : 24|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ANB_CM_Anforderung : 25|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ANB_Info_Teilbremsung : 26|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ANB_Notfallblinken : 27|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ANB_Teilbremsung_Freigabe : 28|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ANB_Zielbrems_Teilbrems_Verz_Anf : 29|10@1+ (0.024,-20.016) [-20.016|4.536] "Unit_MeterPerSeconSquar" XXX
|
||||
SG_ ANB_Zielbremsung_Freigabe : 39|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ AWV_Vorstufe : 40|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ AWV_Halten : 41|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ AWV_CityANB_Auspraegung : 42|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ PCF_Freigabe : 43|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ AWV1_ECD_Anlauf : 44|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ AWV_AWA_VZ_Anf_Lenkmomoffset : 46|1@1+ (1.0,0.0) [0.0|1] "" XXX
|
||||
SG_ AWV_AWA_Anf_Lenkmomoffset : 47|9@1+ (0.01,0) [0.00|5.11] "Unit_NewtoMeter" XXX
|
||||
SG_ PCF_Time_to_collision : 56|8@1+ (0.01,0) [0|2.5] "Unit_Secon" XXX
|
||||
|
||||
BO_ 679 ACC_13: 8 XXX
|
||||
SG_ ACC_Regelgeschw : 12|10@1+ (0.32,0) [0|327.04] "Unit_KiloMeterPerHour" XXX
|
||||
SG_ ACC_Einheit_maxSetzgeschw : 22|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ACC_maxSetzgeschw : 23|9@1+ (1,0) [0|510] "" XXX
|
||||
SG_ ACC_minRegelgeschw : 32|8@1+ (0.32,0) [0|81.28] "Unit_KiloMeterPerHour" XXX
|
||||
SG_ ACC_maxRegelgeschw : 40|8@1+ (0.32,0) [0|81.28] "Unit_KiloMeterPerHour" XXX
|
||||
SG_ ACC_Tempolimitassistent : 48|2@1+ (1,0) [0|3] "" XXX
|
||||
SG_ ACC_Kurvenassistent : 52|3@1+ (1,0) [0|7] "" XXX
|
||||
SG_ ACC_RUV : 56|2@1+ (1,0) [0|3] "" XXX
|
||||
SG_ ACC_Tachokranz : 58|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ACC_Typ_Tachokranz_unten : 59|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ACC_ENG_Texte : 60|2@1+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 681 ACC_15: 8 XXX
|
||||
SG_ AWV_Warnung : 16|3@1+ (1,0) [0|7] "" XXX
|
||||
SG_ AWV_Texte : 24|3@1+ (1,0) [0|7] "" XXX
|
||||
SG_ AWV_Status_Anzeige : 32|2@1+ (1,0) [0|3] "" XXX
|
||||
SG_ AWV_Einstellung_System_FSG : 34|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ AWV_Einstellung_Warnung_FSG : 36|3@1+ (1,0) [0|7] "" XXX
|
||||
SG_ AWV_Warnlevel : 58|6@1+ (1,0) [0|63] "" XXX
|
||||
|
||||
BO_ 64 Airbag_01: 8 Airbag_MQB
|
||||
SG_ Airbag_01_CRC : 0|8@1+ (1,0) [0|255] "" BMS_MQB,Gateway_MQB,LEH_MQB,Motor_Diesel_MQB,Motor_Hybrid_MQB,Motor_Otto_MQB
|
||||
@@ -1237,33 +1267,35 @@ BO_ 919 LDW_02: 8 XXX
|
||||
BO_ 780 ACC_02: 8 XXX
|
||||
SG_ CHECKSUM : 0|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ COUNTER : 8|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ ACC_Wunschgeschw : 12|10@1+ (0.32,0) [0.00|326.72] "Unit_KiloMeterPerHour" XXX
|
||||
SG_ ACC_Status_Prim_Anz : 22|2@1+ (1.0,0.0) [0.0|3] "" XXX
|
||||
SG_ ACC_Wunschgeschw_02 : 12|10@1+ (0.32,0) [0|327.04] "Unit_KiloMeterPerHour" XXX
|
||||
SG_ ACC_Status_Prim_Anz : 22|2@1+ (1,0) [0|3] "" XXX
|
||||
SG_ ACC_Abstandsindex : 24|10@1+ (1,0) [1|1021] "" XXX
|
||||
SG_ ACC_Akustik : 34|3@1+ (1.0,0.0) [0.0|7] "" XXX
|
||||
SG_ ACC_Gesetzte_Zeitluecke : 37|3@1+ (1.0,0.0) [0.0|7] "" XXX
|
||||
SG_ ACC_Optischer_Fahrerhinweis : 40|1@1+ (1.0,0.0) [0.0|1] "" XXX
|
||||
SG_ ACC_Typ_Tachokranz : 41|1@1+ (1.0,0.0) [0.0|1] "" XXX
|
||||
SG_ ACC_Anzeige_Zeitluecke : 42|1@1+ (1.0,0.0) [0.0|1] "" XXX
|
||||
SG_ ACC_Tachokranz : 43|1@1+ (1.0,0.0) [0.0|1] "" XXX
|
||||
SG_ ACC_Display_Prio : 44|2@1+ (1.0,0.0) [0.0|3] "" XXX
|
||||
SG_ ACC_Relevantes_Objekt : 46|2@1+ (1.0,0.0) [0.0|3] "" XXX
|
||||
SG_ ACC_Texte_Primaeranz : 48|7@1+ (1.0,0.0) [0.0|127] "" XXX
|
||||
SG_ ACC_Wunschgeschw_erreicht : 55|1@1+ (1.0,0.0) [0.0|1] "" XXX
|
||||
SG_ ACC_Status_Anzeige : 61|3@1+ (1.0,0.0) [0.0|7] "" XXX
|
||||
SG_ ACC_Akustik_02 : 34|2@1+ (1,0) [0|3] "" XXX
|
||||
SG_ ACC_Warnung_Verkehrszeichen_1 : 36|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ACC_Gesetzte_Zeitluecke : 37|3@1+ (1,0) [0|7] "" XXX
|
||||
SG_ ACC_Optischer_Fahrerhinweis : 40|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ACC_Typ_Tachokranz : 41|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ACC_Anzeige_Zeitluecke : 42|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ACC_Tachokranz : 43|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ACC_Display_Prio : 44|2@1+ (1,0) [0|3] "" XXX
|
||||
SG_ ACC_Relevantes_Objekt : 46|2@1+ (1,0) [0|3] "" XXX
|
||||
SG_ ACC_Texte_Primaeranz : 48|7@1+ (1,0) [0|127] "" XXX
|
||||
SG_ ACC_Wunschgeschw_erreicht : 55|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ACC_Typ_Tachokranz_unten : 60|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ACC_Status_Anzeige : 61|3@1+ (1,0) [0|7] "" XXX
|
||||
|
||||
BO_ 302 ACC_07: 8 XXX
|
||||
SG_ CHECKSUM : 0|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ COUNTER : 8|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ ACC_Distance_to_Stop : 12|11@1+ (0.01,0) [0|1] "m" XXX
|
||||
SG_ ACC_Hold_Request : 23|1@1+ (1,0) [0|1] "x" XXX
|
||||
SG_ ACC_Boost_Request : 24|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ACC_Freewheel_Request : 25|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ACC_Freewheel_Type : 26|2@1+ (1,0) [0|3] "enum" XXX
|
||||
SG_ ACC_Hold_Type : 28|3@1+ (1,0) [0|15] "enum" XXX
|
||||
SG_ ACC_Hold_Release : 31|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ACC_Accel_Secondary : 32|8@1+ (0.03,-4.6) [-4.6|2.99] "m/s2" XXX
|
||||
SG_ ACC_Accel_TSK : 53|11@1+ (0.005,-7.22) [-7.22|3.005] "m/s2" XXX
|
||||
SG_ ACC_Anhalteweg : 12|11@1+ (0.01,0) [0|20.45] "Unit_Meter" XXX
|
||||
SG_ ACC_Anhalten : 23|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ACC_Boost_Anf : 24|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ACC_Freilauf_Anf : 25|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ACC_Freilauf_Info : 26|2@1+ (1,0) [0|3] "" XXX
|
||||
SG_ ACC_Anforderung_HMS : 28|3@1+ (1,0) [0|7] "" XXX
|
||||
SG_ ACC_Anfahren : 31|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ACC_Folgebeschl : 32|8@1+ (0.03,-4.6) [-4.6|2.99] "Unit_MeterPerSeconSquar" XXX
|
||||
SG_ ACC_Sollbeschleunigung_02 : 53|11@1+ (0.005,-7.22) [-7.22|3.005] "Unit_MeterPerSeconSquar" XXX
|
||||
|
||||
BO_ 264 Fahrwerk_01: 8 XXX
|
||||
SG_ Fahrwerk_01_BZ : 8|4@1+ (1,0) [0|15] "" XXX
|
||||
@@ -1297,15 +1329,18 @@ BO_ 783 SWA_01: 8 Gateway_MQB
|
||||
BO_ 804 ACC_04: 8 XXX
|
||||
SG_ CHECKSUM : 0|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ COUNTER : 8|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ ACC_Texte_Zusatzanz : 16|6@1+ (1.0,0.0) [0.0|63] "" XXX
|
||||
SG_ ACC_Status_Zusatzanz : 22|5@1+ (1.0,0.0) [0.0|31] "" XXX
|
||||
SG_ ACC_Texte : 27|5@1+ (1.0,0.0) [0.0|31] "" XXX
|
||||
SG_ ACC_Texte_braking_guard : 32|3@1+ (1.0,0.0) [0.0|7] "" XXX
|
||||
SG_ ACC_Warnhinweis : 35|1@1+ (1.0,0.0) [0.0|1] "" XXX
|
||||
SG_ ACC_Geschw_Zielfahrzeug : 40|10@1+ (0.32,0) [0.00|326.72] "Unit_KiloMeterPerHour" XXX
|
||||
SG_ ACC_Charisma_FahrPr : 56|3@1+ (1.0,0.0) [0.0|7] "" XXX
|
||||
SG_ ACC_Charisma_Status : 59|2@1+ (1.0,0.0) [0.0|3] "" XXX
|
||||
SG_ ACC_Charisma_Umschaltung : 61|2@1+ (1.0,0.0) [0.0|3] "" XXX
|
||||
SG_ ACC_Texte_Sekundaeranz : 12|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ ACC_Texte_Zusatzanz : 16|6@1+ (1,0) [0|63] "" XXX
|
||||
SG_ ACC_Status_Zusatzanz : 22|5@1+ (1,0) [0|31] "" XXX
|
||||
SG_ ACC_Texte : 27|5@1+ (1,0) [0|31] "" XXX
|
||||
SG_ ACC_Texte_braking_guard : 32|3@1+ (1,0) [0|7] "" XXX
|
||||
SG_ ACC_Warnhinweis : 35|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ ACC_Zeitluecke_Abstandswarner : 36|6@1+ (0.1,0) [0|6] "Unit_Secon" XXX
|
||||
SG_ ACC_Abstand_Abstandswarner : 42|9@1+ (1,0) [0|508] "" XXX
|
||||
SG_ ACC_Tempolimit : 51|5@1+ (1,0) [0|31] "" XXX
|
||||
SG_ ACC_Charisma_FahrPr : 56|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ ACC_Charisma_Status : 60|2@1+ (1,0) [0|3] "" XXX
|
||||
SG_ ACC_Texte_Abstandswarner : 62|2@1+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 917 LWR_AFS_01: 8 XXX
|
||||
|
||||
@@ -1437,14 +1472,90 @@ CM_ SG_ 1720 KBI_Variante "Zeigt an ob es sich um ein konventionelles Zeiger-Kom
|
||||
CM_ SG_ 1720 KBI_Variante_USA "In diesem Signal wird die HW-Variante des Kombis ausgegeben, ACC plausibilisiert auf dieses Signal hin seine US-Codierung";
|
||||
|
||||
|
||||
VAL_ 159 EPS_HCA_Status 0 "disabled" 1 "initializing" 2 "fault" 3 "ready" 4 "rejected" 5 "active";
|
||||
VAL_ 173 GE_Fahrstufe 5 "P" 6 "R" 7 "N" 8 "D" 9 "S" 10 "E" 13 "T" 14 "T";
|
||||
VAL_ 288 TSK_Status 0 "init" 1 "disabled" 2 "enabled" 3 "regulating" 4 "accel_pedal_override" 5 "brake_only" 6 "temp_fault" 7 "perm_fault";
|
||||
VAL_ 302 ACC_Freewheel_Type 0 "freewheel_released" 1 "freewheel_not_permitted" 2 "freewheel_not_released" 3 "freewheel_requested" ;
|
||||
VAL_ 302 ACC_Hold_Type 0 "no_request" 1 "hold" 2 "park" 3 "hold_standby" 4 "startup" 5 "loosen_over_ramp" ;
|
||||
VAL_ 391 GearPosition 2 "P" 3 "R" 4 "N" 5 "D" 6 "D";
|
||||
VAL_ 391 RegenBrakingMode 0 "default" 1 "B1" 2 "B2" 3 "B3";
|
||||
VAL_ 870 Fast_Send_Rate_Active 0 "1 Hz" 1 "50 Hz";
|
||||
VAL_ 159 EPS_HCA_Status 0 "disabled" 1 "initializing" 2 "fault" 3 "ready" 4 "rejected" 5 "active" ;
|
||||
VAL_ 173 GE_Fahrstufe 5 "P" 6 "R" 7 "N" 8 "D" 9 "S" 10 "E" 13 "T" 14 "T" ;
|
||||
VAL_ 288 TSK_Status 0 "init" 1 "disabled" 2 "enabled" 3 "regulating" 4 "accel_pedal_override" 5 "brake_only" 6 "temp_fault" 7 "perm_fault" ;
|
||||
VAL_ 780 ACC_Wunschgeschw_02 1023 "keine_Anzeige" ;
|
||||
VAL_ 780 ACC_Status_Prim_Anz 0 "Symbol nicht beleuchtet" 1 "Farbe 1 (typisch 'gruen')" 2 "Farbe 2 (typisch 'rot')" 3 "Farbe 3 (typisch 'gelb')" ;
|
||||
VAL_ 780 ACC_Abstandsindex 0 "Sonderanzeige_graue_Fahrbahn" 1022 "Sonderanzeige_graue_Fahrbahn" 1023 "Sonderanzeige_Fahrbahn_mit_gruenem_roten_Bereich" ;
|
||||
VAL_ 780 ACC_Akustik_02 0 "keine_Akustik" 1 "hochpriore_Akustik" 2 "niederpriore_Akustik" 3 "hochpriore_Dauerakustik" ;
|
||||
VAL_ 780 ACC_Warnung_Verkehrszeichen_1 0 "keine_Warnung_Initialwert" 1 "Warnung" ;
|
||||
VAL_ 780 ACC_Gesetzte_Zeitluecke 0 "keine_Anzeige" 1 "Zeitluecke_1" 2 "Zeitluecke_2" 3 "Zeitluecke_3" 4 "Zeitluecke_4" 5 "Zeitluecke_5" 6 "nicht_definiert" 7 "nicht_definiert" ;
|
||||
VAL_ 780 ACC_Optischer_Fahrerhinweis 0 "optischer_Fahrerhinweis_AUS" 1 "optischer_Fahrerhinweis_EIN" ;
|
||||
VAL_ 780 ACC_Typ_Tachokranz 0 "Tachokranz_lang" 1 "Tachokranz_kurz" ;
|
||||
VAL_ 780 ACC_Anzeige_Zeitluecke 0 "Anzeige_Zeitluecke_nicht_angefordert" 1 "Anzeige_Zeitluecke_angefordert" ;
|
||||
VAL_ 780 ACC_Tachokranz 0 "Tachokranz_nicht_beleuchtet" 1 "Tachokranz_beleuchtet" ;
|
||||
VAL_ 780 ACC_Display_Prio 0 "hoechste_Prio" 1 "mittlere_Prio" 2 "geringe_Prio" 3 "keine_Prio" ;
|
||||
VAL_ 780 ACC_Relevantes_Objekt 0 "Symbol_nicht_beleuchtet" 1 "Farbe_1_typisch_gruen" 2 "Farbe_2_typisch_rot" 3 "Farbe_3_typisch_gelb" ;
|
||||
VAL_ 780 ACC_Texte_Primaeranz 0 "keine Anzeige" 1 "ACC nicht verfuegbar !" 2 "Auto_Auto_ _ _" 3 "Auto_ _Auto_ _" 4 "Auto_ _ _Auto_" 5 "Auto_ _ _ _Auto" 6 "Auto_Auto_ _ _ Gong (durchgestrichen)" 7 "Auto_ _Auto_ _ Gong (durchgestrichen)" 8 "Auto_ _ _Auto_ Gong (durchgestrichen)" 9 "Auto_ _ _ _Auto Gong (durchgestrichen)" 10 "ACC bereit" 11 "keine Abstandsregelung" 12 "ACC Sensor Sicht !" 13 "ACC nicht verfuegbar" 14 "o o o" 15 "Hochschalten" 16 "ESP Eingriff" 17 "Herunterschalten" 18 "Parkbremse !" 19 "Geschwindigkeitsgrenze" 20 "Waehlhebelposition !" 21 "VDA ACC-Symbol YYY km/h / mph" 22 "Tempolimit XXX km/h / mph" 23 "Kurve XXX km/h / mph" 24 "ACC Abschaltung" 25 "Symbol 'Eieruhr'" 26 "!" 27 "--- km/h / mph" 28 "XXX km/h / mph (Schriftart 2)" 29 "Lenkradwinkel" 30 "Anfahren bestaetigen" 31 "Fahrzeug verloren" 32 "Im Stand nicht moeglich" 33 "Ungueltiger Anfahrbefehl" 34 "Tuer offen !" 35 "Fahrer Gurtschloss offen !" 36 "Schalthebelposition !" 37 "Drehzahl !" 38 "Kurvenassistent aus" 39 "Tempolimit aus" 40 "Abbiegeassistent" 41 "Ortsanfang XXX km/h / mph" 42 "Ortsende XXX km/h / mph" 43 "Tempolimit Ende XXX km/h / mph" 44 "HDC aktiv" 45 "braking guard Bremsruck" 46 "braking guard aus" 47 "braking guard aus" 48 "Uebernehmen !" 49 "Steigung zu gross" 50 "Stehendes Objekt voraus" 51 "SET / 'GRA Symbol'___xxx km/h / mph" 52 "SET / 'GRA Symbol' xxx km/h / mph" 53 "ACC aus" 54 "ACC startet" 55 "ACC reinigen" 56 "ACC Fehler" 57 "ACC haelt an !" 58 "Bremse betaetigen !" 59 "Kupplung betaetigt" 60 "LIM AUS" 61 "LIM AKTIV" 62 "LIM PASSIV" 63 "LIM FEHLER" 64 "Bremse ueberhitzt !" 65 "Bremse haelt !" 66 "ESP PASSIV !" 67 "ACC_anfahrbereit" 68 "Gang_einlegen" 69 "Rechtsueberholen_verhindert" 70 "Linksueberholen_verhindert" 71 "Achtung_Geschwindigkeitsueberschreitung" 72 "Tempolimit_und_Kurvenassistent_nicht_verfuegbar" ;
|
||||
VAL_ 780 ACC_Wunschgeschw_erreicht 0 "Wunschgeschwindigkeit_nicht_erreicht" 1 "Wunschgeschwindigkeit_erreicht" ;
|
||||
VAL_ 780 ACC_Typ_Tachokranz_unten 0 "LEDs_an" 1 "LEDs_aus" ;
|
||||
VAL_ 780 ACC_Status_Anzeige 0 "ACC_GRA_Hauptschalter_aus" 1 "ACC_in_Init_nicht_bei_GRA" 2 "ACC_GRA_passiv" 3 "ACC_GRA_aktiv" 4 "ACC_GRA_im_Hintergrund_uebertreten" 5 "ACC_GRA_Abschaltreaktion" 6 "ACC_reversibel_aus_nicht_bei_GRA" 7 "ACC_GRA_irreversibel_aus" ;
|
||||
VAL_ 804 ACC_Texte_Sekundaeranz 0 "keine_Anzeige" 1 "Zielfahrzeug_erkannt" 2 "Rechtskurve_voraus" 3 "Linkskurve_voraus" 4 "Tempolimit_voraus" 5 "Sensorsicht" 6 "Anfahrbereit" 7 "Tempolimit_erkannt" 8 "Kreuzung_voraus" 9 "Kreisverkehr_voraus" ;
|
||||
VAL_ 804 ACC_Texte_Zusatzanz 0 "keine_Anzeige" 1 "ACC_AUS" 2 "ACC_BEREIT" 3 "UEBERTRETEN" 4 "ABSTAND" 5 "DISTANZ_1" 6 "DISTANZ_2" 7 "DISTANZ_3" 8 "DISTANZ_4" 9 "DISTANZ_1__dyn" 10 "DISTANZ_2__dyn" 11 "DISTANZ_3__dyn" 12 "DISTANZ_4__dyn" 13 "DISTANZ_1__stand" 14 "DISTANZ_2__stand" 15 "DISTANZ_3__stand" 16 "DISTANZ_4__stand" 17 "DISTANZ_1__comf" 18 "DISTANZ_2__comf" 19 "DISTANZ_3__comf" 20 "DISTANZ_4__comf" 21 "DISTANZ_1__efficiency" 22 "DISTANZ_2__efficiency" 23 "DISTANZ_3__efficiency" 24 "DISTANZ_4__efficiency" 25 "DISTANZ_5" 26 "DISTANZ_5__dyn" 27 "DISTANZ_5__stand" 28 "DISTANZ_5__comf" 29 "DISTANZ_5__efficiency" 30 "ACHTUNG" 31 "Abstandsanzeige" 32 "Abstandsanz_Warnung_aktiviert" ;
|
||||
VAL_ 804 ACC_Status_Zusatzanz 0 "keine Anzeige" 1 "Bild 1 (Fzg. Silhouette, typ. farblos)" 2 "Bild 2 (Fzg. Farbe 1, typ. grau)" 3 "Bild 3 (Fzg. Farbe 2, typ. rot)" 4 "Bild 4 (Symbol 1 ACCplus, typ. Doppelfzg. gelb)" 5 "Bild 5 (Symbol 2 ACCplus, typ. Doppelfzg. grau)" 6 "Bild 6 (Fzg. Farbe 2, typ. rot) mit Priorität im Kombi (Pop-up)" ;
|
||||
VAL_ 804 ACC_Texte 0 "keine_Anzeige" 1 "ACC_nicht_verfuegbar" 2 "ACC_und_AWV_nicht_verfuegbar" 3 "ACC_keine_Sensorsicht" 4 "ACC_und_AWV_keine_Sensorsicht" 5 "ACC_Steigung_zu_gross" 6 "ACC_nur_in_Fahrstufe_verfuegbar" 7 "ACC_Parkbremse_betaetigt" 8 "ACC_ESP_Eingriff" 9 "ACC_Bitte_uebernehmen" 10 "ACC_HDC_betaetigt" 11 "ACC_Geschwindigkeitsgrenze" 12 "ACC_Schalthebelposition" 13 "ACC_Drehzahl" 14 "ACC_Kupplung_betaetigt" 15 "ACC_Aktivierverhinderung" 16 "ACC_Abschaltung" 17 "ACC_Parkassistent_aktiv" 18 "ACC_ESC_aus" 19 "ACC_Charisma_Modus_inkompatibel" 20 "ACC_Stehendes_Objekt_voraus" 21 "ACA_Fahreruebernahme" 22 "ACA_Querfuehrung_nicht_verfuegbar" ;
|
||||
VAL_ 804 ACC_Texte_braking_guard 0 "keine_Anzeige" 1 "AWV_aus" 2 "AWV_Warnung" 3 "AWV_Demomodus" 4 "AWV_Systemstoerung" 5 "AWV_Eingriff" 6 "AWV_Vorwarnung_aus" 7 "AWV_keine_Sensorsicht" ;
|
||||
VAL_ 804 ACC_Warnhinweis 0 "kein_Warnhinweis" 1 "Warnhinweis" ;
|
||||
VAL_ 804 ACC_Zeitluecke_Abstandswarner 61 "Freifahrt" 62 "nicht_definiert" 63 "keine_Anzeige" ;
|
||||
VAL_ 804 ACC_Abstand_Abstandswarner 509 "Freifahrt" 510 "nicht_definiert" 511 "keine_Anzeige" ;
|
||||
VAL_ 804 ACC_Tempolimit 0 "keine_Anzeige" 1 "5_zulHoechstgeschw" 2 "7_zulHoechstgeschw" 3 "10_zulHoechstgeschw" 4 "15_zulHoechstgeschw" 5 "20_zulHoechstgeschw" 6 "25_zulHoechstgeschw" 7 "30_zulHoechstgeschw" 8 "35_zulHoechstgeschw" 9 "40_zulHoechstgeschw" 10 "45_zulHoechstgeschw" 11 "50_zulHoechstgeschw" 12 "55_zulHoechstgeschw" 13 "60_zulHoechstgeschw" 14 "65_zulHoechstgeschw" 15 "70_zulHoechstgeschw" 16 "75_zulHoechstgeschw" 17 "80_zulHoechstgeschw" 18 "85_zulHoechstgeschw" 19 "90_zulHoechstgeschw" 20 "95_zulHoechstgeschw" 21 "100_zulHoechstgeschw" 22 "110_zulHoechstgeschw" 23 "120_zulHoechstgeschw" 24 "130_zulHoechstgeschw" 25 "140_zulHoechstgeschw" 26 "150_zulHoechstgeschw" 27 "160_zulHoechstgeschw" 28 "200_zulHoechstgeschw" 30 "250_zulHoechstgeschw" 31 "Ende_zulHoechstgeschw" ;
|
||||
VAL_ 804 ACC_Charisma_FahrPr 0 "keine_Funktion" 1 "Programm_1" 2 "Programm_2" 3 "Programm_3" 4 "Programm_4" 5 "Programm_5" 6 "Programm_6" 7 "Programm_7" 8 "Programm_8" 9 "Programm_9" 10 "Programm_10" 11 "Programm_11" 12 "Programm_12" 13 "Programm_13" 14 "Programm_14" 15 "Programm_15" ;
|
||||
VAL_ 804 ACC_Charisma_Status 0 "Init" 1 "verfuegbar" 2 "nicht_verfuegbar" 3 "asynchron_durch_Fahrerwunsch" ;
|
||||
VAL_ 804 ACC_Texte_Abstandswarner 0 "keine_Anzeige" 1 "Systemstoerung" 2 "keine_Sensorsicht" 3 "zurzeit_eingeschraenkt" ;
|
||||
VAL_ 290 ACC_limitierte_Anfahrdyn 0 "keine_Limitierung" 1 "Limitierung_Anfahrdynamik_angefordert" ;
|
||||
VAL_ 290 ACC_nachtr_Stopp_Anf 0 "nicht_angefordert" 1 "angefordert" ;
|
||||
VAL_ 290 ACC_StartStopp_Info 0 "Motorlauf_langfristig_nicht_notwendig_Stoppfreigabe" 1 "Motoranlauf_nicht_zwingend_notwendig_Stoppverbot_keine_Startanforderung" 2 "Motoranlauf_zwingend_notwendig_Startanforderung" 3 "Systemfehler" ;
|
||||
VAL_ 290 ACC_Sollbeschleunigung_02 2046 "Neutralwert" 2047 "Fehler" ;
|
||||
VAL_ 290 ACC_Anfahren 0 "keine_Anforderung_Anfahren" 1 "Anforderung_Anfahren" ;
|
||||
VAL_ 290 ACC_Anhalten 0 "kein_Anhalten_gewuenscht" 1 "Anhalten_gewuenscht" ;
|
||||
VAL_ 290 ACC_Typ 0 "Basis_ACC" 1 "ACC_mit_FollowToStop" 2 "ACC_mit_StopAndGo" 3 "ACC_nicht_codiert" ;
|
||||
VAL_ 290 ACC_Status_ACC 0 "ACC_OFF_Hauptschalter_aus" 1 "ACC_INIT" 2 "ACC_STANDBY" 3 "ACC_AKTIV_regelt" 4 "ACC_OVERRIDE" 5 "ACC_Abschaltreaktion" 6 "reversibler_Fehler_im_ACC_System" 7 "irreversibler_Fehler_im_ACC_System" ;
|
||||
VAL_ 290 ACC_Minimale_Bremsung 0 "Anforderung_Minimale_Bremsung_nicht_aktiv" 1 "Anforderung_Minimale_Bremsung_aktiv" ;
|
||||
VAL_ 302 ACC_Anhalteweg 2046 "Neutralwert" 2047 "Fehler" ;
|
||||
VAL_ 302 ACC_Anhalten 0 "kein_Anhalten_gewuenscht" 1 "Anhalten_gewuenscht" ;
|
||||
VAL_ 302 ACC_Freilauf_Anf 0 "keine Freilauf-Anforderung" 1 "Freilauf-Anforderung" ;
|
||||
VAL_ 302 ACC_Freilauf_Info 0 "Freilauf_freigegeben" 1 "kein_Uebergang_in_Freilauf_zulaessig" 2 "Freilauf_nicht_freigegeben" 3 "Freilauf_Anforderung" ;
|
||||
VAL_ 302 ACC_Anforderung_HMS 0 "keine_Anforderung" 1 "halten" 2 "parken" 3 "halten_Standby" 4 "anfahren" 5 "Loesen_ueber_Rampe" ;
|
||||
VAL_ 302 ACC_Anfahren 0 "keine_Anforderung_Anfahren" 1 "Anforderung_Anfahren" ;
|
||||
VAL_ 302 ACC_Folgebeschl 254 "Neutralwert" ;
|
||||
VAL_ 302 ACC_Sollbeschleunigung_02 2046 "Neutralwert" 2047 "Fehler" ;
|
||||
VAL_ 279 AWV1_Anf_Prefill 0 "Prefill_nicht_aktivieren" 1 "Prefill_aktivieren" ;
|
||||
VAL_ 279 ANB_CM_Info 0 "Standard" 1 "Erweitert" ;
|
||||
VAL_ 279 AWV2_Freigabe 0 "keine_Freigabe" 1 "Freigabe" ;
|
||||
VAL_ 279 AWV1_HBA_Param 0 "Defaultparametersatz" 1 "Parametersatz_mit_leicht_erhoehter_Empfindlichkeit" 2 "Parametersatz_mit_erhoehter_Empfindlichkeit" 3 "Parametersatz_mit_hoechster_Empfindlichkeit" ;
|
||||
VAL_ 279 AWV2_Priowarnung 0 "Anzeige_Verlassen_der_Fahrspur_wird_nicht_unterdrueckt" 1 "Anzeige_Verlassen_der_Fahrspur_wird_unterdrueckt" ;
|
||||
VAL_ 279 ANB_CM_Anforderung 0 "keine_Anforderung" 1 "Anforderung_aktiv" ;
|
||||
VAL_ 279 ANB_Info_Teilbremsung 0 "Auspraegung_Standard" 1 "Auspraegung_Erweitert" ;
|
||||
VAL_ 279 ANB_Notfallblinken 0 "kein_ANB_Notfallblinken" 1 "Notfallblinken_ANB_angefordert" ;
|
||||
VAL_ 279 ANB_Teilbremsung_Freigabe 0 "Teilbremsung_nicht_freigegeben" 1 "Teilbremsung_freigegeben" ;
|
||||
VAL_ 279 ANB_Zielbremsung_Freigabe 0 "Zielbremsung_nicht_freigegeben" 1 "Zielbremsung_freigegeben" ;
|
||||
VAL_ 279 AWV_Vorstufe 0 "keine_Notbremsung_erwartet" 1 "Notbremsung_in_Kuerze" ;
|
||||
VAL_ 279 AWV_Halten 0 "keine_Anforderung" 1 "Anforderung_das_Fzg_im_Stillstand_zu_halten" ;
|
||||
VAL_ 279 AWV_CityANB_Auspraegung 0 "autom_Bremsung_im_ges_vBereich" 1 "autom_Bremsung_im_def_vBereich" ;
|
||||
VAL_ 279 PCF_Freigabe 0 "keine_Freigabe_PreCrashFront" 1 "Freigabe_PreCrashFront" ;
|
||||
VAL_ 279 AWV1_ECD_Anlauf 0 "ECD_Anlauf_nicht_aktivieren" 1 "ECD_Anlauf_aktivieren" ;
|
||||
VAL_ 279 PCF_Time_to_collision 255 "Objektstatus=0x0__oder_berechneter_TTC_Wert_groesser_als_Maximalwert" ;
|
||||
VAL_ 679 ACC_Regelgeschw 1023 "keine_Anzeige" ;
|
||||
VAL_ 679 ACC_Einheit_maxSetzgeschw 0 "kmh" 1 "mph" ;
|
||||
VAL_ 679 ACC_maxSetzgeschw 511 "Init_Neutralwert" ;
|
||||
VAL_ 679 ACC_minRegelgeschw 255 "keine_Anzeige" ;
|
||||
VAL_ 679 ACC_maxRegelgeschw 255 "keine_Anzeige" ;
|
||||
VAL_ 679 ACC_Tempolimitassistent 0 "keine_Anzeige" 1 "Tempolimitassistent_aktiv" 2 "Tempolimitassistent_nicht_verfuegbar" 3 "Tempolimitassistent_Fahreruebernahme" ;
|
||||
VAL_ 679 ACC_Kurvenassistent 0 "keine_Anzeige" 1 "Kreuzung" 2 "Rechtskurve" 3 "Linkskurve" 4 "Kreisverkehr" ;
|
||||
VAL_ 679 ACC_RUV 0 "keine_Anzeige" 1 "RUV_aktiv_Rechtsverkehr" 2 "RUV_aktiv_Linksverkehr" ;
|
||||
VAL_ 679 ACC_Tachokranz 0 "Tachokranz_nicht_beleuchtet" 1 "Tachokranz_beleuchtet" ;
|
||||
VAL_ 679 ACC_Typ_Tachokranz_unten 0 "LEDs_an" 1 "LEDs_aus" ;
|
||||
VAL_ 679 ACC_ENG_Texte 0 "keine_Anzeige" 1 "keine_Laenderverfuegbarkeit" 2 "nicht_verfuegbar" 3 "Geschwindigkeitsgrenze" ;
|
||||
VAL_ 681 AWV_Warnung 0 "keine_Anzeige" 1 "latente_Vorwarnung" 2 "Vorwarnung" 3 "Akutwarnung" 4 "Eingriff" 5 "Fahreruebernahmeaufforderung" 6 "Abbiegewarnung" ;
|
||||
VAL_ 681 AWV_Texte 0 "keine_Anzeige" 1 "Systemstoerung" 2 "keine_Sensorsicht" 3 "Demomodus" 4 "System_aus" 5 "nicht_definiert" 6 "ESC_aus" 7 "zurzeit_eingeschraenkt" ;
|
||||
VAL_ 681 AWV_Status_Anzeige 0 "Init" 1 "verfuegbar" 2 "nicht_verfuegbar" ;
|
||||
VAL_ 681 AWV_Einstellung_System_FSG 0 "deaktiviert" 1 "aktiviert" ;
|
||||
VAL_ 681 AWV_Einstellung_Warnung_FSG 0 "Aus" 1 "Setting_2" 2 "Setting_3" 3 "Setting_4" 4 "Setting_5" 5 "Ein" ;
|
||||
VAL_ 681 AWV_Warnlevel 0 "keine_Gefaehrdung" 63 "max_Gefaehrdung" ;
|
||||
VAL_ 391 GearPosition 2 "P" 3 "R" 4 "N" 5 "D" 6 "D" ;
|
||||
VAL_ 391 RegenBrakingMode 0 "default" 1 "B1" 2 "B2" 3 "B3" ;
|
||||
VAL_ 870 Fast_Send_Rate_Active 0 "1 Hz" 1 "50 Hz" ;
|
||||
VAL_ 1720 KBI_Variante_USA 0 "keine USA-Variante" 1 "USA-Variante" ;
|
||||
VAL_ 1720 KBI_Variante 0 "Zeiger Kombiinstrument" 1 "Volldisplay Kombiinstrument" ;
|
||||
VAL_ 1720 KBI_BCmE_aktiv 0 "Anzeige_nicht_aktiv" 1 "Anzeige_aktiv" ;
|
||||
|
||||
@@ -21,15 +21,19 @@ Programming
|
||||
**Panda**
|
||||
|
||||
```
|
||||
./flash.sh # for any panda
|
||||
./recover.sh # flash bootstub
|
||||
```
|
||||
|
||||
```
|
||||
./flash.sh # flash application
|
||||
```
|
||||
|
||||
Troubleshooting
|
||||
----
|
||||
|
||||
If your panda will not flash and is quickly blinking a single Green LED, use `recover.sh`.
|
||||
|
||||
A [panda paw](https://comma.ai/shop/products/panda-paw) can be used to put panda into DFU mode.
|
||||
If your panda will not flash and green LED is on, use `recover.sh`.
|
||||
If panda is blinking fast with green LED, use `flash.sh`.
|
||||
Otherwise if LED is off and panda can't be seen with `lsusb` command, use [panda paw](https://comma.ai/shop/products/panda-paw) to go into DFU mode.
|
||||
|
||||
|
||||
[dfu-util](http://github.com/dsigma/dfu-util.git) for flashing
|
||||
|
||||
@@ -11,7 +11,7 @@ build_projects = {}
|
||||
build_projects["pedal"] = {
|
||||
"MAIN": "pedal/main.c",
|
||||
"STARTUP_FILE": "stm32fx/startup_stm32f205xx.s",
|
||||
"LINKER_SCRIPT": "stm32fx/stm32fx_flash.ld",
|
||||
"LINKER_SCRIPT": "stm32fx/stm32f2_flash.ld",
|
||||
"APP_START_ADDRESS": "0x8004000",
|
||||
"PROJECT_FLAGS": [
|
||||
"-mcpu=cortex-m3",
|
||||
@@ -29,7 +29,7 @@ build_projects["pedal_usb"]["PROJECT_FLAGS"].append("-DPEDAL_USB")
|
||||
build_projects["panda"] = {
|
||||
"MAIN": "main.c",
|
||||
"STARTUP_FILE": "stm32fx/startup_stm32f413xx.s",
|
||||
"LINKER_SCRIPT": "stm32fx/stm32fx_flash.ld",
|
||||
"LINKER_SCRIPT": "stm32fx/stm32f4_flash.ld",
|
||||
"APP_START_ADDRESS": "0x8004000",
|
||||
"PROJECT_FLAGS": [
|
||||
"-mcpu=cortex-m4",
|
||||
@@ -152,6 +152,9 @@ for project_name in build_projects:
|
||||
"-std=gnu11",
|
||||
] + project["PROJECT_FLAGS"] + common_flags
|
||||
|
||||
if ("ENABLE_SPI" in os.environ or "h7" in project_name) and not project_name.startswith('pedal'):
|
||||
flags.append('-DENABLE_SPI')
|
||||
|
||||
project_env = Environment(
|
||||
ENV=os.environ,
|
||||
CC=PREFIX + 'gcc',
|
||||
|
||||
@@ -57,26 +57,6 @@ void black_set_usb_load_switch(bool enabled) {
|
||||
set_gpio_output(GPIOB, 1, !enabled);
|
||||
}
|
||||
|
||||
void black_set_usb_power_mode(uint8_t mode) {
|
||||
bool valid = false;
|
||||
switch (mode) {
|
||||
case USB_POWER_CLIENT:
|
||||
black_set_usb_load_switch(false);
|
||||
valid = true;
|
||||
break;
|
||||
case USB_POWER_CDP:
|
||||
black_set_usb_load_switch(true);
|
||||
valid = true;
|
||||
break;
|
||||
default:
|
||||
puts("Invalid USB power mode\n");
|
||||
break;
|
||||
}
|
||||
if (valid) {
|
||||
usb_power_mode = mode;
|
||||
}
|
||||
}
|
||||
|
||||
void black_set_gps_mode(uint8_t mode) {
|
||||
switch (mode) {
|
||||
case GPS_DISABLED:
|
||||
@@ -162,9 +142,6 @@ void black_init(void) {
|
||||
// Turn on USB load switch.
|
||||
black_set_usb_load_switch(true);
|
||||
|
||||
// Set right power mode
|
||||
black_set_usb_power_mode(USB_POWER_CDP);
|
||||
|
||||
// Initialize harness
|
||||
harness_init();
|
||||
|
||||
@@ -204,21 +181,22 @@ const harness_configuration black_harness_config = {
|
||||
|
||||
const board board_black = {
|
||||
.board_type = "Black",
|
||||
.board_tick = unused_board_tick,
|
||||
.harness_config = &black_harness_config,
|
||||
.has_gps = true,
|
||||
.has_hw_gmlan = false,
|
||||
.has_obd = true,
|
||||
.has_lin = false,
|
||||
.has_spi = false,
|
||||
.has_canfd = false,
|
||||
.has_rtc_battery = false,
|
||||
.fan_max_rpm = 0U,
|
||||
.init = black_init,
|
||||
.enable_can_transceiver = black_enable_can_transceiver,
|
||||
.enable_can_transceivers = black_enable_can_transceivers,
|
||||
.set_led = black_set_led,
|
||||
.set_usb_power_mode = black_set_usb_power_mode,
|
||||
.set_gps_mode = black_set_gps_mode,
|
||||
.set_can_mode = black_set_can_mode,
|
||||
.usb_power_mode_tick = unused_usb_power_mode_tick,
|
||||
.check_ignition = black_check_ignition,
|
||||
.read_current = unused_read_current,
|
||||
.set_fan_enabled = unused_set_fan_enabled,
|
||||
|
||||
@@ -3,10 +3,8 @@ typedef void (*board_init)(void);
|
||||
typedef void (*board_enable_can_transceiver)(uint8_t transceiver, bool enabled);
|
||||
typedef void (*board_enable_can_transceivers)(bool enabled);
|
||||
typedef void (*board_set_led)(uint8_t color, bool enabled);
|
||||
typedef void (*board_set_usb_power_mode)(uint8_t mode);
|
||||
typedef void (*board_set_gps_mode)(uint8_t mode);
|
||||
typedef void (*board_set_can_mode)(uint8_t mode);
|
||||
typedef void (*board_usb_power_mode_tick)(uint32_t uptime);
|
||||
typedef bool (*board_check_ignition)(void);
|
||||
typedef uint32_t (*board_read_current)(void);
|
||||
typedef void (*board_set_ir_power)(uint8_t percentage);
|
||||
@@ -14,6 +12,7 @@ typedef void (*board_set_fan_enabled)(bool enabled);
|
||||
typedef void (*board_set_phone_power)(bool enabled);
|
||||
typedef void (*board_set_clock_source_mode)(uint8_t mode);
|
||||
typedef void (*board_set_siren)(bool enabled);
|
||||
typedef void (*board_board_tick)(bool ignition, bool usb_enum, bool heartbeat_seen);
|
||||
|
||||
struct board {
|
||||
const char *board_type;
|
||||
@@ -22,16 +21,16 @@ struct board {
|
||||
const bool has_hw_gmlan;
|
||||
const bool has_obd;
|
||||
const bool has_lin;
|
||||
const bool has_spi;
|
||||
const bool has_canfd;
|
||||
const bool has_rtc_battery;
|
||||
const uint16_t fan_max_rpm;
|
||||
board_init init;
|
||||
board_enable_can_transceiver enable_can_transceiver;
|
||||
board_enable_can_transceivers enable_can_transceivers;
|
||||
board_set_led set_led;
|
||||
board_set_usb_power_mode set_usb_power_mode;
|
||||
board_set_gps_mode set_gps_mode;
|
||||
board_set_can_mode set_can_mode;
|
||||
board_usb_power_mode_tick usb_power_mode_tick;
|
||||
board_check_ignition check_ignition;
|
||||
board_read_current read_current;
|
||||
board_set_ir_power set_ir_power;
|
||||
@@ -39,6 +38,7 @@ struct board {
|
||||
board_set_phone_power set_phone_power;
|
||||
board_set_clock_source_mode set_clock_source_mode;
|
||||
board_set_siren set_siren;
|
||||
board_board_tick board_tick;
|
||||
};
|
||||
|
||||
// ******************* Definitions ********************
|
||||
@@ -51,6 +51,8 @@ struct board {
|
||||
#define HW_TYPE_UNO 5U
|
||||
#define HW_TYPE_DOS 6U
|
||||
#define HW_TYPE_RED_PANDA 7U
|
||||
#define HW_TYPE_RED_PANDA_V2 8U
|
||||
#define HW_TYPE_TRES 9U
|
||||
|
||||
// LED colors
|
||||
#define LED_RED 0U
|
||||
@@ -73,6 +75,3 @@ struct board {
|
||||
#define CAN_MODE_GMLAN_CAN2 1U
|
||||
#define CAN_MODE_GMLAN_CAN3 2U
|
||||
#define CAN_MODE_OBD_CAN2 3U
|
||||
|
||||
// ********************* Globals **********************
|
||||
uint8_t usb_power_mode = USB_POWER_NONE;
|
||||
|
||||
+28
-19
@@ -53,23 +53,15 @@ void dos_set_bootkick(bool enabled){
|
||||
set_gpio_output(GPIOC, 4, !enabled);
|
||||
}
|
||||
|
||||
void dos_set_usb_power_mode(uint8_t mode) {
|
||||
bool valid = false;
|
||||
switch (mode) {
|
||||
case USB_POWER_CLIENT:
|
||||
dos_set_bootkick(false);
|
||||
valid = true;
|
||||
break;
|
||||
case USB_POWER_CDP:
|
||||
dos_set_bootkick(true);
|
||||
valid = true;
|
||||
break;
|
||||
default:
|
||||
puts("Invalid USB power mode\n");
|
||||
break;
|
||||
}
|
||||
if (valid) {
|
||||
usb_power_mode = mode;
|
||||
void dos_board_tick(bool ignition, bool usb_enum, bool heartbeat_seen) {
|
||||
if (ignition && !usb_enum) {
|
||||
// enable bootkick if ignition seen
|
||||
dos_set_bootkick(true);
|
||||
} else if (heartbeat_seen) {
|
||||
// disable once openpilot is up
|
||||
dos_set_bootkick(false);
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,6 +139,15 @@ void dos_init(void) {
|
||||
set_gpio_output(GPIOC, 10, 1);
|
||||
set_gpio_output(GPIOC, 11, 1);
|
||||
|
||||
#ifdef ENABLE_SPI
|
||||
// A4-A7: SPI
|
||||
set_gpio_alternate(GPIOA, 4, GPIO_AF5_SPI1);
|
||||
set_gpio_alternate(GPIOA, 5, GPIO_AF5_SPI1);
|
||||
set_gpio_alternate(GPIOA, 6, GPIO_AF5_SPI1);
|
||||
set_gpio_alternate(GPIOA, 7, GPIO_AF5_SPI1);
|
||||
register_set_bits(&(GPIOA->OSPEEDR), GPIO_OSPEEDER_OSPEEDR4 | GPIO_OSPEEDER_OSPEEDR5 | GPIO_OSPEEDER_OSPEEDR6 | GPIO_OSPEEDER_OSPEEDR7);
|
||||
#endif
|
||||
|
||||
// C8: FAN PWM aka TIM3_CH3
|
||||
set_gpio_alternate(GPIOC, 8, GPIO_AF2_TIM3);
|
||||
|
||||
@@ -173,6 +174,9 @@ void dos_init(void) {
|
||||
dos_set_led(LED_GREEN, false);
|
||||
dos_set_led(LED_BLUE, false);
|
||||
|
||||
// Bootkick
|
||||
dos_set_bootkick(true);
|
||||
|
||||
// Set normal CAN mode
|
||||
dos_set_can_mode(CAN_MODE_NORMAL);
|
||||
|
||||
@@ -201,21 +205,26 @@ const harness_configuration dos_harness_config = {
|
||||
|
||||
const board board_dos = {
|
||||
.board_type = "Dos",
|
||||
.board_tick = dos_board_tick,
|
||||
.harness_config = &dos_harness_config,
|
||||
.has_gps = false,
|
||||
.has_hw_gmlan = false,
|
||||
.has_obd = true,
|
||||
.has_lin = false,
|
||||
#ifdef ENABLE_SPI
|
||||
.has_spi = true,
|
||||
#else
|
||||
.has_spi = false,
|
||||
#endif
|
||||
.has_canfd = false,
|
||||
.has_rtc_battery = true,
|
||||
.fan_max_rpm = 6500U,
|
||||
.init = dos_init,
|
||||
.enable_can_transceiver = dos_enable_can_transceiver,
|
||||
.enable_can_transceivers = dos_enable_can_transceivers,
|
||||
.set_led = dos_set_led,
|
||||
.set_usb_power_mode = dos_set_usb_power_mode,
|
||||
.set_gps_mode = unused_set_gps_mode,
|
||||
.set_can_mode = dos_set_can_mode,
|
||||
.usb_power_mode_tick = unused_usb_power_mode_tick,
|
||||
.check_ignition = dos_check_ignition,
|
||||
.read_current = unused_read_current,
|
||||
.set_fan_enabled = dos_set_fan_enabled,
|
||||
|
||||
@@ -35,21 +35,22 @@ void grey_set_gps_mode(uint8_t mode) {
|
||||
|
||||
const board board_grey = {
|
||||
.board_type = "Grey",
|
||||
.board_tick = unused_board_tick,
|
||||
.harness_config = &white_harness_config,
|
||||
.has_gps = true,
|
||||
.has_hw_gmlan = true,
|
||||
.has_obd = false,
|
||||
.has_lin = true,
|
||||
.has_spi = false,
|
||||
.has_canfd = false,
|
||||
.has_rtc_battery = false,
|
||||
.fan_max_rpm = 0U,
|
||||
.init = grey_init,
|
||||
.enable_can_transceiver = white_enable_can_transceiver,
|
||||
.enable_can_transceivers = white_enable_can_transceivers,
|
||||
.set_led = white_set_led,
|
||||
.set_usb_power_mode = white_set_usb_power_mode,
|
||||
.set_gps_mode = grey_set_gps_mode,
|
||||
.set_can_mode = white_set_can_mode,
|
||||
.usb_power_mode_tick = unused_usb_power_mode_tick,
|
||||
.check_ignition = white_check_ignition,
|
||||
.read_current = white_read_current,
|
||||
.set_fan_enabled = unused_set_fan_enabled,
|
||||
|
||||
@@ -30,11 +30,6 @@ void pedal_set_led(uint8_t color, bool enabled) {
|
||||
}
|
||||
}
|
||||
|
||||
void pedal_set_usb_power_mode(uint8_t mode){
|
||||
usb_power_mode = mode;
|
||||
puts("Trying to set USB power mode on pedal. This is not supported.\n");
|
||||
}
|
||||
|
||||
void pedal_set_gps_mode(uint8_t mode) {
|
||||
UNUSED(mode);
|
||||
puts("Trying to set ESP/GPS mode on pedal. This is not supported.\n");
|
||||
@@ -78,21 +73,22 @@ const harness_configuration pedal_harness_config = {
|
||||
|
||||
const board board_pedal = {
|
||||
.board_type = "Pedal",
|
||||
.board_tick = unused_board_tick,
|
||||
.harness_config = &pedal_harness_config,
|
||||
.has_gps = false,
|
||||
.has_hw_gmlan = false,
|
||||
.has_obd = false,
|
||||
.has_lin = false,
|
||||
.has_spi = false,
|
||||
.has_canfd = false,
|
||||
.has_rtc_battery = false,
|
||||
.fan_max_rpm = 0U,
|
||||
.init = pedal_init,
|
||||
.enable_can_transceiver = pedal_enable_can_transceiver,
|
||||
.enable_can_transceivers = pedal_enable_can_transceivers,
|
||||
.set_led = pedal_set_led,
|
||||
.set_usb_power_mode = pedal_set_usb_power_mode,
|
||||
.set_gps_mode = pedal_set_gps_mode,
|
||||
.set_can_mode = pedal_set_can_mode,
|
||||
.usb_power_mode_tick = unused_usb_power_mode_tick,
|
||||
.check_ignition = pedal_check_ignition,
|
||||
.read_current = unused_read_current,
|
||||
.set_fan_enabled = unused_set_fan_enabled,
|
||||
|
||||
+24
-31
@@ -53,25 +53,6 @@ void red_set_usb_load_switch(bool enabled) {
|
||||
set_gpio_output(GPIOB, 14, !enabled);
|
||||
}
|
||||
|
||||
void red_set_usb_power_mode(uint8_t mode) {
|
||||
bool valid = false;
|
||||
switch (mode) {
|
||||
case USB_POWER_CLIENT:
|
||||
red_set_usb_load_switch(false);
|
||||
valid = true;
|
||||
break;
|
||||
case USB_POWER_CDP:
|
||||
red_set_usb_load_switch(true);
|
||||
valid = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (valid) {
|
||||
usb_power_mode = mode;
|
||||
}
|
||||
}
|
||||
|
||||
void red_set_can_mode(uint8_t mode) {
|
||||
switch (mode) {
|
||||
case CAN_MODE_NORMAL:
|
||||
@@ -118,13 +99,6 @@ bool red_check_ignition(void) {
|
||||
void red_init(void) {
|
||||
common_init_gpio();
|
||||
|
||||
//C4,A1: OBD_SBU1, OBD_SBU2
|
||||
set_gpio_pullup(GPIOC, 4, PULL_NONE);
|
||||
set_gpio_mode(GPIOC, 4, MODE_ANALOG);
|
||||
|
||||
set_gpio_pullup(GPIOA, 1, PULL_NONE);
|
||||
set_gpio_mode(GPIOA, 1, MODE_ANALOG);
|
||||
|
||||
//C10,C11 : OBD_SBU1_RELAY, OBD_SBU2_RELAY
|
||||
set_gpio_output_type(GPIOC, 10, OUTPUT_TYPE_OPEN_DRAIN);
|
||||
set_gpio_pullup(GPIOC, 10, PULL_NONE);
|
||||
@@ -136,12 +110,30 @@ void red_init(void) {
|
||||
set_gpio_mode(GPIOC, 11, MODE_OUTPUT);
|
||||
set_gpio_output(GPIOC, 11, 1);
|
||||
|
||||
// G11,B3,D7,B4: transceiver enable
|
||||
set_gpio_pullup(GPIOG, 11, PULL_NONE);
|
||||
set_gpio_mode(GPIOG, 11, MODE_OUTPUT);
|
||||
|
||||
set_gpio_pullup(GPIOB, 3, PULL_NONE);
|
||||
set_gpio_mode(GPIOB, 3, MODE_OUTPUT);
|
||||
|
||||
set_gpio_pullup(GPIOD, 7, PULL_NONE);
|
||||
set_gpio_mode(GPIOD, 7, MODE_OUTPUT);
|
||||
|
||||
set_gpio_pullup(GPIOB, 4, PULL_NONE);
|
||||
set_gpio_mode(GPIOB, 4, MODE_OUTPUT);
|
||||
|
||||
// B14: usb load switch
|
||||
set_gpio_pullup(GPIOB, 14, PULL_NONE);
|
||||
set_gpio_mode(GPIOB, 14, MODE_OUTPUT);
|
||||
|
||||
//B1: 5VOUT_S
|
||||
set_gpio_pullup(GPIOB, 1, PULL_NONE);
|
||||
set_gpio_mode(GPIOB, 1, MODE_ANALOG);
|
||||
|
||||
// Turn on USB load switch.
|
||||
red_set_usb_load_switch(true);
|
||||
|
||||
// Set right power mode
|
||||
red_set_usb_power_mode(USB_POWER_CDP);
|
||||
|
||||
// Initialize harness
|
||||
harness_init();
|
||||
|
||||
@@ -181,21 +173,22 @@ const harness_configuration red_harness_config = {
|
||||
|
||||
const board board_red = {
|
||||
.board_type = "Red",
|
||||
.board_tick = unused_board_tick,
|
||||
.harness_config = &red_harness_config,
|
||||
.has_gps = false,
|
||||
.has_hw_gmlan = false,
|
||||
.has_obd = true,
|
||||
.has_lin = false,
|
||||
.has_spi = false,
|
||||
.has_canfd = true,
|
||||
.has_rtc_battery = false,
|
||||
.fan_max_rpm = 0U,
|
||||
.init = red_init,
|
||||
.enable_can_transceiver = red_enable_can_transceiver,
|
||||
.enable_can_transceivers = red_enable_can_transceivers,
|
||||
.set_led = red_set_led,
|
||||
.set_usb_power_mode = red_set_usb_power_mode,
|
||||
.set_gps_mode = unused_set_gps_mode,
|
||||
.set_can_mode = red_set_can_mode,
|
||||
.usb_power_mode_tick = unused_usb_power_mode_tick,
|
||||
.check_ignition = red_check_ignition,
|
||||
.read_current = unused_read_current,
|
||||
.set_fan_enabled = unused_set_fan_enabled,
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
// ///////////////////// //
|
||||
// Red Panda chiplet + Harness //
|
||||
// ///////////////////// //
|
||||
|
||||
// Most hardware functionality is similar to red panda
|
||||
|
||||
void red_chiplet_enable_can_transceiver(uint8_t transceiver, bool enabled) {
|
||||
switch (transceiver) {
|
||||
case 1U:
|
||||
set_gpio_output(GPIOG, 11, !enabled);
|
||||
break;
|
||||
case 2U:
|
||||
set_gpio_output(GPIOB, 10, !enabled);
|
||||
break;
|
||||
case 3U:
|
||||
set_gpio_output(GPIOD, 7, !enabled);
|
||||
break;
|
||||
case 4U:
|
||||
set_gpio_output(GPIOB, 11, !enabled);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void red_chiplet_enable_can_transceivers(bool enabled) {
|
||||
uint8_t main_bus = (car_harness_status == HARNESS_STATUS_FLIPPED) ? 3U : 1U;
|
||||
for (uint8_t i=1U; i<=4U; i++) {
|
||||
// Leave main CAN always on for CAN-based ignition detection
|
||||
if (i == main_bus) {
|
||||
red_chiplet_enable_can_transceiver(i, true);
|
||||
} else {
|
||||
red_chiplet_enable_can_transceiver(i, enabled);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void red_chiplet_set_usb_load_switch(bool enabled) {
|
||||
set_gpio_output(GPIOD, 3, enabled);
|
||||
}
|
||||
|
||||
void red_chiplet_init(void) {
|
||||
common_init_gpio();
|
||||
|
||||
//A8, A9 : OBD_SBU1_RELAY, OBD_SBU2_RELAY
|
||||
set_gpio_output_type(GPIOA, 8, OUTPUT_TYPE_OPEN_DRAIN);
|
||||
set_gpio_pullup(GPIOA, 8, PULL_NONE);
|
||||
set_gpio_mode(GPIOA, 8, MODE_OUTPUT);
|
||||
set_gpio_output(GPIOA, 8, 1);
|
||||
|
||||
set_gpio_output_type(GPIOA, 9, OUTPUT_TYPE_OPEN_DRAIN);
|
||||
set_gpio_pullup(GPIOA, 9, PULL_NONE);
|
||||
set_gpio_mode(GPIOA, 9, MODE_OUTPUT);
|
||||
set_gpio_output(GPIOA, 9, 1);
|
||||
|
||||
// G11,B10,D7,B11: transceiver enable
|
||||
set_gpio_pullup(GPIOG, 11, PULL_NONE);
|
||||
set_gpio_mode(GPIOG, 11, MODE_OUTPUT);
|
||||
|
||||
set_gpio_pullup(GPIOB, 10, PULL_NONE);
|
||||
set_gpio_mode(GPIOB, 10, MODE_OUTPUT);
|
||||
|
||||
set_gpio_pullup(GPIOD, 7, PULL_NONE);
|
||||
set_gpio_mode(GPIOD, 7, MODE_OUTPUT);
|
||||
|
||||
set_gpio_pullup(GPIOB, 11, PULL_NONE);
|
||||
set_gpio_mode(GPIOB, 11, MODE_OUTPUT);
|
||||
|
||||
// D3: usb load switch
|
||||
set_gpio_pullup(GPIOD, 3, PULL_NONE);
|
||||
set_gpio_mode(GPIOD, 3, MODE_OUTPUT);
|
||||
|
||||
//B0: 5VOUT_S
|
||||
set_gpio_pullup(GPIOB, 0, PULL_NONE);
|
||||
set_gpio_mode(GPIOB, 0, MODE_ANALOG);
|
||||
|
||||
// Turn on USB load switch.
|
||||
red_chiplet_set_usb_load_switch(true);
|
||||
|
||||
// Initialize harness
|
||||
harness_init();
|
||||
|
||||
// Initialize RTC
|
||||
rtc_init();
|
||||
|
||||
// Enable CAN transceivers
|
||||
red_chiplet_enable_can_transceivers(true);
|
||||
|
||||
// Disable LEDs
|
||||
red_set_led(LED_RED, false);
|
||||
red_set_led(LED_GREEN, false);
|
||||
red_set_led(LED_BLUE, false);
|
||||
|
||||
// Set normal CAN mode
|
||||
red_set_can_mode(CAN_MODE_NORMAL);
|
||||
|
||||
// flip CAN0 and CAN2 if we are flipped
|
||||
if (car_harness_status == HARNESS_STATUS_FLIPPED) {
|
||||
can_flip_buses(0, 2);
|
||||
}
|
||||
}
|
||||
|
||||
const harness_configuration red_chiplet_harness_config = {
|
||||
.has_harness = true,
|
||||
.GPIO_SBU1 = GPIOC,
|
||||
.GPIO_SBU2 = GPIOA,
|
||||
.GPIO_relay_SBU1 = GPIOA,
|
||||
.GPIO_relay_SBU2 = GPIOA,
|
||||
.pin_SBU1 = 4,
|
||||
.pin_SBU2 = 1,
|
||||
.pin_relay_SBU1 = 8,
|
||||
.pin_relay_SBU2 = 9,
|
||||
.adc_channel_SBU1 = 4, // ADC12_INP4
|
||||
.adc_channel_SBU2 = 17 // ADC1_INP17
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
// ///////////////////// //
|
||||
// Red Panda V2 with chiplet + Harness //
|
||||
// ///////////////////// //
|
||||
|
||||
const board board_red_v2 = {
|
||||
.board_type = "Red_v2",
|
||||
.board_tick = unused_board_tick,
|
||||
.harness_config = &red_chiplet_harness_config,
|
||||
.has_gps = false,
|
||||
.has_hw_gmlan = false,
|
||||
.has_obd = true,
|
||||
.has_lin = false,
|
||||
.has_spi = false,
|
||||
.has_canfd = true,
|
||||
.has_rtc_battery = true,
|
||||
.fan_max_rpm = 0U,
|
||||
.init = red_chiplet_init,
|
||||
.enable_can_transceiver = red_chiplet_enable_can_transceiver,
|
||||
.enable_can_transceivers = red_chiplet_enable_can_transceivers,
|
||||
.set_led = red_set_led,
|
||||
.set_gps_mode = unused_set_gps_mode,
|
||||
.set_can_mode = red_set_can_mode,
|
||||
.check_ignition = red_check_ignition,
|
||||
.read_current = unused_read_current,
|
||||
.set_fan_enabled = unused_set_fan_enabled,
|
||||
.set_ir_power = unused_set_ir_power,
|
||||
.set_phone_power = unused_set_phone_power,
|
||||
.set_clock_source_mode = unused_set_clock_source_mode,
|
||||
.set_siren = unused_set_siren
|
||||
};
|
||||
@@ -0,0 +1,46 @@
|
||||
// /////////////////
|
||||
// Tres + Harness //
|
||||
// /////////////////
|
||||
|
||||
void tres_init(void) {
|
||||
// Enable USB 3.3V LDO for USB block
|
||||
register_set_bits(&(PWR->CR3), PWR_CR3_USBREGEN);
|
||||
register_set_bits(&(PWR->CR3), PWR_CR3_USB33DEN);
|
||||
while ((PWR->CR3 & PWR_CR3_USB33RDY) == 0);
|
||||
|
||||
red_chiplet_init();
|
||||
|
||||
// SPI init
|
||||
set_gpio_alternate(GPIOE, 11, GPIO_AF5_SPI4);
|
||||
set_gpio_alternate(GPIOE, 12, GPIO_AF5_SPI4);
|
||||
set_gpio_alternate(GPIOE, 13, GPIO_AF5_SPI4);
|
||||
set_gpio_alternate(GPIOE, 14, GPIO_AF5_SPI4);
|
||||
register_set_bits(&(GPIOE->OSPEEDR), GPIO_OSPEEDR_OSPEED11 | GPIO_OSPEEDR_OSPEED12 | GPIO_OSPEEDR_OSPEED13 | GPIO_OSPEEDR_OSPEED14);
|
||||
}
|
||||
|
||||
const board board_tres = {
|
||||
.board_type = "Tres",
|
||||
.board_tick = unused_board_tick,
|
||||
.harness_config = &red_chiplet_harness_config,
|
||||
.has_gps = false,
|
||||
.has_hw_gmlan = false,
|
||||
.has_obd = true,
|
||||
.has_lin = false,
|
||||
.has_spi = true,
|
||||
.has_canfd = true,
|
||||
.has_rtc_battery = true,
|
||||
.fan_max_rpm = 0U,
|
||||
.init = tres_init,
|
||||
.enable_can_transceiver = red_chiplet_enable_can_transceiver,
|
||||
.enable_can_transceivers = red_chiplet_enable_can_transceivers,
|
||||
.set_led = red_set_led,
|
||||
.set_gps_mode = unused_set_gps_mode,
|
||||
.set_can_mode = red_set_can_mode,
|
||||
.check_ignition = red_check_ignition,
|
||||
.read_current = unused_read_current,
|
||||
.set_fan_enabled = unused_set_fan_enabled,
|
||||
.set_ir_power = unused_set_ir_power,
|
||||
.set_phone_power = unused_set_phone_power,
|
||||
.set_clock_source_mode = unused_set_clock_source_mode,
|
||||
.set_siren = unused_set_siren
|
||||
};
|
||||
@@ -56,7 +56,7 @@ void uno_set_gps_load_switch(bool enabled) {
|
||||
}
|
||||
|
||||
void uno_set_bootkick(bool enabled){
|
||||
if(enabled){
|
||||
if (enabled) {
|
||||
set_gpio_output(GPIOB, 14, false);
|
||||
} else {
|
||||
// We want the pin to be floating, not forced high!
|
||||
@@ -73,25 +73,6 @@ void uno_set_phone_power(bool enabled){
|
||||
set_gpio_output(GPIOB, 4, enabled);
|
||||
}
|
||||
|
||||
void uno_set_usb_power_mode(uint8_t mode) {
|
||||
bool valid = false;
|
||||
switch (mode) {
|
||||
case USB_POWER_CLIENT:
|
||||
valid = true;
|
||||
break;
|
||||
case USB_POWER_CDP:
|
||||
uno_bootkick();
|
||||
valid = true;
|
||||
break;
|
||||
default:
|
||||
puts("Invalid USB power mode\n");
|
||||
break;
|
||||
}
|
||||
if (valid) {
|
||||
usb_power_mode = mode;
|
||||
}
|
||||
}
|
||||
|
||||
void uno_set_gps_mode(uint8_t mode) {
|
||||
switch (mode) {
|
||||
case GPS_DISABLED:
|
||||
@@ -145,9 +126,11 @@ void uno_set_can_mode(uint8_t mode){
|
||||
}
|
||||
}
|
||||
|
||||
void uno_usb_power_mode_tick(uint32_t uptime){
|
||||
UNUSED(uptime);
|
||||
if(bootkick_timer != 0U){
|
||||
void uno_board_tick(bool ignition, bool usb_enum, bool heartbeat_seen) {
|
||||
UNUSED(ignition);
|
||||
UNUSED(usb_enum);
|
||||
UNUSED(heartbeat_seen);
|
||||
if (bootkick_timer != 0U) {
|
||||
bootkick_timer--;
|
||||
} else {
|
||||
uno_set_bootkick(false);
|
||||
@@ -262,21 +245,22 @@ const harness_configuration uno_harness_config = {
|
||||
|
||||
const board board_uno = {
|
||||
.board_type = "Uno",
|
||||
.board_tick = uno_board_tick,
|
||||
.harness_config = &uno_harness_config,
|
||||
.has_gps = true,
|
||||
.has_hw_gmlan = false,
|
||||
.has_obd = true,
|
||||
.has_lin = false,
|
||||
.has_spi = false,
|
||||
.has_canfd = false,
|
||||
.has_rtc_battery = true,
|
||||
.fan_max_rpm = 5100U,
|
||||
.init = uno_init,
|
||||
.enable_can_transceiver = uno_enable_can_transceiver,
|
||||
.enable_can_transceivers = uno_enable_can_transceivers,
|
||||
.set_led = uno_set_led,
|
||||
.set_usb_power_mode = uno_set_usb_power_mode,
|
||||
.set_gps_mode = uno_set_gps_mode,
|
||||
.set_can_mode = uno_set_can_mode,
|
||||
.usb_power_mode_tick = uno_usb_power_mode_tick,
|
||||
.check_ignition = uno_check_ignition,
|
||||
.read_current = unused_read_current,
|
||||
.set_fan_enabled = uno_set_fan_enabled,
|
||||
|
||||
@@ -2,10 +2,6 @@ void unused_set_gps_mode(uint8_t mode) {
|
||||
UNUSED(mode);
|
||||
}
|
||||
|
||||
void unused_usb_power_mode_tick(uint32_t uptime) {
|
||||
UNUSED(uptime);
|
||||
}
|
||||
|
||||
void unused_set_ir_power(uint8_t percentage) {
|
||||
UNUSED(percentage);
|
||||
}
|
||||
@@ -29,3 +25,9 @@ void unused_set_siren(bool enabled) {
|
||||
uint32_t unused_read_current(void) {
|
||||
return 0U;
|
||||
}
|
||||
|
||||
void unused_board_tick(bool ignition, bool usb_enum, bool heartbeat_seen) {
|
||||
UNUSED(ignition);
|
||||
UNUSED(usb_enum);
|
||||
UNUSED(heartbeat_seen);
|
||||
}
|
||||
@@ -43,7 +43,6 @@ void white_set_led(uint8_t color, bool enabled) {
|
||||
}
|
||||
|
||||
void white_set_usb_power_mode(uint8_t mode){
|
||||
bool valid_mode = true;
|
||||
switch (mode) {
|
||||
case USB_POWER_CLIENT:
|
||||
// B2,A13: set client mode
|
||||
@@ -61,14 +60,9 @@ void white_set_usb_power_mode(uint8_t mode){
|
||||
set_gpio_output(GPIOA, 13, 0);
|
||||
break;
|
||||
default:
|
||||
valid_mode = false;
|
||||
puts("Invalid usb power mode\n");
|
||||
break;
|
||||
}
|
||||
|
||||
if (valid_mode) {
|
||||
usb_power_mode = mode;
|
||||
}
|
||||
}
|
||||
|
||||
void white_set_gps_mode(uint8_t mode) {
|
||||
@@ -243,21 +237,22 @@ const harness_configuration white_harness_config = {
|
||||
|
||||
const board board_white = {
|
||||
.board_type = "White",
|
||||
.board_tick = unused_board_tick,
|
||||
.harness_config = &white_harness_config,
|
||||
.has_gps = false,
|
||||
.has_hw_gmlan = true,
|
||||
.has_obd = false,
|
||||
.has_lin = true,
|
||||
.has_spi = false,
|
||||
.has_canfd = false,
|
||||
.has_rtc_battery = false,
|
||||
.fan_max_rpm = 0U,
|
||||
.init = white_init,
|
||||
.enable_can_transceiver = white_enable_can_transceiver,
|
||||
.enable_can_transceivers = white_enable_can_transceivers,
|
||||
.set_led = white_set_led,
|
||||
.set_usb_power_mode = white_set_usb_power_mode,
|
||||
.set_gps_mode = white_set_gps_mode,
|
||||
.set_can_mode = white_set_can_mode,
|
||||
.usb_power_mode_tick = unused_usb_power_mode_tick,
|
||||
.check_ignition = white_check_ignition,
|
||||
.read_current = white_read_current,
|
||||
.set_fan_enabled = unused_set_fan_enabled,
|
||||
|
||||
@@ -39,7 +39,6 @@ int main(void) {
|
||||
|
||||
disable_interrupts();
|
||||
clock_init();
|
||||
detect_external_debug_serial();
|
||||
detect_board_type();
|
||||
|
||||
if (enter_bootloader_mode == ENTER_SOFTLOADER_MAGIC) {
|
||||
|
||||
@@ -3,6 +3,7 @@ void puts(const char *a){ UNUSED(a); }
|
||||
void puth(uint8_t i){ UNUSED(i); }
|
||||
void puth2(uint8_t i){ UNUSED(i); }
|
||||
void puth4(uint8_t i){ UNUSED(i); }
|
||||
void hexdump(const void *a, int l){ UNUSED(a); UNUSED(l); }
|
||||
typedef struct board board;
|
||||
typedef struct harness_configuration harness_configuration;
|
||||
// No CAN support on bootloader
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
//#define DEBUG_USB
|
||||
//#define DEBUG_SPI
|
||||
//#define DEBUG_FAULTS
|
||||
//#define DEBUG_COMMS
|
||||
|
||||
#define DEEPSLEEP_WAKEUP_DELAY 3U
|
||||
|
||||
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env sh
|
||||
set -e
|
||||
|
||||
DFU_UTIL="dfu-util"
|
||||
|
||||
scons -u -j$(nproc)
|
||||
|
||||
PYTHONPATH=.. python3 -c "from python import Panda; Panda().reset(enter_bootstub=True); Panda().reset(enter_bootloader=True)" || true
|
||||
sleep 1
|
||||
$DFU_UTIL -d 0483:df11 -a 0 -s 0x08004000 -D obj/panda.bin.signed
|
||||
$DFU_UTIL -d 0483:df11 -a 0 -s 0x08000000:leave -D obj/bootstub.panda.bin
|
||||
+47
-45
@@ -68,31 +68,34 @@ void can_set_gmlan(uint8_t bus) {
|
||||
}
|
||||
}
|
||||
|
||||
void update_can_health_pkt(uint8_t can_number, bool error_irq) {
|
||||
CAN_TypeDef *CAN = CANIF_FROM_CAN_NUM(can_number);
|
||||
uint32_t esr_reg = CAN->ESR;
|
||||
|
||||
if (error_irq) {
|
||||
can_health[can_number].total_error_cnt += 1U;
|
||||
CAN->MSR = CAN_MSR_ERRI;
|
||||
llcan_clear_send(CAN);
|
||||
}
|
||||
|
||||
can_health[can_number].bus_off = ((esr_reg & CAN_ESR_BOFF) >> CAN_ESR_BOFF_Pos);
|
||||
can_health[can_number].bus_off_cnt += can_health[can_number].bus_off;
|
||||
can_health[can_number].error_warning = ((esr_reg & CAN_ESR_EWGF) >> CAN_ESR_EWGF_Pos);
|
||||
can_health[can_number].error_passive = ((esr_reg & CAN_ESR_EPVF) >> CAN_ESR_EPVF_Pos);
|
||||
|
||||
can_health[can_number].last_error = ((esr_reg & CAN_ESR_LEC) >> CAN_ESR_LEC_Pos);
|
||||
if ((can_health[can_number].last_error != 0U) && (can_health[can_number].last_error != 7U)) {
|
||||
can_health[can_number].last_stored_error = can_health[can_number].last_error;
|
||||
}
|
||||
|
||||
can_health[can_number].receive_error_cnt = ((esr_reg & CAN_ESR_REC) >> CAN_ESR_REC_Pos);
|
||||
can_health[can_number].transmit_error_cnt = ((esr_reg & CAN_ESR_TEC) >> CAN_ESR_TEC_Pos);
|
||||
}
|
||||
|
||||
// CAN error
|
||||
void can_sce(CAN_TypeDef *CAN) {
|
||||
void can_sce(uint8_t can_number) {
|
||||
ENTER_CRITICAL();
|
||||
|
||||
#ifdef DEBUG
|
||||
if (CAN==CAN1) puts("CAN1: ");
|
||||
if (CAN==CAN2) puts("CAN2: ");
|
||||
#ifdef CAN3
|
||||
if (CAN==CAN3) puts("CAN3: ");
|
||||
#endif
|
||||
puts("MSR:");
|
||||
puth(CAN->MSR);
|
||||
puts(" TSR:");
|
||||
puth(CAN->TSR);
|
||||
puts(" RF0R:");
|
||||
puth(CAN->RF0R);
|
||||
puts(" RF1R:");
|
||||
puth(CAN->RF1R);
|
||||
puts(" ESR:");
|
||||
puth(CAN->ESR);
|
||||
puts("\n");
|
||||
#endif
|
||||
|
||||
can_err_cnt += 1;
|
||||
llcan_clear_send(CAN);
|
||||
update_can_health_pkt(can_number, true);
|
||||
EXIT_CRITICAL();
|
||||
}
|
||||
|
||||
@@ -107,11 +110,13 @@ void process_can(uint8_t can_number) {
|
||||
|
||||
// check for empty mailbox
|
||||
CANPacket_t to_send;
|
||||
if ((CAN->TSR & (CAN_TSR_TERR0 | CAN_TSR_ALST0)) != 0) { // last TX failed due to error arbitration lost
|
||||
can_health[can_number].total_rx_lost_cnt += 1U;
|
||||
CAN->TSR |= (CAN_TSR_TERR0 | CAN_TSR_ALST0);
|
||||
}
|
||||
if ((CAN->TSR & CAN_TSR_TME0) == CAN_TSR_TME0) {
|
||||
// add successfully transmitted message to my fifo
|
||||
if ((CAN->TSR & CAN_TSR_RQCP0) == CAN_TSR_RQCP0) {
|
||||
can_txd_cnt += 1;
|
||||
|
||||
if ((CAN->TSR & CAN_TSR_TXOK0) == CAN_TSR_TXOK0) {
|
||||
CANPacket_t to_push;
|
||||
to_push.returned = 1U;
|
||||
@@ -123,19 +128,7 @@ void process_can(uint8_t can_number) {
|
||||
WORD_TO_BYTE_ARRAY(&to_push.data[0], CAN->sTxMailBox[0].TDLR);
|
||||
WORD_TO_BYTE_ARRAY(&to_push.data[4], CAN->sTxMailBox[0].TDHR);
|
||||
|
||||
can_send_errs += can_push(&can_rx_q, &to_push) ? 0U : 1U;
|
||||
}
|
||||
|
||||
if ((CAN->TSR & CAN_TSR_TERR0) == CAN_TSR_TERR0) {
|
||||
#ifdef DEBUG
|
||||
puts("CAN TX ERROR!\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
if ((CAN->TSR & CAN_TSR_ALST0) == CAN_TSR_ALST0) {
|
||||
#ifdef DEBUG
|
||||
puts("CAN TX ARBITRATION LOST!\n");
|
||||
#endif
|
||||
rx_buffer_overflow += can_push(&can_rx_q, &to_push) ? 0U : 1U;
|
||||
}
|
||||
|
||||
// clear interrupt
|
||||
@@ -144,7 +137,7 @@ void process_can(uint8_t can_number) {
|
||||
}
|
||||
|
||||
if (can_pop(can_queues[bus_number], &to_send)) {
|
||||
can_tx_cnt += 1;
|
||||
can_health[can_number].total_tx_cnt += 1U;
|
||||
// only send if we have received a packet
|
||||
CAN->sTxMailBox[0].TIR = ((to_send.extended != 0U) ? (to_send.addr << 3) : (to_send.addr << 21)) | (to_send.extended << 2);
|
||||
CAN->sTxMailBox[0].TDTR = to_send.data_len_code;
|
||||
@@ -157,6 +150,7 @@ void process_can(uint8_t can_number) {
|
||||
}
|
||||
}
|
||||
|
||||
update_can_health_pkt(can_number, false);
|
||||
EXIT_CRITICAL();
|
||||
}
|
||||
}
|
||||
@@ -166,8 +160,14 @@ void process_can(uint8_t can_number) {
|
||||
void can_rx(uint8_t can_number) {
|
||||
CAN_TypeDef *CAN = CANIF_FROM_CAN_NUM(can_number);
|
||||
uint8_t bus_number = BUS_NUM_FROM_CAN_NUM(can_number);
|
||||
|
||||
if ((CAN->RF0R & (CAN_RF0R_FOVR0)) != 0) { // RX message lost due to FIFO overrun
|
||||
can_health[can_number].total_tx_lost_cnt += 1U;
|
||||
CAN->RF0R &= ~(CAN_RF0R_FOVR0);
|
||||
}
|
||||
|
||||
while ((CAN->RF0R & CAN_RF0R_FMP0) != 0) {
|
||||
can_rx_cnt += 1;
|
||||
can_health[can_number].total_rx_cnt += 1U;
|
||||
|
||||
// can is live
|
||||
pending_can_live = 1;
|
||||
@@ -197,30 +197,32 @@ void can_rx(uint8_t can_number) {
|
||||
to_send.data_len_code = to_push.data_len_code;
|
||||
(void)memcpy(to_send.data, to_push.data, dlc_to_len[to_push.data_len_code]);
|
||||
can_send(&to_send, bus_fwd_num, true);
|
||||
can_health[can_number].total_fwd_cnt += 1U;
|
||||
}
|
||||
|
||||
can_rx_errs += safety_rx_hook(&to_push) ? 0U : 1U;
|
||||
safety_rx_invalid += safety_rx_hook(&to_push) ? 0U : 1U;
|
||||
ignition_can_hook(&to_push);
|
||||
|
||||
current_board->set_led(LED_BLUE, true);
|
||||
can_send_errs += can_push(&can_rx_q, &to_push) ? 0U : 1U;
|
||||
rx_buffer_overflow += can_push(&can_rx_q, &to_push) ? 0U : 1U;
|
||||
|
||||
// next
|
||||
update_can_health_pkt(can_number, false);
|
||||
CAN->RF0R |= CAN_RF0R_RFOM0;
|
||||
}
|
||||
}
|
||||
|
||||
void CAN1_TX_IRQ_Handler(void) { process_can(0); }
|
||||
void CAN1_RX0_IRQ_Handler(void) { can_rx(0); }
|
||||
void CAN1_SCE_IRQ_Handler(void) { can_sce(CAN1); }
|
||||
void CAN1_SCE_IRQ_Handler(void) { can_sce(0); }
|
||||
|
||||
void CAN2_TX_IRQ_Handler(void) { process_can(1); }
|
||||
void CAN2_RX0_IRQ_Handler(void) { can_rx(1); }
|
||||
void CAN2_SCE_IRQ_Handler(void) { can_sce(CAN2); }
|
||||
void CAN2_SCE_IRQ_Handler(void) { can_sce(1); }
|
||||
|
||||
void CAN3_TX_IRQ_Handler(void) { process_can(2); }
|
||||
void CAN3_RX0_IRQ_Handler(void) { can_rx(2); }
|
||||
void CAN3_SCE_IRQ_Handler(void) { can_sce(CAN3); }
|
||||
void CAN3_SCE_IRQ_Handler(void) { can_sce(2); }
|
||||
|
||||
bool can_init(uint8_t can_number) {
|
||||
bool ret = false;
|
||||
|
||||
@@ -12,13 +12,16 @@ typedef struct {
|
||||
uint32_t can_data_speed;
|
||||
bool canfd_enabled;
|
||||
bool brs_enabled;
|
||||
bool canfd_non_iso;
|
||||
} bus_config_t;
|
||||
|
||||
uint32_t can_rx_errs = 0;
|
||||
uint32_t can_send_errs = 0;
|
||||
uint32_t can_fwd_errs = 0;
|
||||
uint32_t safety_tx_blocked = 0;
|
||||
uint32_t safety_rx_invalid = 0;
|
||||
uint32_t tx_buffer_overflow = 0;
|
||||
uint32_t rx_buffer_overflow = 0;
|
||||
uint32_t gmlan_send_errs = 0;
|
||||
uint32_t blocked_msg_cnt = 0;
|
||||
|
||||
can_health_t can_health[] = {{0}, {0}, {0}};
|
||||
|
||||
extern int can_live;
|
||||
extern int pending_can_live;
|
||||
@@ -50,25 +53,19 @@ void process_can(uint8_t can_number);
|
||||
|
||||
#ifdef STM32H7
|
||||
__attribute__((section(".ram_d1"))) can_buffer(rx_q, 0x1000)
|
||||
__attribute__((section(".ram_d1"))) can_buffer(txgmlan_q, 0x1A0)
|
||||
__attribute__((section(".ram_d1"))) can_buffer(tx2_q, 0x1A0)
|
||||
__attribute__((section(".ram_d2"))) can_buffer(txgmlan_q, 0x1A0)
|
||||
#else
|
||||
can_buffer(rx_q, 0x1000)
|
||||
can_buffer(tx2_q, 0x1A0)
|
||||
can_buffer(txgmlan_q, 0x1A0)
|
||||
#endif
|
||||
can_buffer(tx1_q, 0x1A0)
|
||||
can_buffer(tx2_q, 0x1A0)
|
||||
can_buffer(tx3_q, 0x1A0)
|
||||
// FIXME:
|
||||
// cppcheck-suppress misra-c2012-9.3
|
||||
can_ring *can_queues[] = {&can_tx1_q, &can_tx2_q, &can_tx3_q, &can_txgmlan_q};
|
||||
|
||||
// global CAN stats
|
||||
int can_rx_cnt = 0;
|
||||
int can_tx_cnt = 0;
|
||||
int can_txd_cnt = 0;
|
||||
int can_err_cnt = 0;
|
||||
int can_overflow_cnt = 0;
|
||||
|
||||
// ********************* interrupt safe queue *********************
|
||||
bool can_pop(can_ring *q, CANPacket_t *elem) {
|
||||
bool ret = 0;
|
||||
@@ -105,7 +102,6 @@ bool can_push(can_ring *q, CANPacket_t *elem) {
|
||||
}
|
||||
EXIT_CRITICAL();
|
||||
if (!ret) {
|
||||
can_overflow_cnt++;
|
||||
#ifdef DEBUG
|
||||
puts("can_push to ");
|
||||
if (q == &can_rx_q) {
|
||||
@@ -161,10 +157,10 @@ void can_clear(can_ring *q) {
|
||||
// Helpers
|
||||
// Panda: Bus 0=CAN1 Bus 1=CAN2 Bus 2=CAN3
|
||||
bus_config_t bus_config[] = {
|
||||
{ .bus_lookup = 0U, .can_num_lookup = 0U, .can_speed = 5000U, .can_data_speed = 20000U, .canfd_enabled = false, .brs_enabled = false },
|
||||
{ .bus_lookup = 1U, .can_num_lookup = 1U, .can_speed = 5000U, .can_data_speed = 20000U, .canfd_enabled = false, .brs_enabled = false },
|
||||
{ .bus_lookup = 2U, .can_num_lookup = 2U, .can_speed = 5000U, .can_data_speed = 20000U, .canfd_enabled = false, .brs_enabled = false },
|
||||
{ .bus_lookup = 0xFFU, .can_num_lookup = 0xFFU, .can_speed = 333U, .can_data_speed = 333U, .canfd_enabled = false, .brs_enabled = false },
|
||||
{ .bus_lookup = 0U, .can_num_lookup = 0U, .can_speed = 5000U, .can_data_speed = 20000U, .canfd_enabled = false, .brs_enabled = false, .canfd_non_iso = false },
|
||||
{ .bus_lookup = 1U, .can_num_lookup = 1U, .can_speed = 5000U, .can_data_speed = 20000U, .canfd_enabled = false, .brs_enabled = false, .canfd_non_iso = false },
|
||||
{ .bus_lookup = 2U, .can_num_lookup = 2U, .can_speed = 5000U, .can_data_speed = 20000U, .canfd_enabled = false, .brs_enabled = false, .canfd_non_iso = false },
|
||||
{ .bus_lookup = 0xFFU, .can_num_lookup = 0xFFU, .can_speed = 333U, .can_data_speed = 333U, .canfd_enabled = false, .brs_enabled = false, .canfd_non_iso = false },
|
||||
};
|
||||
|
||||
#define CANIF_FROM_CAN_NUM(num) (cans[num])
|
||||
@@ -174,6 +170,9 @@ bus_config_t bus_config[] = {
|
||||
void can_init_all(void) {
|
||||
bool ret = true;
|
||||
for (uint8_t i=0U; i < CAN_CNT; i++) {
|
||||
if (!current_board->has_canfd) {
|
||||
bus_config[i].can_data_speed = 0U;
|
||||
}
|
||||
can_clear(can_queues[i]);
|
||||
ret &= can_init(i);
|
||||
}
|
||||
@@ -230,13 +229,23 @@ void can_send(CANPacket_t *to_push, uint8_t bus_number, bool skip_tx_hook) {
|
||||
if ((bus_number == 3U) && (bus_config[3].can_num_lookup == 0xFFU)) {
|
||||
gmlan_send_errs += bitbang_gmlan(to_push) ? 0U : 1U;
|
||||
} else {
|
||||
can_fwd_errs += can_push(can_queues[bus_number], to_push) ? 0U : 1U;
|
||||
tx_buffer_overflow += can_push(can_queues[bus_number], to_push) ? 0U : 1U;
|
||||
process_can(CAN_NUM_FROM_BUS_NUM(bus_number));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
blocked_msg_cnt += 1U;
|
||||
safety_tx_blocked += 1U;
|
||||
to_push->rejected = 1U;
|
||||
can_send_errs += can_push(&can_rx_q, to_push) ? 0U : 1U;
|
||||
rx_buffer_overflow += can_push(&can_rx_q, to_push) ? 0U : 1U;
|
||||
}
|
||||
}
|
||||
|
||||
bool is_speed_valid(uint32_t speed, const uint32_t *speeds, uint8_t len) {
|
||||
bool ret = false;
|
||||
for (uint8_t i = 0U; i < len; i++) {
|
||||
if (speeds[i] == speed) {
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -37,10 +37,13 @@ void fan_tick(void){
|
||||
if (fan_state.stall_counter > FAN_STALL_THRESHOLD) {
|
||||
// Stall detected, power cycling fan controller
|
||||
current_board->set_fan_enabled(false);
|
||||
fan_state.error_integral = 0U;
|
||||
|
||||
// clip integral, can't fully reset otherwise we may always be stuck in stall detection
|
||||
fan_state.error_integral = MIN(50.0f, MAX(0.0f, fan_state.error_integral));
|
||||
}
|
||||
} else {
|
||||
fan_state.stall_counter = 0U;
|
||||
fan_state.error_integral = 0.0f;
|
||||
}
|
||||
|
||||
// Update controller
|
||||
|
||||
+50
-52
@@ -4,9 +4,6 @@
|
||||
|
||||
#define CANFD
|
||||
|
||||
#define BUS_OFF_FAIL_LIMIT 2U
|
||||
uint8_t bus_off_err[] = {0U, 0U, 0U};
|
||||
|
||||
typedef struct {
|
||||
volatile uint32_t header[2];
|
||||
volatile uint32_t data_word[CANPACKET_DATA_SIZE_MAX/4U];
|
||||
@@ -23,6 +20,7 @@ bool can_set_speed(uint8_t can_number) {
|
||||
CANx,
|
||||
bus_config[bus_number].can_speed,
|
||||
bus_config[bus_number].can_data_speed,
|
||||
bus_config[bus_number].canfd_non_iso,
|
||||
can_loopback,
|
||||
(unsigned int)(can_silent) & (1U << can_number)
|
||||
);
|
||||
@@ -34,21 +32,46 @@ void can_set_gmlan(uint8_t bus) {
|
||||
puts("GMLAN not available on red panda\n");
|
||||
}
|
||||
|
||||
void cycle_transceiver(uint8_t can_number) {
|
||||
// FDCAN1 = trans 1, FDCAN3 = trans 3, FDCAN2 = trans 2 normal or 4 flipped harness
|
||||
uint8_t transceiver_number = can_number;
|
||||
if (can_number == 2U) {
|
||||
uint8_t flip = (car_harness_status == HARNESS_STATUS_FLIPPED) ? 2U : 0U;
|
||||
transceiver_number += flip;
|
||||
// ***************************** CAN *****************************
|
||||
void update_can_health_pkt(uint8_t can_number, bool error_irq) {
|
||||
ENTER_CRITICAL();
|
||||
|
||||
FDCAN_GlobalTypeDef *CANx = CANIF_FROM_CAN_NUM(can_number);
|
||||
uint32_t psr_reg = CANx->PSR;
|
||||
uint32_t ecr_reg = CANx->ECR;
|
||||
|
||||
can_health[can_number].bus_off = ((psr_reg & FDCAN_PSR_BO) >> FDCAN_PSR_BO_Pos);
|
||||
can_health[can_number].bus_off_cnt += can_health[can_number].bus_off;
|
||||
can_health[can_number].error_warning = ((psr_reg & FDCAN_PSR_EW) >> FDCAN_PSR_EW_Pos);
|
||||
can_health[can_number].error_passive = ((psr_reg & FDCAN_PSR_EP) >> FDCAN_PSR_EP_Pos);
|
||||
|
||||
can_health[can_number].last_error = ((psr_reg & FDCAN_PSR_LEC) >> FDCAN_PSR_LEC_Pos);
|
||||
if ((can_health[can_number].last_error != 0U) && (can_health[can_number].last_error != 7U)) {
|
||||
can_health[can_number].last_stored_error = can_health[can_number].last_error;
|
||||
}
|
||||
current_board->enable_can_transceiver(transceiver_number, false);
|
||||
delay(20000);
|
||||
current_board->enable_can_transceiver(transceiver_number, true);
|
||||
bus_off_err[can_number] = 0U;
|
||||
puts("Cycled transceiver number: "); puth(transceiver_number); puts("\n");
|
||||
|
||||
can_health[can_number].last_data_error = ((psr_reg & FDCAN_PSR_DLEC) >> FDCAN_PSR_DLEC_Pos);
|
||||
if ((can_health[can_number].last_data_error != 0U) && (can_health[can_number].last_data_error != 7U)) {
|
||||
can_health[can_number].last_data_stored_error = can_health[can_number].last_data_error;
|
||||
}
|
||||
|
||||
can_health[can_number].receive_error_cnt = ((ecr_reg & FDCAN_ECR_REC) >> FDCAN_ECR_REC_Pos);
|
||||
can_health[can_number].transmit_error_cnt = ((ecr_reg & FDCAN_ECR_TEC) >> FDCAN_ECR_TEC_Pos);
|
||||
|
||||
|
||||
if (error_irq) {
|
||||
can_health[can_number].total_error_cnt += 1U;
|
||||
if ((CANx->IR & (FDCAN_IR_RF0L)) != 0) {
|
||||
can_health[can_number].total_rx_lost_cnt += 1U;
|
||||
}
|
||||
if ((CANx->IR & (FDCAN_IR_TEFL)) != 0) {
|
||||
can_health[can_number].total_tx_lost_cnt += 1U;
|
||||
}
|
||||
llcan_clear_send(CANx);
|
||||
}
|
||||
EXIT_CRITICAL();
|
||||
}
|
||||
|
||||
// ***************************** CAN *****************************
|
||||
void process_can(uint8_t can_number) {
|
||||
if (can_number != 0xffU) {
|
||||
ENTER_CRITICAL();
|
||||
@@ -61,7 +84,8 @@ void process_can(uint8_t can_number) {
|
||||
if ((CANx->TXFQS & FDCAN_TXFQS_TFQF) == 0) {
|
||||
CANPacket_t to_send;
|
||||
if (can_pop(can_queues[bus_number], &to_send)) {
|
||||
can_tx_cnt += 1;
|
||||
can_health[can_number].total_tx_cnt += 1U;
|
||||
|
||||
uint32_t TxFIFOSA = FDCAN_START_ADDRESS + (can_number * FDCAN_OFFSET) + (FDCAN_RX_FIFO_0_EL_CNT * FDCAN_RX_FIFO_0_EL_SIZE);
|
||||
uint8_t tx_index = (CANx->TXFQS >> FDCAN_TXFQS_TFQPI_Pos) & 0x1F;
|
||||
// only send if we have received a packet
|
||||
@@ -80,7 +104,6 @@ void process_can(uint8_t can_number) {
|
||||
CANx->TXBAR = (1UL << tx_index);
|
||||
|
||||
// Send back to USB
|
||||
can_txd_cnt += 1;
|
||||
CANPacket_t to_push;
|
||||
|
||||
to_push.returned = 1U;
|
||||
@@ -90,33 +113,13 @@ void process_can(uint8_t can_number) {
|
||||
to_push.bus = to_send.bus;
|
||||
to_push.data_len_code = to_send.data_len_code;
|
||||
(void)memcpy(to_push.data, to_send.data, dlc_to_len[to_push.data_len_code]);
|
||||
can_send_errs += can_push(&can_rx_q, &to_push) ? 0U : 1U;
|
||||
rx_buffer_overflow += can_push(&can_rx_q, &to_push) ? 0U : 1U;
|
||||
|
||||
usb_cb_ep3_out_complete();
|
||||
}
|
||||
}
|
||||
|
||||
// Recover after Bus-off state
|
||||
if (((CANx->PSR & FDCAN_PSR_BO) != 0) && ((CANx->CCCR & FDCAN_CCCR_INIT) != 0)) {
|
||||
bus_off_err[can_number] += 1U;
|
||||
puts("CAN is in Bus_Off state! Resetting... CAN number: "); puth(can_number); puts("\n");
|
||||
if (bus_off_err[can_number] > BUS_OFF_FAIL_LIMIT) {
|
||||
cycle_transceiver(can_number);
|
||||
}
|
||||
CANx->IR = 0xFFC60000U; // Reset all flags(Only errors!)
|
||||
CANx->CCCR &= ~(FDCAN_CCCR_INIT);
|
||||
uint32_t timeout_counter = 0U;
|
||||
while((CANx->CCCR & FDCAN_CCCR_INIT) != 0) {
|
||||
// Delay for about 1ms
|
||||
delay(10000);
|
||||
timeout_counter++;
|
||||
|
||||
if(timeout_counter >= CAN_INIT_TIMEOUT_MS){
|
||||
puts(CAN_NAME_FROM_CANIF(CANx)); puts(" Bus_Off reset timed out!\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
update_can_health_pkt(can_number, false);
|
||||
EXIT_CRITICAL();
|
||||
}
|
||||
}
|
||||
@@ -126,19 +129,18 @@ void process_can(uint8_t can_number) {
|
||||
void can_rx(uint8_t can_number) {
|
||||
FDCAN_GlobalTypeDef *CANx = CANIF_FROM_CAN_NUM(can_number);
|
||||
uint8_t bus_number = BUS_NUM_FROM_CAN_NUM(can_number);
|
||||
uint8_t rx_fifo_idx;
|
||||
|
||||
// Rx FIFO 0 new message
|
||||
if((CANx->IR & FDCAN_IR_RF0N) != 0) {
|
||||
CANx->IR |= FDCAN_IR_RF0N;
|
||||
while((CANx->RXF0S & FDCAN_RXF0S_F0FL) != 0) {
|
||||
can_rx_cnt += 1;
|
||||
can_health[can_number].total_rx_cnt += 1U;
|
||||
|
||||
// can is live
|
||||
pending_can_live = 1;
|
||||
|
||||
// getting new message index (0 to 63)
|
||||
rx_fifo_idx = (uint8_t)((CANx->RXF0S >> FDCAN_RXF0S_F0GI_Pos) & 0x3F);
|
||||
uint8_t rx_fifo_idx = (uint8_t)((CANx->RXF0S >> FDCAN_RXF0S_F0GI_Pos) & 0x3F);
|
||||
|
||||
uint32_t RxFIFO0SA = FDCAN_START_ADDRESS + (can_number * FDCAN_OFFSET);
|
||||
CANPacket_t to_push;
|
||||
@@ -176,13 +178,14 @@ void can_rx(uint8_t can_number) {
|
||||
to_send.data_len_code = to_push.data_len_code;
|
||||
(void)memcpy(to_send.data, to_push.data, dlc_to_len[to_push.data_len_code]);
|
||||
can_send(&to_send, bus_fwd_num, true);
|
||||
can_health[can_number].total_fwd_cnt += 1U;
|
||||
}
|
||||
|
||||
can_rx_errs += safety_rx_hook(&to_push) ? 0U : 1U;
|
||||
safety_rx_invalid += safety_rx_hook(&to_push) ? 0U : 1U;
|
||||
ignition_can_hook(&to_push);
|
||||
|
||||
current_board->set_led(LED_BLUE, true);
|
||||
can_send_errs += can_push(&can_rx_q, &to_push) ? 0U : 1U;
|
||||
rx_buffer_overflow += can_push(&can_rx_q, &to_push) ? 0U : 1U;
|
||||
|
||||
// Enable CAN FD and BRS if CAN FD message was received
|
||||
if (!(bus_config[can_number].canfd_enabled) && (canfd_frame)) {
|
||||
@@ -196,15 +199,10 @@ void can_rx(uint8_t can_number) {
|
||||
CANx->RXF0A = rx_fifo_idx;
|
||||
}
|
||||
|
||||
} else if((CANx->IR & (FDCAN_IR_PEA | FDCAN_IR_PED | FDCAN_IR_RF0L | FDCAN_IR_RF0F | FDCAN_IR_EW | FDCAN_IR_MRAF | FDCAN_IR_TOO)) != 0) {
|
||||
#ifdef DEBUG
|
||||
puts("FDCAN error, FDCAN_IR: ");puth(CANx->IR);puts("\n");
|
||||
#endif
|
||||
CANx->IR |= (FDCAN_IR_PEA | FDCAN_IR_PED | FDCAN_IR_RF0L | FDCAN_IR_RF0F | FDCAN_IR_EW | FDCAN_IR_MRAF | FDCAN_IR_TOO); // Clean all error flags
|
||||
can_err_cnt += 1;
|
||||
} else {
|
||||
|
||||
}
|
||||
// Error handling
|
||||
bool error_irq = ((CANx->IR & (FDCAN_IR_PED | FDCAN_IR_PEA | FDCAN_IR_EW | FDCAN_IR_EP | FDCAN_IR_ELO | FDCAN_IR_BO | FDCAN_IR_TEFL | FDCAN_IR_RF0L)) != 0);
|
||||
update_can_health_pkt(can_number, error_irq);
|
||||
}
|
||||
|
||||
void FDCAN1_IT0_IRQ_Handler(void) { can_rx(0); }
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
#pragma once
|
||||
|
||||
#define SPI_BUF_SIZE 1024U
|
||||
|
||||
#ifdef STM32H7
|
||||
__attribute__((section(".ram_d1"))) uint8_t spi_buf_rx[SPI_BUF_SIZE];
|
||||
__attribute__((section(".ram_d1"))) uint8_t spi_buf_tx[SPI_BUF_SIZE];
|
||||
#else
|
||||
uint8_t spi_buf_rx[SPI_BUF_SIZE];
|
||||
uint8_t spi_buf_tx[SPI_BUF_SIZE];
|
||||
#endif
|
||||
|
||||
#define SPI_CHECKSUM_START 0xABU
|
||||
#define SPI_SYNC_BYTE 0x5AU
|
||||
#define SPI_HACK 0x79U
|
||||
#define SPI_DACK 0x85U
|
||||
#define SPI_NACK 0x1FU
|
||||
|
||||
// SPI states
|
||||
enum {
|
||||
SPI_STATE_HEADER,
|
||||
SPI_STATE_HEADER_ACK,
|
||||
SPI_STATE_HEADER_NACK,
|
||||
SPI_STATE_DATA_RX,
|
||||
SPI_STATE_DATA_RX_ACK,
|
||||
SPI_STATE_DATA_TX
|
||||
};
|
||||
|
||||
uint8_t spi_state = SPI_STATE_HEADER;
|
||||
uint8_t spi_endpoint;
|
||||
uint16_t spi_data_len_mosi;
|
||||
uint16_t spi_data_len_miso;
|
||||
|
||||
#define SPI_HEADER_SIZE 7U
|
||||
|
||||
// low level SPI prototypes
|
||||
void llspi_init(void);
|
||||
void llspi_mosi_dma(uint8_t *addr, int len);
|
||||
void llspi_miso_dma(uint8_t *addr, int len);
|
||||
|
||||
void spi_init(void) {
|
||||
// clear buffers (for debugging)
|
||||
(void)memset(spi_buf_rx, 0, SPI_BUF_SIZE);
|
||||
(void)memset(spi_buf_tx, 0, SPI_BUF_SIZE);
|
||||
|
||||
// platform init
|
||||
llspi_init();
|
||||
|
||||
// Start the first packet!
|
||||
spi_state = SPI_STATE_HEADER;
|
||||
llspi_mosi_dma(spi_buf_rx, SPI_HEADER_SIZE);
|
||||
}
|
||||
|
||||
bool check_checksum(uint8_t *data, uint16_t len) {
|
||||
// TODO: can speed this up by casting the bulk to uint32_t and xor-ing the bytes afterwards
|
||||
uint8_t checksum = SPI_CHECKSUM_START;
|
||||
for(uint16_t i = 0U; i < len; i++){
|
||||
checksum ^= data[i];
|
||||
}
|
||||
return checksum == 0U;
|
||||
}
|
||||
|
||||
void spi_handle_rx(void) {
|
||||
uint8_t next_rx_state = SPI_STATE_HEADER;
|
||||
|
||||
// parse header
|
||||
spi_endpoint = spi_buf_rx[1];
|
||||
spi_data_len_mosi = (spi_buf_rx[3] << 8) | spi_buf_rx[2];
|
||||
spi_data_len_miso = (spi_buf_rx[5] << 8) | spi_buf_rx[4];
|
||||
|
||||
if (spi_state == SPI_STATE_HEADER) {
|
||||
if ((spi_buf_rx[0] == SPI_SYNC_BYTE) && check_checksum(spi_buf_rx, SPI_HEADER_SIZE)) {
|
||||
// response: ACK and start receiving data portion
|
||||
spi_buf_tx[0] = SPI_HACK;
|
||||
next_rx_state = SPI_STATE_HEADER_ACK;
|
||||
} else {
|
||||
// response: NACK and reset state machine
|
||||
puts("- incorrect header sync or checksum "); hexdump(spi_buf_rx, SPI_HEADER_SIZE);
|
||||
spi_buf_tx[0] = SPI_NACK;
|
||||
next_rx_state = SPI_STATE_HEADER_NACK;
|
||||
}
|
||||
llspi_miso_dma(spi_buf_tx, 1);
|
||||
} else if (spi_state == SPI_STATE_DATA_RX) {
|
||||
// We got everything! Based on the endpoint specified, call the appropriate handler
|
||||
uint16_t response_len = 0U;
|
||||
bool reponse_ack = false;
|
||||
if (check_checksum(&(spi_buf_rx[SPI_HEADER_SIZE]), spi_data_len_mosi + 1U)) {
|
||||
if (spi_endpoint == 0U) {
|
||||
if (spi_data_len_mosi >= sizeof(ControlPacket_t)) {
|
||||
ControlPacket_t ctrl;
|
||||
(void)memcpy(&ctrl, &spi_buf_rx[SPI_HEADER_SIZE], sizeof(ControlPacket_t));
|
||||
response_len = comms_control_handler(&ctrl, &spi_buf_tx[3]);
|
||||
reponse_ack = true;
|
||||
} else {
|
||||
puts("SPI: insufficient data for control handler\n");
|
||||
}
|
||||
} else if ((spi_endpoint == 1U) || (spi_endpoint == 0x81U)) {
|
||||
if (spi_data_len_mosi == 0U) {
|
||||
response_len = comms_can_read(&(spi_buf_tx[3]), spi_data_len_miso);
|
||||
reponse_ack = true;
|
||||
} else {
|
||||
puts("SPI: did not expect data for can_read\n");
|
||||
}
|
||||
} else if (spi_endpoint == 2U) {
|
||||
comms_endpoint2_write(&spi_buf_rx[SPI_HEADER_SIZE], spi_data_len_mosi);
|
||||
reponse_ack = true;
|
||||
} else if (spi_endpoint == 3U) {
|
||||
if (spi_data_len_mosi > 0U) {
|
||||
comms_can_write(&spi_buf_rx[SPI_HEADER_SIZE], spi_data_len_mosi);
|
||||
reponse_ack = true;
|
||||
} else {
|
||||
puts("SPI: did expect data for can_write\n");
|
||||
}
|
||||
} else {
|
||||
puts("SPI: unexpected endpoint"); puth(spi_endpoint); puts("\n");
|
||||
}
|
||||
} else {
|
||||
// Checksum was incorrect
|
||||
reponse_ack = false;
|
||||
puts("- incorrect data checksum\n");
|
||||
}
|
||||
|
||||
// Setup response header
|
||||
spi_buf_tx[0] = reponse_ack ? SPI_DACK : SPI_NACK;
|
||||
spi_buf_tx[1] = response_len & 0xFFU;
|
||||
spi_buf_tx[2] = (response_len >> 8) & 0xFFU;
|
||||
|
||||
// Add checksum
|
||||
uint8_t checksum = SPI_CHECKSUM_START;
|
||||
for(uint16_t i = 0U; i < (response_len + 3U); i++) {
|
||||
checksum ^= spi_buf_tx[i];
|
||||
}
|
||||
spi_buf_tx[response_len + 3U] = checksum;
|
||||
|
||||
// Write response
|
||||
llspi_miso_dma(spi_buf_tx, response_len + 4U);
|
||||
|
||||
next_rx_state = SPI_STATE_DATA_TX;
|
||||
} else {
|
||||
puts("SPI: RX unexpected state: "); puth(spi_state); puts("\n");
|
||||
}
|
||||
|
||||
spi_state = next_rx_state;
|
||||
}
|
||||
|
||||
void spi_handle_tx(void) {
|
||||
if (spi_state == SPI_STATE_HEADER_ACK) {
|
||||
// ACK was sent, queue up the RX buf for the data + checksum
|
||||
spi_state = SPI_STATE_DATA_RX;
|
||||
llspi_mosi_dma(&spi_buf_rx[SPI_HEADER_SIZE], spi_data_len_mosi + 1U);
|
||||
} else if (spi_state == SPI_STATE_HEADER_NACK) {
|
||||
// Reset state
|
||||
spi_state = SPI_STATE_HEADER;
|
||||
llspi_mosi_dma(spi_buf_rx, SPI_HEADER_SIZE);
|
||||
} else if (spi_state == SPI_STATE_DATA_TX) {
|
||||
// Reset state
|
||||
spi_state = SPI_STATE_HEADER;
|
||||
llspi_mosi_dma(spi_buf_rx, SPI_HEADER_SIZE);
|
||||
} else {
|
||||
spi_state = SPI_STATE_HEADER;
|
||||
llspi_mosi_dma(spi_buf_rx, SPI_HEADER_SIZE);
|
||||
puts("SPI: TX unexpected state: "); puth(spi_state); puts("\n");
|
||||
}
|
||||
}
|
||||
@@ -150,14 +150,8 @@ void clear_uart_buff(uart_ring *q) {
|
||||
|
||||
// ************************ High-level debug functions **********************
|
||||
void putch(const char a) {
|
||||
if (has_external_debug_serial) {
|
||||
// assuming debugging is important if there's external serial connected
|
||||
while (!putc(&uart_ring_debug, a));
|
||||
|
||||
} else {
|
||||
// misra-c2012-17.7: serial debug function, ok to ignore output
|
||||
(void)injectc(&uart_ring_debug, a);
|
||||
}
|
||||
// misra-c2012-17.7: serial debug function, ok to ignore output
|
||||
(void)injectc(&uart_ring_debug, a);
|
||||
}
|
||||
|
||||
void puts(const char *a) {
|
||||
|
||||
@@ -48,7 +48,6 @@ void early_initialization(void) {
|
||||
// early GPIOs float everything
|
||||
early_gpio_float();
|
||||
|
||||
detect_external_debug_serial();
|
||||
detect_board_type();
|
||||
|
||||
if (enter_bootloader_mode == ENTER_BOOTLOADER_MAGIC) {
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#define FAULT_INTERRUPT_RATE_CLOCK_SOURCE (1U << 20)
|
||||
#define FAULT_INTERRUPT_RATE_TICK (1U << 21)
|
||||
#define FAULT_INTERRUPT_RATE_EXTI (1U << 22)
|
||||
#define FAULT_INTERRUPT_RATE_SPI (1U << 23)
|
||||
|
||||
// Permanent faults
|
||||
#define PERMANENT_FAULTS 0U
|
||||
|
||||
+34
-7
@@ -1,12 +1,15 @@
|
||||
// When changing this struct, python/__init__.py needs to be kept up to date!
|
||||
#define HEALTH_PACKET_VERSION 8
|
||||
// When changing these structs, python/__init__.py needs to be kept up to date!
|
||||
|
||||
#define HEALTH_PACKET_VERSION 11
|
||||
|
||||
struct __attribute__((packed)) health_t {
|
||||
uint32_t uptime_pkt;
|
||||
uint32_t voltage_pkt;
|
||||
uint32_t current_pkt;
|
||||
uint32_t can_rx_errs_pkt;
|
||||
uint32_t can_send_errs_pkt;
|
||||
uint32_t can_fwd_errs_pkt;
|
||||
uint32_t safety_tx_blocked_pkt;
|
||||
uint32_t safety_rx_invalid_pkt;
|
||||
uint32_t tx_buffer_overflow_pkt;
|
||||
uint32_t rx_buffer_overflow_pkt;
|
||||
uint32_t gmlan_send_errs_pkt;
|
||||
uint32_t faults_pkt;
|
||||
uint8_t ignition_line_pkt;
|
||||
@@ -14,14 +17,38 @@ struct __attribute__((packed)) health_t {
|
||||
uint8_t controls_allowed_pkt;
|
||||
uint8_t gas_interceptor_detected_pkt;
|
||||
uint8_t car_harness_status_pkt;
|
||||
uint8_t usb_power_mode_pkt;
|
||||
uint8_t safety_mode_pkt;
|
||||
uint16_t safety_param_pkt;
|
||||
uint8_t fault_status_pkt;
|
||||
uint8_t power_save_enabled_pkt;
|
||||
uint8_t heartbeat_lost_pkt;
|
||||
uint16_t alternative_experience_pkt;
|
||||
uint32_t blocked_msg_cnt_pkt;
|
||||
float interrupt_load;
|
||||
uint8_t fan_power;
|
||||
uint8_t safety_rx_checks_invalid;
|
||||
};
|
||||
|
||||
#define CAN_HEALTH_PACKET_VERSION 3
|
||||
typedef struct __attribute__((packed)) {
|
||||
uint8_t bus_off;
|
||||
uint32_t bus_off_cnt;
|
||||
uint8_t error_warning;
|
||||
uint8_t error_passive;
|
||||
uint8_t last_error; // real time LEC value
|
||||
uint8_t last_stored_error; // last LEC positive error code stored
|
||||
uint8_t last_data_error; // DLEC (for CANFD only)
|
||||
uint8_t last_data_stored_error; // last DLEC positive error code stored (for CANFD only)
|
||||
uint8_t receive_error_cnt; // REC
|
||||
uint8_t transmit_error_cnt; // TEC
|
||||
uint32_t total_error_cnt; // How many times any error interrupt were invoked
|
||||
uint32_t total_tx_lost_cnt; // Tx event FIFO element Lost
|
||||
uint32_t total_rx_lost_cnt; // Rx FIFO 0 message Lost
|
||||
uint32_t total_tx_cnt;
|
||||
uint32_t total_rx_cnt;
|
||||
uint32_t total_fwd_cnt; // Messages forwarded from one bus to another
|
||||
uint16_t can_speed;
|
||||
uint16_t can_data_speed;
|
||||
uint8_t canfd_enabled;
|
||||
uint8_t brs_enabled;
|
||||
uint8_t canfd_non_iso;
|
||||
} can_health_t;
|
||||
|
||||
+18
-39
@@ -12,6 +12,8 @@
|
||||
#include "power_saving.h"
|
||||
#include "safety.h"
|
||||
|
||||
#include "health.h"
|
||||
|
||||
#include "drivers/can_common.h"
|
||||
|
||||
#ifdef STM32H7
|
||||
@@ -51,20 +53,6 @@ void debug_ring_callback(uart_ring *ring) {
|
||||
if (rcv == 'x') {
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
||||
// enable CDP mode
|
||||
if (rcv == 'C') {
|
||||
puts("switching USB to CDP mode\n");
|
||||
current_board->set_usb_power_mode(USB_POWER_CDP);
|
||||
}
|
||||
if (rcv == 'c') {
|
||||
puts("switching USB to client mode\n");
|
||||
current_board->set_usb_power_mode(USB_POWER_CLIENT);
|
||||
}
|
||||
if (rcv == 'D') {
|
||||
puts("switching USB to DCP mode\n");
|
||||
current_board->set_usb_power_mode(USB_POWER_DCP);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +73,8 @@ void set_safety_mode(uint16_t mode, uint16_t param) {
|
||||
}
|
||||
}
|
||||
}
|
||||
blocked_msg_cnt = 0;
|
||||
safety_tx_blocked = 0;
|
||||
safety_rx_invalid = 0;
|
||||
|
||||
switch (mode_copy) {
|
||||
case SAFETY_SILENT:
|
||||
@@ -158,15 +147,13 @@ void tick_handler(void) {
|
||||
// siren
|
||||
current_board->set_siren((loop_counter & 1U) && (siren_enabled || (siren_countdown > 0U)));
|
||||
|
||||
// tick drivers
|
||||
// tick drivers at 8Hz
|
||||
fan_tick();
|
||||
|
||||
// decimated to 1Hz
|
||||
if (loop_counter == 0U) {
|
||||
can_live = pending_can_live;
|
||||
|
||||
current_board->usb_power_mode_tick(uptime_cnt);
|
||||
|
||||
//puth(usart1_dma); puts(" "); puth(DMA2_Stream5->M0AR); puts(" "); puth(DMA2_Stream5->NDTR); puts("\n");
|
||||
|
||||
// reset this every 16th pass
|
||||
@@ -188,6 +175,10 @@ void tick_handler(void) {
|
||||
// unless we are in power saving mode
|
||||
current_board->set_led(LED_BLUE, (uptime_cnt & 1U) && (power_save_status == POWER_SAVE_STATUS_ENABLED));
|
||||
|
||||
// tick drivers at 1Hz
|
||||
const bool recent_heartbeat = heartbeat_counter == 0U;
|
||||
current_board->board_tick(check_started(), usb_enumerated, recent_heartbeat);
|
||||
|
||||
// increase heartbeat counter and cap it at the uint32 limit
|
||||
if (heartbeat_counter < __UINT32_MAX__) {
|
||||
heartbeat_counter += 1U;
|
||||
@@ -254,11 +245,6 @@ void tick_handler(void) {
|
||||
fan_set_power(0U);
|
||||
}
|
||||
}
|
||||
|
||||
// enter CDP mode when car starts to ensure we are charging a turned off EON
|
||||
if (check_started() && ((usb_power_mode != USB_POWER_CDP) || !usb_enumerated)) {
|
||||
current_board->set_usb_power_mode(USB_POWER_CDP);
|
||||
}
|
||||
}
|
||||
|
||||
// check registers
|
||||
@@ -289,7 +275,6 @@ void EXTI_IRQ_Handler(void) {
|
||||
exti_irq_clear();
|
||||
clock_init();
|
||||
|
||||
current_board->set_usb_power_mode(USB_POWER_CDP);
|
||||
set_power_save_state(POWER_SAVE_STATUS_DISABLED);
|
||||
deepsleep_allowed = false;
|
||||
heartbeat_counter = 0U;
|
||||
@@ -327,7 +312,6 @@ int main(void) {
|
||||
// init early devices
|
||||
clock_init();
|
||||
peripherals_init();
|
||||
detect_external_debug_serial();
|
||||
detect_board_type();
|
||||
adc_init();
|
||||
|
||||
@@ -342,7 +326,6 @@ int main(void) {
|
||||
|
||||
puts("Config:\n");
|
||||
puts(" Board type: "); puts(current_board->board_type); puts("\n");
|
||||
puts(has_external_debug_serial ? " Real serial\n" : " USB serial\n");
|
||||
|
||||
// init board
|
||||
current_board->init();
|
||||
@@ -350,13 +333,6 @@ int main(void) {
|
||||
// panda has an FPU, let's use it!
|
||||
enable_fpu();
|
||||
|
||||
// enable main uart if it's connected
|
||||
if (has_external_debug_serial) {
|
||||
// WEIRDNESS: without this gate around the UART, it would "crash", but only if the ESP is enabled
|
||||
// assuming it's because the lines were left floating and spurious noise was on them
|
||||
uart_init(&uart_ring_debug, 115200);
|
||||
}
|
||||
|
||||
if (current_board->has_gps) {
|
||||
uart_init(&uart_ring_gps, 9600);
|
||||
} else {
|
||||
@@ -390,6 +366,12 @@ int main(void) {
|
||||
// enable USB (right before interrupts or enum can fail!)
|
||||
usb_init();
|
||||
|
||||
#ifdef ENABLE_SPI
|
||||
if (current_board->has_spi) {
|
||||
spi_init();
|
||||
}
|
||||
#endif
|
||||
|
||||
puts("**** INTERRUPTS ON ****\n");
|
||||
enable_interrupts();
|
||||
|
||||
@@ -399,19 +381,17 @@ int main(void) {
|
||||
for (cnt=0;;cnt++) {
|
||||
if (power_save_status == POWER_SAVE_STATUS_DISABLED) {
|
||||
#ifdef DEBUG_FAULTS
|
||||
if(fault_status == FAULT_STATUS_NONE){
|
||||
if (fault_status == FAULT_STATUS_NONE) {
|
||||
#endif
|
||||
uint32_t div_mode = ((usb_power_mode == USB_POWER_DCP) ? 4U : 1U);
|
||||
|
||||
// useful for debugging, fade breaks = panda is overloaded
|
||||
for(uint32_t fade = 0U; fade < MAX_LED_FADE; fade += div_mode){
|
||||
for (uint32_t fade = 0U; fade < MAX_LED_FADE; fade += 1U) {
|
||||
current_board->set_led(LED_RED, true);
|
||||
delay(fade >> 4);
|
||||
current_board->set_led(LED_RED, false);
|
||||
delay((MAX_LED_FADE - fade) >> 4);
|
||||
}
|
||||
|
||||
for(uint32_t fade = MAX_LED_FADE; fade > 0U; fade -= div_mode){
|
||||
for (uint32_t fade = MAX_LED_FADE; fade > 0U; fade -= 1U) {
|
||||
current_board->set_led(LED_RED, true);
|
||||
delay(fade >> 4);
|
||||
current_board->set_led(LED_RED, false);
|
||||
@@ -430,7 +410,6 @@ int main(void) {
|
||||
if (deepsleep_allowed && !usb_enumerated && !check_started() && ignition_seen && (heartbeat_counter > 20U)) {
|
||||
usb_soft_disconnect(true);
|
||||
fan_set_power(0U);
|
||||
current_board->set_usb_power_mode(USB_POWER_CLIENT);
|
||||
NVIC_DisableIRQ(TICK_TIMER_IRQ);
|
||||
delay(512000U);
|
||||
|
||||
|
||||
+40
-33
@@ -1,5 +1,3 @@
|
||||
#include "health.h"
|
||||
|
||||
extern int _app_start[0xc000]; // Only first 3 sectors of size 0x4000 are used
|
||||
|
||||
// Prototypes
|
||||
@@ -20,18 +18,18 @@ int get_health_pkt(void *dat) {
|
||||
|
||||
health->controls_allowed_pkt = controls_allowed;
|
||||
health->gas_interceptor_detected_pkt = gas_interceptor_detected;
|
||||
health->can_rx_errs_pkt = can_rx_errs;
|
||||
health->can_send_errs_pkt = can_send_errs;
|
||||
health->can_fwd_errs_pkt = can_fwd_errs;
|
||||
health->safety_tx_blocked_pkt = safety_tx_blocked;
|
||||
health->safety_rx_invalid_pkt = safety_rx_invalid;
|
||||
health->tx_buffer_overflow_pkt = tx_buffer_overflow;
|
||||
health->rx_buffer_overflow_pkt = rx_buffer_overflow;
|
||||
health->gmlan_send_errs_pkt = gmlan_send_errs;
|
||||
health->car_harness_status_pkt = car_harness_status;
|
||||
health->usb_power_mode_pkt = usb_power_mode;
|
||||
health->safety_mode_pkt = (uint8_t)(current_safety_mode);
|
||||
health->safety_param_pkt = current_safety_param;
|
||||
health->alternative_experience_pkt = alternative_experience;
|
||||
health->power_save_enabled_pkt = (uint8_t)(power_save_status == POWER_SAVE_STATUS_ENABLED);
|
||||
health->heartbeat_lost_pkt = (uint8_t)(heartbeat_lost);
|
||||
health->blocked_msg_cnt_pkt = blocked_msg_cnt;
|
||||
health->safety_rx_checks_invalid = safety_rx_checks_invalid;
|
||||
|
||||
health->fault_status_pkt = fault_status;
|
||||
health->faults_pkt = faults;
|
||||
@@ -178,6 +176,14 @@ int comms_control_handler(ControlPacket_t *req, uint8_t *resp) {
|
||||
unsigned int resp_len = 0;
|
||||
uart_ring *ur = NULL;
|
||||
timestamp_t t;
|
||||
|
||||
#ifdef DEBUG_COMMS
|
||||
puts("raw control request: "); hexdump(req, sizeof(ControlPacket_t)); puts("\n");
|
||||
puts("- request "); puth(req->request); puts("\n");
|
||||
puts("- param1 "); puth(req->param1); puts("\n");
|
||||
puts("- param2 "); puth(req->param2); puts("\n");
|
||||
#endif
|
||||
|
||||
switch (req->request) {
|
||||
// **** 0xa0: get rtc time
|
||||
case 0xa0:
|
||||
@@ -243,20 +249,24 @@ int comms_control_handler(ControlPacket_t *req, uint8_t *resp) {
|
||||
case 0xb3:
|
||||
current_board->set_phone_power(req->param1 > 0U);
|
||||
break;
|
||||
// **** 0xc0: get CAN debug info
|
||||
case 0xc0:
|
||||
puts("can tx: "); puth(can_tx_cnt);
|
||||
puts(" txd: "); puth(can_txd_cnt);
|
||||
puts(" rx: "); puth(can_rx_cnt);
|
||||
puts(" err: "); puth(can_err_cnt);
|
||||
puts("\n");
|
||||
break;
|
||||
// **** 0xc1: get hardware type
|
||||
case 0xc1:
|
||||
resp[0] = hw_type;
|
||||
resp_len = 1;
|
||||
break;
|
||||
// **** 0xd0: fetch serial number
|
||||
case 0xc2:
|
||||
COMPILE_TIME_ASSERT(sizeof(can_health_t) <= USBPACKET_MAX_SIZE);
|
||||
if (req->param1 < 3U) {
|
||||
can_health[req->param1].can_speed = (bus_config[req->param1].can_speed / 10U);
|
||||
can_health[req->param1].can_data_speed = (bus_config[req->param1].can_data_speed / 10U);
|
||||
can_health[req->param1].canfd_enabled = bus_config[req->param1].canfd_enabled;
|
||||
can_health[req->param1].brs_enabled = bus_config[req->param1].brs_enabled;
|
||||
can_health[req->param1].canfd_non_iso = bus_config[req->param1].canfd_non_iso;
|
||||
resp_len = sizeof(can_health[req->param1]);
|
||||
(void)memcpy(resp, &can_health[req->param1], resp_len);
|
||||
}
|
||||
break;
|
||||
case 0xd0:
|
||||
// addresses are OTP
|
||||
if (req->param1 == 1U) {
|
||||
@@ -377,12 +387,12 @@ int comms_control_handler(ControlPacket_t *req, uint8_t *resp) {
|
||||
case 0xdd:
|
||||
resp[0] = HEALTH_PACKET_VERSION;
|
||||
resp[1] = CAN_PACKET_VERSION;
|
||||
resp_len = 2;
|
||||
resp[2] = CAN_HEALTH_PACKET_VERSION;
|
||||
resp_len = 3;
|
||||
break;
|
||||
// **** 0xde: set can bitrate
|
||||
case 0xde:
|
||||
if (req->param1 < BUS_CNT) {
|
||||
// TODO: add sanity check, ideally check if value is correct(from array of correct values)
|
||||
if ((req->param1 < BUS_CNT) && is_speed_valid(req->param2, speeds, sizeof(speeds)/sizeof(speeds[0]))) {
|
||||
bus_config[req->param1].can_speed = req->param2;
|
||||
bool ret = can_init(CAN_NUM_FROM_BUS_NUM(req->param1));
|
||||
UNUSED(ret);
|
||||
@@ -459,10 +469,6 @@ int comms_control_handler(ControlPacket_t *req, uint8_t *resp) {
|
||||
can_loopback = (req->param1 > 0U);
|
||||
can_init_all();
|
||||
break;
|
||||
// **** 0xe6: set USB power
|
||||
case 0xe6:
|
||||
current_board->set_usb_power_mode(req->param1);
|
||||
break;
|
||||
// **** 0xe7: set power save state
|
||||
case 0xe7:
|
||||
set_power_save_state(req->param1);
|
||||
@@ -537,10 +543,11 @@ int comms_control_handler(ControlPacket_t *req, uint8_t *resp) {
|
||||
heartbeat_disabled = true;
|
||||
}
|
||||
break;
|
||||
// **** 0xde: set CAN FD data bitrate
|
||||
// **** 0xf9: set CAN FD data bitrate
|
||||
case 0xf9:
|
||||
if (req->param1 < CAN_CNT) {
|
||||
// TODO: add sanity check, ideally check if value is correct (from array of correct values)
|
||||
if ((req->param1 < CAN_CNT) &&
|
||||
current_board->has_canfd &&
|
||||
is_speed_valid(req->param2, data_speeds, sizeof(data_speeds)/sizeof(data_speeds[0]))) {
|
||||
bus_config[req->param1].can_data_speed = req->param2;
|
||||
bus_config[req->param1].canfd_enabled = (req->param2 >= bus_config[req->param1].can_speed);
|
||||
bus_config[req->param1].brs_enabled = (req->param2 > bus_config[req->param1].can_speed);
|
||||
@@ -548,18 +555,18 @@ int comms_control_handler(ControlPacket_t *req, uint8_t *resp) {
|
||||
UNUSED(ret);
|
||||
}
|
||||
break;
|
||||
// **** 0xfa: check if CAN FD and BRS are enabled
|
||||
case 0xfa:
|
||||
if (req->param1 < CAN_CNT) {
|
||||
resp[0] = bus_config[req->param1].canfd_enabled;
|
||||
resp[1] = bus_config[req->param1].brs_enabled;
|
||||
resp_len = 2;
|
||||
}
|
||||
break;
|
||||
// **** 0xfb: allow highest power saving mode (stop) to be entered
|
||||
case 0xfb:
|
||||
deepsleep_allowed = true;
|
||||
break;
|
||||
// **** 0xfc: set CAN FD non-ISO mode
|
||||
case 0xfc:
|
||||
if ((req->param1 < CAN_CNT) && current_board->has_canfd) {
|
||||
bus_config[req->param1].canfd_non_iso = (req->param2 != 0U);
|
||||
bool ret = can_init(CAN_NUM_FROM_BUS_NUM(req->param1));
|
||||
UNUSED(ret);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
puts("NO HANDLER ");
|
||||
puth(req->request);
|
||||
|
||||
@@ -3,6 +3,7 @@ void puts(const char *a);
|
||||
void puth(unsigned int i);
|
||||
void puth2(unsigned int i);
|
||||
void puth4(unsigned int i);
|
||||
void hexdump(const void *a, int l);
|
||||
typedef struct board board;
|
||||
typedef struct harness_configuration harness_configuration;
|
||||
void can_flip_buses(uint8_t bus1, uint8_t bus2);
|
||||
|
||||
@@ -275,7 +275,6 @@ int main(void) {
|
||||
// init devices
|
||||
clock_init();
|
||||
peripherals_init();
|
||||
detect_external_debug_serial();
|
||||
detect_board_type();
|
||||
|
||||
// init board
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
#!/usr/bin/env sh
|
||||
set -e
|
||||
|
||||
DFU_UTIL="dfu-util"
|
||||
|
||||
scons -u -j$(nproc)
|
||||
|
||||
PYTHONPATH=.. python3 -c "from python import Panda; Panda().reset(enter_bootstub=True); Panda().reset(enter_bootloader=True)" || true
|
||||
# Recovers panda from DFU mode only, use flash.sh after power cycling panda
|
||||
printf %b 'from python import Panda\nfor serial in Panda.list(): Panda(serial).reset(enter_bootstub=True); Panda(serial).reset(enter_bootloader=True)' | PYTHONPATH=.. python3
|
||||
sleep 1
|
||||
$DFU_UTIL -d 0483:df11 -a 0 -s 0x08004000 -D obj/panda.bin.signed
|
||||
$DFU_UTIL -d 0483:df11 -a 0 -s 0x08000000:leave -D obj/bootstub.panda.bin
|
||||
printf %b 'from python import PandaDFU\nfor serial in PandaDFU.list(): PandaDFU(serial).recover()' | PYTHONPATH=.. python3
|
||||
|
||||
+61
-7
@@ -164,6 +164,7 @@ int get_addr_check_index(CANPacket_t *to_push, AddrCheckStruct addr_list[], cons
|
||||
|
||||
// 1Hz safety function called by main. Now just a check for lagging safety messages
|
||||
void safety_tick(const addr_checks *rx_checks) {
|
||||
bool rx_checks_invalid = false;
|
||||
uint32_t ts = microsecond_timer_get();
|
||||
if (rx_checks != NULL) {
|
||||
for (int i=0; i < rx_checks->len; i++) {
|
||||
@@ -176,8 +177,14 @@ void safety_tick(const addr_checks *rx_checks) {
|
||||
if (lagging) {
|
||||
controls_allowed = 0;
|
||||
}
|
||||
|
||||
if (lagging || !is_msg_valid(rx_checks->check, i)) {
|
||||
rx_checks_invalid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
safety_rx_checks_invalid = rx_checks_invalid;
|
||||
}
|
||||
|
||||
void update_counter(AddrCheckStruct addr_list[], int index, uint8_t counter) {
|
||||
@@ -250,6 +257,12 @@ void generic_rx_checks(bool stock_ecu_detected) {
|
||||
}
|
||||
brake_pressed_prev = brake_pressed;
|
||||
|
||||
// exit controls on rising edge of regen paddle
|
||||
if (regen_braking && (!regen_braking_prev || vehicle_moving)) {
|
||||
controls_allowed = 0;
|
||||
}
|
||||
regen_braking_prev = regen_braking;
|
||||
|
||||
// check if stock ECU is on bus broken by car harness
|
||||
if ((safety_mode_cnt > RELAY_TRNS_TIMEOUT) && stock_ecu_detected) {
|
||||
relay_malfunction_set();
|
||||
@@ -309,6 +322,8 @@ int set_safety_hooks(uint16_t mode, uint16_t param) {
|
||||
gas_pressed_prev = false;
|
||||
brake_pressed = false;
|
||||
brake_pressed_prev = false;
|
||||
regen_braking = false;
|
||||
regen_braking_prev = false;
|
||||
cruise_engaged_prev = false;
|
||||
vehicle_speed = 0;
|
||||
vehicle_moving = false;
|
||||
@@ -318,7 +333,10 @@ int set_safety_hooks(uint16_t mode, uint16_t param) {
|
||||
rt_torque_last = 0;
|
||||
ts_angle_last = 0;
|
||||
desired_angle_last = 0;
|
||||
ts_last = 0;
|
||||
ts_torque_check_last = 0;
|
||||
ts_steer_req_mismatch_last = 0;
|
||||
valid_steer_req_count = 0;
|
||||
invalid_steer_req_count = 0;
|
||||
|
||||
torque_meas.max = 0;
|
||||
torque_meas.max = 0;
|
||||
@@ -329,6 +347,7 @@ int set_safety_hooks(uint16_t mode, uint16_t param) {
|
||||
|
||||
controls_allowed = false;
|
||||
relay_malfunction_reset();
|
||||
safety_rx_checks_invalid = false;
|
||||
|
||||
int set_status = -1; // not set
|
||||
int hook_config_count = sizeof(safety_hook_registry) / sizeof(safety_hook_config);
|
||||
@@ -492,10 +511,10 @@ bool steer_torque_cmd_checks(int desired_torque, int steer_req, const SteeringLi
|
||||
violation |= rt_rate_limit_check(desired_torque, rt_torque_last, limits.max_rt_delta);
|
||||
|
||||
// every RT_INTERVAL set the new limits
|
||||
uint32_t ts_elapsed = get_ts_elapsed(ts, ts_last);
|
||||
uint32_t ts_elapsed = get_ts_elapsed(ts, ts_torque_check_last);
|
||||
if (ts_elapsed > limits.max_rt_interval) {
|
||||
rt_torque_last = desired_torque;
|
||||
ts_last = ts;
|
||||
ts_torque_check_last = ts;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -504,16 +523,51 @@ bool steer_torque_cmd_checks(int desired_torque, int steer_req, const SteeringLi
|
||||
violation = true;
|
||||
}
|
||||
|
||||
// no torque if request bit isn't high
|
||||
if ((steer_req == 0) && (desired_torque != 0)) {
|
||||
violation = true;
|
||||
// certain safety modes set their steer request bit low for one or more frame at a
|
||||
// predefined max frequency to avoid steering faults in certain situations
|
||||
bool steer_req_mismatch = (steer_req == 0) && (desired_torque != 0);
|
||||
if (!limits.has_steer_req_tolerance) {
|
||||
if (steer_req_mismatch) {
|
||||
violation = true;
|
||||
}
|
||||
|
||||
} else {
|
||||
if (steer_req_mismatch) {
|
||||
if (invalid_steer_req_count == 0) {
|
||||
// disallow torque cut if not enough recent matching steer_req messages
|
||||
if (valid_steer_req_count < limits.min_valid_request_frames) {
|
||||
violation = true;
|
||||
}
|
||||
|
||||
// or we've cut torque too recently in time
|
||||
uint32_t ts_elapsed = get_ts_elapsed(ts, ts_steer_req_mismatch_last);
|
||||
if (ts_elapsed < limits.min_valid_request_rt_interval) {
|
||||
violation = true;
|
||||
}
|
||||
} else {
|
||||
// or we're cutting more frames consecutively than allowed
|
||||
if (invalid_steer_req_count >= limits.max_invalid_request_frames) {
|
||||
violation = true;
|
||||
}
|
||||
}
|
||||
|
||||
valid_steer_req_count = 0;
|
||||
ts_steer_req_mismatch_last = ts;
|
||||
invalid_steer_req_count = MIN(invalid_steer_req_count + 1, limits.max_invalid_request_frames);
|
||||
} else {
|
||||
valid_steer_req_count = MIN(valid_steer_req_count + 1, limits.min_valid_request_frames);
|
||||
invalid_steer_req_count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// reset to 0 if either controls is not allowed or there's a violation
|
||||
if (violation || !controls_allowed) {
|
||||
valid_steer_req_count = 0;
|
||||
invalid_steer_req_count = 0;
|
||||
desired_torque_last = 0;
|
||||
rt_torque_last = 0;
|
||||
ts_last = ts;
|
||||
ts_torque_check_last = ts;
|
||||
ts_steer_req_mismatch_last = ts;
|
||||
}
|
||||
|
||||
return violation;
|
||||
|
||||
@@ -28,9 +28,6 @@ const SteeringLimits CHRYSLER_RAM_HD_STEERING_LIMITS = {
|
||||
.type = TorqueMotorLimited,
|
||||
};
|
||||
|
||||
const int CHRYSLER_STANDSTILL_THRSLD = 10; // about 1m/s
|
||||
const int CHRYSLER_RAM_STANDSTILL_THRSLD = 3; // about 1m/s changed from wheel rpm to km/h
|
||||
|
||||
typedef struct {
|
||||
const int EPS_2;
|
||||
const int ESP_1;
|
||||
@@ -204,16 +201,14 @@ static int chrysler_rx_hook(CANPacket_t *to_push) {
|
||||
}
|
||||
|
||||
// TODO: use the same message for both
|
||||
// update speed
|
||||
// update vehicle moving
|
||||
if ((chrysler_platform != CHRYSLER_PACIFICA) && (bus == 0) && (addr == chrysler_addrs->ESP_8)) {
|
||||
vehicle_speed = (((GET_BYTE(to_push, 4) & 0x3U) << 8) + GET_BYTE(to_push, 5))*0.0078125;
|
||||
vehicle_moving = (int)vehicle_speed > CHRYSLER_RAM_STANDSTILL_THRSLD;
|
||||
vehicle_moving = ((GET_BYTE(to_push, 4) << 8) + GET_BYTE(to_push, 5)) != 0U;
|
||||
}
|
||||
if ((chrysler_platform == CHRYSLER_PACIFICA) && (bus == 0) && (addr == 514)) {
|
||||
int speed_l = (GET_BYTE(to_push, 0) << 4) + (GET_BYTE(to_push, 1) >> 4);
|
||||
int speed_r = (GET_BYTE(to_push, 2) << 4) + (GET_BYTE(to_push, 3) >> 4);
|
||||
vehicle_speed = (speed_l + speed_r) / 2;
|
||||
vehicle_moving = (int)vehicle_speed > CHRYSLER_STANDSTILL_THRSLD;
|
||||
vehicle_moving = (speed_l != 0) || (speed_r != 0);
|
||||
}
|
||||
|
||||
// exit controls on rising edge of gas press
|
||||
|
||||
@@ -13,7 +13,7 @@ static int elm327_tx_hook(CANPacket_t *to_send, bool longitudinal_allowed) {
|
||||
//Check valid 29 bit send addresses for ISO 15765-4
|
||||
//Check valid 11 bit send addresses for ISO 15765-4
|
||||
if ((addr != 0x18DB33F1) && ((addr & 0x1FFF00FF) != 0x18DA00F1) &&
|
||||
((addr & 0x1FFFFF00) != 0x700)) {
|
||||
((addr & 0x1FFFFF00) != 0x600) && ((addr & 0x1FFFFF00) != 0x700)) {
|
||||
tx = 0;
|
||||
}
|
||||
return tx;
|
||||
|
||||
@@ -1,37 +1,41 @@
|
||||
// Safety-relevant CAN messages for Ford vehicles.
|
||||
#define MSG_ENG_BRAKE_DATA 0x165 // RX from PCM, for driver brake pedal and cruise state
|
||||
#define MSG_ENG_VEHICLE_SP_THROTTLE 0x204 // RX from PCM, for driver throttle input
|
||||
#define MSG_DESIRED_TORQ_BRK 0x213 // RX from ABS, for standstill state
|
||||
#define MSG_STEERING_DATA_FD1 0x083 // TX by OP, ACC control buttons for cancel
|
||||
#define MSG_LANE_ASSIST_DATA1 0x3CA // TX by OP, Lane Keeping Assist
|
||||
#define MSG_LATERAL_MOTION_CONTROL 0x3D3 // TX by OP, Lane Centering Assist
|
||||
#define MSG_IPMA_DATA 0x3D8 // TX by OP, IPMA HUD user interface
|
||||
#define MSG_EngBrakeData 0x165 // RX from PCM, for driver brake pedal and cruise state
|
||||
#define MSG_EngVehicleSpThrottle 0x204 // RX from PCM, for driver throttle input
|
||||
#define MSG_DesiredTorqBrk 0x213 // RX from ABS, for standstill state
|
||||
#define MSG_Steering_Data_FD1 0x083 // TX by OP, various driver switches and LKAS/CC buttons
|
||||
#define MSG_ACCDATA_3 0x18A // TX by OP, ACC/TJA user interface
|
||||
#define MSG_Lane_Assist_Data1 0x3CA // TX by OP, Lane Keep Assist
|
||||
#define MSG_LateralMotionControl 0x3D3 // TX by OP, Traffic Jam Assist
|
||||
#define MSG_IPMA_Data 0x3D8 // TX by OP, IPMA and LKAS user interface
|
||||
|
||||
// CAN bus numbers.
|
||||
#define FORD_MAIN_BUS 0U
|
||||
#define FORD_CAM_BUS 2U
|
||||
|
||||
const CanMsg FORD_TX_MSGS[] = {
|
||||
{MSG_STEERING_DATA_FD1, 0, 8},
|
||||
{MSG_LANE_ASSIST_DATA1, 0, 8},
|
||||
{MSG_LATERAL_MOTION_CONTROL, 0, 8},
|
||||
{MSG_IPMA_DATA, 0, 8},
|
||||
{MSG_Steering_Data_FD1, 0, 8},
|
||||
{MSG_Steering_Data_FD1, 2, 8},
|
||||
{MSG_ACCDATA_3, 0, 8},
|
||||
{MSG_Lane_Assist_Data1, 0, 8},
|
||||
{MSG_LateralMotionControl, 0, 8},
|
||||
{MSG_IPMA_Data, 0, 8},
|
||||
};
|
||||
#define FORD_TX_LEN (sizeof(FORD_TX_MSGS) / sizeof(FORD_TX_MSGS[0]))
|
||||
|
||||
AddrCheckStruct ford_addr_checks[] = {
|
||||
{.msg = {{MSG_ENG_BRAKE_DATA, 0, 8, .expected_timestep = 100000U}, { 0 }, { 0 }}},
|
||||
{.msg = {{MSG_ENG_VEHICLE_SP_THROTTLE, 0, 8, .expected_timestep = 10000U}, { 0 }, { 0 }}},
|
||||
{.msg = {{MSG_DESIRED_TORQ_BRK, 0, 8, .expected_timestep = 20000U}, { 0 }, { 0 }}},
|
||||
{.msg = {{MSG_EngBrakeData, 0, 8, .expected_timestep = 100000U}, { 0 }, { 0 }}},
|
||||
{.msg = {{MSG_EngVehicleSpThrottle, 0, 8, .expected_timestep = 10000U}, { 0 }, { 0 }}},
|
||||
{.msg = {{MSG_DesiredTorqBrk, 0, 8, .expected_timestep = 20000U}, { 0 }, { 0 }}},
|
||||
};
|
||||
#define FORD_ADDR_CHECK_LEN (sizeof(ford_addr_checks) / sizeof(ford_addr_checks[0]))
|
||||
addr_checks ford_rx_checks = {ford_addr_checks, FORD_ADDR_CHECK_LEN};
|
||||
|
||||
|
||||
static bool ford_lkas_msg_check(int addr) {
|
||||
return (addr == MSG_LANE_ASSIST_DATA1)
|
||||
|| (addr == MSG_LATERAL_MOTION_CONTROL)
|
||||
|| (addr == MSG_IPMA_DATA);
|
||||
return (addr == MSG_ACCDATA_3)
|
||||
|| (addr == MSG_Lane_Assist_Data1)
|
||||
|| (addr == MSG_LateralMotionControl)
|
||||
|| (addr == MSG_IPMA_Data);
|
||||
}
|
||||
|
||||
static int ford_rx_hook(CANPacket_t *to_push) {
|
||||
@@ -41,20 +45,20 @@ static int ford_rx_hook(CANPacket_t *to_push) {
|
||||
int addr = GET_ADDR(to_push);
|
||||
|
||||
// Update in motion state from standstill signal
|
||||
if (addr == MSG_DESIRED_TORQ_BRK) {
|
||||
if (addr == MSG_DesiredTorqBrk) {
|
||||
// Signal: VehStop_D_Stat
|
||||
vehicle_moving = ((GET_BYTE(to_push, 3) >> 3) & 0x3U) == 0U;
|
||||
}
|
||||
|
||||
// Update gas pedal
|
||||
if (addr == MSG_ENG_VEHICLE_SP_THROTTLE) {
|
||||
if (addr == MSG_EngVehicleSpThrottle) {
|
||||
// Pedal position: (0.1 * val) in percent
|
||||
// Signal: ApedPos_Pc_ActlArb
|
||||
gas_pressed = (((GET_BYTE(to_push, 0) & 0x03U) << 8) | GET_BYTE(to_push, 1)) > 0U;
|
||||
}
|
||||
|
||||
// Update brake pedal and cruise state
|
||||
if (addr == MSG_ENG_BRAKE_DATA) {
|
||||
if (addr == MSG_EngBrakeData) {
|
||||
// Signal: BpedDrvAppl_D_Actl
|
||||
brake_pressed = ((GET_BYTE(to_push, 0) >> 4) & 0x3U) == 2U;
|
||||
|
||||
@@ -82,23 +86,23 @@ static int ford_tx_hook(CANPacket_t *to_send, bool longitudinal_allowed) {
|
||||
tx = 0;
|
||||
}
|
||||
|
||||
// Cruise button check, only allow cancel button to be sent
|
||||
if (addr == MSG_STEERING_DATA_FD1) {
|
||||
// Violation if any button other than cancel is pressed
|
||||
// Signal: CcAslButtnCnclPress
|
||||
bool violation = (GET_BYTE(to_send, 0) |
|
||||
(GET_BYTE(to_send, 1) & 0xFEU) |
|
||||
GET_BYTE(to_send, 2) |
|
||||
GET_BYTE(to_send, 3) |
|
||||
GET_BYTE(to_send, 4) |
|
||||
GET_BYTE(to_send, 5)) != 0U;
|
||||
// Safety check for Steering_Data_FD1 button signals
|
||||
// Note: Many other signals in this message are not relevant to safety (e.g. blinkers, wiper switches, high beam)
|
||||
// which we passthru in OP.
|
||||
if (addr == MSG_Steering_Data_FD1) {
|
||||
// Violation if resume button is pressed while controls not allowed, or
|
||||
// if cancel button is pressed when cruise isn't engaged.
|
||||
bool violation = false;
|
||||
violation |= (GET_BIT(to_send, 8U) == 1U) && !cruise_engaged_prev; // Signal: CcAslButtnCnclPress (cancel)
|
||||
violation |= (GET_BIT(to_send, 25U) == 1U) && !controls_allowed; // Signal: CcAsllButtnResPress (resume)
|
||||
|
||||
if (violation) {
|
||||
tx = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Safety check for Lane_Assist_Data1 action
|
||||
if (addr == MSG_LANE_ASSIST_DATA1) {
|
||||
if (addr == MSG_Lane_Assist_Data1) {
|
||||
// Do not allow steering using Lane_Assist_Data1 (Lane-Departure Aid).
|
||||
// This message must be sent for Lane Centering to work, and can include
|
||||
// values such as the steering angle or lane curvature for debugging,
|
||||
@@ -110,7 +114,7 @@ static int ford_tx_hook(CANPacket_t *to_send, bool longitudinal_allowed) {
|
||||
}
|
||||
|
||||
// Safety check for LateralMotionControl action
|
||||
if (addr == MSG_LATERAL_MOTION_CONTROL) {
|
||||
if (addr == MSG_LateralMotionControl) {
|
||||
// Signal: LatCtl_D_Rq
|
||||
unsigned int steer_control_type = (GET_BYTE(to_send, 4) >> 2) & 0x7U;
|
||||
bool steer_control_enabled = steer_control_type != 0U;
|
||||
|
||||
+100
-57
@@ -16,9 +16,30 @@ const int GM_MAX_RATE_DOWN = 17;
|
||||
const int GM_DRIVER_TORQUE_ALLOWANCE = 50;
|
||||
const int GM_DRIVER_TORQUE_FACTOR = 4;
|
||||
|
||||
const int GM_MAX_GAS = 3072;
|
||||
const int GM_MAX_REGEN = 1404;
|
||||
const int GM_MAX_BRAKE = 350;
|
||||
typedef struct {
|
||||
const int max_gas;
|
||||
const int max_regen;
|
||||
const int inactive_regen;
|
||||
const int max_brake;
|
||||
} GmLongLimits;
|
||||
|
||||
const GmLongLimits GM_ASCM_LONG_LIMITS = {
|
||||
.max_gas = 3072,
|
||||
.max_regen = 1404,
|
||||
.inactive_regen = 1404,
|
||||
.max_brake = 400,
|
||||
};
|
||||
|
||||
const GmLongLimits GM_CAM_LONG_LIMITS = {
|
||||
.max_gas = 3400,
|
||||
.max_regen = 1514,
|
||||
.inactive_regen = 1554,
|
||||
.max_brake = 400,
|
||||
};
|
||||
|
||||
const GmLongLimits *gm_long_limits;
|
||||
|
||||
const int GM_STANDSTILL_THRSLD = 10; // 0.311kph
|
||||
|
||||
const CanMsg GM_ASCM_TX_MSGS[] = {{384, 0, 4}, {1033, 0, 7}, {1034, 0, 7}, {715, 0, 8}, {880, 0, 6}, // pt bus
|
||||
{161, 1, 7}, {774, 1, 8}, {776, 1, 7}, {784, 1, 2}, // obs bus
|
||||
@@ -26,20 +47,27 @@ const CanMsg GM_ASCM_TX_MSGS[] = {{384, 0, 4}, {1033, 0, 7}, {1034, 0, 7}, {715,
|
||||
{0x104c006c, 3, 3}, {0x10400060, 3, 5}}; // gmlan
|
||||
|
||||
const CanMsg GM_CAM_TX_MSGS[] = {{384, 0, 4}, // pt bus
|
||||
{481, 2, 7}}; // camera bus
|
||||
{481, 2, 7}, {388, 2, 8}}; // camera bus
|
||||
|
||||
const CanMsg GM_CAM_LONG_TX_MSGS[] = {{384, 0, 4}, {789, 0, 5}, {715, 0, 8}, {880, 0, 6}, // pt bus
|
||||
{388, 2, 8}}; // camera bus
|
||||
|
||||
// TODO: do checksum and counter checks. Add correct timestep, 0.1s for now.
|
||||
AddrCheckStruct gm_addr_checks[] = {
|
||||
{.msg = {{388, 0, 8, .expected_timestep = 100000U}, { 0 }, { 0 }}},
|
||||
{.msg = {{842, 0, 5, .expected_timestep = 100000U}, { 0 }, { 0 }}},
|
||||
{.msg = {{481, 0, 7, .expected_timestep = 100000U}, { 0 }, { 0 }}},
|
||||
{.msg = {{241, 0, 6, .expected_timestep = 100000U}, { 0 }, { 0 }}},
|
||||
{.msg = {{190, 0, 6, .expected_timestep = 100000U}, // Volt, Silverado, Acadia Denali
|
||||
{190, 0, 7, .expected_timestep = 100000U}, // Bolt EUV
|
||||
{190, 0, 8, .expected_timestep = 100000U}}}, // Escalade
|
||||
{.msg = {{452, 0, 8, .expected_timestep = 100000U}, { 0 }, { 0 }}},
|
||||
{.msg = {{201, 0, 8, .expected_timestep = 100000U}, { 0 }, { 0 }}},
|
||||
};
|
||||
#define GM_RX_CHECK_LEN (sizeof(gm_addr_checks) / sizeof(gm_addr_checks[0]))
|
||||
addr_checks gm_rx_checks = {gm_addr_checks, GM_RX_CHECK_LEN};
|
||||
|
||||
const uint16_t GM_PARAM_HW_CAM = 1;
|
||||
const uint16_t GM_PARAM_HW_CAM_LONG = 2;
|
||||
|
||||
enum {
|
||||
GM_BTN_UNPRESS = 1,
|
||||
@@ -49,6 +77,8 @@ enum {
|
||||
};
|
||||
|
||||
enum {GM_ASCM, GM_CAM} gm_hw = GM_ASCM;
|
||||
bool gm_cam_long = false;
|
||||
bool gm_pcm_cruise = false;
|
||||
|
||||
static int gm_rx_hook(CANPacket_t *to_push) {
|
||||
|
||||
@@ -64,60 +94,60 @@ static int gm_rx_hook(CANPacket_t *to_push) {
|
||||
update_sample(&torque_driver, torque_driver_new);
|
||||
}
|
||||
|
||||
// sample speed, really only care if car is moving or not
|
||||
// rear left wheel speed
|
||||
// sample rear wheel speeds
|
||||
if (addr == 842) {
|
||||
vehicle_moving = GET_BYTE(to_push, 0) | GET_BYTE(to_push, 1);
|
||||
int left_rear_speed = (GET_BYTE(to_push, 0) << 8) | GET_BYTE(to_push, 1);
|
||||
int right_rear_speed = (GET_BYTE(to_push, 2) << 8) | GET_BYTE(to_push, 3);
|
||||
vehicle_moving = (left_rear_speed > GM_STANDSTILL_THRSLD) || (right_rear_speed > GM_STANDSTILL_THRSLD);
|
||||
}
|
||||
|
||||
// ACC steering wheel buttons (GM_CAM is tied to the PCM)
|
||||
if ((addr == 481) && (gm_hw == GM_ASCM)) {
|
||||
if ((addr == 481) && !gm_pcm_cruise) {
|
||||
int button = (GET_BYTE(to_push, 5) & 0x70U) >> 4;
|
||||
|
||||
// enter controls on falling edge of set or rising edge of resume (avoids fault)
|
||||
bool set = (button != GM_BTN_SET) && (cruise_button_prev == GM_BTN_SET);
|
||||
bool res = (button == GM_BTN_RESUME) && (cruise_button_prev != GM_BTN_RESUME);
|
||||
if (set || res) {
|
||||
controls_allowed = 1;
|
||||
}
|
||||
|
||||
// exit controls on cancel press
|
||||
if (button == GM_BTN_CANCEL) {
|
||||
controls_allowed = 0;
|
||||
}
|
||||
|
||||
// enter controls on falling edge of set or resume
|
||||
bool set = (button == GM_BTN_UNPRESS) && (cruise_button_prev == GM_BTN_SET);
|
||||
bool res = (button == GM_BTN_UNPRESS) && (cruise_button_prev == GM_BTN_RESUME);
|
||||
if (set || res) {
|
||||
controls_allowed = 1;
|
||||
}
|
||||
|
||||
cruise_button_prev = button;
|
||||
}
|
||||
|
||||
// speed > 0
|
||||
if (addr == 241) {
|
||||
// Brake pedal's potentiometer returns near-zero reading
|
||||
// even when pedal is not pressed
|
||||
brake_pressed = GET_BYTE(to_push, 1) >= 10U;
|
||||
// Reference for brake pressed signals:
|
||||
// https://github.com/commaai/openpilot/blob/master/selfdrive/car/gm/carstate.py
|
||||
if ((addr == 190) && (gm_hw == GM_ASCM)) {
|
||||
brake_pressed = GET_BYTE(to_push, 1) >= 8U;
|
||||
}
|
||||
|
||||
if ((addr == 201) && (gm_hw == GM_CAM)) {
|
||||
brake_pressed = GET_BIT(to_push, 40U) != 0U;
|
||||
}
|
||||
|
||||
if (addr == 452) {
|
||||
gas_pressed = GET_BYTE(to_push, 5) != 0U;
|
||||
|
||||
// enter controls on rising edge of ACC, exit controls when ACC off
|
||||
if (gm_hw == GM_CAM) {
|
||||
if (gm_pcm_cruise) {
|
||||
bool cruise_engaged = (GET_BYTE(to_push, 1) >> 5) != 0U;
|
||||
pcm_cruise_check(cruise_engaged);
|
||||
}
|
||||
}
|
||||
|
||||
// exit controls on regen paddle
|
||||
if (addr == 189) {
|
||||
bool regen = GET_BYTE(to_push, 0) & 0x20U;
|
||||
if (regen) {
|
||||
controls_allowed = 0;
|
||||
}
|
||||
regen_braking = (GET_BYTE(to_push, 0) >> 4) != 0U;
|
||||
}
|
||||
|
||||
bool stock_ecu_detected = (addr == 384); // ASCMLKASteeringCmd
|
||||
|
||||
// Only check ASCMGasRegenCmd if ASCM, GM_CAM uses stock longitudinal
|
||||
if ((gm_hw == GM_ASCM) && (addr == 715)) {
|
||||
// Check ASCMGasRegenCmd only if we're blocking it
|
||||
if (!gm_pcm_cruise && (addr == 715)) {
|
||||
stock_ecu_detected = true;
|
||||
}
|
||||
generic_rx_checks(stock_ecu_detected);
|
||||
@@ -137,30 +167,25 @@ static int gm_tx_hook(CANPacket_t *to_send, bool longitudinal_allowed) {
|
||||
int addr = GET_ADDR(to_send);
|
||||
|
||||
if (gm_hw == GM_CAM) {
|
||||
tx = msg_allowed(to_send, GM_CAM_TX_MSGS, sizeof(GM_CAM_TX_MSGS)/sizeof(GM_CAM_TX_MSGS[0]));
|
||||
if (gm_cam_long) {
|
||||
tx = msg_allowed(to_send, GM_CAM_LONG_TX_MSGS, sizeof(GM_CAM_LONG_TX_MSGS)/sizeof(GM_CAM_LONG_TX_MSGS[0]));
|
||||
} else {
|
||||
tx = msg_allowed(to_send, GM_CAM_TX_MSGS, sizeof(GM_CAM_TX_MSGS)/sizeof(GM_CAM_TX_MSGS[0]));
|
||||
}
|
||||
} else {
|
||||
tx = msg_allowed(to_send, GM_ASCM_TX_MSGS, sizeof(GM_ASCM_TX_MSGS)/sizeof(GM_ASCM_TX_MSGS[0]));
|
||||
}
|
||||
|
||||
// disallow actuator commands if gas or brake (with vehicle moving) are pressed
|
||||
// and the the latching controls_allowed flag is True
|
||||
int pedal_pressed = brake_pressed_prev && vehicle_moving;
|
||||
bool alt_exp_allow_gas = alternative_experience & ALT_EXP_DISABLE_DISENGAGE_ON_GAS;
|
||||
if (!alt_exp_allow_gas) {
|
||||
pedal_pressed = pedal_pressed || gas_pressed_prev;
|
||||
}
|
||||
bool current_controls_allowed = controls_allowed && !pedal_pressed;
|
||||
|
||||
// BRAKE: safety check
|
||||
if (addr == 789) {
|
||||
int brake = ((GET_BYTE(to_send, 0) & 0xFU) << 8) + GET_BYTE(to_send, 1);
|
||||
brake = (0x1000 - brake) & 0xFFF;
|
||||
if (!current_controls_allowed || !longitudinal_allowed) {
|
||||
if (!longitudinal_allowed) {
|
||||
if (brake != 0) {
|
||||
tx = 0;
|
||||
}
|
||||
}
|
||||
if (brake > GM_MAX_BRAKE) {
|
||||
if (brake > gm_long_limits->max_brake) {
|
||||
tx = 0;
|
||||
}
|
||||
}
|
||||
@@ -172,7 +197,7 @@ static int gm_tx_hook(CANPacket_t *to_send, bool longitudinal_allowed) {
|
||||
bool violation = 0;
|
||||
desired_torque = to_signed(desired_torque, 11);
|
||||
|
||||
if (current_controls_allowed) {
|
||||
if (controls_allowed) {
|
||||
|
||||
// *** global torque limit check ***
|
||||
violation |= max_limit_check(desired_torque, GM_MAX_STEER, -GM_MAX_STEER);
|
||||
@@ -189,23 +214,23 @@ static int gm_tx_hook(CANPacket_t *to_send, bool longitudinal_allowed) {
|
||||
violation |= rt_rate_limit_check(desired_torque, rt_torque_last, GM_MAX_RT_DELTA);
|
||||
|
||||
// every RT_INTERVAL set the new limits
|
||||
uint32_t ts_elapsed = get_ts_elapsed(ts, ts_last);
|
||||
uint32_t ts_elapsed = get_ts_elapsed(ts, ts_torque_check_last);
|
||||
if (ts_elapsed > GM_RT_INTERVAL) {
|
||||
rt_torque_last = desired_torque;
|
||||
ts_last = ts;
|
||||
ts_torque_check_last = ts;
|
||||
}
|
||||
}
|
||||
|
||||
// no torque if controls is not allowed
|
||||
if (!current_controls_allowed && (desired_torque != 0)) {
|
||||
if (!controls_allowed && (desired_torque != 0)) {
|
||||
violation = 1;
|
||||
}
|
||||
|
||||
// reset to 0 if either controls is not allowed or there's a violation
|
||||
if (violation || !current_controls_allowed) {
|
||||
if (violation || !controls_allowed) {
|
||||
desired_torque_last = 0;
|
||||
rt_torque_last = 0;
|
||||
ts_last = ts;
|
||||
ts_torque_check_last = ts;
|
||||
}
|
||||
|
||||
if (violation) {
|
||||
@@ -217,10 +242,9 @@ static int gm_tx_hook(CANPacket_t *to_send, bool longitudinal_allowed) {
|
||||
if (addr == 715) {
|
||||
int gas_regen = ((GET_BYTE(to_send, 2) & 0x7FU) << 5) + ((GET_BYTE(to_send, 3) & 0xF8U) >> 3);
|
||||
// Disabled message is !engaged with gas
|
||||
// value that corresponds to max regen.
|
||||
if (!current_controls_allowed || !longitudinal_allowed) {
|
||||
// Stock ECU sends max regen when not enabled
|
||||
if (gas_regen != GM_MAX_REGEN) {
|
||||
// value that corresponds to inactive regen.
|
||||
if (!longitudinal_allowed) {
|
||||
if (gas_regen != gm_long_limits->inactive_regen) {
|
||||
tx = 0;
|
||||
}
|
||||
}
|
||||
@@ -231,13 +255,14 @@ static int gm_tx_hook(CANPacket_t *to_send, bool longitudinal_allowed) {
|
||||
tx = 0;
|
||||
}
|
||||
}
|
||||
if (gas_regen > GM_MAX_GAS) {
|
||||
// Enforce gas/regen actuation limits (max_regen <= gas_regen <= max_gas)
|
||||
if ((gas_regen < gm_long_limits->max_regen) || (gas_regen > gm_long_limits->max_gas)) {
|
||||
tx = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// BUTTONS: used for resume spamming and cruise cancellation with stock longitudinal
|
||||
if ((addr == 481) && (gm_hw == GM_CAM)) {
|
||||
if ((addr == 481) && gm_pcm_cruise) {
|
||||
int button = (GET_BYTE(to_send, 5) >> 4) & 0x7U;
|
||||
|
||||
bool allowed_cancel = (button == 6) && cruise_engaged_prev;
|
||||
@@ -255,15 +280,21 @@ static int gm_fwd_hook(int bus_num, CANPacket_t *to_fwd) {
|
||||
int bus_fwd = -1;
|
||||
|
||||
if (gm_hw == GM_CAM) {
|
||||
int addr = GET_ADDR(to_fwd);
|
||||
if (bus_num == 0) {
|
||||
bus_fwd = 2;
|
||||
// block PSCMStatus; forwarded through openpilot to hide an alert from the camera
|
||||
bool is_pscm_msg = (addr == 388);
|
||||
if (!is_pscm_msg) {
|
||||
bus_fwd = 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (bus_num == 2) {
|
||||
// block lkas message, forward all others
|
||||
int addr = GET_ADDR(to_fwd);
|
||||
// block lkas message and acc messages if gm_cam_long, forward all others
|
||||
bool is_lkas_msg = (addr == 384);
|
||||
if (!is_lkas_msg) {
|
||||
bool is_acc_msg = (addr == 789) || (addr == 715) || (addr == 880);
|
||||
int block_msg = is_lkas_msg || (is_acc_msg && gm_cam_long);
|
||||
if (!block_msg) {
|
||||
bus_fwd = 0;
|
||||
}
|
||||
}
|
||||
@@ -274,6 +305,18 @@ static int gm_fwd_hook(int bus_num, CANPacket_t *to_fwd) {
|
||||
|
||||
static const addr_checks* gm_init(uint16_t param) {
|
||||
gm_hw = GET_FLAG(param, GM_PARAM_HW_CAM) ? GM_CAM : GM_ASCM;
|
||||
|
||||
if (gm_hw == GM_ASCM) {
|
||||
gm_long_limits = &GM_ASCM_LONG_LIMITS;
|
||||
} else if (gm_hw == GM_CAM) {
|
||||
gm_long_limits = &GM_CAM_LONG_LIMITS;
|
||||
} else {
|
||||
}
|
||||
|
||||
#ifdef ALLOW_DEBUG
|
||||
gm_cam_long = GET_FLAG(param, GM_PARAM_HW_CAM_LONG);
|
||||
#endif
|
||||
gm_pcm_cruise = (gm_hw == GM_CAM) && !gm_cam_long;
|
||||
return &gm_rx_checks;
|
||||
}
|
||||
|
||||
|
||||
@@ -263,14 +263,6 @@ static int honda_tx_hook(CANPacket_t *to_send, bool longitudinal_allowed) {
|
||||
tx = msg_allowed(to_send, HONDA_N_TX_MSGS, sizeof(HONDA_N_TX_MSGS)/sizeof(HONDA_N_TX_MSGS[0]));
|
||||
}
|
||||
|
||||
// disallow actuator commands if gas or brake (with vehicle moving) are pressed
|
||||
// and the latching controls_allowed flag is True
|
||||
int pedal_pressed = brake_pressed_prev && vehicle_moving;
|
||||
bool alt_exp_allow_gas = alternative_experience & ALT_EXP_DISABLE_DISENGAGE_ON_GAS;
|
||||
if (!alt_exp_allow_gas) {
|
||||
pedal_pressed = pedal_pressed || gas_pressed_prev;
|
||||
}
|
||||
bool current_controls_allowed = controls_allowed && !(pedal_pressed);
|
||||
int bus_pt = honda_get_pt_bus();
|
||||
int bus_buttons = (honda_bosch_radarless) ? 2 : bus_pt; // the camera controls ACC on radarless Bosch cars
|
||||
|
||||
@@ -278,7 +270,7 @@ static int honda_tx_hook(CANPacket_t *to_send, bool longitudinal_allowed) {
|
||||
if ((addr == 0x30C) && (bus == bus_pt)) {
|
||||
int pcm_speed = (GET_BYTE(to_send, 0) << 8) | GET_BYTE(to_send, 1);
|
||||
int pcm_gas = GET_BYTE(to_send, 2);
|
||||
if (!current_controls_allowed || !longitudinal_allowed) {
|
||||
if (!longitudinal_allowed) {
|
||||
if ((pcm_speed != 0) || (pcm_gas != 0)) {
|
||||
tx = 0;
|
||||
}
|
||||
@@ -288,7 +280,7 @@ static int honda_tx_hook(CANPacket_t *to_send, bool longitudinal_allowed) {
|
||||
// BRAKE: safety check (nidec)
|
||||
if ((addr == 0x1FA) && (bus == bus_pt)) {
|
||||
honda_brake = (GET_BYTE(to_send, 0) << 2) + ((GET_BYTE(to_send, 1) >> 6) & 0x3U);
|
||||
if (!current_controls_allowed || !longitudinal_allowed) {
|
||||
if (!longitudinal_allowed) {
|
||||
if (honda_brake != 0) {
|
||||
tx = 0;
|
||||
}
|
||||
@@ -305,7 +297,7 @@ static int honda_tx_hook(CANPacket_t *to_send, bool longitudinal_allowed) {
|
||||
if ((addr == 0x1DF) && (bus == bus_pt)) {
|
||||
int accel = (GET_BYTE(to_send, 3) << 3) | ((GET_BYTE(to_send, 4) >> 5) & 0x7U);
|
||||
accel = to_signed(accel, 11);
|
||||
if (!current_controls_allowed || !longitudinal_allowed) {
|
||||
if (!longitudinal_allowed) {
|
||||
if (accel != 0) {
|
||||
tx = 0;
|
||||
}
|
||||
@@ -316,7 +308,7 @@ static int honda_tx_hook(CANPacket_t *to_send, bool longitudinal_allowed) {
|
||||
|
||||
int gas = (GET_BYTE(to_send, 0) << 8) | GET_BYTE(to_send, 1);
|
||||
gas = to_signed(gas, 16);
|
||||
if (!current_controls_allowed || !longitudinal_allowed) {
|
||||
if (!longitudinal_allowed) {
|
||||
if (gas != HONDA_BOSCH_NO_GAS_VALUE) {
|
||||
tx = 0;
|
||||
}
|
||||
@@ -328,7 +320,7 @@ static int honda_tx_hook(CANPacket_t *to_send, bool longitudinal_allowed) {
|
||||
|
||||
// STEER: safety check
|
||||
if ((addr == 0xE4) || (addr == 0x194)) {
|
||||
if (!current_controls_allowed) {
|
||||
if (!controls_allowed) {
|
||||
bool steer_applied = GET_BYTE(to_send, 0) | GET_BYTE(to_send, 1);
|
||||
if (steer_applied) {
|
||||
tx = 0;
|
||||
@@ -345,7 +337,7 @@ static int honda_tx_hook(CANPacket_t *to_send, bool longitudinal_allowed) {
|
||||
|
||||
// GAS: safety check (interceptor)
|
||||
if (addr == 0x200) {
|
||||
if (!current_controls_allowed || !longitudinal_allowed) {
|
||||
if (!longitudinal_allowed) {
|
||||
if (GET_BYTE(to_send, 0) || GET_BYTE(to_send, 1)) {
|
||||
tx = 0;
|
||||
}
|
||||
@@ -355,7 +347,7 @@ static int honda_tx_hook(CANPacket_t *to_send, bool longitudinal_allowed) {
|
||||
// FORCE CANCEL: safety check only relevant when spamming the cancel button in Bosch HW
|
||||
// ensuring that only the cancel button press is sent (VAL 2) when controls are off.
|
||||
// This avoids unintended engagements while still allowing resume spam
|
||||
if ((addr == 0x296) && !current_controls_allowed && (bus == bus_buttons)) {
|
||||
if ((addr == 0x296) && !controls_allowed && (bus == bus_buttons)) {
|
||||
if (((GET_BYTE(to_send, 0) >> 5) & 0x7U) != 2U) {
|
||||
tx = 0;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include "safety_hyundai_common.h"
|
||||
|
||||
const SteeringLimits HYUNDAI_STEERING_LIMITS = {
|
||||
.max_steer = 384,
|
||||
.max_rt_delta = 112,
|
||||
@@ -7,9 +9,14 @@ const SteeringLimits HYUNDAI_STEERING_LIMITS = {
|
||||
.driver_torque_allowance = 50,
|
||||
.driver_torque_factor = 2,
|
||||
.type = TorqueDriverLimited,
|
||||
};
|
||||
|
||||
const int HYUNDAI_STANDSTILL_THRSLD = 30; // ~1kph
|
||||
// the EPS faults when the steering angle is above a certain threshold for too long. to prevent this,
|
||||
// we allow setting CF_Lkas_ActToi bit to 0 while maintaining the requested torque value for two consecutive frames
|
||||
.min_valid_request_frames = 89,
|
||||
.max_invalid_request_frames = 2,
|
||||
.min_valid_request_rt_interval = 810000, // 810ms; a ~10% buffer on cutting every 90 frames
|
||||
.has_steer_req_tolerance = true,
|
||||
};
|
||||
|
||||
const int HYUNDAI_MAX_ACCEL = 200; // 1/100 m/s2
|
||||
const int HYUNDAI_MIN_ACCEL = -350; // 1/100 m/s2
|
||||
@@ -45,11 +52,19 @@ AddrCheckStruct hyundai_addr_checks[] = {
|
||||
{881, 0, 8, .expected_timestep = 10000U}, { 0 }}},
|
||||
{.msg = {{902, 0, 8, .check_checksum = true, .max_counter = 15U, .expected_timestep = 10000U}, { 0 }, { 0 }}},
|
||||
{.msg = {{916, 0, 8, .check_checksum = true, .max_counter = 7U, .expected_timestep = 10000U}, { 0 }, { 0 }}},
|
||||
{.msg = {{1057, 0, 8, .check_checksum = true, .max_counter = 15U, .expected_timestep = 20000U},
|
||||
{1057, 2, 8, .check_checksum = true, .max_counter = 15U, .expected_timestep = 20000U}, { 0 }}},
|
||||
{.msg = {{1057, 0, 8, .check_checksum = true, .max_counter = 15U, .expected_timestep = 20000U}, { 0 }, { 0 }}},
|
||||
};
|
||||
#define HYUNDAI_ADDR_CHECK_LEN (sizeof(hyundai_addr_checks) / sizeof(hyundai_addr_checks[0]))
|
||||
|
||||
AddrCheckStruct hyundai_cam_scc_addr_checks[] = {
|
||||
{.msg = {{608, 0, 8, .check_checksum = true, .max_counter = 3U, .expected_timestep = 10000U},
|
||||
{881, 0, 8, .expected_timestep = 10000U}, { 0 }}},
|
||||
{.msg = {{902, 0, 8, .check_checksum = true, .max_counter = 15U, .expected_timestep = 10000U}, { 0 }, { 0 }}},
|
||||
{.msg = {{916, 0, 8, .check_checksum = true, .max_counter = 7U, .expected_timestep = 10000U}, { 0 }, { 0 }}},
|
||||
{.msg = {{1057, 2, 8, .check_checksum = true, .max_counter = 15U, .expected_timestep = 20000U}, { 0 }, { 0 }}},
|
||||
};
|
||||
#define HYUNDAI_CAM_SCC_ADDR_CHECK_LEN (sizeof(hyundai_cam_scc_addr_checks) / sizeof(hyundai_cam_scc_addr_checks[0]))
|
||||
|
||||
AddrCheckStruct hyundai_long_addr_checks[] = {
|
||||
{.msg = {{608, 0, 8, .check_checksum = true, .max_counter = 3U, .expected_timestep = 10000U},
|
||||
{881, 0, 8, .expected_timestep = 10000U}, { 0 }}},
|
||||
@@ -69,28 +84,7 @@ AddrCheckStruct hyundai_legacy_addr_checks[] = {
|
||||
};
|
||||
#define HYUNDAI_LEGACY_ADDR_CHECK_LEN (sizeof(hyundai_legacy_addr_checks) / sizeof(hyundai_legacy_addr_checks[0]))
|
||||
|
||||
const int HYUNDAI_PARAM_EV_GAS = 1;
|
||||
const int HYUNDAI_PARAM_HYBRID_GAS = 2;
|
||||
const int HYUNDAI_PARAM_LONGITUDINAL = 4;
|
||||
const int HYUNDAI_PARAM_CAMERA_SCC = 8;
|
||||
|
||||
enum {
|
||||
HYUNDAI_BTN_NONE = 0,
|
||||
HYUNDAI_BTN_RESUME = 1,
|
||||
HYUNDAI_BTN_SET = 2,
|
||||
HYUNDAI_BTN_CANCEL = 4,
|
||||
};
|
||||
|
||||
// some newer HKG models can re-enable after spamming cancel button,
|
||||
// so keep track of user button presses to deny engagement if no interaction
|
||||
const uint8_t HYUNDAI_PREV_BUTTON_SAMPLES = 8; // roughly 160 ms
|
||||
uint8_t hyundai_last_button_interaction; // button messages since the user pressed an enable button
|
||||
|
||||
bool hyundai_legacy = false;
|
||||
bool hyundai_ev_gas_signal = false;
|
||||
bool hyundai_hybrid_gas_signal = false;
|
||||
bool hyundai_camera_scc = false;
|
||||
bool hyundai_longitudinal = false;
|
||||
|
||||
addr_checks hyundai_rx_checks = {hyundai_addr_checks, HYUNDAI_ADDR_CHECK_LEN};
|
||||
|
||||
@@ -178,20 +172,10 @@ static int hyundai_rx_hook(CANPacket_t *to_push) {
|
||||
int addr = GET_ADDR(to_push);
|
||||
|
||||
// SCC12 is on bus 2 for camera-based SCC cars, bus 0 on all others
|
||||
if (valid && (((bus == 0) && !hyundai_camera_scc) || ((bus == 2) && hyundai_camera_scc))) {
|
||||
// enter controls on rising edge of ACC and user button press, exit controls when ACC off
|
||||
if (!hyundai_longitudinal && (addr == 1057)) {
|
||||
// 2 bits: 13-14
|
||||
int cruise_engaged = (GET_BYTES_04(to_push) >> 13) & 0x3U;
|
||||
if (cruise_engaged && !cruise_engaged_prev && (hyundai_last_button_interaction < HYUNDAI_PREV_BUTTON_SAMPLES)) {
|
||||
controls_allowed = 1;
|
||||
}
|
||||
|
||||
if (!cruise_engaged) {
|
||||
controls_allowed = 0;
|
||||
}
|
||||
cruise_engaged_prev = cruise_engaged;
|
||||
}
|
||||
if (valid && (addr == 1057) && (((bus == 0) && !hyundai_camera_scc) || ((bus == 2) && hyundai_camera_scc))) {
|
||||
// 2 bits: 13-14
|
||||
int cruise_engaged = (GET_BYTES_04(to_push) >> 13) & 0x3U;
|
||||
hyundai_common_cruise_state_check(cruise_engaged);
|
||||
}
|
||||
|
||||
if (valid && (bus == 0)) {
|
||||
@@ -205,43 +189,22 @@ static int hyundai_rx_hook(CANPacket_t *to_push) {
|
||||
if (addr == 1265) {
|
||||
int cruise_button = GET_BYTE(to_push, 0) & 0x7U;
|
||||
int main_button = GET_BIT(to_push, 3U);
|
||||
|
||||
if ((cruise_button == HYUNDAI_BTN_RESUME) || (cruise_button == HYUNDAI_BTN_SET) || (cruise_button == HYUNDAI_BTN_CANCEL) || (main_button != 0)) {
|
||||
hyundai_last_button_interaction = 0U;
|
||||
} else {
|
||||
hyundai_last_button_interaction = MIN(hyundai_last_button_interaction + 1U, HYUNDAI_PREV_BUTTON_SAMPLES);
|
||||
}
|
||||
|
||||
if (hyundai_longitudinal) {
|
||||
// exit controls on cancel press
|
||||
if (cruise_button == HYUNDAI_BTN_CANCEL) {
|
||||
controls_allowed = 0;
|
||||
}
|
||||
|
||||
// enter controls on falling edge of resume or set
|
||||
bool set = (cruise_button == HYUNDAI_BTN_NONE) && (cruise_button_prev == HYUNDAI_BTN_SET);
|
||||
bool res = (cruise_button == HYUNDAI_BTN_NONE) && (cruise_button_prev == HYUNDAI_BTN_RESUME);
|
||||
if (set || res) {
|
||||
controls_allowed = 1;
|
||||
}
|
||||
|
||||
cruise_button_prev = cruise_button;
|
||||
}
|
||||
hyundai_common_cruise_buttons_check(cruise_button, main_button);
|
||||
}
|
||||
|
||||
// read gas pressed signal
|
||||
// gas press, different for EV, hybrid, and ICE models
|
||||
if ((addr == 881) && hyundai_ev_gas_signal) {
|
||||
gas_pressed = (((GET_BYTE(to_push, 4) & 0x7FU) << 1) | GET_BYTE(to_push, 3) >> 7) != 0U;
|
||||
} else if ((addr == 881) && hyundai_hybrid_gas_signal) {
|
||||
gas_pressed = GET_BYTE(to_push, 7) != 0U;
|
||||
} else if (addr == 608) { // ICE
|
||||
} else if ((addr == 608) && !hyundai_ev_gas_signal && !hyundai_hybrid_gas_signal) {
|
||||
gas_pressed = (GET_BYTE(to_push, 7) >> 6) != 0U;
|
||||
} else {
|
||||
}
|
||||
|
||||
// sample wheel speed, averaging opposite corners
|
||||
if (addr == 902) {
|
||||
int hyundai_speed = (GET_BYTES_04(to_push) & 0x3FFFU) + ((GET_BYTES_48(to_push) >> 16) & 0x3FFFU); // FL + RR
|
||||
uint32_t hyundai_speed = (GET_BYTES_04(to_push) & 0x3FFFU) + ((GET_BYTES_48(to_push) >> 16) & 0x3FFFU); // FL + RR
|
||||
hyundai_speed /= 2;
|
||||
vehicle_moving = hyundai_speed > HYUNDAI_STANDSTILL_THRSLD;
|
||||
}
|
||||
@@ -360,19 +323,17 @@ static int hyundai_fwd_hook(int bus_num, CANPacket_t *to_fwd) {
|
||||
}
|
||||
|
||||
static const addr_checks* hyundai_init(uint16_t param) {
|
||||
hyundai_common_init(param);
|
||||
hyundai_legacy = false;
|
||||
hyundai_ev_gas_signal = GET_FLAG(param, HYUNDAI_PARAM_EV_GAS);
|
||||
hyundai_hybrid_gas_signal = !hyundai_ev_gas_signal && GET_FLAG(param, HYUNDAI_PARAM_HYBRID_GAS);
|
||||
hyundai_camera_scc = GET_FLAG(param, HYUNDAI_PARAM_CAMERA_SCC);
|
||||
hyundai_last_button_interaction = HYUNDAI_PREV_BUTTON_SAMPLES;
|
||||
|
||||
#ifdef ALLOW_DEBUG
|
||||
// TODO: add longitudinal support for camera-based SCC platform
|
||||
hyundai_longitudinal = GET_FLAG(param, HYUNDAI_PARAM_LONGITUDINAL) && !hyundai_camera_scc;
|
||||
#endif
|
||||
if (hyundai_camera_scc) {
|
||||
hyundai_longitudinal = false;
|
||||
}
|
||||
|
||||
if (hyundai_longitudinal) {
|
||||
hyundai_rx_checks = (addr_checks){hyundai_long_addr_checks, HYUNDAI_LONG_ADDR_CHECK_LEN};
|
||||
} else if (hyundai_camera_scc) {
|
||||
hyundai_rx_checks = (addr_checks){hyundai_cam_scc_addr_checks, HYUNDAI_CAM_SCC_ADDR_CHECK_LEN};
|
||||
} else {
|
||||
hyundai_rx_checks = (addr_checks){hyundai_addr_checks, HYUNDAI_ADDR_CHECK_LEN};
|
||||
}
|
||||
@@ -380,12 +341,11 @@ static const addr_checks* hyundai_init(uint16_t param) {
|
||||
}
|
||||
|
||||
static const addr_checks* hyundai_legacy_init(uint16_t param) {
|
||||
hyundai_common_init(param);
|
||||
hyundai_legacy = true;
|
||||
hyundai_longitudinal = false;
|
||||
hyundai_camera_scc = false;
|
||||
hyundai_ev_gas_signal = GET_FLAG(param, HYUNDAI_PARAM_EV_GAS);
|
||||
hyundai_hybrid_gas_signal = !hyundai_ev_gas_signal && GET_FLAG(param, HYUNDAI_PARAM_HYBRID_GAS);
|
||||
hyundai_last_button_interaction = HYUNDAI_PREV_BUTTON_SAMPLES;
|
||||
|
||||
hyundai_rx_checks = (addr_checks){hyundai_legacy_addr_checks, HYUNDAI_LEGACY_ADDR_CHECK_LEN};
|
||||
return &hyundai_rx_checks;
|
||||
}
|
||||
|
||||
@@ -1,15 +1,22 @@
|
||||
#include "safety_hyundai_common.h"
|
||||
|
||||
const SteeringLimits HYUNDAI_CANFD_STEERING_LIMITS = {
|
||||
.max_steer = 270,
|
||||
.max_rt_delta = 112,
|
||||
.max_rt_interval = 250000,
|
||||
.max_rate_up = 3,
|
||||
.max_rate_down = 7,
|
||||
.max_rate_up = 2,
|
||||
.max_rate_down = 3,
|
||||
.driver_torque_allowance = 250,
|
||||
.driver_torque_factor = 2,
|
||||
.type = TorqueDriverLimited,
|
||||
};
|
||||
|
||||
const uint32_t HYUNDAI_CANFD_STANDSTILL_THRSLD = 30; // ~1kph
|
||||
// the EPS faults when the steering angle is above a certain threshold for too long. to prevent this,
|
||||
// we allow setting torque actuation bit to 0 while maintaining the requested torque value for two consecutive frames
|
||||
.min_valid_request_frames = 89,
|
||||
.max_invalid_request_frames = 2,
|
||||
.min_valid_request_rt_interval = 810000, // 810ms; a ~10% buffer on cutting every 90 frames
|
||||
.has_steer_req_tolerance = true,
|
||||
};
|
||||
|
||||
const CanMsg HYUNDAI_CANFD_HDA2_TX_MSGS[] = {
|
||||
{0x50, 0, 16}, // LKAS
|
||||
@@ -17,38 +24,80 @@ const CanMsg HYUNDAI_CANFD_HDA2_TX_MSGS[] = {
|
||||
{0x2A4, 0, 24}, // CAM_0x2A4
|
||||
};
|
||||
|
||||
const CanMsg HYUNDAI_CANFD_HDA2_LONG_TX_MSGS[] = {
|
||||
{0x50, 0, 16}, // LKAS
|
||||
{0x1CF, 1, 8}, // CRUISE_BUTTON
|
||||
{0x2A4, 0, 24}, // CAM_0x2A4
|
||||
{0x51, 0, 32}, // ADRV_0x51
|
||||
{0x730, 1, 8}, // tester present for ADAS ECU disable
|
||||
{0x12A, 1, 16}, // LFA
|
||||
{0x160, 1, 16}, // ADRV_0x160
|
||||
{0x1E0, 1, 16}, // LFAHDA_CLUSTER
|
||||
{0x1A0, 1, 32}, // CRUISE_INFO
|
||||
{0x1EA, 1, 32}, // ADRV_0x1ea
|
||||
{0x200, 1, 8}, // ADRV_0x200
|
||||
{0x345, 1, 8}, // ADRV_0x345
|
||||
{0x1DA, 1, 32}, // ADRV_0x1da
|
||||
};
|
||||
|
||||
const CanMsg HYUNDAI_CANFD_HDA1_TX_MSGS[] = {
|
||||
{0x12A, 0, 16}, // LFA
|
||||
{0x1A0, 0, 32}, // CRUISE_INFO
|
||||
{0x1CF, 0, 8}, // CRUISE_BUTTON
|
||||
{0x1CF, 2, 8}, // CRUISE_BUTTON
|
||||
{0x1E0, 0, 16}, // LFAHDA_CLUSTER
|
||||
};
|
||||
|
||||
AddrCheckStruct hyundai_canfd_addr_checks[] = {
|
||||
{.msg = {{0x35, 1, 32, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 10000U},
|
||||
{0x105, 0, 32, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 10000U}, { 0 }}},
|
||||
{.msg = {{0x65, 1, 32, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 10000U},
|
||||
{0x65, 0, 32, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 10000U}, { 0 }}},
|
||||
{0x35, 0, 32, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 10000U},
|
||||
{0x105, 0, 32, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 10000U}}},
|
||||
{.msg = {{0x175, 1, 24, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 20000U},
|
||||
{0x175, 0, 24, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 20000U}, { 0 }}},
|
||||
{.msg = {{0xa0, 1, 24, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 10000U},
|
||||
{0xa0, 0, 24, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 10000U}, { 0 }}},
|
||||
{.msg = {{0xea, 1, 24, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 10000U},
|
||||
{0xea, 0, 24, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 10000U}, { 0 }}},
|
||||
{.msg = {{0x175, 1, 24, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 10000U},
|
||||
{0x175, 0, 24, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 10000U}, { 0 }}},
|
||||
{.msg = {{0x1a0, 1, 32, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 20000U},
|
||||
{0x1a0, 2, 32, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 20000U}, { 0 }}},
|
||||
{.msg = {{0x1cf, 1, 8, .check_checksum = false, .max_counter = 0xfU, .expected_timestep = 20000U},
|
||||
{0x1cf, 0, 8, .check_checksum = false, .max_counter = 0xfU, .expected_timestep = 20000U},
|
||||
{0x1aa, 0, 16, .check_checksum = false, .max_counter = 0xffU, .expected_timestep = 20000U}}},
|
||||
};
|
||||
#define HYUNDAI_CANFD_ADDR_CHECK_LEN (sizeof(hyundai_canfd_addr_checks) / sizeof(hyundai_canfd_addr_checks[0]))
|
||||
|
||||
AddrCheckStruct hyundai_canfd_long_addr_checks[] = {
|
||||
{.msg = {{0x35, 1, 32, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 10000U},
|
||||
{0x35, 0, 32, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 10000U},
|
||||
{0x105, 0, 32, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 10000U}}},
|
||||
{.msg = {{0x175, 1, 24, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 20000U},
|
||||
{0x175, 0, 24, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 20000U}, { 0 }}},
|
||||
{.msg = {{0xa0, 1, 24, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 10000U},
|
||||
{0xa0, 0, 24, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 10000U}, { 0 }}},
|
||||
{.msg = {{0xea, 1, 24, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 10000U},
|
||||
{0xea, 0, 24, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 10000U}, { 0 }}},
|
||||
{.msg = {{0x1cf, 1, 8, .check_checksum = false, .max_counter = 0xfU, .expected_timestep = 20000U},
|
||||
{0x1cf, 0, 8, .check_checksum = false, .max_counter = 0xfU, .expected_timestep = 20000U},
|
||||
{0x1aa, 0, 16, .check_checksum = false, .max_counter = 0xffU, .expected_timestep = 20000U}}},
|
||||
};
|
||||
#define HYUNDAI_CANFD_LONG_ADDR_CHECK_LEN (sizeof(hyundai_canfd_long_addr_checks) / sizeof(hyundai_canfd_long_addr_checks[0]))
|
||||
|
||||
AddrCheckStruct hyundai_canfd_ice_addr_checks[] = {
|
||||
{.msg = {{0x100, 0, 32, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 10000U}, { 0 }, { 0 }}},
|
||||
{.msg = {{0xa0, 0, 24, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 10000U}, { 0 }, { 0 }}},
|
||||
{.msg = {{0xea, 0, 24, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 10000U}, { 0 }, { 0 }}},
|
||||
{.msg = {{0x175, 0, 24, .check_checksum = true, .max_counter = 0xffU, .expected_timestep = 20000U}, { 0 }, { 0 }}},
|
||||
{.msg = {{0x1aa, 0, 16, .check_checksum = false, .max_counter = 0xffU, .expected_timestep = 20000U}, { 0 }, { 0 }}},
|
||||
};
|
||||
#define HYUNDAI_CANFD_ICE_ADDR_CHECK_LEN (sizeof(hyundai_canfd_ice_addr_checks) / sizeof(hyundai_canfd_ice_addr_checks[0]))
|
||||
|
||||
addr_checks hyundai_canfd_rx_checks = {hyundai_canfd_addr_checks, HYUNDAI_CANFD_ADDR_CHECK_LEN};
|
||||
|
||||
|
||||
uint16_t hyundai_canfd_crc_lut[256];
|
||||
|
||||
|
||||
const int HYUNDAI_PARAM_CANFD_HDA2 = 1;
|
||||
const int HYUNDAI_PARAM_CANFD_ALT_BUTTONS = 2;
|
||||
const int HYUNDAI_PARAM_CANFD_HDA2 = 16;
|
||||
const int HYUNDAI_PARAM_CANFD_ALT_BUTTONS = 32;
|
||||
bool hyundai_canfd_hda2 = false;
|
||||
bool hyundai_canfd_alt_buttons = false;
|
||||
|
||||
@@ -106,6 +155,7 @@ static int hyundai_canfd_rx_hook(CANPacket_t *to_push) {
|
||||
int addr = GET_ADDR(to_push);
|
||||
|
||||
const int pt_bus = hyundai_canfd_hda2 ? 1 : 0;
|
||||
const int scc_bus = hyundai_camera_scc ? 2 : pt_bus;
|
||||
|
||||
if (valid && (bus == pt_bus)) {
|
||||
// driver torque
|
||||
@@ -127,38 +177,22 @@ static int hyundai_canfd_rx_hook(CANPacket_t *to_push) {
|
||||
cruise_button = (GET_BYTE(to_push, 4) >> 4) & 0x7U;
|
||||
main_button = GET_BIT(to_push, 34U);
|
||||
}
|
||||
|
||||
if ((cruise_button == HYUNDAI_BTN_RESUME) || (cruise_button == HYUNDAI_BTN_SET) || (cruise_button == HYUNDAI_BTN_CANCEL) || (main_button != 0)) {
|
||||
hyundai_last_button_interaction = 0U;
|
||||
} else {
|
||||
hyundai_last_button_interaction = MIN(hyundai_last_button_interaction + 1U, HYUNDAI_PREV_BUTTON_SAMPLES);
|
||||
}
|
||||
hyundai_common_cruise_buttons_check(cruise_button, main_button);
|
||||
}
|
||||
|
||||
// cruise state
|
||||
if (addr == 0x175) {
|
||||
bool cruise_engaged = GET_BIT(to_push, 68U);
|
||||
if (cruise_engaged && !cruise_engaged_prev && (hyundai_last_button_interaction < HYUNDAI_PREV_BUTTON_SAMPLES)) {
|
||||
controls_allowed = 1;
|
||||
}
|
||||
|
||||
if (!cruise_engaged) {
|
||||
controls_allowed = 0;
|
||||
}
|
||||
cruise_engaged_prev = cruise_engaged;
|
||||
}
|
||||
|
||||
// gas press
|
||||
if ((addr == 0x35) && hyundai_canfd_hda2) {
|
||||
// gas press, different for EV, hybrid, and ICE models
|
||||
if ((addr == 0x35) && hyundai_ev_gas_signal) {
|
||||
gas_pressed = GET_BYTE(to_push, 5) != 0U;
|
||||
} else if ((addr == 0x105) && !hyundai_canfd_hda2) {
|
||||
} else if ((addr == 0x105) && hyundai_hybrid_gas_signal) {
|
||||
gas_pressed = (GET_BIT(to_push, 103U) != 0U) || (GET_BYTE(to_push, 13) != 0U) || (GET_BIT(to_push, 112U) != 0U);
|
||||
} else if ((addr == 0x100) && !hyundai_ev_gas_signal && !hyundai_hybrid_gas_signal) {
|
||||
gas_pressed = GET_BIT(to_push, 176U) != 0U;
|
||||
} else {
|
||||
}
|
||||
|
||||
// brake press
|
||||
if (addr == 0x65) {
|
||||
brake_pressed = GET_BIT(to_push, 57U) != 0U;
|
||||
if (addr == 0x175) {
|
||||
brake_pressed = GET_BIT(to_push, 81U) != 0U;
|
||||
}
|
||||
|
||||
// vehicle moving
|
||||
@@ -167,12 +201,27 @@ static int hyundai_canfd_rx_hook(CANPacket_t *to_push) {
|
||||
for (int i = 8; i < 15; i+=2) {
|
||||
speed += GET_BYTE(to_push, i) | (GET_BYTE(to_push, i + 1) << 8U);
|
||||
}
|
||||
vehicle_moving = (speed / 4U) > HYUNDAI_CANFD_STANDSTILL_THRSLD;
|
||||
vehicle_moving = (speed / 4U) > HYUNDAI_STANDSTILL_THRSLD;
|
||||
}
|
||||
}
|
||||
|
||||
if (valid && (bus == scc_bus)) {
|
||||
// cruise state
|
||||
if ((addr == 0x1a0) && !hyundai_longitudinal) {
|
||||
bool cruise_engaged = ((GET_BYTE(to_push, 8) >> 4) & 0x3U) != 0U;
|
||||
hyundai_common_cruise_state_check(cruise_engaged);
|
||||
}
|
||||
}
|
||||
|
||||
const int steer_addr = hyundai_canfd_hda2 ? 0x50 : 0x12a;
|
||||
generic_rx_checks((addr == steer_addr) && (bus == 0));
|
||||
bool stock_ecu_detected = (addr == steer_addr) && (bus == 0);
|
||||
if (hyundai_longitudinal) {
|
||||
// on HDA2, ensure ADRV ECU is still knocked out
|
||||
// on others, ensure accel msg is blocked from camera
|
||||
const int stock_scc_bus = hyundai_canfd_hda2 ? 1 : 0;
|
||||
stock_ecu_detected = stock_ecu_detected || ((addr == 0x1a0) && (bus == stock_scc_bus));
|
||||
}
|
||||
generic_rx_checks(stock_ecu_detected);
|
||||
|
||||
return valid;
|
||||
}
|
||||
@@ -182,28 +231,28 @@ static int hyundai_canfd_tx_hook(CANPacket_t *to_send, bool longitudinal_allowed
|
||||
|
||||
int tx = 0;
|
||||
int addr = GET_ADDR(to_send);
|
||||
int bus = GET_BUS(to_send);
|
||||
|
||||
if (hyundai_canfd_hda2) {
|
||||
if (hyundai_canfd_hda2 && !hyundai_longitudinal) {
|
||||
tx = msg_allowed(to_send, HYUNDAI_CANFD_HDA2_TX_MSGS, sizeof(HYUNDAI_CANFD_HDA2_TX_MSGS)/sizeof(HYUNDAI_CANFD_HDA2_TX_MSGS[0]));
|
||||
} else if (hyundai_canfd_hda2 && hyundai_longitudinal) {
|
||||
tx = msg_allowed(to_send, HYUNDAI_CANFD_HDA2_LONG_TX_MSGS, sizeof(HYUNDAI_CANFD_HDA2_LONG_TX_MSGS)/sizeof(HYUNDAI_CANFD_HDA2_LONG_TX_MSGS[0]));
|
||||
} else {
|
||||
tx = msg_allowed(to_send, HYUNDAI_CANFD_HDA1_TX_MSGS, sizeof(HYUNDAI_CANFD_HDA1_TX_MSGS)/sizeof(HYUNDAI_CANFD_HDA1_TX_MSGS[0]));
|
||||
}
|
||||
|
||||
// steering
|
||||
const int steer_addr = hyundai_canfd_hda2 ? 0x50 : 0x12a;
|
||||
if ((addr == steer_addr) && (bus == 0)) {
|
||||
int desired_torque = ((GET_BYTE(to_send, 6) & 0xFU) << 7U) | (GET_BYTE(to_send, 5) >> 1U);
|
||||
desired_torque -= 1024;
|
||||
const int steer_addr = (hyundai_canfd_hda2 && !hyundai_longitudinal) ? 0x50 : 0x12a;
|
||||
if (addr == steer_addr) {
|
||||
int desired_torque = (((GET_BYTE(to_send, 6) & 0xFU) << 7U) | (GET_BYTE(to_send, 5) >> 1U)) - 1024U;
|
||||
bool steer_req = GET_BIT(to_send, 52U) != 0U;
|
||||
|
||||
if (steer_torque_cmd_checks(desired_torque, -1, HYUNDAI_CANFD_STEERING_LIMITS)) {
|
||||
if (steer_torque_cmd_checks(desired_torque, steer_req, HYUNDAI_CANFD_STEERING_LIMITS)) {
|
||||
tx = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// cruise buttons check
|
||||
const int buttons_bus = hyundai_canfd_hda2 ? 1 : 0;
|
||||
if ((addr == 0x1cf) && (bus == buttons_bus)) {
|
||||
if (addr == 0x1cf) {
|
||||
int button = GET_BYTE(to_send, 2) & 0x7U;
|
||||
bool is_cancel = (button == HYUNDAI_BTN_CANCEL);
|
||||
bool is_resume = (button == HYUNDAI_BTN_RESUME);
|
||||
@@ -214,11 +263,44 @@ static int hyundai_canfd_tx_hook(CANPacket_t *to_send, bool longitudinal_allowed
|
||||
}
|
||||
}
|
||||
|
||||
// UDS: only tester present ("\x02\x3E\x80\x00\x00\x00\x00\x00") allowed on diagnostics address
|
||||
if ((addr == 0x730) && hyundai_canfd_hda2) {
|
||||
if ((GET_BYTES_04(to_send) != 0x00803E02U) || (GET_BYTES_48(to_send) != 0x0U)) {
|
||||
tx = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// ACCEL: safety check
|
||||
if (addr == 0x1a0) {
|
||||
int desired_accel_raw = (((GET_BYTE(to_send, 17) & 0x7U) << 8) | GET_BYTE(to_send, 16)) - 1023U;
|
||||
int desired_accel_val = ((GET_BYTE(to_send, 18) << 4) | (GET_BYTE(to_send, 17) >> 4)) - 1023U;
|
||||
|
||||
bool violation = false;
|
||||
|
||||
if (hyundai_longitudinal) {
|
||||
if (!longitudinal_allowed) {
|
||||
if ((desired_accel_raw != 0) || (desired_accel_val != 0)) {
|
||||
violation = true;
|
||||
}
|
||||
}
|
||||
violation |= max_limit_check(desired_accel_raw, HYUNDAI_MAX_ACCEL, HYUNDAI_MIN_ACCEL);
|
||||
violation |= max_limit_check(desired_accel_val, HYUNDAI_MAX_ACCEL, HYUNDAI_MIN_ACCEL);
|
||||
} else {
|
||||
// only used to cancel on here
|
||||
if ((desired_accel_raw != 0) || (desired_accel_val != 0)) {
|
||||
violation = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (violation) {
|
||||
tx = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return tx;
|
||||
}
|
||||
|
||||
static int hyundai_canfd_fwd_hook(int bus_num, CANPacket_t *to_fwd) {
|
||||
|
||||
int bus_fwd = -1;
|
||||
int addr = GET_ADDR(to_fwd);
|
||||
|
||||
@@ -233,7 +315,10 @@ static int hyundai_canfd_fwd_hook(int bus_num, CANPacket_t *to_fwd) {
|
||||
// HUD icons
|
||||
int is_lfahda_msg = ((addr == 0x1e0) && !hyundai_canfd_hda2);
|
||||
|
||||
int block_msg = is_lkas_msg || is_lfa_msg || is_lfahda_msg;
|
||||
// CRUISE_INFO for non-HDA2, we send our own longitudinal commands
|
||||
int is_scc_msg = ((addr == 0x1a0) && hyundai_longitudinal && !hyundai_canfd_hda2);
|
||||
|
||||
int block_msg = is_lkas_msg || is_lfa_msg || is_lfahda_msg || is_scc_msg;
|
||||
if (!block_msg) {
|
||||
bus_fwd = 0;
|
||||
}
|
||||
@@ -243,11 +328,27 @@ static int hyundai_canfd_fwd_hook(int bus_num, CANPacket_t *to_fwd) {
|
||||
}
|
||||
|
||||
static const addr_checks* hyundai_canfd_init(uint16_t param) {
|
||||
hyundai_common_init(param);
|
||||
|
||||
gen_crc_lookup_table_16(0x1021, hyundai_canfd_crc_lut);
|
||||
hyundai_last_button_interaction = HYUNDAI_PREV_BUTTON_SAMPLES;
|
||||
hyundai_canfd_hda2 = GET_FLAG(param, HYUNDAI_PARAM_CANFD_HDA2);
|
||||
hyundai_canfd_alt_buttons = GET_FLAG(param, HYUNDAI_PARAM_CANFD_ALT_BUTTONS);
|
||||
|
||||
// no long for ICE yet
|
||||
if (!hyundai_ev_gas_signal && !hyundai_hybrid_gas_signal) {
|
||||
hyundai_longitudinal = false;
|
||||
}
|
||||
|
||||
if (hyundai_longitudinal) {
|
||||
hyundai_canfd_rx_checks = (addr_checks){hyundai_canfd_long_addr_checks, HYUNDAI_CANFD_LONG_ADDR_CHECK_LEN};
|
||||
} else {
|
||||
if (!hyundai_ev_gas_signal && !hyundai_hybrid_gas_signal) {
|
||||
hyundai_canfd_rx_checks = (addr_checks){hyundai_canfd_ice_addr_checks, HYUNDAI_CANFD_ICE_ADDR_CHECK_LEN};
|
||||
} else {
|
||||
hyundai_canfd_rx_checks = (addr_checks){hyundai_canfd_addr_checks, HYUNDAI_CANFD_ADDR_CHECK_LEN};
|
||||
}
|
||||
}
|
||||
|
||||
return &hyundai_canfd_rx_checks;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
#ifndef SAFETY_HYUNDAI_COMMON_H
|
||||
#define SAFETY_HYUNDAI_COMMON_H
|
||||
|
||||
const int HYUNDAI_PARAM_EV_GAS = 1;
|
||||
const int HYUNDAI_PARAM_HYBRID_GAS = 2;
|
||||
const int HYUNDAI_PARAM_LONGITUDINAL = 4;
|
||||
const int HYUNDAI_PARAM_CAMERA_SCC = 8;
|
||||
|
||||
const uint8_t HYUNDAI_PREV_BUTTON_SAMPLES = 8; // roughly 160 ms
|
||||
const uint32_t HYUNDAI_STANDSTILL_THRSLD = 30; // ~1kph
|
||||
|
||||
enum {
|
||||
HYUNDAI_BTN_NONE = 0,
|
||||
HYUNDAI_BTN_RESUME = 1,
|
||||
HYUNDAI_BTN_SET = 2,
|
||||
HYUNDAI_BTN_CANCEL = 4,
|
||||
};
|
||||
|
||||
// common state
|
||||
bool hyundai_ev_gas_signal = false;
|
||||
bool hyundai_hybrid_gas_signal = false;
|
||||
bool hyundai_longitudinal = false;
|
||||
bool hyundai_camera_scc = false;
|
||||
uint8_t hyundai_last_button_interaction; // button messages since the user pressed an enable button
|
||||
|
||||
void hyundai_common_init(uint16_t param) {
|
||||
hyundai_ev_gas_signal = GET_FLAG(param, HYUNDAI_PARAM_EV_GAS);
|
||||
hyundai_hybrid_gas_signal = !hyundai_ev_gas_signal && GET_FLAG(param, HYUNDAI_PARAM_HYBRID_GAS);
|
||||
hyundai_camera_scc = GET_FLAG(param, HYUNDAI_PARAM_CAMERA_SCC);
|
||||
|
||||
hyundai_last_button_interaction = HYUNDAI_PREV_BUTTON_SAMPLES;
|
||||
|
||||
#ifdef ALLOW_DEBUG
|
||||
hyundai_longitudinal = GET_FLAG(param, HYUNDAI_PARAM_LONGITUDINAL);
|
||||
#else
|
||||
hyundai_longitudinal = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void hyundai_common_cruise_state_check(const int cruise_engaged) {
|
||||
// some newer HKG models can re-enable after spamming cancel button,
|
||||
// so keep track of user button presses to deny engagement if no interaction
|
||||
|
||||
// enter controls on rising edge of ACC and recent user button press, exit controls when ACC off
|
||||
if (!hyundai_longitudinal) {
|
||||
if (cruise_engaged && !cruise_engaged_prev && (hyundai_last_button_interaction < HYUNDAI_PREV_BUTTON_SAMPLES)) {
|
||||
controls_allowed = 1;
|
||||
}
|
||||
|
||||
if (!cruise_engaged) {
|
||||
controls_allowed = 0;
|
||||
}
|
||||
cruise_engaged_prev = cruise_engaged;
|
||||
}
|
||||
}
|
||||
|
||||
void hyundai_common_cruise_buttons_check(const int cruise_button, const int main_button) {
|
||||
if ((cruise_button == HYUNDAI_BTN_RESUME) || (cruise_button == HYUNDAI_BTN_SET) || (cruise_button == HYUNDAI_BTN_CANCEL) ||
|
||||
(main_button != 0)) {
|
||||
hyundai_last_button_interaction = 0U;
|
||||
} else {
|
||||
hyundai_last_button_interaction = MIN(hyundai_last_button_interaction + 1U, HYUNDAI_PREV_BUTTON_SAMPLES);
|
||||
}
|
||||
|
||||
if (hyundai_longitudinal) {
|
||||
// enter controls on falling edge of resume or set
|
||||
bool set = (cruise_button != HYUNDAI_BTN_SET) && (cruise_button_prev == HYUNDAI_BTN_SET);
|
||||
bool res = (cruise_button != HYUNDAI_BTN_RESUME) && (cruise_button_prev == HYUNDAI_BTN_RESUME);
|
||||
if (set || res) {
|
||||
controls_allowed = 1;
|
||||
}
|
||||
|
||||
// exit controls on cancel press
|
||||
if (cruise_button == HYUNDAI_BTN_CANCEL) {
|
||||
controls_allowed = 0;
|
||||
}
|
||||
|
||||
cruise_button_prev = cruise_button;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -62,10 +62,11 @@ static int nissan_rx_hook(CANPacket_t *to_push) {
|
||||
}
|
||||
|
||||
if (addr == 0x285) {
|
||||
// Get current speed
|
||||
// Factor 0.005
|
||||
vehicle_speed = ((GET_BYTE(to_push, 2) << 8) | (GET_BYTE(to_push, 3))) * 0.005 / 3.6;
|
||||
vehicle_moving = vehicle_speed > 0.;
|
||||
// Get current speed and standstill
|
||||
uint16_t right_rear = (GET_BYTE(to_push, 0) << 8) | (GET_BYTE(to_push, 1));
|
||||
uint16_t left_rear = (GET_BYTE(to_push, 2) << 8) | (GET_BYTE(to_push, 3));
|
||||
vehicle_moving = (right_rear | left_rear) != 0U;
|
||||
vehicle_speed = left_rear * 0.005 / 3.6;
|
||||
}
|
||||
|
||||
// X-Trail 0x15c, Leaf 0x239
|
||||
|
||||
@@ -20,8 +20,6 @@ const SteeringLimits SUBARU_GEN2_STEERING_LIMITS = {
|
||||
.type = TorqueDriverLimited,
|
||||
};
|
||||
|
||||
const int SUBARU_STANDSTILL_THRSLD = 20; // about 1kph
|
||||
|
||||
const CanMsg SUBARU_TX_MSGS[] = {
|
||||
{0x122, 0, 8},
|
||||
{0x221, 0, 8},
|
||||
@@ -104,11 +102,9 @@ static int subaru_rx_hook(CANPacket_t *to_push) {
|
||||
pcm_cruise_check(cruise_engaged);
|
||||
}
|
||||
|
||||
// sample wheel speed, averaging opposite corners
|
||||
// update vehicle moving with any non-zero wheel speed
|
||||
if ((addr == 0x13a) && (bus == alt_bus)) {
|
||||
int subaru_speed = ((GET_BYTES_04(to_push) >> 12) & 0x1FFFU) + ((GET_BYTES_48(to_push) >> 6) & 0x1FFFU); // FR + RL
|
||||
subaru_speed /= 2;
|
||||
vehicle_moving = subaru_speed > SUBARU_STANDSTILL_THRSLD;
|
||||
vehicle_moving = ((GET_BYTES_04(to_push) >> 12) != 0U) || (GET_BYTES_48(to_push) != 0U);
|
||||
}
|
||||
|
||||
if ((addr == 0x13c) && (bus == alt_bus)) {
|
||||
|
||||
@@ -43,11 +43,9 @@ static int subaru_legacy_rx_hook(CANPacket_t *to_push) {
|
||||
pcm_cruise_check(cruise_engaged);
|
||||
}
|
||||
|
||||
// sample wheel speed, averaging opposite corners
|
||||
// update vehicle moving with any non-zero wheel speed
|
||||
if (addr == 0xD4) {
|
||||
int subaru_speed = ((GET_BYTES_04(to_push) >> 16) & 0xFFFFU) + (GET_BYTES_48(to_push) & 0xFFFFU); // FR + RL
|
||||
subaru_speed /= 2;
|
||||
vehicle_moving = subaru_speed > SUBARU_STANDSTILL_THRSLD;
|
||||
vehicle_moving = ((GET_BYTES_04(to_push) >> 12) != 0U) || (GET_BYTES_48(to_push) != 0U);
|
||||
}
|
||||
|
||||
if (addr == 0xD1) {
|
||||
|
||||
@@ -6,14 +6,19 @@ const SteeringLimits TOYOTA_STEERING_LIMITS = {
|
||||
.max_rt_delta = 450, // the real time limit is 1800/sec, a 20% buffer
|
||||
.max_rt_interval = 250000,
|
||||
.type = TorqueMotorLimited,
|
||||
|
||||
// the EPS faults when the steering angle rate is above a certain threshold for too long. to prevent this,
|
||||
// we allow setting STEER_REQUEST bit to 0 while maintaining the requested torque value for a single frame
|
||||
.min_valid_request_frames = 18,
|
||||
.max_invalid_request_frames = 1,
|
||||
.min_valid_request_rt_interval = 170000, // 170ms; a ~10% buffer on cutting every 19 frames
|
||||
.has_steer_req_tolerance = true,
|
||||
};
|
||||
|
||||
// longitudinal limits
|
||||
const int TOYOTA_MAX_ACCEL = 2000; // 2.0 m/s2
|
||||
const int TOYOTA_MIN_ACCEL = -3500; // -3.5 m/s2
|
||||
|
||||
const int TOYOTA_STANDSTILL_THRSLD = 100; // 1kph
|
||||
|
||||
// panda interceptor threshold needs to be equivalent to openpilot threshold to avoid controls mismatches
|
||||
// If thresholds are mismatched then it is possible for panda to see the gas fall and rise while openpilot is in the pre-enabled state
|
||||
// Threshold calculated from DBC gains: round((((15 + 75.555) / 0.159375) + ((15 + 151.111) / 0.159375)) / 2) = 805
|
||||
@@ -98,15 +103,10 @@ static int toyota_rx_hook(CANPacket_t *to_push) {
|
||||
}
|
||||
}
|
||||
|
||||
// sample speed
|
||||
if (addr == 0xaa) {
|
||||
int speed = 0;
|
||||
// sum 4 wheel speeds
|
||||
for (uint8_t i=0U; i<8U; i+=2U) {
|
||||
int wheel_speed = (GET_BYTE(to_push, i) << 8U) + GET_BYTE(to_push, (i+1U));
|
||||
speed += wheel_speed - 0x1a6f;
|
||||
}
|
||||
vehicle_moving = ABS(speed / 4) > TOYOTA_STANDSTILL_THRSLD;
|
||||
// check that all wheel speeds are at zero value with offset
|
||||
bool standstill = (GET_BYTES_04(to_push) == 0x6F1A6F1AU) && (GET_BYTES_48(to_push) == 0x6F1A6F1AU);
|
||||
vehicle_moving = !standstill;
|
||||
}
|
||||
|
||||
// most cars have brake_pressed on 0x226, corolla and rav4 on 0x224
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
#ifndef SAFETY_VOLKSWAGEN_COMMON_H
|
||||
#define SAFETY_VOLKSWAGEN_COMMON_H
|
||||
|
||||
const uint16_t FLAG_VOLKSWAGEN_LONG_CONTROL = 1;
|
||||
|
||||
bool volkswagen_longitudinal = false;
|
||||
bool volkswagen_set_button_prev = false;
|
||||
bool volkswagen_resume_button_prev = false;
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,6 @@
|
||||
#include "safety_volkswagen_common.h"
|
||||
|
||||
// lateral limits
|
||||
const SteeringLimits VOLKSWAGEN_MQB_STEERING_LIMITS = {
|
||||
.max_steer = 300, // 3.0 Nm (EPS side max of 3.0Nm with fault if violated)
|
||||
.max_rt_delta = 75, // 4 max rate up * 50Hz send rate * 250000 RT interval / 1000000 = 50 ; 50 * 1.5 for safety pad = 75
|
||||
@@ -10,18 +12,27 @@ const SteeringLimits VOLKSWAGEN_MQB_STEERING_LIMITS = {
|
||||
.type = TorqueDriverLimited,
|
||||
};
|
||||
|
||||
// longitudinal limits
|
||||
// acceleration in m/s2 * 1000 to avoid floating point math
|
||||
const int VOLKSWAGEN_MQB_MAX_ACCEL = 2000;
|
||||
const int VOLKSWAGEN_MQB_MIN_ACCEL = -3500;
|
||||
|
||||
#define MSG_ESP_19 0x0B2 // RX from ABS, for wheel speeds
|
||||
#define MSG_LH_EPS_03 0x09F // RX from EPS, for driver steering torque
|
||||
#define MSG_ESP_05 0x106 // RX from ABS, for brake switch state
|
||||
#define MSG_TSK_06 0x120 // RX from ECU, for ACC status from drivetrain coordinator
|
||||
#define MSG_MOTOR_20 0x121 // RX from ECU, for driver throttle input
|
||||
#define MSG_ACC_06 0x122 // TX by OP, ACC control instructions to the drivetrain coordinator
|
||||
#define MSG_HCA_01 0x126 // TX by OP, Heading Control Assist steering torque
|
||||
#define MSG_GRA_ACC_01 0x12B // TX by OP, ACC control buttons for cancel/resume
|
||||
#define MSG_ACC_07 0x12E // TX by OP, ACC control instructions to the drivetrain coordinator
|
||||
#define MSG_ACC_02 0x30C // TX by OP, ACC HUD data to the instrument cluster
|
||||
#define MSG_LDW_02 0x397 // TX by OP, Lane line recognition and text alerts
|
||||
|
||||
// Transmit of GRA_ACC_01 is allowed on bus 0 and 2 to keep compatibility with gateway and camera integration
|
||||
const CanMsg VOLKSWAGEN_MQB_TX_MSGS[] = {{MSG_HCA_01, 0, 8}, {MSG_GRA_ACC_01, 0, 8}, {MSG_GRA_ACC_01, 2, 8}, {MSG_LDW_02, 0, 8}};
|
||||
#define VOLKSWAGEN_MQB_TX_MSGS_LEN (sizeof(VOLKSWAGEN_MQB_TX_MSGS) / sizeof(VOLKSWAGEN_MQB_TX_MSGS[0]))
|
||||
const CanMsg VOLKSWAGEN_MQB_STOCK_TX_MSGS[] = {{MSG_HCA_01, 0, 8}, {MSG_GRA_ACC_01, 0, 8}, {MSG_GRA_ACC_01, 2, 8}, {MSG_LDW_02, 0, 8}};
|
||||
const CanMsg VOLKSWAGEN_MQB_LONG_TX_MSGS[] = {{MSG_HCA_01, 0, 8}, {MSG_LDW_02, 0, 8},
|
||||
{MSG_ACC_02, 0, 8}, {MSG_ACC_06, 0, 8}, {MSG_ACC_07, 0, 8}};
|
||||
|
||||
AddrCheckStruct volkswagen_mqb_addr_checks[] = {
|
||||
{.msg = {{MSG_ESP_19, 0, 8, .check_checksum = false, .max_counter = 0U, .expected_timestep = 10000U}, { 0 }, { 0 }}},
|
||||
@@ -35,7 +46,6 @@ addr_checks volkswagen_mqb_rx_checks = {volkswagen_mqb_addr_checks, VOLKSWAGEN_M
|
||||
|
||||
uint8_t volkswagen_crc8_lut_8h2f[256]; // Static lookup table for CRC8 poly 0x2F, aka 8H2F/AUTOSAR
|
||||
|
||||
|
||||
static uint32_t volkswagen_mqb_get_checksum(CANPacket_t *to_push) {
|
||||
return (uint8_t)GET_BYTE(to_push, 0);
|
||||
}
|
||||
@@ -83,6 +93,12 @@ static uint32_t volkswagen_mqb_compute_crc(CANPacket_t *to_push) {
|
||||
static const addr_checks* volkswagen_mqb_init(uint16_t param) {
|
||||
UNUSED(param);
|
||||
|
||||
volkswagen_set_button_prev = false;
|
||||
volkswagen_resume_button_prev = false;
|
||||
|
||||
#ifdef ALLOW_DEBUG
|
||||
volkswagen_longitudinal = GET_FLAG(param, FLAG_VOLKSWAGEN_LONG_CONTROL);
|
||||
#endif
|
||||
gen_crc_lookup_table_8(0x2F, volkswagen_crc8_lut_8h2f);
|
||||
return &volkswagen_mqb_rx_checks;
|
||||
}
|
||||
@@ -118,12 +134,41 @@ static int volkswagen_mqb_rx_hook(CANPacket_t *to_push) {
|
||||
update_sample(&torque_driver, torque_driver_new);
|
||||
}
|
||||
|
||||
// Enter controls on rising edge of stock ACC, exit controls if stock ACC disengages
|
||||
// Signal: TSK_06.TSK_Status
|
||||
if (addr == MSG_TSK_06) {
|
||||
// When using stock ACC, enter controls on rising edge of stock ACC engage, exit on disengage
|
||||
// Always exit controls on main switch off
|
||||
// Signal: TSK_06.TSK_Status
|
||||
int acc_status = (GET_BYTE(to_push, 3) & 0x7U);
|
||||
bool cruise_engaged = (acc_status == 3) || (acc_status == 4) || (acc_status == 5);
|
||||
pcm_cruise_check(cruise_engaged);
|
||||
acc_main_on = cruise_engaged || (acc_status == 2);
|
||||
|
||||
if (!volkswagen_longitudinal) {
|
||||
pcm_cruise_check(cruise_engaged);
|
||||
}
|
||||
|
||||
if (!acc_main_on) {
|
||||
controls_allowed = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (addr == MSG_GRA_ACC_01) {
|
||||
// If using openpilot longitudinal, enter controls on falling edge of Set or Resume with main switch on
|
||||
// Signal: GRA_ACC_01.GRA_Tip_Setzen
|
||||
// Signal: GRA_ACC_01.GRA_Tip_Wiederaufnahme
|
||||
if (volkswagen_longitudinal) {
|
||||
bool set_button = GET_BIT(to_push, 16U);
|
||||
bool resume_button = GET_BIT(to_push, 19U);
|
||||
if ((volkswagen_set_button_prev && !set_button) || (volkswagen_resume_button_prev && !resume_button)) {
|
||||
controls_allowed = acc_main_on;
|
||||
}
|
||||
volkswagen_set_button_prev = set_button;
|
||||
volkswagen_resume_button_prev = resume_button;
|
||||
}
|
||||
// Always exit controls on rising edge of Cancel
|
||||
// Signal: GRA_ACC_01.GRA_Abbrechen
|
||||
if (GET_BIT(to_push, 13U) == 1U) {
|
||||
controls_allowed = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Signal: Motor_20.MO_Fahrpedalrohwert_01
|
||||
@@ -147,8 +192,10 @@ static int volkswagen_mqb_tx_hook(CANPacket_t *to_send, bool longitudinal_allowe
|
||||
int addr = GET_ADDR(to_send);
|
||||
int tx = 1;
|
||||
|
||||
if (!msg_allowed(to_send, VOLKSWAGEN_MQB_TX_MSGS, VOLKSWAGEN_MQB_TX_MSGS_LEN)) {
|
||||
tx = 0;
|
||||
if (volkswagen_longitudinal) {
|
||||
tx = msg_allowed(to_send, VOLKSWAGEN_MQB_LONG_TX_MSGS, sizeof(VOLKSWAGEN_MQB_LONG_TX_MSGS) / sizeof(VOLKSWAGEN_MQB_LONG_TX_MSGS[0]));
|
||||
} else {
|
||||
tx = msg_allowed(to_send, VOLKSWAGEN_MQB_STOCK_TX_MSGS, sizeof(VOLKSWAGEN_MQB_STOCK_TX_MSGS) / sizeof(VOLKSWAGEN_MQB_STOCK_TX_MSGS[0]));
|
||||
}
|
||||
|
||||
// Safety check for HCA_01 Heading Control Assist torque
|
||||
@@ -166,6 +213,38 @@ static int volkswagen_mqb_tx_hook(CANPacket_t *to_send, bool longitudinal_allowe
|
||||
}
|
||||
}
|
||||
|
||||
// Safety check for both ACC_06 and ACC_07 acceleration requests
|
||||
// To avoid floating point math, scale upward and compare to pre-scaled safety m/s2 boundaries
|
||||
if ((addr == MSG_ACC_06) || (addr == MSG_ACC_07)) {
|
||||
bool violation = false;
|
||||
int desired_accel = 0;
|
||||
|
||||
if (addr == MSG_ACC_06) {
|
||||
// Signal: ACC_06.ACC_Sollbeschleunigung_02 (acceleration in m/s2, scale 0.005, offset -7.22)
|
||||
desired_accel = ((((GET_BYTE(to_send, 4) & 0x7U) << 8) | GET_BYTE(to_send, 3)) * 5U) - 7220U;
|
||||
} else {
|
||||
// Signal: ACC_07.ACC_Folgebeschl (acceleration in m/s2, scale 0.03, offset -4.6)
|
||||
int secondary_accel = (GET_BYTE(to_send, 4) * 30U) - 4600U;
|
||||
violation |= (secondary_accel != 3020); // enforce always inactive (one increment above max range) at this time
|
||||
// Signal: ACC_07.ACC_Sollbeschleunigung_02 (acceleration in m/s2, scale 0.005, offset -7.22)
|
||||
desired_accel = (((GET_BYTE(to_send, 7) << 3) | ((GET_BYTE(to_send, 6) & 0xE0U) >> 5)) * 5U) - 7220U;
|
||||
}
|
||||
|
||||
// VW send one increment above the max range when inactive
|
||||
if (desired_accel == 3010) {
|
||||
desired_accel = 0;
|
||||
}
|
||||
|
||||
if (!controls_allowed && (desired_accel != 0)) {
|
||||
violation = 1;
|
||||
}
|
||||
violation |= max_limit_check(desired_accel, VOLKSWAGEN_MQB_MAX_ACCEL, VOLKSWAGEN_MQB_MIN_ACCEL);
|
||||
|
||||
if (violation) {
|
||||
tx = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// FORCE CANCEL: ensuring that only the cancel button press is sent when controls are off.
|
||||
// This avoids unintended engagements while still allowing resume spam
|
||||
if ((addr == MSG_GRA_ACC_01) && !controls_allowed) {
|
||||
@@ -190,7 +269,10 @@ static int volkswagen_mqb_fwd_hook(int bus_num, CANPacket_t *to_fwd) {
|
||||
break;
|
||||
case 2:
|
||||
if ((addr == MSG_HCA_01) || (addr == MSG_LDW_02)) {
|
||||
// OP takes control of the Heading Control Assist and Lane Departure Warning messages from the camera
|
||||
// openpilot takes over LKAS steering control and related HUD messages from the camera
|
||||
bus_fwd = -1;
|
||||
} else if (volkswagen_longitudinal && ((addr == MSG_ACC_02) || (addr == MSG_ACC_06) || (addr == MSG_ACC_07))) {
|
||||
// openpilot takes over acceleration/braking control and related HUD messages from the stock ACC radar
|
||||
bus_fwd = -1;
|
||||
} else {
|
||||
// Forward all remaining traffic from Extended CAN devices to J533 gateway
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include "safety_volkswagen_common.h"
|
||||
|
||||
// lateral limits
|
||||
const SteeringLimits VOLKSWAGEN_PQ_STEERING_LIMITS = {
|
||||
.max_steer = 300, // 3.0 Nm (EPS side max of 3.0Nm with fault if violated)
|
||||
@@ -11,8 +13,9 @@ const SteeringLimits VOLKSWAGEN_PQ_STEERING_LIMITS = {
|
||||
};
|
||||
|
||||
// longitudinal limits
|
||||
const int VOLKSWAGEN_PQ_MAX_ACCEL = 2000; // 2.0 m/s2
|
||||
const int VOLKSWAGEN_PQ_MIN_ACCEL = -3500; // -3.5 m/s2
|
||||
// acceleration in m/s2 * 1000 to avoid floating point math
|
||||
const int VOLKSWAGEN_PQ_MAX_ACCEL = 2000;
|
||||
const int VOLKSWAGEN_PQ_MIN_ACCEL = -3500;
|
||||
|
||||
#define MSG_LENKHILFE_3 0x0D0 // RX from EPS, for steering angle and driver steering torque
|
||||
#define MSG_HCA_1 0x0D2 // TX by OP, Heading Control Assist steering torque
|
||||
@@ -42,11 +45,6 @@ AddrCheckStruct volkswagen_pq_addr_checks[] = {
|
||||
#define VOLKSWAGEN_PQ_ADDR_CHECKS_LEN (sizeof(volkswagen_pq_addr_checks) / sizeof(volkswagen_pq_addr_checks[0]))
|
||||
addr_checks volkswagen_pq_rx_checks = {volkswagen_pq_addr_checks, VOLKSWAGEN_PQ_ADDR_CHECKS_LEN};
|
||||
|
||||
const uint16_t FLAG_VOLKSWAGEN_LONG_CONTROL = 1;
|
||||
bool volkswagen_pq_longitudinal = false;
|
||||
bool volkswagen_pq_set_prev = false;
|
||||
bool volkswagen_pq_resume_prev = false;
|
||||
|
||||
static uint32_t volkswagen_pq_get_checksum(CANPacket_t *to_push) {
|
||||
int addr = GET_ADDR(to_push);
|
||||
|
||||
@@ -87,8 +85,11 @@ static uint32_t volkswagen_pq_compute_checksum(CANPacket_t *to_push) {
|
||||
static const addr_checks* volkswagen_pq_init(uint16_t param) {
|
||||
UNUSED(param);
|
||||
|
||||
volkswagen_set_button_prev = false;
|
||||
volkswagen_resume_button_prev = false;
|
||||
|
||||
#ifdef ALLOW_DEBUG
|
||||
volkswagen_pq_longitudinal = GET_FLAG(param, FLAG_VOLKSWAGEN_LONG_CONTROL);
|
||||
volkswagen_longitudinal = GET_FLAG(param, FLAG_VOLKSWAGEN_LONG_CONTROL);
|
||||
#endif
|
||||
return &volkswagen_pq_rx_checks;
|
||||
}
|
||||
@@ -121,7 +122,7 @@ static int volkswagen_pq_rx_hook(CANPacket_t *to_push) {
|
||||
update_sample(&torque_driver, torque_driver_new);
|
||||
}
|
||||
|
||||
if (volkswagen_pq_longitudinal) {
|
||||
if (volkswagen_longitudinal) {
|
||||
if (addr == MSG_MOTOR_5) {
|
||||
// ACC main switch on is a prerequisite to enter controls, exit controls immediately on main switch off
|
||||
// Signal: Motor_5.GRA_Hauptschalter
|
||||
@@ -137,11 +138,11 @@ static int volkswagen_pq_rx_hook(CANPacket_t *to_push) {
|
||||
// Signal: GRA_Neu.GRA_Neu_Recall
|
||||
bool set_button = GET_BIT(to_push, 16U);
|
||||
bool resume_button = GET_BIT(to_push, 17U);
|
||||
if ((volkswagen_pq_set_prev && !set_button) || (volkswagen_pq_resume_prev && !resume_button)) {
|
||||
if ((volkswagen_set_button_prev && !set_button) || (volkswagen_resume_button_prev && !resume_button)) {
|
||||
controls_allowed = acc_main_on;
|
||||
}
|
||||
volkswagen_pq_set_prev = set_button;
|
||||
volkswagen_pq_resume_prev = resume_button;
|
||||
volkswagen_set_button_prev = set_button;
|
||||
volkswagen_resume_button_prev = resume_button;
|
||||
// Exit controls on rising edge of Cancel, override Set/Resume if present simultaneously
|
||||
// Signal: GRA_ACC_01.GRA_Abbrechen
|
||||
if (GET_BIT(to_push, 9U) == 1U) {
|
||||
@@ -177,7 +178,7 @@ static int volkswagen_pq_tx_hook(CANPacket_t *to_send, bool longitudinal_allowed
|
||||
int addr = GET_ADDR(to_send);
|
||||
int tx = 1;
|
||||
|
||||
if (volkswagen_pq_longitudinal) {
|
||||
if (volkswagen_longitudinal) {
|
||||
tx = msg_allowed(to_send, VOLKSWAGEN_PQ_LONG_TX_MSGS, sizeof(VOLKSWAGEN_PQ_LONG_TX_MSGS) / sizeof(VOLKSWAGEN_PQ_LONG_TX_MSGS[0]));
|
||||
} else {
|
||||
tx = msg_allowed(to_send, VOLKSWAGEN_PQ_STOCK_TX_MSGS, sizeof(VOLKSWAGEN_PQ_STOCK_TX_MSGS) / sizeof(VOLKSWAGEN_PQ_STOCK_TX_MSGS[0]));
|
||||
@@ -251,7 +252,7 @@ static int volkswagen_pq_fwd_hook(int bus_num, CANPacket_t *to_fwd) {
|
||||
if ((addr == MSG_HCA_1) || (addr == MSG_LDW_1)) {
|
||||
// openpilot takes over LKAS steering control and related HUD messages from the camera
|
||||
bus_fwd = -1;
|
||||
} else if (volkswagen_pq_longitudinal && ((addr == MSG_ACC_SYSTEM) || (addr == MSG_ACC_GRA_ANZIEGE))) {
|
||||
} else if (volkswagen_longitudinal && ((addr == MSG_ACC_SYSTEM) || (addr == MSG_ACC_GRA_ANZIEGE))) {
|
||||
// openpilot takes over acceleration/braking control and related HUD messages from the stock ACC radar
|
||||
} else {
|
||||
// Forward all remaining traffic from Extended CAN devices to J533 gateway
|
||||
|
||||
@@ -46,6 +46,12 @@ typedef struct {
|
||||
|
||||
// motor torque limits
|
||||
const int max_torque_error;
|
||||
|
||||
// safety around steer req bit
|
||||
const int min_valid_request_frames;
|
||||
const int max_invalid_request_frames;
|
||||
const uint32_t min_valid_request_rt_interval;
|
||||
const bool has_steer_req_tolerance;
|
||||
} SteeringLimits;
|
||||
|
||||
typedef struct {
|
||||
@@ -134,18 +140,24 @@ bool gas_pressed = false;
|
||||
bool gas_pressed_prev = false;
|
||||
bool brake_pressed = false;
|
||||
bool brake_pressed_prev = false;
|
||||
bool regen_braking = false;
|
||||
bool regen_braking_prev = false;
|
||||
bool cruise_engaged_prev = false;
|
||||
float vehicle_speed = 0;
|
||||
bool vehicle_moving = false;
|
||||
bool acc_main_on = false; // referred to as "ACC off" in ISO 15622:2018
|
||||
int cruise_button_prev = 0;
|
||||
bool safety_rx_checks_invalid = false;
|
||||
|
||||
// for safety modes with torque steering control
|
||||
int desired_torque_last = 0; // last desired steer torque
|
||||
int rt_torque_last = 0; // last desired torque for real time check
|
||||
int valid_steer_req_count = 0; // counter for steer request bit matching non-zero torque
|
||||
int invalid_steer_req_count = 0; // counter to allow multiple frames of mismatching torque request bit
|
||||
struct sample_t torque_meas; // last 6 motor torques produced by the eps
|
||||
struct sample_t torque_driver; // last 6 driver torques measured
|
||||
uint32_t ts_last = 0;
|
||||
uint32_t ts_torque_check_last = 0;
|
||||
uint32_t ts_steer_req_mismatch_last = 0; // last timestamp steer req was mismatched with torque
|
||||
|
||||
// state for controls_allowed timeout logic
|
||||
bool heartbeat_engaged = false; // openpilot enabled, passed in heartbeat USB command
|
||||
|
||||
@@ -52,10 +52,3 @@ void detect_board_type(void) {
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
bool has_external_debug_serial = 0;
|
||||
|
||||
void detect_external_debug_serial(void) {
|
||||
// detect if external serial debugging is present
|
||||
has_external_debug_serial = detect_with_pull(GPIOA, 3, PULL_DOWN);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ void clock_init(void) {
|
||||
while ((RCC->CR & RCC_CR_HSERDY) == 0);
|
||||
|
||||
// divide things
|
||||
register_set(&(RCC->CFGR), RCC_CFGR_HPRE_DIV1 | RCC_CFGR_PPRE2_DIV2 | RCC_CFGR_PPRE1_DIV4, 0xFF7FFCF3U);
|
||||
register_set(&(RCC->CFGR), RCC_CFGR_HPRE_DIV1 | RCC_CFGR_PPRE2_DIV2 | RCC_CFGR_PPRE1_DIV2, 0xFF7FFCF3U);
|
||||
|
||||
// 16mhz crystal
|
||||
register_set(&(RCC->PLLCFGR), RCC_PLLCFGR_PLLQ_2 | RCC_PLLCFGR_PLLM_3 | RCC_PLLCFGR_PLLN_6 | RCC_PLLCFGR_PLLN_5 | RCC_PLLCFGR_PLLSRC_HSE, 0x7F437FFFU);
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
// this is needed for 1 mbps support
|
||||
#define CAN_QUANTA 8U
|
||||
#define CAN_SEQ1 6 // roundf(quanta * 0.875f) - 1;
|
||||
#define CAN_SEQ2 1 // roundf(quanta * 0.125f);
|
||||
// SAE 2284-3 : minimum 16 tq, SJW 3, sample point at 81.3%
|
||||
#define CAN_QUANTA 16U
|
||||
#define CAN_SEQ1 12U
|
||||
#define CAN_SEQ2 3U
|
||||
#define CAN_SJW 3U
|
||||
|
||||
#define CAN_PCLK 24000U
|
||||
#define CAN_PCLK 48000U
|
||||
// 333 = 33.3 kbps
|
||||
// 5000 = 500 kbps
|
||||
#define can_speed_to_prescaler(x) (CAN_PCLK / CAN_QUANTA * 10U / (x))
|
||||
@@ -12,6 +13,10 @@
|
||||
|
||||
void puts(const char *a);
|
||||
|
||||
// kbps multiplied by 10
|
||||
const uint32_t speeds[] = {100U, 200U, 500U, 1000U, 1250U, 2500U, 5000U, 10000U};
|
||||
const uint32_t data_speeds[] = {0U}; // No separate data speed, dummy
|
||||
|
||||
bool llcan_set_speed(CAN_TypeDef *CAN_obj, uint32_t speed, bool loopback, bool silent) {
|
||||
bool ret = true;
|
||||
|
||||
@@ -32,9 +37,10 @@ bool llcan_set_speed(CAN_TypeDef *CAN_obj, uint32_t speed, bool loopback, bool s
|
||||
|
||||
if(ret){
|
||||
// set time quanta from defines
|
||||
register_set(&(CAN_obj->BTR), ((CAN_BTR_TS1_0 * (CAN_SEQ1-1)) |
|
||||
(CAN_BTR_TS2_0 * (CAN_SEQ2-1)) |
|
||||
(can_speed_to_prescaler(speed) - 1U)), 0xC37F03FFU);
|
||||
register_set(&(CAN_obj->BTR), ((CAN_BTR_TS1_0 * (CAN_SEQ1-1U)) |
|
||||
(CAN_BTR_TS2_0 * (CAN_SEQ2-1U)) |
|
||||
(CAN_BTR_SJW_0 * (CAN_SJW-1U)) |
|
||||
(can_speed_to_prescaler(speed) - 1U)), 0xC37F03FFU);
|
||||
|
||||
// silent loopback mode for debugging
|
||||
if (loopback) {
|
||||
@@ -97,7 +103,7 @@ bool llcan_init(CAN_TypeDef *CAN_obj) {
|
||||
register_clear_bits(&(CAN_obj->FMR), CAN_FMR_FINIT);
|
||||
|
||||
// enable certain CAN interrupts
|
||||
register_set_bits(&(CAN_obj->IER), CAN_IER_TMEIE | CAN_IER_FMPIE0 | CAN_IER_WKUIE);
|
||||
register_set_bits(&(CAN_obj->IER), CAN_IER_TMEIE | CAN_IER_FMPIE0 | CAN_IER_ERRIE | CAN_IER_LECIE | CAN_IER_BOFIE | CAN_IER_EPVIE | CAN_IER_EWGIE | CAN_IER_FOVIE0 | CAN_IER_FFIE0);
|
||||
|
||||
if (CAN_obj == CAN1) {
|
||||
NVIC_EnableIRQ(CAN1_TX_IRQn);
|
||||
@@ -121,8 +127,6 @@ bool llcan_init(CAN_TypeDef *CAN_obj) {
|
||||
}
|
||||
|
||||
void llcan_clear_send(CAN_TypeDef *CAN_obj) {
|
||||
CAN_obj->TSR |= CAN_TSR_ABRQ0;
|
||||
register_clear_bits(&(CAN_obj->MSR), CAN_MSR_ERRI);
|
||||
// cppcheck-suppress selfAssignment ; needed to clear the register
|
||||
CAN_obj->MSR = CAN_obj->MSR;
|
||||
CAN_obj->TSR |= CAN_TSR_ABRQ0; // Abort message transmission on error interrupt
|
||||
CAN_obj->MSR |= CAN_MSR_ERRI; // Clear error interrupt
|
||||
}
|
||||
|
||||
+42
-93
@@ -1,131 +1,80 @@
|
||||
// IRQs: DMA2_Stream2, DMA2_Stream3, EXTI4
|
||||
|
||||
void spi_init(void);
|
||||
int spi_cb_rx(uint8_t *data, int len, uint8_t *data_out);
|
||||
|
||||
// end API
|
||||
|
||||
#define SPI_BUF_SIZE 256
|
||||
uint8_t spi_buf[SPI_BUF_SIZE];
|
||||
int spi_buf_count = 0;
|
||||
int spi_total_count = 0;
|
||||
|
||||
void spi_tx_dma(void *addr, int len) {
|
||||
void llspi_miso_dma(uint8_t *addr, int len) {
|
||||
// disable DMA
|
||||
DMA2_Stream3->CR &= ~DMA_SxCR_EN;
|
||||
register_clear_bits(&(SPI1->CR2), SPI_CR2_TXDMAEN);
|
||||
register_clear_bits(&(DMA2_Stream3->CR), DMA_SxCR_EN);
|
||||
|
||||
// DMA2, stream 3, channel 3
|
||||
// setup source and length
|
||||
register_set(&(DMA2_Stream3->M0AR), (uint32_t)addr, 0xFFFFFFFFU);
|
||||
DMA2_Stream3->NDTR = len;
|
||||
register_set(&(DMA2_Stream3->PAR), (uint32_t)&(SPI1->DR), 0xFFFFFFFFU);
|
||||
|
||||
// channel3, increment memory, memory -> periph, enable
|
||||
register_set(&(DMA2_Stream3->CR), (DMA_SxCR_CHSEL_1 | DMA_SxCR_CHSEL_0 | DMA_SxCR_MINC | DMA_SxCR_DIR_0 | DMA_SxCR_EN), 0x1E077EFEU);
|
||||
delay(0);
|
||||
register_set_bits(&(DMA2_Stream3->CR), DMA_SxCR_TCIE);
|
||||
|
||||
// enable DMA
|
||||
register_set_bits(&(SPI1->CR2), SPI_CR2_TXDMAEN);
|
||||
|
||||
// signal data is ready by driving low
|
||||
// esp must be configured as input by this point
|
||||
set_gpio_output(GPIOB, 0, 0);
|
||||
DMA2_Stream3->CR |= DMA_SxCR_EN;
|
||||
}
|
||||
|
||||
void spi_rx_dma(void *addr, int len) {
|
||||
void llspi_mosi_dma(uint8_t *addr, int len) {
|
||||
// disable DMA
|
||||
register_clear_bits(&(SPI1->CR2), SPI_CR2_RXDMAEN);
|
||||
register_clear_bits(&(DMA2_Stream2->CR), DMA_SxCR_EN);
|
||||
DMA2_Stream2->CR &= ~DMA_SxCR_EN;
|
||||
|
||||
// drain the bus
|
||||
volatile uint8_t dat = SPI1->DR;
|
||||
(void)dat;
|
||||
|
||||
// DMA2, stream 2, channel 3
|
||||
// setup destination and length
|
||||
register_set(&(DMA2_Stream2->M0AR), (uint32_t)addr, 0xFFFFFFFFU);
|
||||
DMA2_Stream2->NDTR = len;
|
||||
register_set(&(DMA2_Stream2->PAR), (uint32_t)&(SPI1->DR), 0xFFFFFFFFU);
|
||||
|
||||
// channel3, increment memory, periph -> memory, enable
|
||||
register_set(&(DMA2_Stream2->CR), (DMA_SxCR_CHSEL_1 | DMA_SxCR_CHSEL_0 | DMA_SxCR_MINC | DMA_SxCR_EN), 0x1E077EFEU);
|
||||
delay(0);
|
||||
register_set_bits(&(DMA2_Stream2->CR), DMA_SxCR_TCIE);
|
||||
|
||||
// enable DMA
|
||||
DMA2_Stream2->CR |= DMA_SxCR_EN;
|
||||
register_set_bits(&(SPI1->CR2), SPI_CR2_RXDMAEN);
|
||||
}
|
||||
|
||||
// ***************************** SPI IRQs *****************************
|
||||
// can't go on the stack cause it's DMAed
|
||||
uint8_t spi_tx_buf[0x44];
|
||||
|
||||
// SPI RX
|
||||
// SPI MOSI DMA FINISHED
|
||||
void DMA2_Stream2_IRQ_Handler(void) {
|
||||
int *resp_len = (int*)spi_tx_buf;
|
||||
(void)memset(spi_tx_buf, 0xaa, 0x44);
|
||||
*resp_len = spi_cb_rx(spi_buf, 0x14, spi_tx_buf+4);
|
||||
#ifdef DEBUG_SPI
|
||||
puts("SPI write: ");
|
||||
puth(*resp_len);
|
||||
puts("\n");
|
||||
#endif
|
||||
spi_tx_dma(spi_tx_buf, *resp_len + 4);
|
||||
|
||||
// ack
|
||||
// Clear interrupt flag
|
||||
ENTER_CRITICAL();
|
||||
DMA2->LIFCR = DMA_LIFCR_CTCIF2;
|
||||
|
||||
spi_handle_rx();
|
||||
|
||||
EXIT_CRITICAL();
|
||||
}
|
||||
|
||||
// SPI TX
|
||||
// SPI MISO DMA FINISHED
|
||||
void DMA2_Stream3_IRQ_Handler(void) {
|
||||
#ifdef DEBUG_SPI
|
||||
puts("SPI handshake\n");
|
||||
#endif
|
||||
|
||||
// reset handshake back to pull up
|
||||
set_gpio_mode(GPIOB, 0, MODE_INPUT);
|
||||
set_gpio_pullup(GPIOB, 0, PULL_UP);
|
||||
|
||||
// ack
|
||||
// Clear interrupt flag
|
||||
DMA2->LIFCR = DMA_LIFCR_CTCIF3;
|
||||
}
|
||||
|
||||
void EXTI4_IRQ_Handler(void) {
|
||||
volatile unsigned int pr = EXTI->PR & (1U << 4);
|
||||
#ifdef DEBUG_SPI
|
||||
puts("exti4\n");
|
||||
#endif
|
||||
// SPI CS falling
|
||||
if ((pr & (1U << 4)) != 0U) {
|
||||
spi_total_count = 0;
|
||||
spi_rx_dma(spi_buf, 0x14);
|
||||
}
|
||||
EXTI->PR = pr;
|
||||
// Wait until the transaction is actually finished and clear the DR
|
||||
// TODO: needs a timeout here, otherwise it gets stuck with no master clock!
|
||||
while (!(SPI1->SR & SPI_SR_TXE));
|
||||
volatile uint8_t dat = SPI1->DR;
|
||||
(void)dat;
|
||||
SPI1->DR = 0U;
|
||||
|
||||
spi_handle_tx();
|
||||
}
|
||||
|
||||
// ***************************** SPI init *****************************
|
||||
void spi_init(void) {
|
||||
// Max SPI clock the ESP can produce is 80MHz. At buffer size of 256 bytes, that's a max of about 40k buffers per second
|
||||
REGISTER_INTERRUPT(DMA2_Stream2_IRQn, DMA2_Stream2_IRQ_Handler, 50000U, FAULT_INTERRUPT_RATE_SPI_DMA)
|
||||
REGISTER_INTERRUPT(DMA2_Stream3_IRQn, DMA2_Stream3_IRQ_Handler, 50000U, FAULT_INTERRUPT_RATE_SPI_DMA)
|
||||
REGISTER_INTERRUPT(EXTI4_IRQn, EXTI4_IRQ_Handler, 50000U, FAULT_INTERRUPT_RATE_SPI_CS) // TODO: Figure out if this is a reasonable limit
|
||||
void llspi_init(void) {
|
||||
// We expect less than 50 transactions (including control messages and CAN buffers) at the 100Hz boardd interval. Can be raised if needed.
|
||||
REGISTER_INTERRUPT(DMA2_Stream2_IRQn, DMA2_Stream2_IRQ_Handler, 5000U, FAULT_INTERRUPT_RATE_SPI_DMA)
|
||||
REGISTER_INTERRUPT(DMA2_Stream3_IRQn, DMA2_Stream3_IRQ_Handler, 5000U, FAULT_INTERRUPT_RATE_SPI_DMA)
|
||||
|
||||
//puts("SPI init\n");
|
||||
// Setup MOSI DMA
|
||||
register_set(&(DMA2_Stream2->CR), (DMA_SxCR_CHSEL_1 | DMA_SxCR_CHSEL_0 | DMA_SxCR_MINC | DMA_SxCR_TCIE), 0x1E077EFEU);
|
||||
register_set(&(DMA2_Stream2->PAR), (uint32_t)&(SPI1->DR), 0xFFFFFFFFU);
|
||||
|
||||
// Setup MISO DMA
|
||||
register_set(&(DMA2_Stream3->CR), (DMA_SxCR_CHSEL_1 | DMA_SxCR_CHSEL_0 | DMA_SxCR_MINC | DMA_SxCR_DIR_0 | DMA_SxCR_TCIE), 0x1E077EFEU);
|
||||
register_set(&(DMA2_Stream3->PAR), (uint32_t)&(SPI1->DR), 0xFFFFFFFFU);
|
||||
|
||||
// Enable SPI and the error interrupts
|
||||
// TODO: verify clock phase and polarity
|
||||
register_set(&(SPI1->CR1), SPI_CR1_SPE, 0xFFFFU);
|
||||
|
||||
// enable SPI interrupts
|
||||
//SPI1->CR2 = SPI_CR2_RXNEIE | SPI_CR2_ERRIE | SPI_CR2_TXEIE;
|
||||
register_set(&(SPI1->CR2), SPI_CR2_RXNEIE, 0xF7U);
|
||||
register_set(&(SPI1->CR2), 0U, 0xF7U);
|
||||
|
||||
NVIC_EnableIRQ(DMA2_Stream2_IRQn);
|
||||
NVIC_EnableIRQ(DMA2_Stream3_IRQn);
|
||||
//NVIC_EnableIRQ(SPI1_IRQn);
|
||||
|
||||
// reset handshake back to pull up
|
||||
set_gpio_mode(GPIOB, 0, MODE_INPUT);
|
||||
set_gpio_pullup(GPIOB, 0, PULL_UP);
|
||||
|
||||
// setup interrupt on falling edge of SPI enable (on PA4)
|
||||
register_set(&(SYSCFG->EXTICR[2]), SYSCFG_EXTICR2_EXTI4_PA, 0xFFFFU);
|
||||
register_set_bits(&(EXTI->IMR), (1U << 4));
|
||||
register_set_bits(&(EXTI->FTSR), (1U << 4));
|
||||
NVIC_EnableIRQ(EXTI4_IRQn);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,166 @@
|
||||
/*
|
||||
*****************************************************************************
|
||||
**
|
||||
** File : stm32f4_flash.ld
|
||||
**
|
||||
** Abstract : Linker script for STM32F407VG Device with
|
||||
** 1024KByte FLASH, 192KByte RAM
|
||||
**
|
||||
** Set heap size, stack size and stack location according
|
||||
** to application requirements.
|
||||
**
|
||||
** Set memory bank area and size if external memory is used.
|
||||
**
|
||||
** Target : STMicroelectronics STM32
|
||||
**
|
||||
** Environment : Atollic TrueSTUDIO(R)
|
||||
**
|
||||
** Distribution: The file is distributed "as is," without any warranty
|
||||
** of any kind.
|
||||
**
|
||||
** (c)Copyright Atollic AB.
|
||||
** You may use this file as-is or modify it according to the needs of your
|
||||
** project. Distribution of this file (unmodified or modified) is not
|
||||
** permitted. Atollic AB permit registered Atollic TrueSTUDIO(R) users the
|
||||
** rights to distribute the assembled, compiled & linked contents of this
|
||||
** file as part of an application binary file, provided that it is built
|
||||
** using the Atollic TrueSTUDIO(R) toolchain.
|
||||
**
|
||||
*****************************************************************************
|
||||
*/
|
||||
|
||||
/* Entry Point */
|
||||
ENTRY(Reset_Handler)
|
||||
|
||||
/* Highest address of the user mode stack */
|
||||
enter_bootloader_mode = 0x2001FFFC;
|
||||
_estack = 0x2001FFFC; /* end of 128K RAM on AHB bus*/
|
||||
_app_start = 0x08004000; /* Reserve Sector 0(16K) for bootloader */
|
||||
|
||||
/* Generate a link error if heap and stack don't fit into RAM */
|
||||
_Min_Heap_Size = 0; /* required amount of heap */
|
||||
_Min_Stack_Size = 0x400; /* required amount of stack */
|
||||
|
||||
/* Specify the memory areas */
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
|
||||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 256K
|
||||
RAM2 (xrw) : ORIGIN = 0x20040000, LENGTH = 64K
|
||||
MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K
|
||||
}
|
||||
|
||||
/* Define output sections */
|
||||
SECTIONS
|
||||
{
|
||||
/* The startup code goes first into FLASH */
|
||||
.isr_vector :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
KEEP(*(.isr_vector)) /* Startup code */
|
||||
. = ALIGN(4);
|
||||
} >FLASH
|
||||
|
||||
/* The program code and other data goes into FLASH */
|
||||
.text :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.text) /* .text sections (code) */
|
||||
*(.text*) /* .text* sections (code) */
|
||||
*(.rodata) /* .rodata sections (constants, strings, etc.) */
|
||||
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
|
||||
*(.glue_7) /* glue arm to thumb code */
|
||||
*(.glue_7t) /* glue thumb to arm code */
|
||||
*(.eh_frame)
|
||||
|
||||
KEEP (*(.init))
|
||||
KEEP (*(.fini))
|
||||
|
||||
. = ALIGN(4);
|
||||
_etext = .; /* define a global symbols at end of code */
|
||||
_exit = .;
|
||||
} >FLASH
|
||||
|
||||
|
||||
.ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
|
||||
.ARM : {
|
||||
__exidx_start = .;
|
||||
*(.ARM.exidx*)
|
||||
__exidx_end = .;
|
||||
} >FLASH
|
||||
|
||||
.preinit_array :
|
||||
{
|
||||
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||
KEEP (*(.preinit_array*))
|
||||
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||
} >FLASH
|
||||
.init_array :
|
||||
{
|
||||
PROVIDE_HIDDEN (__init_array_start = .);
|
||||
KEEP (*(SORT(.init_array.*)))
|
||||
KEEP (*(.init_array*))
|
||||
PROVIDE_HIDDEN (__init_array_end = .);
|
||||
} >FLASH
|
||||
.fini_array :
|
||||
{
|
||||
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||
KEEP (*(.fini_array*))
|
||||
KEEP (*(SORT(.fini_array.*)))
|
||||
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||
} >FLASH
|
||||
|
||||
/* used by the startup to initialize data */
|
||||
_sidata = .;
|
||||
|
||||
/* Initialized data sections goes into RAM, load LMA copy after code */
|
||||
.data : AT ( _sidata )
|
||||
{
|
||||
. = ALIGN(4);
|
||||
_sdata = .; /* create a global symbol at data start */
|
||||
*(.data) /* .data sections */
|
||||
*(.data*) /* .data* sections */
|
||||
|
||||
. = ALIGN(4);
|
||||
_edata = .; /* define a global symbol at data end */
|
||||
} >RAM
|
||||
|
||||
/* Uninitialized data section */
|
||||
. = ALIGN(4);
|
||||
.bss :
|
||||
{
|
||||
/* This is used by the startup in order to initialize the .bss secion */
|
||||
_sbss = .; /* define a global symbol at bss start */
|
||||
__bss_start__ = _sbss;
|
||||
*(.bss)
|
||||
*(.bss*)
|
||||
*(COMMON)
|
||||
|
||||
. = ALIGN(4);
|
||||
_ebss = .; /* define a global symbol at bss end */
|
||||
__bss_end__ = _ebss;
|
||||
} >RAM
|
||||
|
||||
/* User_heap_stack section, used to check that there is enough RAM left */
|
||||
._user_heap_stack :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE ( end = . );
|
||||
PROVIDE ( _end = . );
|
||||
. = . + _Min_Heap_Size;
|
||||
. = . + _Min_Stack_Size;
|
||||
. = ALIGN(4);
|
||||
} >RAM
|
||||
|
||||
/* MEMORY_bank1 section, code must be located here explicitly */
|
||||
/* Example: extern int foo(void) __attribute__ ((section (".mb1text"))); */
|
||||
.memory_b1_text :
|
||||
{
|
||||
*(.mb1text) /* .mb1text sections (code) */
|
||||
*(.mb1text*) /* .mb1text* sections (code) */
|
||||
*(.mb1rodata) /* read-only data (constants) */
|
||||
*(.mb1rodata*)
|
||||
} >MEMORY_B1
|
||||
|
||||
.ARM.attributes 0 : { *(.ARM.attributes) }
|
||||
}
|
||||
@@ -66,6 +66,11 @@
|
||||
#include "stm32fx/board.h"
|
||||
#include "stm32fx/clock.h"
|
||||
|
||||
#ifdef ENABLE_SPI
|
||||
#include "drivers/spi.h"
|
||||
#include "stm32fx/llspi.h"
|
||||
#endif
|
||||
|
||||
#if !defined(BOOTSTUB) && (defined(PANDA) || defined(PEDAL_USB))
|
||||
#include "drivers/uart.h"
|
||||
#include "stm32fx/lluart.h"
|
||||
|
||||
+17
-11
@@ -11,26 +11,32 @@
|
||||
#include "stm32h7/llrtc.h"
|
||||
#include "drivers/rtc.h"
|
||||
#include "boards/red.h"
|
||||
#include "boards/red_chiplet.h"
|
||||
#include "boards/red_v2.h"
|
||||
#include "boards/tres.h"
|
||||
|
||||
uint8_t board_id(void) {
|
||||
|
||||
uint8_t get_board_id(void) {
|
||||
return detect_with_pull(GPIOF, 7, PULL_UP) |
|
||||
(detect_with_pull(GPIOF, 8, PULL_UP) << 1U) |
|
||||
(detect_with_pull(GPIOF, 9, PULL_UP) << 2U) |
|
||||
(detect_with_pull(GPIOF, 10, PULL_UP) << 3U);
|
||||
(detect_with_pull(GPIOF, 8, PULL_UP) << 1U) |
|
||||
(detect_with_pull(GPIOF, 9, PULL_UP) << 2U) |
|
||||
(detect_with_pull(GPIOF, 10, PULL_UP) << 3U);
|
||||
}
|
||||
|
||||
void detect_board_type(void) {
|
||||
if(board_id() == 0U){
|
||||
const uint8_t board_id = get_board_id();
|
||||
|
||||
if (board_id == 0U) {
|
||||
hw_type = HW_TYPE_RED_PANDA;
|
||||
current_board = &board_red;
|
||||
} else if (board_id == 1U) {
|
||||
hw_type = HW_TYPE_RED_PANDA_V2;
|
||||
current_board = &board_red_v2;
|
||||
} else if (board_id == 2U) {
|
||||
hw_type = HW_TYPE_TRES;
|
||||
current_board = &board_tres;
|
||||
} else {
|
||||
hw_type = HW_TYPE_UNKNOWN;
|
||||
puts("Hardware type is UNKNOWN!\n");
|
||||
}
|
||||
}
|
||||
|
||||
bool has_external_debug_serial = 0;
|
||||
void detect_external_debug_serial(void) {
|
||||
// detect if external serial debugging is present
|
||||
has_external_debug_serial = detect_with_pull(GPIOA, 3, PULL_DOWN);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,22 @@
|
||||
/*
|
||||
HSE: 25MHz
|
||||
PLL1Q: 80MHz (for FDCAN)
|
||||
HSI48 enabled (for USB)
|
||||
CPU: 240MHz
|
||||
CPU Systick: 240MHz
|
||||
AXI: 120MHz
|
||||
HCLK3: 60MHz
|
||||
APB3 per: 60MHz
|
||||
AHB1,2 per: 120MHz
|
||||
APB1 per: 60MHz
|
||||
APB1 tim: 120MHz
|
||||
APB2 per: 60MHz
|
||||
APB2 tim: 120MHz
|
||||
AHB4 per: 120MHz
|
||||
APB4 per: 60MHz
|
||||
PCLK1: 60MHz (for USART2,3,4,5,7,8)
|
||||
*/
|
||||
|
||||
void clock_init(void) {
|
||||
//Set power mode to direct SMPS power supply(depends on the board layout)
|
||||
register_set(&(PWR->CR3), PWR_CR3_SMPSEN, 0xFU); // powered only by SMPS
|
||||
@@ -42,7 +61,7 @@ void clock_init(void) {
|
||||
register_set_bits(&(RCC->AHB4ENR), RCC_APB4ENR_SYSCFGEN);
|
||||
//////////////END OTHER CLOCKS////////////////////
|
||||
|
||||
// Configure clock source for USB (HSI at 48Mhz)
|
||||
// Configure clock source for USB (HSI48)
|
||||
register_set(&(RCC->D2CCIP2R), RCC_D2CCIP2R_USBSEL_1 | RCC_D2CCIP2R_USBSEL_0, RCC_D2CCIP2R_USBSEL);
|
||||
// Configure clock source for FDCAN (PLL1Q at 80Mhz)
|
||||
register_set(&(RCC->D2CCIP1R), RCC_D2CCIP1R_FDCANSEL_0, RCC_D2CCIP1R_FDCANSEL);
|
||||
@@ -52,4 +71,8 @@ void clock_init(void) {
|
||||
register_set_bits(&(RCC->CR), RCC_CR_CSSHSEON);
|
||||
//Enable Vdd33usb supply level detector
|
||||
register_set_bits(&(PWR->CR3), PWR_CR3_USB33DEN);
|
||||
|
||||
// Enable CPU access to SRAM1 and SRAM2 (in domain D2)
|
||||
register_set_bits(&(RCC->AHB2ENR), RCC_AHB2ENR_SRAM1EN);
|
||||
register_set_bits(&(RCC->AHB2ENR), RCC_AHB2ENR_SRAM2EN);
|
||||
}
|
||||
|
||||
@@ -39,6 +39,11 @@
|
||||
|
||||
void puts(const char *a);
|
||||
|
||||
// kbps multiplied by 10
|
||||
const uint32_t speeds[] = {100U, 200U, 500U, 1000U, 1250U, 2500U, 5000U, 10000U};
|
||||
const uint32_t data_speeds[] = {100U, 200U, 500U, 1000U, 1250U, 2500U, 5000U, 10000U, 20000U, 50000U};
|
||||
|
||||
|
||||
bool fdcan_request_init(FDCAN_GlobalTypeDef *CANx) {
|
||||
bool ret = true;
|
||||
// Exit from sleep mode
|
||||
@@ -79,7 +84,7 @@ bool fdcan_exit_init(FDCAN_GlobalTypeDef *CANx) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool llcan_set_speed(FDCAN_GlobalTypeDef *CANx, uint32_t speed, uint32_t data_speed, bool loopback, bool silent) {
|
||||
bool llcan_set_speed(FDCAN_GlobalTypeDef *CANx, uint32_t speed, uint32_t data_speed, bool non_iso, bool loopback, bool silent) {
|
||||
UNUSED(speed);
|
||||
bool ret = fdcan_request_init(CANx);
|
||||
|
||||
@@ -92,6 +97,7 @@ bool llcan_set_speed(FDCAN_GlobalTypeDef *CANx, uint32_t speed, uint32_t data_sp
|
||||
CANx->TEST &= ~(FDCAN_TEST_LBCK);
|
||||
CANx->CCCR &= ~(FDCAN_CCCR_MON);
|
||||
CANx->CCCR &= ~(FDCAN_CCCR_ASM);
|
||||
CANx->CCCR &= ~(FDCAN_CCCR_NISO);
|
||||
|
||||
// TODO: add as a separate safety mode
|
||||
// Enable ASM restricted operation(for debug or automatic bitrate switching)
|
||||
@@ -108,7 +114,7 @@ bool llcan_set_speed(FDCAN_GlobalTypeDef *CANx, uint32_t speed, uint32_t data_sp
|
||||
uint8_t sp = CAN_SP_NOMINAL;
|
||||
uint8_t seg1 = CAN_SEG1(tq, sp);
|
||||
uint8_t seg2 = CAN_SEG2(tq, sp);
|
||||
uint8_t sjw = seg2;
|
||||
uint8_t sjw = MIN(127U, seg2);
|
||||
|
||||
CANx->NBTP = (((sjw & 0x7FU)-1U)<<FDCAN_NBTP_NSJW_Pos) | (((seg1 & 0xFFU)-1U)<<FDCAN_NBTP_NTSEG1_Pos) | (((seg2 & 0x7FU)-1U)<<FDCAN_NBTP_NTSEG2_Pos) | (((prescaler & 0x1FFU)-1U)<<FDCAN_NBTP_NBRP_Pos);
|
||||
|
||||
@@ -121,10 +127,15 @@ bool llcan_set_speed(FDCAN_GlobalTypeDef *CANx, uint32_t speed, uint32_t data_sp
|
||||
tq = CAN_QUANTA(data_speed, prescaler);
|
||||
seg1 = CAN_SEG1(tq, sp);
|
||||
seg2 = CAN_SEG2(tq, sp);
|
||||
sjw = seg2;
|
||||
sjw = MIN(15U, seg2);
|
||||
|
||||
CANx->DBTP = (((sjw & 0xFU)-1U)<<FDCAN_DBTP_DSJW_Pos) | (((seg1 & 0x1FU)-1U)<<FDCAN_DBTP_DTSEG1_Pos) | (((seg2 & 0xFU)-1U)<<FDCAN_DBTP_DTSEG2_Pos) | (((prescaler & 0x1FU)-1U)<<FDCAN_DBTP_DBRP_Pos);
|
||||
|
||||
if (non_iso) {
|
||||
// FD non-ISO mode
|
||||
CANx->CCCR |= FDCAN_CCCR_NISO;
|
||||
}
|
||||
|
||||
// Silent loopback is known as internal loopback in the docs
|
||||
if (loopback) {
|
||||
CANx->CCCR |= FDCAN_CCCR_TEST;
|
||||
@@ -200,6 +211,7 @@ bool llcan_init(FDCAN_GlobalTypeDef *CANx) {
|
||||
CANx->IE &= 0x0U; // Reset all interrupts
|
||||
// Messages for INT0
|
||||
CANx->IE |= FDCAN_IE_RF0NE; // Rx FIFO 0 new message
|
||||
CANx->IE |= FDCAN_IE_PEDE | FDCAN_IE_PEAE | FDCAN_IE_BOE | FDCAN_IE_EPE | FDCAN_IE_ELOE | FDCAN_IE_TEFLE | FDCAN_IE_RF0LE;
|
||||
|
||||
// Messages for INT1 (Only TFE works??)
|
||||
CANx->ILS |= FDCAN_ILS_TFEL;
|
||||
@@ -230,6 +242,7 @@ bool llcan_init(FDCAN_GlobalTypeDef *CANx) {
|
||||
}
|
||||
|
||||
void llcan_clear_send(FDCAN_GlobalTypeDef *CANx) {
|
||||
// From H7 datasheet: Transmit cancellation is not intended for Tx FIFO operation.
|
||||
UNUSED(CANx);
|
||||
CANx->TXBCR = 0xFFFFU; // Abort message transmission on error interrupt
|
||||
// Clear error interrupts
|
||||
CANx->IR |= (FDCAN_IR_PED | FDCAN_IR_PEA | FDCAN_IR_EW | FDCAN_IR_EP | FDCAN_IR_ELO | FDCAN_IR_BO | FDCAN_IR_TEFL | FDCAN_IR_RF0L);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
// master -> panda DMA start
|
||||
void llspi_mosi_dma(uint8_t *addr, int len) {
|
||||
// disable DMA + SPI
|
||||
register_clear_bits(&(SPI4->CFG1), SPI_CFG1_RXDMAEN);
|
||||
DMA2_Stream2->CR &= ~DMA_SxCR_EN;
|
||||
register_clear_bits(&(SPI4->CR1), SPI_CR1_SPE);
|
||||
|
||||
// drain the bus
|
||||
while ((SPI4->SR & SPI_SR_RXP) != 0U) {
|
||||
volatile uint8_t dat = SPI4->RXDR;
|
||||
(void)dat;
|
||||
}
|
||||
|
||||
// setup destination and length
|
||||
register_set(&(DMA2_Stream2->M0AR), (uint32_t)addr, 0xFFFFFFFFU);
|
||||
DMA2_Stream2->NDTR = len;
|
||||
|
||||
// enable DMA + SPI
|
||||
DMA2_Stream2->CR |= DMA_SxCR_EN;
|
||||
register_set_bits(&(SPI4->CFG1), SPI_CFG1_RXDMAEN);
|
||||
register_set_bits(&(SPI4->CR1), SPI_CR1_SPE);
|
||||
}
|
||||
|
||||
// panda -> master DMA start
|
||||
void llspi_miso_dma(uint8_t *addr, int len) {
|
||||
// disable DMA
|
||||
DMA2_Stream3->CR &= ~DMA_SxCR_EN;
|
||||
register_clear_bits(&(SPI4->CFG1), SPI_CFG1_TXDMAEN);
|
||||
|
||||
// setup source and length
|
||||
register_set(&(DMA2_Stream3->M0AR), (uint32_t)addr, 0xFFFFFFFFU);
|
||||
DMA2_Stream3->NDTR = len;
|
||||
|
||||
// clear under-run while we were reading
|
||||
SPI4->IFCR |= SPI_IFCR_UDRC;
|
||||
|
||||
// enable DMA
|
||||
register_set_bits(&(SPI4->CFG1), SPI_CFG1_TXDMAEN);
|
||||
DMA2_Stream3->CR |= DMA_SxCR_EN;
|
||||
}
|
||||
|
||||
// master -> panda DMA finished
|
||||
void DMA2_Stream2_IRQ_Handler(void) {
|
||||
// Clear interrupt flag
|
||||
ENTER_CRITICAL();
|
||||
DMA2->LIFCR = DMA_LIFCR_CTCIF2;
|
||||
|
||||
spi_handle_rx();
|
||||
|
||||
EXIT_CRITICAL();
|
||||
}
|
||||
|
||||
// panda -> master DMA finished
|
||||
void DMA2_Stream3_IRQ_Handler(void) {
|
||||
// Clear interrupt flag
|
||||
DMA2->LIFCR = DMA_LIFCR_CTCIF3;
|
||||
|
||||
// Wait until the transaction is actually finished and clear the DR
|
||||
// TODO: needs a timeout here, otherwise it gets stuck with no master clock!
|
||||
while (!(SPI4->SR & SPI_SR_TXC));
|
||||
volatile uint8_t dat = SPI4->TXDR;
|
||||
(void)dat;
|
||||
|
||||
spi_handle_tx();
|
||||
}
|
||||
|
||||
|
||||
void llspi_init(void) {
|
||||
// We expect less than 50 transactions (including control messages and CAN buffers) at the 100Hz boardd interval. Can be raised if needed.
|
||||
REGISTER_INTERRUPT(DMA2_Stream2_IRQn, DMA2_Stream2_IRQ_Handler, 5000U, FAULT_INTERRUPT_RATE_SPI_DMA)
|
||||
REGISTER_INTERRUPT(DMA2_Stream3_IRQn, DMA2_Stream3_IRQ_Handler, 5000U, FAULT_INTERRUPT_RATE_SPI_DMA)
|
||||
|
||||
// Setup MOSI DMA
|
||||
register_set(&(DMAMUX1_Channel10->CCR), 83U, 0xFFFFFFFFU);
|
||||
register_set(&(DMA2_Stream2->CR), (DMA_SxCR_MINC | DMA_SxCR_TCIE), 0x1E077EFEU);
|
||||
register_set(&(DMA2_Stream2->PAR), (uint32_t)&(SPI4->RXDR), 0xFFFFFFFFU);
|
||||
|
||||
// Setup MISO DMA, memory -> peripheral
|
||||
register_set(&(DMAMUX1_Channel11->CCR), 84U, 0xFFFFFFFFU);
|
||||
register_set(&(DMA2_Stream3->CR), (DMA_SxCR_MINC | DMA_SxCR_DIR_0 | DMA_SxCR_TCIE), 0x1E077EFEU);
|
||||
register_set(&(DMA2_Stream3->PAR), (uint32_t)&(SPI4->TXDR), 0xFFFFFFFFU);
|
||||
|
||||
// Enable SPI
|
||||
register_set(&(SPI4->CFG1), (7U << SPI_CFG1_DSIZE_Pos), SPI_CFG1_DSIZE_Msk);
|
||||
register_set(&(SPI4->UDRDR), 0xcd, 0xFFFFU); // set under-run value for debugging
|
||||
register_set(&(SPI4->CR1), SPI_CR1_SPE, 0xFFFFU);
|
||||
register_set(&(SPI4->CR2), 0, 0xFFFFU);
|
||||
|
||||
NVIC_EnableIRQ(DMA2_Stream2_IRQn);
|
||||
NVIC_EnableIRQ(DMA2_Stream3_IRQn);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user