mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-12 19:44:26 +08:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
39f2d349b5 | ||
|
|
c0a8416229 | ||
|
|
92883c53dc | ||
|
|
5b31463d9c | ||
|
|
7489d32183 | ||
|
|
30e0313357 | ||
|
|
1afd68d485 | ||
|
|
c2d44cb333 | ||
|
|
9f1a209f4f | ||
|
|
f7433d9426 | ||
|
|
444aace15f | ||
|
|
5face13bc5 | ||
|
|
b201dc1996 | ||
|
|
ce6564c684 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -42,6 +42,7 @@ selfdrive/logcatd/logcatd
|
||||
selfdrive/mapd/default_speeds_by_region.json
|
||||
selfdrive/proclogd/proclogd
|
||||
|
||||
|
||||
selfdrive/test/longitudinal_maneuvers/out
|
||||
selfdrive/visiond/visiond
|
||||
selfdrive/loggerd/loggerd
|
||||
|
||||
@@ -1,3 +1,50 @@
|
||||
dragonpilot 0.8.7-4
|
||||
========================
|
||||
* 2017 JADE w/ Added Comma Pedal Support. (Thanks to @lijunhao731)
|
||||
* Fixed toyota / honda brake light display. (Thanks to @loveloveses)
|
||||
* Fixed UI toggle. (Thanks to @鄧育林、@謝聖鴻)
|
||||
* Fixed VW resume/display issue. (Thanks to @SKY)
|
||||
* Fixed CJK font installation issue.
|
||||
|
||||
dragonpilot 0.8.7-3
|
||||
========================
|
||||
* Bug fixes.
|
||||
* Fixed gpxd.
|
||||
* Added some Chinese support.
|
||||
|
||||
dragonpilot 0.8.7-2
|
||||
========================
|
||||
* Fixed sound issue.
|
||||
* Changed gpx logs to OSM compatible format.
|
||||
* HONDA: Added BSM support for CRV-Hybrid.
|
||||
* HONDA: Added toggle to force displaying km/h in HUD.
|
||||
* TOYOTA: Add new Toggles under DP - Cars to enable/disable Following Modes / Accel Modes with physical button feature.
|
||||
|
||||
dragonpilot 0.8.7-1
|
||||
========================
|
||||
* Based on openpilot 0.8.7 devel.
|
||||
* Support 1+3t / C2 / Jetson Xavier NX.
|
||||
* Support White / Grey Panda.
|
||||
* TOYOTA: Can now change Following Modes with physical button from the steering wheel.
|
||||
* TOYOTA: Can now change Acceleration Modes with physical button if your car supports it.
|
||||
* TOYOTA: Added Low speed override toggles.
|
||||
* Dev UI now displays RPM reading.
|
||||
* Added Prebuilt toggle for faster boot.
|
||||
* Lexus RX high RPM fix. (Thanks to @crazysim).
|
||||
* Added toggle to launch Language settings.
|
||||
* Added toggle to launch Volume settings.
|
||||
* Added toggle to launch date/time settings.
|
||||
* Added toggle to flash panda.
|
||||
* Added toggle to recover panda firmware.
|
||||
* Added toggle to delete logging (/sdcard/realdata).
|
||||
* Added GPS Logger.
|
||||
|
||||
dragonpilot 0.8.6-1
|
||||
========================
|
||||
* Based on openpilot 0.8.6 devel.
|
||||
* Support 1+3t / C2 / Jetson Xavier NX.
|
||||
* Support White / Grey Panda.
|
||||
|
||||
dragonpilot 0.8.5-4
|
||||
========================
|
||||
* Added multiple toggles.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Our software is open source so you can solve your own problems without needing help from others. And if you solve a problem and are so kind, you can upstream it for the rest of the world to use.
|
||||
|
||||
Most open source development activity is coordinated through our [GitHub Discussions](https://github.com/commaai/openpilot/discussions) and [Discord](https://discord.comma.ai). A lot of documentation is available on our [medium](https://medium.com/@comma_ai/).
|
||||
Most open source development activity is coordinated through our [GitHub Discussions](https://github.com/commaai/openpilot/discussions) and [Discord](https://discord.comma.ai). A lot of documentation is available on our [blog](https://blog.comma.ai/).
|
||||
|
||||
## Getting Started
|
||||
|
||||
@@ -22,9 +22,9 @@ Code is automatically checked for style by GitHub Actions as part of the automat
|
||||
|
||||
## Car Ports (openpilot)
|
||||
|
||||
We've released a [Model Port guide](https://medium.com/@comma_ai/openpilot-port-guide-for-toyota-models-e5467f4b5fe6) for porting to Toyota/Lexus models.
|
||||
We've released a [Model Port guide](https://blog.comma.ai/openpilot-port-guide-for-toyota-models/) for porting to Toyota/Lexus models.
|
||||
|
||||
If you port openpilot to a substantially new car brand, see this more generic [Brand Port guide](https://medium.com/@comma_ai/how-to-write-a-car-port-for-openpilot-7ce0785eda84).
|
||||
If you port openpilot to a substantially new car brand, see this more generic [Brand Port guide](https://blog.comma.ai/how-to-write-a-car-port-for-openpilot/).
|
||||
|
||||
## Pull Requests
|
||||
|
||||
@@ -36,7 +36,7 @@ Or alternatively, when on the master branch:
|
||||
```
|
||||
git submodule update --init
|
||||
```
|
||||
The reasons for having submodules on a dedicated repository and our new development philosophy can be found in our [post about externalization](https://medium.com/@comma_ai/a-2020-theme-externalization-13b33326d8b3).
|
||||
The reasons for having submodules on a dedicated repository and our new development philosophy can be found in our [post about externalization](https://blog.comma.ai/a-2020-theme-externalization/).
|
||||
Modules that are in seperate repositories include:
|
||||
* cereal
|
||||
* laika
|
||||
|
||||
@@ -1,28 +1,35 @@
|
||||
# CONTRIBUTORS
|
||||
|
||||
Due to the way we manage the source code, it is not possible to see all the contributors info, hence we create a list here.
|
||||
|
||||
Due to the way we manage the source code, it is not possible to see all the contributors' info, hence we create a list here.
|
||||
If you have contributed to DP project before and your name is not listed here, feel free to send us a PR to update this!
|
||||
|
||||
name | github | contribution
|
||||
------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------
|
||||
andy741217 | [andy741217](https://github.com/andy741217) | New features, bug fixes
|
||||
Arne Schwarck | [arne182](https://github.com/arne182) | New features, bug fixes
|
||||
berno22 | [berno22](https://github.com/berno22) | New car fingerprint
|
||||
Bobbydough | [Bobbydough](https://github.com/bobbydough) | Bug fixes
|
||||
Curtis Jenkins | [actuallylemoncurd](https://github.com/actuallylemoncurd) | New Features
|
||||
DFyffe | [donfyffe](https://github.com/donfyffe) | New features, bug fixes
|
||||
dinglx | [dingliangxue](https://github.com/dingliangxue) | New features, bug fixes
|
||||
eyezenheim | [eyezenheim](https://github.com/eyezenheim) | Tester
|
||||
kegman | [kegman](https://github.com/kegman) | New features, bug fixes
|
||||
kumar | [rav4kumar](https://github.com/rav4kumar) | New features, bug fixes
|
||||
lijunhao731 | [lijunhao731](https://github.com/lijunhao731) | New car fingerprint
|
||||
lirudy | [lirudy](https://github.com/lirudy) | Bug fixes
|
||||
LOVEChen | [LOVEChen](https://github.com/LOVEChen) | Bug fixes
|
||||
loveloveses | [loveloveses](https://github.com/loveloveses) | Bug fixes, DP wiki main maintainer
|
||||
menwenliang | [menwenliang](https://github.com/menwenliang) | New features
|
||||
Rick Lan | [efinilan](https://github.com/efinilan) | Project lead
|
||||
rming | [Rming](https://github.com/rming) | Bug fixes, wiki contributor
|
||||
sebastian4k | [sebastian4k](https://github.com/sebastian4k) | Bug fixes
|
||||
Shane Smiskol | [sshane](https://github.com/sshane) | New features, bug fixes
|
||||
toyboxZ | [toyboxZ](https://github.com/toyboxZ) | New features, bug fixes
|
||||
### TEAM
|
||||
Name | github | Role
|
||||
------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------
|
||||
cafe | [cafe](https://github.com/coffice12) | Resource Provider
|
||||
kumar | [rav4kumar](https://github.com/rav4kumar) | Release Maintainer
|
||||
loveloveses | [loveloveses](https://github.com/loveloveses) | Wiki Maintainer
|
||||
Rick Lan | [efinilan](https://github.com/efinilan) | Release Maintainer
|
||||
|
||||
### CONTRIBUTORS
|
||||
Name | github
|
||||
------------------------------------------------------------ | ------------------------------------------------------------
|
||||
andy741217 | [andy741217](https://github.com/andy741217)
|
||||
Arne Schwarck | [arne182](https://github.com/arne182)
|
||||
berno22 | [berno22](https://github.com/berno22)
|
||||
Bobbydough | [Bobbydough](https://github.com/bobbydough)
|
||||
cgw1968 | [cgw1968](https://github.com/cgw1968-5779)
|
||||
Curtis Jenkins | [actuallylemoncurd](https://github.com/actuallylemoncurd)
|
||||
DFyffe | [donfyffe](https://github.com/donfyffe)
|
||||
dinglx | [dingliangxue](https://github.com/dingliangxue)
|
||||
eyezenheim | [eyezenheim](https://github.com/eyezenheim)
|
||||
kegman | [kegman](https://github.com/kegman)
|
||||
lijunhao731 | [lijunhao731](https://github.com/lijunhao731)
|
||||
lirudy | [lirudy](https://github.com/lirudy)
|
||||
LOVEChen | [LOVEChen](https://github.com/LOVEChen)
|
||||
menwenliang | [menwenliang](https://github.com/menwenliang)
|
||||
Nelson Chen | [nelsonjchen](https://github.com/nelsonjchen)
|
||||
rming | [Rming](https://github.com/rming)
|
||||
sebastian4k | [sebastian4k](https://github.com/sebastian4k)
|
||||
Shane Smiskol | [sshane](https://github.com/sshane)
|
||||
toyboxZ | [toyboxZ](https://github.com/toyboxZ)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
How to install on Oneplus 3t?
|
||||
------
|
||||
1. clone dragonpilot to /data/ and make sure it's named openpilot:
|
||||
(手動安裝切換至 dragonpilot 0.8.5 branch)
|
||||
(手動安裝切換至 dp)
|
||||
```
|
||||
cd /data/ && rm -fr openpilot; git clone https://github.com/dragonpilot-community/dragonpilot.git openpilot -b 0.8.5
|
||||
cd /data/ && rm -fr openpilot ; git clone https://github.com/dragonpilot-community/dragonpilot.git openpilot -b 0.8.7
|
||||
```
|
||||
|
||||
2. run command:
|
||||
|
||||
10
JETSON.md
Normal file
10
JETSON.md
Normal file
@@ -0,0 +1,10 @@
|
||||
set_core_affinity
|
||||
------
|
||||
Jetson Xavier NX has 6 cores running at 1.9 GHz, here is what I've defined
|
||||
|
||||
0 = (not specified)
|
||||
1 = plannerd / radard
|
||||
2 = boardd
|
||||
3 = controlsd
|
||||
4 = camerad
|
||||
5 = modeld
|
||||
46
Jenkinsfile
vendored
46
Jenkinsfile
vendored
@@ -7,6 +7,7 @@ set -e
|
||||
|
||||
export CI=1
|
||||
export TEST_DIR=${env.TEST_DIR}
|
||||
export SOURCE_DIR=${env.SOURCE_DIR}
|
||||
export GIT_BRANCH=${env.GIT_BRANCH}
|
||||
export GIT_COMMIT=${env.GIT_COMMIT}
|
||||
|
||||
@@ -50,6 +51,7 @@ pipeline {
|
||||
environment {
|
||||
COMMA_JWT = credentials('athena-test-jwt')
|
||||
TEST_DIR = "/data/openpilot"
|
||||
SOURCE_DIR = "/data/openpilot_source/"
|
||||
}
|
||||
options {
|
||||
timeout(time: 3, unit: 'HOURS')
|
||||
@@ -69,7 +71,24 @@ pipeline {
|
||||
}
|
||||
steps {
|
||||
phone_steps("eon-build", [
|
||||
["build release2-staging and dashcam-staging", "cd release && PUSH=1 ./build_release2.sh"],
|
||||
["build release2-staging & dashcam-staging", "cd release && PUSH=1 ./build_release2.sh"],
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build release3') {
|
||||
agent {
|
||||
docker {
|
||||
image 'python:3.7.3'
|
||||
args '--user=root'
|
||||
}
|
||||
}
|
||||
when {
|
||||
branch 'devel-staging'
|
||||
}
|
||||
steps {
|
||||
phone_steps("tici", [
|
||||
["build release3-staging & dashcam3-staging", "PUSH=1 $SOURCE_DIR/release/build_release3.sh"],
|
||||
])
|
||||
}
|
||||
}
|
||||
@@ -78,7 +97,10 @@ pipeline {
|
||||
when {
|
||||
not {
|
||||
anyOf {
|
||||
branch 'master-ci'; branch 'devel'; branch 'devel-staging'; branch 'release2'; branch 'release2-staging'; branch 'dashcam'; branch 'dashcam-staging'; branch 'testing-closet*'; branch 'hotfix-*'
|
||||
branch 'master-ci'; branch 'devel'; branch 'devel-staging';
|
||||
branch 'release2'; branch 'release2-staging'; branch 'dashcam'; branch 'dashcam-staging';
|
||||
branch 'release3'; branch 'release3-staging'; branch 'dashcam3'; branch 'dashcam3-staging';
|
||||
branch 'testing-closet*'; branch 'hotfix-*'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -127,7 +149,8 @@ pipeline {
|
||||
stage('Devel Tests') {
|
||||
steps {
|
||||
phone_steps("eon-build", [
|
||||
["build devel", "cd release && DEVEL_TEST=1 ./build_devel.sh"],
|
||||
["build devel", "cd $SOURCE_DIR/release && EXTRA_FILES='tools/' ./build_devel.sh"],
|
||||
["build openpilot", "cd selfdrive/manager && ./build.py"],
|
||||
["test manager", "python selfdrive/manager/test/test_manager.py"],
|
||||
["onroad tests", "cd selfdrive/test/ && ./test_onroad.py"],
|
||||
["test car interfaces", "cd selfdrive/car/tests/ && ./test_car_interfaces.py"],
|
||||
@@ -149,7 +172,7 @@ pipeline {
|
||||
phone_steps("eon", [
|
||||
["build", "cd selfdrive/manager && ./build.py"],
|
||||
["test athena", "nosetests -s selfdrive/athena/tests/test_athenad_old.py"],
|
||||
["test sounds", "nosetests -s selfdrive/test/test_sounds.py"],
|
||||
["test sounds", "nosetests -s selfdrive/ui/tests/test_sounds.py"],
|
||||
["test boardd loopback", "nosetests -s selfdrive/boardd/tests/test_boardd_loopback.py"],
|
||||
["test loggerd", "python selfdrive/loggerd/tests/test_loggerd.py"],
|
||||
["test encoder", "python selfdrive/loggerd/tests/test_encoder.py"],
|
||||
@@ -180,17 +203,24 @@ pipeline {
|
||||
}
|
||||
*/
|
||||
|
||||
stage('Tici Build') {
|
||||
stage('tici Build') {
|
||||
environment {
|
||||
R3_PUSH = "${env.BRANCH_NAME == 'master' ? '1' : ' '}"
|
||||
}
|
||||
steps {
|
||||
phone_steps("tici", [
|
||||
["build", "cd selfdrive/manager && ./build.py"],
|
||||
["onroad tests", "cd selfdrive/test/ && ./test_onroad.py"],
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
stage('Unit Tests (tici)') {
|
||||
steps {
|
||||
phone_steps("tici2", [
|
||||
["build", "cd selfdrive/manager && ./build.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"],
|
||||
["onroad tests", "cd selfdrive/test/ && ./test_onroad.py"],
|
||||
//["build release3-staging", "cd release && PUSH=${env.R3_PUSH} ./build_release3.sh"],
|
||||
])
|
||||
}
|
||||
}
|
||||
@@ -224,7 +254,7 @@ pipeline {
|
||||
}
|
||||
steps {
|
||||
phone_steps("eon-build", [
|
||||
["push devel", "cd release && CI_PUSH='master-ci' ./build_devel.sh"],
|
||||
["push devel", "cd $SOURCE_DIR/release && PUSH='master-ci' ./build_devel.sh"],
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
61
README.md
61
README.md
@@ -1,4 +1,4 @@
|
||||
[](#)
|
||||

|
||||
|
||||
Table of Contents
|
||||
=======================
|
||||
@@ -57,7 +57,7 @@ openpilot should preserve all other vehicle's stock features, including, but are
|
||||
Supported Hardware
|
||||
------
|
||||
|
||||
At the moment, openpilot supports the [EON DevKit](https://comma.ai/shop/products/eon-dashcam-devkit) and the [comma two](https://comma.ai/shop/products/comma-two-devkit). A [car harness](https://comma.ai/shop/products/car-harness) is recommended to connect the EON or comma two to the car. For experimental purposes, openpilot can also run on an Ubuntu computer with external [webcams](https://github.com/commaai/openpilot/tree/master/tools/webcam).
|
||||
At the moment, openpilot supports the EON Gold DevKit, [comma two](https://comma.ai/shop/products/two), and [comma three](https://comma.ai/shop/products/three). A [car harness](https://comma.ai/shop/products/car-harness) is recommended to connect your device to the car. For experimental purposes, openpilot can also run on an Ubuntu computer with external [webcams](https://github.com/commaai/openpilot/tree/master/tools/webcam).
|
||||
|
||||
Supported Cars
|
||||
------
|
||||
@@ -70,10 +70,12 @@ Supported Cars
|
||||
| Honda | Accord 2018-20 | All | Stock | 0mph | 3mph |
|
||||
| Honda | Accord Hybrid 2018-20 | All | Stock | 0mph | 3mph |
|
||||
| Honda | Civic Hatchback 2017-21 | Honda Sensing | Stock | 0mph | 12mph |
|
||||
| Honda | Civic Sedan/Coupe 2016-18 | Honda Sensing | openpilot | 0mph | 12mph |
|
||||
| Honda | Civic Sedan/Coupe 2019-20 | All | Stock | 0mph | 2mph<sup>2</sup> |
|
||||
| Honda | Civic Coupe 2016-18 | Honda Sensing | openpilot | 0mph | 12mph |
|
||||
| Honda | Civic Coupe 2019-20 | All | Stock | 0mph | 2mph<sup>2</sup> |
|
||||
| Honda | Civic Sedan 2016-18 | Honda Sensing | openpilot | 0mph | 12mph |
|
||||
| Honda | Civic Sedan 2019-20 | All | Stock | 0mph | 2mph<sup>2</sup> |
|
||||
| Honda | CR-V 2015-16 | Touring | openpilot | 25mph<sup>1</sup> | 12mph |
|
||||
| Honda | CR-V 2017-20 | Honda Sensing | Stock | 0mph | 12mph |
|
||||
| Honda | CR-V 2017-21 | Honda Sensing | Stock | 0mph | 12mph |
|
||||
| Honda | CR-V Hybrid 2017-2019 | Honda Sensing | Stock | 0mph | 12mph |
|
||||
| Honda | Fit 2018-19 | Honda Sensing | openpilot | 25mph<sup>1</sup> | 12mph |
|
||||
| Honda | HR-V 2019-20 | Honda Sensing | openpilot | 25mph<sup>1</sup> | 12mph |
|
||||
@@ -92,16 +94,17 @@ Supported Cars
|
||||
| Lexus | IS 2017-2019 | All | Stock | 22mph | 0mph |
|
||||
| Lexus | NX 2018 | All | Stock<sup>3</sup>| 0mph | 0mph |
|
||||
| Lexus | NX 2020 | All | openpilot | 0mph | 0mph |
|
||||
| Lexus | NX Hybrid 2018 | All | Stock<sup>3</sup>| 0mph | 0mph |
|
||||
| Lexus | NX Hybrid 2018-19 | All | Stock<sup>3</sup>| 0mph | 0mph |
|
||||
| Lexus | RX 2016-18 | All | Stock<sup>3</sup>| 0mph | 0mph |
|
||||
| Lexus | RX 2020-21 | All | openpilot | 0mph | 0mph |
|
||||
| Lexus | RX Hybrid 2016-19 | All | Stock<sup>3</sup>| 0mph | 0mph |
|
||||
| Lexus | RX Hybrid 2020 | All | openpilot | 0mph | 0mph |
|
||||
| Lexus | UX Hybrid 2019 | All | openpilot | 0mph | 0mph |
|
||||
| Lexus | RX Hybrid 2020-21 | All | openpilot | 0mph | 0mph |
|
||||
| Lexus | UX Hybrid 2019-21 | All | openpilot | 0mph | 0mph |
|
||||
| Toyota | Alphard 2020 | All | openpilot | 0mph | 0mph |
|
||||
| Toyota | Avalon 2016-21 | TSS-P | Stock<sup>3</sup>| 20mph<sup>1</sup> | 0mph |
|
||||
| Toyota | Avalon Hybrid 2019 | TSS-P | Stock<sup>3</sup>| 20mph<sup>1</sup> | 0mph |
|
||||
| Toyota | Avalon Hybrid 2019-21 | TSS-P | Stock<sup>3</sup>| 20mph<sup>1</sup> | 0mph |
|
||||
| Toyota | Camry 2018-20 | All | Stock | 0mph<sup>4</sup> | 0mph |
|
||||
| Toyota | Camry 2021 | All | openpilot | 0mph | 0mph |
|
||||
| Toyota | Camry 2021 | All | openpilot | 0mph<sup>4</sup> | 0mph |
|
||||
| Toyota | Camry Hybrid 2018-20 | All | Stock | 0mph<sup>4</sup> | 0mph |
|
||||
| Toyota | Camry Hybrid 2021 | All | openpilot | 0mph | 0mph |
|
||||
| Toyota | C-HR 2017-20 | All | Stock | 0mph | 0mph |
|
||||
@@ -151,19 +154,23 @@ Community Maintained Cars and Features
|
||||
| Genesis | G90 2018 | All | Stock | 0mph | 0mph |
|
||||
| GMC | Acadia 2018<sup>1</sup> | Adaptive Cruise | openpilot | 0mph | 7mph |
|
||||
| Holden | Astra 2017<sup>1</sup> | Adaptive Cruise | openpilot | 0mph | 7mph |
|
||||
| Hyundai | Elantra 2017-19, 2021 | SCC + LKAS | Stock | 19mph | 34mph |
|
||||
| Hyundai | Elantra 2017-19 | SCC + LKAS | Stock | 19mph | 34mph |
|
||||
| Hyundai | Elantra 2021 | SCC + LKAS | Stock | 0mph | 0mph |
|
||||
| Hyundai | Elantra Hybrid 2021 | SCC + LKAS | Stock | 0mph | 0mph |
|
||||
| Hyundai | Genesis 2015-16 | SCC + LKAS | Stock | 19mph | 37mph |
|
||||
| Hyundai | Ioniq Electric 2019 | SCC + LKAS | Stock | 0mph | 32mph |
|
||||
| Hyundai | Ioniq Electric 2020 | SCC + LKAS | Stock | 0mph | 0mph |
|
||||
| Hyundai | Ioniq PHEV 2020 | SCC + LKAS | Stock | 0mph | 0mph |
|
||||
| Hyundai | Kona 2020 | SCC + LKAS | Stock | 0mph | 0mph |
|
||||
| Hyundai | Kona EV 2019 | SCC + LKAS | Stock | 0mph | 0mph |
|
||||
| Hyundai | Santa Fe 2019-20 | All | Stock | 0mph | 0mph |
|
||||
| Hyundai | Sonata 2018-2019 | SCC + LKAS | Stock | 0mph | 0mph |
|
||||
| Hyundai | Veloster 2019 | SCC + LKAS | Stock | 5mph | 0mph |
|
||||
| Hyundai | Veloster 2019-20 | SCC + LKAS | Stock | 5mph | 0mph |
|
||||
| Jeep | Grand Cherokee 2016-18 | Adaptive Cruise | Stock | 0mph | 9mph |
|
||||
| Jeep | Grand Cherokee 2019-20 | Adaptive Cruise | Stock | 0mph | 39mph |
|
||||
| Kia | Forte 2018-2021 | SCC + LKAS | Stock | 0mph | 0mph |
|
||||
| Kia | Niro EV 2020 | SCC + LKAS | Stock | 0mph | 0mph |
|
||||
| Kia | Niro PHEV 2019 | SCC + LKAS | Stock | 10mph | 32mph |
|
||||
| Kia | Optima 2017 | SCC + LKAS | Stock | 0mph | 32mph |
|
||||
| Kia | Optima 2019 | SCC + LKAS | Stock | 0mph | 0mph |
|
||||
| Kia | Seltos 2021 | SCC + LKAS | Stock | 0mph | 0mph |
|
||||
@@ -178,6 +185,7 @@ Community Maintained Cars and Features
|
||||
| SEAT | Leon 2014-2020 | Driver Assistance | Stock | 0mph | 0mph |
|
||||
| Škoda | Kodiaq 2018 | Driver Assistance | Stock | 0mph | 0mph |
|
||||
| Škoda | Octavia 2015, 2019 | Driver Assistance | Stock | 0mph | 0mph |
|
||||
| Škoda | Octavia RS 2016 | Driver Assistance | Stock | 0mph | 0mph |
|
||||
| Škoda | Scala 2020 | Driver Assistance | Stock | 0mph | 0mph |
|
||||
| Škoda | Superb 2015-18 | Driver Assistance | Stock | 0mph | 0mph |
|
||||
| Subaru | Ascent 2019 | EyeSight | Stock | 0mph | 0mph |
|
||||
@@ -192,10 +200,13 @@ Community Maintained Cars and Features
|
||||
| Volkswagen| Golf GTI 2018-19 | Driver Assistance | Stock | 0mph | 0mph |
|
||||
| Volkswagen| Golf R 2016-19 | Driver Assistance | Stock | 0mph | 0mph |
|
||||
| Volkswagen| Golf SportsVan 2016 | Driver Assistance | Stock | 0mph | 0mph |
|
||||
| Volkswagen| Golf SportWagen 2015 | Driver Assistance | Stock | 0mph | 0mph |
|
||||
| Volkswagen| Jetta 2018-20 | Driver Assistance | Stock | 0mph | 0mph |
|
||||
| Volkswagen| Jetta GLI 2021 | Driver Assistance | Stock | 0mph | 0mph |
|
||||
| Volkswagen| Passat 2016-17<sup>2</sup> | Driver Assistance | Stock | 0mph | 0mph |
|
||||
| Volkswagen| T-Cross 2021 | Driver Assistance | Stock | 0mph | 0mph |
|
||||
| Volkswagen| Tiguan 2020 | Driver Assistance | Stock | 0mph | 0mph |
|
||||
| Volkswagen| Touran 2017 | Driver Assistance | Stock | 0mph | 0mph |
|
||||
|
||||
<sup>1</sup>Requires an [OBD-II car harness](https://comma.ai/shop/products/comma-car-harness) and [community built ASCM harness](https://github.com/commaai/openpilot/wiki/GM#hardware). ***NOTE: disconnecting the ASCM disables Automatic Emergency Braking (AEB).*** <br />
|
||||
<sup>2</sup>Only includes the MQB Passat sold outside of North America. The NMS Passat made in Chattanooga TN is not yet supported.
|
||||
@@ -209,7 +220,7 @@ Although they're not upstream, the community has openpilot running on other make
|
||||
Installation Instructions
|
||||
------
|
||||
|
||||
Install openpilot on an EON or comma two by entering ``https://openpilot.comma.ai`` during the installer setup.
|
||||
Install openpilot on a supported device by entering ``https://openpilot.comma.ai`` during the installer setup.
|
||||
|
||||
Follow these [video instructions](https://youtu.be/lcjqxCymins) to properly mount the device on the windshield. Note: openpilot features an automatic pose calibration routine and openpilot performance should not be affected by small pitch and yaw misalignments caused by imprecise device mounting.
|
||||
|
||||
@@ -288,18 +299,18 @@ openpilot is open source software: the user is free to disable data collection i
|
||||
openpilot logs the road facing camera, CAN, GPS, IMU, magnetometer, thermal sensors, crashes, and operating system logs.
|
||||
The driver facing camera is only logged if you explicitly opt-in in settings. The microphone is not recorded.
|
||||
|
||||
By using openpilot, you agree to [our Privacy Policy](https://my.comma.ai/privacy). You understand that use of this software or its related services will generate certain types of user data, which may be logged and stored at the sole discretion of comma. By accepting this agreement, you grant an irrevocable, perpetual, worldwide right to comma for the use of this data.
|
||||
By using openpilot, you agree to [our Privacy Policy](https://connect.comma.ai/privacy). You understand that use of this software or its related services will generate certain types of user data, which may be logged and stored at the sole discretion of comma. By accepting this agreement, you grant an irrevocable, perpetual, worldwide right to comma for the use of this data.
|
||||
|
||||
Safety and Testing
|
||||
----
|
||||
|
||||
* openpilot observes ISO26262 guidelines, see [SAFETY.md](SAFETY.md) for more details.
|
||||
* openpilot has software in the loop [tests](.github/workflows/test.yaml) that run on every commit.
|
||||
* openpilot has software in the loop [tests](.github/workflows/selfdrive_tests.yaml) that run on every commit.
|
||||
* The safety model code lives in panda and is written in C, see [code rigor](https://github.com/commaai/panda#code-rigor) for more details.
|
||||
* panda has software in the loop [safety tests](https://github.com/commaai/panda/tree/master/tests/safety).
|
||||
* Internally, we have a hardware in the loop Jenkins test suite that builds and unit tests the various processes.
|
||||
* panda has additional hardware in the loop [tests](https://github.com/commaai/panda/blob/master/Jenkinsfile).
|
||||
* We run the latest openpilot in a testing closet containing 10 EONs continuously replaying routes.
|
||||
* We run the latest openpilot in a testing closet containing 10 comma devices continuously replaying routes.
|
||||
|
||||
Testing on PC
|
||||
------
|
||||
@@ -326,7 +337,7 @@ Community and Contributing
|
||||
|
||||
openpilot is developed by [comma](https://comma.ai/) and by users like you. We welcome both pull requests and issues on [GitHub](http://github.com/commaai/openpilot). Bug fixes and new car ports are encouraged.
|
||||
|
||||
You can add support for your car by following guides we have written for [Brand](https://medium.com/@comma_ai/how-to-write-a-car-port-for-openpilot-7ce0785eda84) and [Model](https://medium.com/@comma_ai/openpilot-port-guide-for-toyota-models-e5467f4b5fe6) ports. Generally, a car with adaptive cruise control and lane keep assist is a good candidate. [Join our Discord](https://discord.comma.ai) to discuss car ports: most car makes have a dedicated channel.
|
||||
You can add support for your car by following guides we have written for [Brand](https://blog.comma.ai/how-to-write-a-car-port-for-openpilot/) and [Model](https://blog.comma.ai/openpilot-port-guide-for-toyota-models/) ports. Generally, a car with adaptive cruise control and lane keep assist is a good candidate. [Join our Discord](https://discord.comma.ai) to discuss car ports: most car makes have a dedicated channel.
|
||||
|
||||
Want to get paid to work on openpilot? [comma is hiring](https://comma.ai/jobs/).
|
||||
|
||||
@@ -337,27 +348,27 @@ Directory Structure
|
||||
.
|
||||
├── cereal # The messaging spec and libs used for all logs
|
||||
├── common # Library like functionality we've developed here
|
||||
├── installer/updater # Manages auto-updates of NEOS
|
||||
├── installer/updater # Manages updates of NEOS
|
||||
├── opendbc # Files showing how to interpret data from cars
|
||||
├── panda # Code used to communicate on CAN
|
||||
├── phonelibs # Libraries used on NEOS devices
|
||||
├── pyextra # Libraries used on NEOS devices
|
||||
├── phonelibs # External libraries
|
||||
├── pyextra # Extra python packages not shipped in NEOS
|
||||
└── selfdrive # Code needed to drive the car
|
||||
├── assets # Fonts, images and sounds for UI
|
||||
├── assets # Fonts, images, and sounds for UI
|
||||
├── athena # Allows communication with the app
|
||||
├── boardd # Daemon to talk to the board
|
||||
├── camerad # Driver to capture images from the camera sensors
|
||||
├── car # Car specific code to read states and control actuators
|
||||
├── common # Shared C/C++ code for the daemons
|
||||
├── controls # Perception, planning and controls
|
||||
├── controls # Planning and controls
|
||||
├── debug # Tools to help you debug and do car ports
|
||||
├── locationd # Soon to be home of precise location
|
||||
├── locationd # Precise localization and vehicle parameter estimation
|
||||
├── logcatd # Android logcat as a service
|
||||
├── loggerd # Logger and uploader of car data
|
||||
├── modeld # Driving and monitoring model runners
|
||||
├── proclogd # Logs information from proc
|
||||
├── sensord # IMU / GPS interface code
|
||||
├── test # Unit tests, system tests and a car simulator
|
||||
├── sensord # IMU interface code
|
||||
├── test # Unit tests, system tests, and a car simulator
|
||||
└── ui # The UI
|
||||
|
||||
Licensing
|
||||
|
||||
22
RELEASES.md
22
RELEASES.md
@@ -1,3 +1,25 @@
|
||||
Version 0.8.7 (2021-07-31)
|
||||
========================
|
||||
* comma three support!
|
||||
* Navigation alpha for the comma three!
|
||||
* Volkswagen T-Cross 2021 support thanks to jyoung8607!
|
||||
|
||||
Version 0.8.6 (2021-07-21)
|
||||
========================
|
||||
* Revamp lateral and longitudinal planners
|
||||
* Refactor planner output API to be more readable and verbose
|
||||
* Planners now output desired trajectories for speed, acceleration, curvature, and curvature rate
|
||||
* Use MPC for longitudinal planning when no lead car is present, makes accel and decel smoother
|
||||
* Remove "CHECK DRIVER FACE VISIBILITY" warning
|
||||
* Fixed cruise fault on some TSS2.5 Camrys and international Toyotas
|
||||
* Hyundai Elantra Hybrid 2021 support thanks to tecandrew!
|
||||
* Hyundai Ioniq PHEV 2020 support thanks to YawWashout!
|
||||
* Kia Niro Hybrid 2019 support thanks to jyoung8607!
|
||||
* Škoda Octavia RS 2016 support thanks to jyoung8607!
|
||||
* Toyota Alphard 2020 support thanks to belm0!
|
||||
* Volkswagen Golf SportWagen 2015 support thanks to jona96!
|
||||
* Volkswagen Touran 2017 support thanks to jyoung8607!
|
||||
|
||||
Version 0.8.5 (2021-06-11)
|
||||
========================
|
||||
* NEOS update: improved reliability and stability with better voltage regulator configuration
|
||||
|
||||
@@ -28,7 +28,7 @@ ensuring two main safety requirements.
|
||||
react. This means that while the system is engaged, the actuators are constrained
|
||||
to operate within reasonable limits.
|
||||
|
||||
For vehicle specific implementation of the safety concept, refer to `panda/board/safety/`.
|
||||
For additional safety implementation details, refer to [panda safety model](https://github.com/commaai/panda#safety-model). For vehicle specific implementation of the safety concept, refer to [panda/board/safety/](https://github.com/commaai/panda/tree/master/board/safety).
|
||||
|
||||
**Extra note**: comma.ai strongly discourages the use of openpilot forks with safety code either missing or
|
||||
not fully meeting the above requirements.
|
||||
|
||||
22
SConstruct
22
SConstruct
@@ -15,6 +15,10 @@ AddOption('--test',
|
||||
action='store_true',
|
||||
help='build test files')
|
||||
|
||||
AddOption('--setup',
|
||||
action='store_true',
|
||||
help='build setup and installer files')
|
||||
|
||||
AddOption('--kaitai',
|
||||
action='store_true',
|
||||
help='Regenerate kaitai struct parsers')
|
||||
@@ -49,6 +53,11 @@ AddOption('--external-sconscript',
|
||||
dest='external_sconscript',
|
||||
help='add an external SConscript to the build')
|
||||
|
||||
AddOption('--no-thneed',
|
||||
action='store_true',
|
||||
dest='no_thneed',
|
||||
help='avoid using thneed')
|
||||
|
||||
real_arch = arch = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip()
|
||||
if platform.system() == "Darwin":
|
||||
arch = "Darwin"
|
||||
@@ -104,8 +113,8 @@ if arch == "aarch64" or arch == "larch64":
|
||||
"#phonelibs/libyuv/lib",
|
||||
"/system/vendor/lib64"
|
||||
]
|
||||
cflags = ["-DQCOM", "-mcpu=cortex-a57"]
|
||||
cxxflags = ["-DQCOM", "-mcpu=cortex-a57"]
|
||||
cflags = ["-DQCOM", "-D_USING_LIBCXX", "-mcpu=cortex-a57"]
|
||||
cxxflags = ["-DQCOM", "-D_USING_LIBCXX", "-mcpu=cortex-a57"]
|
||||
rpath = []
|
||||
else:
|
||||
cflags = []
|
||||
@@ -213,8 +222,6 @@ env = Environment(
|
||||
"#phonelibs/qrcode",
|
||||
"#phonelibs",
|
||||
"#cereal",
|
||||
"#cereal/messaging",
|
||||
"#cereal/visionipc",
|
||||
"#opendbc/can",
|
||||
],
|
||||
|
||||
@@ -335,7 +342,8 @@ qt_flags = [
|
||||
"-DQT_QUICK_LIB",
|
||||
"-DQT_QUICKWIDGETS_LIB",
|
||||
"-DQT_QML_LIB",
|
||||
"-DQT_CORE_LIB"
|
||||
"-DQT_CORE_LIB",
|
||||
"-DQT_MESSAGELOGCONTEXT",
|
||||
]
|
||||
qt_env['CXXFLAGS'] += qt_flags
|
||||
qt_env['LIBPATH'] += ['#selfdrive/ui']
|
||||
@@ -418,8 +426,8 @@ SConscript(['selfdrive/modeld/SConscript'])
|
||||
|
||||
SConscript(['selfdrive/controls/lib/cluster/SConscript'])
|
||||
SConscript(['selfdrive/controls/lib/lateral_mpc/SConscript'])
|
||||
SConscript(['selfdrive/controls/lib/longitudinal_mpc/SConscript'])
|
||||
SConscript(['selfdrive/controls/lib/longitudinal_mpc_model/SConscript'])
|
||||
SConscript(['selfdrive/controls/lib/lead_mpc_lib/SConscript'])
|
||||
SConscript(['selfdrive/controls/lib/longitudinal_mpc_lib/SConscript'])
|
||||
|
||||
SConscript(['selfdrive/boardd/SConscript'])
|
||||
SConscript(['selfdrive/proclogd/SConscript'])
|
||||
|
||||
@@ -53,7 +53,7 @@ struct CarEvent @0x9b1657f34caf3ad3 {
|
||||
lowSpeedLockout @31;
|
||||
plannerError @32;
|
||||
joystickDebug @34;
|
||||
steerTempUnavailableUserOverride @35;
|
||||
steerTempUnavailableSilent @35;
|
||||
resumeRequired @36;
|
||||
preDriverDistracted @37;
|
||||
promptDriverDistracted @38;
|
||||
@@ -78,7 +78,6 @@ struct CarEvent @0x9b1657f34caf3ad3 {
|
||||
stockAeb @64;
|
||||
ldw @65;
|
||||
carUnrecognized @66;
|
||||
driverMonitorLowAcc @68;
|
||||
invalidLkasSetting @69;
|
||||
speedTooHigh @70;
|
||||
laneChangeBlocked @71;
|
||||
@@ -110,6 +109,7 @@ struct CarEvent @0x9b1657f34caf3ad3 {
|
||||
wideRoadCameraError @102;
|
||||
localizerMalfunction @103;
|
||||
|
||||
driverMonitorLowAccDEPRECATED @68;
|
||||
radarCanErrorDEPRECATED @15;
|
||||
radarCommIssueDEPRECATED @67;
|
||||
gasUnavailableDEPRECATED @3;
|
||||
@@ -141,6 +141,7 @@ struct CarEvent @0x9b1657f34caf3ad3 {
|
||||
timebombWarn @110;
|
||||
timebombBypassing @111;
|
||||
timebombBypassed @112;
|
||||
mapdAlert @113;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,6 +210,7 @@ struct CarState {
|
||||
# dp
|
||||
lkMode @37 :Bool;
|
||||
stopSteering @38 :Bool; # timebomb - stopSteering
|
||||
engineRPM @39 :Float32;
|
||||
|
||||
struct WheelSpeeds {
|
||||
# optional wheel speeds
|
||||
@@ -378,12 +380,11 @@ struct CarParams {
|
||||
fuzzyFingerprint @55 :Bool;
|
||||
|
||||
enableGasInterceptor @2 :Bool;
|
||||
enableCruise @3 :Bool;
|
||||
enableCamera @4 :Bool;
|
||||
enableDsu @5 :Bool; # driving support unit
|
||||
enableApgs @6 :Bool; # advanced parking guidance system
|
||||
enableBsm @56 :Bool; # blind spot monitoring
|
||||
hasStockCamera @57 :Bool; # factory LKAS/LDW camera is present
|
||||
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
|
||||
hasStockCamera @57 :Bool; # factory LKAS/LDW camera is present
|
||||
|
||||
minEnableSpeed @7 :Float32;
|
||||
minSteerSpeed @8 :Float32;
|
||||
@@ -580,5 +581,6 @@ struct CarParams {
|
||||
gateway @1; # Integration at vehicle's CAN gateway
|
||||
}
|
||||
|
||||
enableCameraDEPRECATED @4 :Bool;
|
||||
isPandaBlackDEPRECATED @39: Bool;
|
||||
}
|
||||
|
||||
@@ -45,13 +45,17 @@ struct DragonConf {
|
||||
dpUiVolume @31 :Int8;
|
||||
dpToyotaLdw @32 :Bool;
|
||||
dpToyotaSng @33 :Bool;
|
||||
dpVwTimebombAssist @34 :Bool;
|
||||
dpIpAddr @35 :Text;
|
||||
dpCameraOffset @36 :Int8;
|
||||
dpPathOffset @37 :Int8;
|
||||
dpLocale @38 :Text;
|
||||
dpSrLearner @39 :Bool;
|
||||
dpSrCustom @40 :Float32;
|
||||
dpAppd @41 :Bool;
|
||||
dpDebug @42 :Bool;
|
||||
}
|
||||
dpToyotaCruiseOverride @34 :Bool;
|
||||
dpToyotaCruiseOverrideVego @35 :Bool;
|
||||
dpToyotaCruiseOverrideAt @36 :Float32;
|
||||
dpToyotaCruiseOverrideSpeed @37 :Float32;
|
||||
dpVwTimebombAssist @38 :Bool;
|
||||
dpIpAddr @39 :Text;
|
||||
dpCameraOffset @40 :Int8;
|
||||
dpPathOffset @41 :Int8;
|
||||
dpLocale @42 :Text;
|
||||
dpSrLearner @43 :Bool;
|
||||
dpSrCustom @44 :Float32;
|
||||
dpAppd @45 :Bool;
|
||||
dpMapd @46 :Bool;
|
||||
}
|
||||
|
||||
134
cereal/log.capnp
134
cereal/log.capnp
@@ -125,27 +125,38 @@ struct InitData {
|
||||
struct FrameData {
|
||||
frameId @0 :UInt32;
|
||||
encodeId @1 :UInt32; # DEPRECATED
|
||||
timestampEof @2 :UInt64;
|
||||
|
||||
frameType @7 :FrameType;
|
||||
frameLength @3 :Int32;
|
||||
|
||||
# Timestamps
|
||||
timestampEof @2 :UInt64;
|
||||
timestampSof @8 :UInt64;
|
||||
|
||||
# Exposure
|
||||
integLines @4 :Int32;
|
||||
globalGain @5 :Int32;
|
||||
highConversionGain @20 :Bool;
|
||||
gain @15 :Float32; # This includes highConversionGain if enabled
|
||||
measuredGreyFraction @21 :Float32;
|
||||
targetGreyFraction @22 :Float32;
|
||||
|
||||
# Focus
|
||||
lensPos @11 :Int32;
|
||||
lensSag @12 :Float32;
|
||||
lensErr @13 :Float32;
|
||||
lensTruePos @14 :Float32;
|
||||
image @6 :Data;
|
||||
gainFrac @15 :Float32;
|
||||
focusVal @16 :List(Int16);
|
||||
focusConf @17 :List(UInt8);
|
||||
sharpnessScore @18 :List(UInt16);
|
||||
recoverState @19 :Int32;
|
||||
|
||||
frameType @7 :FrameType;
|
||||
timestampSof @8 :UInt64;
|
||||
transform @10 :List(Float32);
|
||||
|
||||
androidCaptureResult @9 :AndroidCaptureResult;
|
||||
|
||||
image @6 :Data;
|
||||
globalGainDEPRECATED @5 :Int32;
|
||||
|
||||
enum FrameType {
|
||||
unknown @0;
|
||||
neo @1;
|
||||
@@ -214,6 +225,8 @@ struct SensorEventData {
|
||||
mmc3416x @7; # magnetometer (c2)
|
||||
bmx055 @8;
|
||||
rpr0521 @9;
|
||||
lsm6ds3trc @10;
|
||||
mmc5603nj @11;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -281,6 +294,7 @@ struct DeviceState @0xa4d8b5af2aa492eb {
|
||||
freeSpacePercent @7 :Float32;
|
||||
memoryUsagePercent @19 :Int8;
|
||||
cpuUsagePercent @20 :Int8;
|
||||
gpuUsagePercent @33 :Int8;
|
||||
usbOnline @12 :Bool;
|
||||
networkType @22 :NetworkType;
|
||||
networkInfo @31 :NetworkInfo;
|
||||
@@ -324,6 +338,7 @@ struct DeviceState @0xa4d8b5af2aa492eb {
|
||||
cell3G @3;
|
||||
cell4G @4;
|
||||
cell5G @5;
|
||||
ethernet @6;
|
||||
}
|
||||
|
||||
enum NetworkStrength {
|
||||
@@ -407,7 +422,7 @@ struct PandaState @0xa7649e2575e4591e {
|
||||
registerDivergent @18;
|
||||
interruptRateKlineInit @19;
|
||||
interruptRateClockSource @20;
|
||||
interruptRateTim9 @21;
|
||||
interruptRateTick @21;
|
||||
# Update max fault type in boardd when adding faults
|
||||
}
|
||||
|
||||
@@ -419,6 +434,7 @@ struct PandaState @0xa7649e2575e4591e {
|
||||
pedal @4;
|
||||
uno @5;
|
||||
dos @6;
|
||||
red @7;
|
||||
}
|
||||
|
||||
enum UsbPowerMode {
|
||||
@@ -524,7 +540,6 @@ struct ControlsState @0x97ff69c53601abf1 {
|
||||
uiAccelCmd @5 :Float32;
|
||||
ufAccelCmd @33 :Float32;
|
||||
aTarget @35 :Float32;
|
||||
steeringAngleDesiredDeg @29 :Float32;
|
||||
curvature @37 :Float32; # path curvature from vehicle model
|
||||
forceDecel @51 :Bool;
|
||||
|
||||
@@ -546,6 +561,7 @@ struct ControlsState @0x97ff69c53601abf1 {
|
||||
pidState @53 :LateralPIDState;
|
||||
lqrState @55 :LateralLQRState;
|
||||
angleState @58 :LateralAngleState;
|
||||
debugState @59 :LateralDebugState;
|
||||
}
|
||||
|
||||
enum OpenpilotState @0xdbe58b96d2d1ac61 {
|
||||
@@ -617,6 +633,13 @@ struct ControlsState @0x97ff69c53601abf1 {
|
||||
saturated @3 :Bool;
|
||||
}
|
||||
|
||||
struct LateralDebugState {
|
||||
active @0 :Bool;
|
||||
steeringAngleDeg @1 :Float32;
|
||||
output @2 :Float32;
|
||||
saturated @3 :Bool;
|
||||
}
|
||||
|
||||
# deprecated
|
||||
vEgoDEPRECATED @0 :Float32;
|
||||
vEgoRawDEPRECATED @32 :Float32;
|
||||
@@ -645,6 +668,7 @@ struct ControlsState @0x97ff69c53601abf1 {
|
||||
mapValidDEPRECATED @49 :Bool;
|
||||
jerkFactorDEPRECATED @12 :Float32;
|
||||
steerOverrideDEPRECATED @20 :Bool;
|
||||
steeringAngleDesiredDeg @29 :Float32; # dp
|
||||
}
|
||||
|
||||
struct ModelDataV2 {
|
||||
@@ -671,6 +695,7 @@ struct ModelDataV2 {
|
||||
|
||||
# predicted lead cars
|
||||
leads @11 :List(LeadDataV2);
|
||||
leadsV3 @18 :List(LeadDataV3);
|
||||
|
||||
meta @12 :MetaData;
|
||||
|
||||
@@ -696,6 +721,25 @@ struct ModelDataV2 {
|
||||
xyvaStd @3 :List(Float32);
|
||||
}
|
||||
|
||||
struct LeadDataV3 {
|
||||
prob @0 :Float32; # probability that car is your lead at time t
|
||||
probTime @1 :Float32;
|
||||
t @2 :List(Float32);
|
||||
|
||||
# x and y are relative position in device frame
|
||||
# v absolute norm speed
|
||||
# a is derivative of v
|
||||
x @3 :List(Float32);
|
||||
xStd @4 :List(Float32);
|
||||
y @5 :List(Float32);
|
||||
yStd @6 :List(Float32);
|
||||
v @7 :List(Float32);
|
||||
vStd @8 :List(Float32);
|
||||
a @9 :List(Float32);
|
||||
aStd @10 :List(Float32);
|
||||
}
|
||||
|
||||
|
||||
struct MetaData {
|
||||
engagedProb @0 :Float32;
|
||||
desirePrediction @1 :List(Float32);
|
||||
@@ -756,34 +800,35 @@ struct AndroidLogEntry {
|
||||
}
|
||||
|
||||
struct LongitudinalPlan @0xe00b5b3eba12876c {
|
||||
mdMonoTime @9 :UInt64;
|
||||
radarStateMonoTime @10 :UInt64;
|
||||
|
||||
vCruise @16 :Float32;
|
||||
aCruise @17 :Float32;
|
||||
vTarget @3 :Float32;
|
||||
vTargetFuture @14 :Float32;
|
||||
vMax @20 :Float32;
|
||||
aTarget @18 :Float32;
|
||||
|
||||
vStart @26 :Float32;
|
||||
aStart @27 :Float32;
|
||||
|
||||
modelMonoTime @9 :UInt64;
|
||||
hasLead @7 :Bool;
|
||||
fcw @8 :Bool;
|
||||
longitudinalPlanSource @15 :LongitudinalPlanSource;
|
||||
|
||||
processingDelay @29 :Float32;
|
||||
|
||||
# desired speed/accel/jerk over next 2.5s
|
||||
accels @32 :List(Float32);
|
||||
speeds @33 :List(Float32);
|
||||
jerks @34 :List(Float32);
|
||||
|
||||
enum LongitudinalPlanSource {
|
||||
cruise @0;
|
||||
mpc1 @1;
|
||||
mpc2 @2;
|
||||
mpc3 @3;
|
||||
model @4;
|
||||
lead0 @1;
|
||||
lead1 @2;
|
||||
lead2 @3;
|
||||
e2e @4;
|
||||
}
|
||||
|
||||
# deprecated
|
||||
vCruiseDEPRECATED @16 :Float32;
|
||||
aCruiseDEPRECATED @17 :Float32;
|
||||
vTargetDEPRECATED @3 :Float32;
|
||||
vTargetFutureDEPRECATED @14 :Float32;
|
||||
aTargetDEPRECATED @18 :Float32;
|
||||
vStartDEPRECATED @26 :Float32;
|
||||
aStartDEPRECATED @27 :Float32;
|
||||
vMaxDEPRECATED @20 :Float32;
|
||||
radarStateMonoTimeDEPRECATED @10 :UInt64;
|
||||
jerkFactorDEPRECATED @6 :Float32;
|
||||
hasLeftLaneDEPRECATED @23 :Bool;
|
||||
hasRightLaneDEPRECATED @24 :Bool;
|
||||
@@ -821,14 +866,14 @@ struct LateralPlan @0xe1e9318e2ae8b51e {
|
||||
laneChangeState @18 :LaneChangeState;
|
||||
laneChangeDirection @19 :LaneChangeDirection;
|
||||
|
||||
# curvature is in rad/m
|
||||
curvature @22 :Float32;
|
||||
curvatureRate @23 :Float32;
|
||||
rawCurvature @24 :Float32;
|
||||
rawCurvatureRate @25 :Float32;
|
||||
|
||||
# desired curvatures over next 2.5s in rad/m
|
||||
psis @26 :List(Float32);
|
||||
curvatures @27 :List(Float32);
|
||||
curvatureRates @28 :List(Float32);
|
||||
|
||||
# dp
|
||||
dpALCAllowed @26 :Bool;
|
||||
dpALCAllowed @29 :Bool;
|
||||
|
||||
enum Desire {
|
||||
none @0;
|
||||
@@ -854,6 +899,10 @@ struct LateralPlan @0xe1e9318e2ae8b51e {
|
||||
}
|
||||
|
||||
# deprecated
|
||||
curvatureDEPRECATED @22 :Float32;
|
||||
curvatureRateDEPRECATED @23 :Float32;
|
||||
rawCurvatureDEPRECATED @24 :Float32;
|
||||
rawCurvatureRateDEPRECATED @25 :Float32;
|
||||
cProbDEPRECATED @3 :Float32;
|
||||
dPolyDEPRECATED @1 :List(Float32);
|
||||
cPolyDEPRECATED @2 :List(Float32);
|
||||
@@ -1206,6 +1255,8 @@ struct DriverState {
|
||||
partialFace @18 :Float32;
|
||||
distractedPose @19 :Float32;
|
||||
distractedEyes @20 :Float32;
|
||||
eyesOnRoad @21 :Float32;
|
||||
phoneUse @22 :Float32;
|
||||
|
||||
irPwrDEPRECATED @10 :Float32;
|
||||
descriptorDEPRECATED @1 :List(Float32);
|
||||
@@ -1306,6 +1357,18 @@ struct ManagerState {
|
||||
}
|
||||
}
|
||||
|
||||
struct UploaderState {
|
||||
immediateQueueSize @0 :UInt32;
|
||||
immediateQueueCount @1 :UInt32;
|
||||
rawQueueSize @2 :UInt32;
|
||||
rawQueueCount @3 :UInt32;
|
||||
|
||||
# stats for last successfully uploaded file
|
||||
lastTime @4 :Float32; # s
|
||||
lastSpeed @5 :Float32; # MB/s
|
||||
lastFilename @6 :Text;
|
||||
}
|
||||
|
||||
struct Event {
|
||||
logMonoTime @0 :UInt64; # nanoseconds
|
||||
valid @67 :Bool = true;
|
||||
@@ -1333,8 +1396,6 @@ struct Event {
|
||||
longitudinalPlan @24 :LongitudinalPlan;
|
||||
lateralPlan @64 :LateralPlan;
|
||||
ubloxGnss @34 :UbloxGnss;
|
||||
liveMpc @36 :LiveMpcData;
|
||||
liveLongitudinalMpc @37 :LiveLongitudinalMpcData;
|
||||
ubloxRaw @39 :Data;
|
||||
gpsLocationExternal @48 :GpsLocationData;
|
||||
driverState @59 :DriverState;
|
||||
@@ -1358,6 +1419,7 @@ struct Event {
|
||||
# systems stuff
|
||||
androidLog @20 :AndroidLogEntry;
|
||||
managerState @78 :ManagerState;
|
||||
uploaderState @79 :UploaderState;
|
||||
procLog @33 :ProcLog;
|
||||
clocks @35 :Clocks;
|
||||
deviceState @6 :DeviceState;
|
||||
@@ -1369,6 +1431,8 @@ struct Event {
|
||||
|
||||
# *********** legacy + deprecated ***********
|
||||
model @9 :Legacy.ModelData; # TODO: rename modelV2 and mark this as deprecated
|
||||
liveMpcDEPRECATED @36 :LiveMpcData;
|
||||
liveLongitudinalMpcDEPRECATED @37 :LiveLongitudinalMpcData;
|
||||
liveLocationKalmanDEPRECATED @51 :Legacy.LiveLocationData;
|
||||
orbslamCorrectionDEPRECATED @45 :Legacy.OrbslamCorrection;
|
||||
liveUIDEPRECATED @14 :Legacy.LiveUI;
|
||||
@@ -1402,6 +1466,6 @@ struct Event {
|
||||
kalmanOdometryDEPRECATED @65 :Legacy.KalmanOdometry;
|
||||
gpsLocationDEPRECATED @21 :GpsLocationData;
|
||||
uiLayoutStateDEPRECATED @57 :Legacy.UiLayoutState;
|
||||
dragonConf @79 :Dp.DragonConf;
|
||||
dragonConf @80 :Dp.DragonConf;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,59 +1,74 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <csignal>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
typedef void (*sighandler_t)(int sig);
|
||||
|
||||
#include "services.h"
|
||||
|
||||
#include "impl_msgq.h"
|
||||
#include "impl_zmq.h"
|
||||
#include "services.h"
|
||||
|
||||
void sigpipe_handler(int sig) {
|
||||
assert(sig == SIGPIPE);
|
||||
std::cout << "SIGPIPE received" << std::endl;
|
||||
}
|
||||
|
||||
static std::vector<std::string> get_services() {
|
||||
std::vector<std::string> name_list;
|
||||
|
||||
static std::vector<std::string> get_services(std::string whitelist_str, bool zmq_to_msgq) {
|
||||
std::vector<std::string> service_list;
|
||||
for (const auto& it : services) {
|
||||
std::string name = it.name;
|
||||
if (name == "plusFrame" || name == "uiLayoutState") continue;
|
||||
name_list.push_back(name);
|
||||
bool in_whitelist = whitelist_str.find(name) != std::string::npos;
|
||||
if (name == "plusFrame" || name == "uiLayoutState" || (zmq_to_msgq && !in_whitelist)) {
|
||||
continue;
|
||||
}
|
||||
service_list.push_back(name);
|
||||
}
|
||||
|
||||
return name_list;
|
||||
return service_list;
|
||||
}
|
||||
|
||||
|
||||
int main(void){
|
||||
int main(int argc, char** argv) {
|
||||
signal(SIGPIPE, (sighandler_t)sigpipe_handler);
|
||||
|
||||
auto endpoints = get_services();
|
||||
bool zmq_to_msgq = argc > 2;
|
||||
std::string ip = zmq_to_msgq ? argv[1] : "127.0.0.1";
|
||||
std::string whitelist_str = zmq_to_msgq ? std::string(argv[2]) : "";
|
||||
|
||||
std::map<SubSocket*, PubSocket*> sub2pub;
|
||||
|
||||
Context *zmq_context = new ZMQContext();
|
||||
Context *msgq_context = new MSGQContext();
|
||||
Poller *poller = new MSGQPoller();
|
||||
|
||||
for (auto endpoint: endpoints){
|
||||
SubSocket * msgq_sock = new MSGQSubSocket();
|
||||
msgq_sock->connect(msgq_context, endpoint, "127.0.0.1", false);
|
||||
poller->registerSocket(msgq_sock);
|
||||
|
||||
PubSocket * zmq_sock = new ZMQPubSocket();
|
||||
zmq_sock->connect(zmq_context, endpoint);
|
||||
|
||||
sub2pub[msgq_sock] = zmq_sock;
|
||||
Poller *poller;
|
||||
Context *pub_context;
|
||||
Context *sub_context;
|
||||
if (zmq_to_msgq) { // republishes zmq debugging messages as msgq
|
||||
poller = new ZMQPoller();
|
||||
pub_context = new MSGQContext();
|
||||
sub_context = new ZMQContext();
|
||||
} else {
|
||||
poller = new MSGQPoller();
|
||||
pub_context = new ZMQContext();
|
||||
sub_context = new MSGQContext();
|
||||
}
|
||||
|
||||
std::map<SubSocket*, PubSocket*> sub2pub;
|
||||
for (auto endpoint: get_services(whitelist_str, zmq_to_msgq)) {
|
||||
PubSocket * pub_sock;
|
||||
SubSocket * sub_sock;
|
||||
if (zmq_to_msgq) {
|
||||
pub_sock = new MSGQPubSocket();
|
||||
sub_sock = new ZMQSubSocket();
|
||||
} else {
|
||||
pub_sock = new ZMQPubSocket();
|
||||
sub_sock = new MSGQSubSocket();
|
||||
}
|
||||
pub_sock->connect(pub_context, endpoint);
|
||||
sub_sock->connect(sub_context, endpoint, ip, false);
|
||||
|
||||
while (true){
|
||||
for (auto sub_sock : poller->poll(100)){
|
||||
poller->registerSocket(sub_sock);
|
||||
sub2pub[sub_sock] = pub_sock;
|
||||
}
|
||||
|
||||
while (true) {
|
||||
for (auto sub_sock : poller->poll(100)) {
|
||||
Message * msg = sub_sock->receive();
|
||||
if (msg == NULL) continue;
|
||||
sub2pub[sub_sock]->sendMessage(msg);
|
||||
|
||||
@@ -19,15 +19,15 @@ class Service:
|
||||
self.frequency = frequency
|
||||
self.decimation = decimation
|
||||
|
||||
DCAM_FREQ = 10. if not TICI else 20.
|
||||
|
||||
services = {
|
||||
"roadCameraState": (True, 20., 1), # should_log, frequency, decimation (optional)
|
||||
# service: (should_log, frequency, qlog decimation (optional))
|
||||
"sensorEvents": (True, 100., 100),
|
||||
"gpsNMEA": (True, 9.),
|
||||
"deviceState": (True, 2., 1),
|
||||
"can": (True, 100.),
|
||||
"controlsState": (True, 100., 100),
|
||||
"features": (True, 0.),
|
||||
"controlsState": (True, 100., 10),
|
||||
"pandaState": (True, 2., 1),
|
||||
"radarState": (True, 20., 5),
|
||||
"roadEncodeIdx": (True, 20., 1),
|
||||
@@ -38,41 +38,33 @@ services = {
|
||||
"androidLog": (True, 0., 1),
|
||||
"carState": (True, 100., 10),
|
||||
"carControl": (True, 100., 10),
|
||||
"longitudinalPlan": (True, 20., 2),
|
||||
"liveLocation": (True, 0., 1),
|
||||
"longitudinalPlan": (True, 20., 5),
|
||||
"procLog": (True, 0.5),
|
||||
"gpsLocationExternal": (True, 10., 1),
|
||||
"ubloxGnss": (True, 10.),
|
||||
"clocks": (True, 1., 1),
|
||||
"liveMpc": (False, 20.),
|
||||
"liveLongitudinalMpc": (False, 20.),
|
||||
"ubloxRaw": (True, 20.),
|
||||
"liveLocationKalman": (True, 20., 2),
|
||||
"uiLayoutState": (True, 0.),
|
||||
"liveParameters": (True, 20., 2),
|
||||
"cameraOdometry": (True, 20., 5),
|
||||
"lateralPlan": (True, 20., 2),
|
||||
"lateralPlan": (True, 20., 5),
|
||||
"thumbnail": (True, 0.2, 1),
|
||||
"carEvents": (True, 1., 1),
|
||||
"carParams": (True, 0.02, 1),
|
||||
"driverCameraState": (True, 10. if not TICI else 20., 1),
|
||||
"driverEncodeIdx": (True, 10. if not TICI else 20., 1),
|
||||
"driverState": (True, 10. if not TICI else 20., 1),
|
||||
"driverMonitoringState": (True, 10. if not TICI else 20., 1),
|
||||
"offroadLayout": (False, 0.),
|
||||
"roadCameraState": (True, 20., 20),
|
||||
"driverCameraState": (True, DCAM_FREQ, DCAM_FREQ),
|
||||
"driverEncodeIdx": (True, DCAM_FREQ, 1),
|
||||
"driverState": (True, DCAM_FREQ, DCAM_FREQ / 2),
|
||||
"driverMonitoringState": (True, DCAM_FREQ, DCAM_FREQ / 2),
|
||||
"wideRoadEncodeIdx": (True, 20., 1),
|
||||
"wideRoadCameraState": (True, 20., 1),
|
||||
"modelV2": (True, 20., 20),
|
||||
"wideRoadCameraState": (True, 20., 20),
|
||||
"modelV2": (True, 20., 40),
|
||||
"managerState": (True, 2., 1),
|
||||
|
||||
"testModel": (False, 0.),
|
||||
"testLiveLocation": (False, 0.),
|
||||
"testJoystick": (False, 0.),
|
||||
"uploaderState": (True, 0., 1),
|
||||
|
||||
# dp
|
||||
"thermal": (True, 2., 1),
|
||||
"dragonConf": (False, 2.),
|
||||
|
||||
}
|
||||
service_list = {name: Service(new_port(idx), *vals) for # type: ignore
|
||||
idx, (name, vals) in enumerate(services.items())}
|
||||
|
||||
@@ -49,7 +49,6 @@ class VisionBuf {
|
||||
|
||||
// ion
|
||||
int handle = 0;
|
||||
bool owner = false;
|
||||
|
||||
void allocate(size_t len);
|
||||
void import();
|
||||
|
||||
@@ -62,7 +62,6 @@ void VisionBuf::allocate(size_t len) {
|
||||
|
||||
memset(addr, 0, ion_alloc.len);
|
||||
|
||||
this->owner = true;
|
||||
this->len = len;
|
||||
this->mmap_len = ion_alloc.len;
|
||||
this->addr = addr;
|
||||
@@ -82,7 +81,6 @@ void VisionBuf::import(){
|
||||
err = ioctl(ion_fd, ION_IOC_IMPORT, &fd_data);
|
||||
assert(err == 0);
|
||||
|
||||
this->owner = false;
|
||||
this->handle = fd_data.handle;
|
||||
this->addr = mmap(NULL, this->mmap_len, PROT_READ | PROT_WRITE, MAP_SHARED, this->fd, 0);
|
||||
assert(this->addr != MAP_FAILED);
|
||||
@@ -139,10 +137,6 @@ void VisionBuf::free() {
|
||||
munmap(this->addr, this->mmap_len);
|
||||
close(this->fd);
|
||||
|
||||
// Free the ION buffer if we also shared it
|
||||
if (this->owner){
|
||||
struct ion_handle_data handle_data = {.handle = this->handle};
|
||||
int ret = ioctl(ion_fd, ION_IOC_FREE, &handle_data);
|
||||
assert(ret == 0);
|
||||
}
|
||||
struct ion_handle_data handle_data = {.handle = this->handle};
|
||||
ioctl(ion_fd, ION_IOC_FREE, &handle_data);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
|
||||
constexpr int VISIONIPC_MAX_FDS = 64;
|
||||
constexpr int VISIONIPC_MAX_FDS = 128;
|
||||
|
||||
struct VisionIpcBufExtra {
|
||||
uint32_t frame_id;
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
#include <string>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "messaging.h"
|
||||
#include "visionipc.h"
|
||||
#include "visionbuf.h"
|
||||
#include "messaging/messaging.h"
|
||||
#include "visionipc/visionipc.h"
|
||||
#include "visionipc/visionbuf.h"
|
||||
|
||||
class VisionIpcClient {
|
||||
private:
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
#include <sys/socket.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "messaging.h"
|
||||
#include "ipc.h"
|
||||
#include "visionipc_server.h"
|
||||
#include "messaging/messaging.h"
|
||||
#include "visionipc/ipc.h"
|
||||
#include "visionipc/visionipc_server.h"
|
||||
|
||||
std::string get_endpoint_name(std::string name, VisionStreamType type){
|
||||
if (messaging_use_zmq()){
|
||||
@@ -122,7 +122,6 @@ void VisionIpcServer::listener(){
|
||||
bufs[i].buf_cl = 0;
|
||||
bufs[i].copy_q = 0;
|
||||
bufs[i].handle = 0;
|
||||
bufs[i].owner = false;
|
||||
|
||||
bufs[i].server_id = server_id;
|
||||
}
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
#include <atomic>
|
||||
#include <map>
|
||||
|
||||
#include "messaging.h"
|
||||
#include "visionipc.h"
|
||||
#include "visionbuf.h"
|
||||
#include "messaging/messaging.h"
|
||||
#include "visionipc/visionipc.h"
|
||||
#include "visionipc/visionbuf.h"
|
||||
|
||||
std::string get_endpoint_name(std::string name, VisionStreamType type);
|
||||
|
||||
|
||||
@@ -23,10 +23,10 @@ confs = [
|
||||
{'name': 'dp_auto_shutdown', 'default': False, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_auto_shutdown_in', 'default': 90, 'type': 'UInt16', 'min': 0, 'max': 600, 'depends': [{'name': 'dp_auto_shutdown', 'vals': [True]}], 'conf_type': ['param']},
|
||||
# service
|
||||
{'name': 'dp_updated', 'default': True, 'type': 'Bool', 'conf_type': ['param']},
|
||||
{'name': 'dp_logger', 'default': True, 'type': 'Bool', 'conf_type': ['param']},
|
||||
{'name': 'dp_athenad', 'default': True, 'type': 'Bool', 'depends': [{'name': 'dp_atl', 'vals': [False]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_uploader', 'default': True, 'type': 'Bool', 'depends': [{'name': 'dp_atl', 'vals': [False]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_updated', 'default': False, 'type': 'Bool', 'conf_type': ['param']},
|
||||
{'name': 'dp_logger', 'default': False, 'type': 'Bool', 'conf_type': ['param']},
|
||||
{'name': 'dp_athenad', 'default': False, 'type': 'Bool', 'depends': [{'name': 'dp_atl', 'vals': [False]}], 'conf_type': ['param', 'struct'], 'update_once': True},
|
||||
{'name': 'dp_uploader', 'default': False, 'type': 'Bool', 'depends': [{'name': 'dp_atl', 'vals': [False]}], 'conf_type': ['param', 'struct'], 'update_once': True},
|
||||
# {'name': 'dp_gpxd', 'default': False, 'type': 'Bool', 'conf_type': ['param']},
|
||||
{'name': 'dp_hotspot_on_boot', 'default': False, 'type': 'Bool', 'conf_type': ['param']},
|
||||
# lat ctrl
|
||||
@@ -60,14 +60,22 @@ confs = [
|
||||
{'name': 'dp_ui_brightness', 'default': 0, 'type': 'UInt8', 'min': 0, 'max': 100, 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_ui_volume', 'default': -5, 'type': 'Int8', 'min': -5, 'max': 100, 'conf_type': ['param', 'struct']},
|
||||
# toyota
|
||||
{'name': 'dp_lexus_rx_rpm_fix', 'default': False, 'type': 'Bool', 'depends': [{'name': 'dp_atl', 'vals': [False]}], 'conf_type': ['param']},
|
||||
{'name': 'dp_toyota_ldw', 'default': True, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_toyota_sng', 'default': False, 'type': 'Bool', 'depends': [{'name': 'dp_atl', 'vals': [False]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_toyota_zss', 'default': False, 'type': 'Bool', 'conf_type': ['param']},
|
||||
{'name': 'dp_toyota_fp_btn_link', 'default': False, 'type': 'Bool', 'conf_type': ['param']},
|
||||
{'name': 'dp_toyota_ap_btn_link', 'default': False, 'type': 'Bool', 'conf_type': ['param']},
|
||||
{'name': 'dp_toyota_disable_relay', 'default': False, 'type': 'Bool', 'conf_type': ['param']},
|
||||
{'name': 'dp_toyota_cruise_override', 'default': False, 'type': 'Bool', 'depends': [{'name': 'dp_atl', 'vals': [False]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_toyota_cruise_override_vego', 'default': False, 'type': 'Bool', 'depends': [{'name': 'dp_atl', 'vals': [False]}, {'name': 'dp_toyota_cruise_override', 'vals': [True]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_toyota_cruise_override_at', 'default': 44, 'type': 'Float32', 'depends': [{'name': 'dp_atl', 'vals': [False]}, {'name': 'dp_toyota_cruise_override', 'vals': [True]}], 'min': 0, 'max': 50., 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_toyota_cruise_override_speed', 'default': 32, 'type': 'Float32', 'depends': [{'name': 'dp_atl', 'vals': [False]}, {'name': 'dp_toyota_cruise_override', 'vals': [True]}], 'min': 0, 'max': 50., 'conf_type': ['param', 'struct']},
|
||||
# hyundai
|
||||
{'name': 'dp_hkg_smart_mdps', 'default': False, 'type': 'Bool', 'conf_type': ['param']},
|
||||
# honda
|
||||
{'name': 'dp_honda_eps_mod', 'default': False, 'type': 'Bool', 'conf_type': ['param']},
|
||||
{'name': 'dp_honda_kmh_display', 'default': False, 'type': 'Bool', 'conf_type': ['param']},
|
||||
# volkswagen
|
||||
{'name': 'dp_vw_panda', 'default': False, 'type': 'Bool', 'conf_type': ['param']},
|
||||
{'name': 'dp_vw_timebomb_assist', 'default': False, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
@@ -96,7 +104,12 @@ confs = [
|
||||
{'name': 'dp_panda_fake_black', 'default': False, 'type': 'Bool', 'conf_type': ['param']},
|
||||
{'name': 'dp_panda_no_gps', 'default': False, 'type': 'Bool', 'conf_type': ['param']},
|
||||
{'name': 'dp_last_candidate', 'default': '', 'type': 'Text', 'conf_type': ['param']},
|
||||
{'name': 'dp_debug', 'default': False, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_prebuilt', 'default': False, 'type': 'Bool', 'conf_type': ['param']},
|
||||
{'name': 'dp_gpxd', 'default': False, 'type': 'Bool', 'conf_type': ['param']},
|
||||
{'name': 'dp_mapd', 'default': False, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
# custom server support
|
||||
# {'name': 'dp_custom_server', 'default': False, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
# {'name': 'dp_custom_server_url', 'default': 'api.retropilot.org', 'type': 'Text', 'depends': [{'name': 'dp_custom_server', 'vals': [True]}], 'conf_type': ['param', 'struct']},
|
||||
]
|
||||
|
||||
def get_definition(name):
|
||||
|
||||
@@ -158,7 +158,7 @@ class SwagLogger(logging.Logger):
|
||||
evt.update(kwargs)
|
||||
if 'error' in kwargs:
|
||||
self.error(evt)
|
||||
if 'debug' in kwargs:
|
||||
elif 'debug' in kwargs:
|
||||
self.debug(evt)
|
||||
else:
|
||||
self.info(evt)
|
||||
|
||||
@@ -17,14 +17,14 @@ cdef extern from "selfdrive/common/params.h":
|
||||
ALL
|
||||
|
||||
cdef cppclass Params:
|
||||
Params(bool)
|
||||
Params(string)
|
||||
Params(bool) nogil
|
||||
Params(string) nogil
|
||||
string get(string, bool) nogil
|
||||
bool getBool(string)
|
||||
int remove(string)
|
||||
int put(string, string)
|
||||
int putBool(string, bool)
|
||||
bool checkKey(string)
|
||||
bool getBool(string) nogil
|
||||
int remove(string) nogil
|
||||
int put(string, string) nogil
|
||||
int putBool(string, bool) nogil
|
||||
bool checkKey(string) nogil
|
||||
void clearAll(ParamKeyType)
|
||||
|
||||
string get_params_path()
|
||||
|
||||
@@ -31,10 +31,14 @@ cdef class Params:
|
||||
cdef c_Params* p
|
||||
|
||||
def __cinit__(self, d=None, bool persistent_params=False):
|
||||
cdef string path
|
||||
if d is None:
|
||||
self.p = new c_Params(persistent_params)
|
||||
with nogil:
|
||||
self.p = new c_Params(persistent_params)
|
||||
else:
|
||||
self.p = new c_Params(<string>d.encode())
|
||||
path = <string>d.encode()
|
||||
with nogil:
|
||||
self.p = new c_Params(path)
|
||||
|
||||
def __dealloc__(self):
|
||||
del self.p
|
||||
@@ -53,13 +57,12 @@ cdef class Params:
|
||||
|
||||
return key
|
||||
|
||||
def get(self, key, block=False, encoding=None):
|
||||
def get(self, key, bool block=False, encoding=None):
|
||||
cdef string k = self.check_key(key)
|
||||
cdef bool b = block
|
||||
|
||||
cdef string val
|
||||
with nogil:
|
||||
val = self.p.get(k, b)
|
||||
val = self.p.get(k, block)
|
||||
|
||||
if val == b"":
|
||||
if block:
|
||||
@@ -76,7 +79,10 @@ cdef class Params:
|
||||
|
||||
def get_bool(self, key):
|
||||
cdef string k = self.check_key(key)
|
||||
return self.p.getBool(k)
|
||||
cdef bool r
|
||||
with nogil:
|
||||
r = self.p.getBool(k)
|
||||
return r
|
||||
|
||||
def put(self, key, dat):
|
||||
"""
|
||||
@@ -86,16 +92,19 @@ cdef class Params:
|
||||
in general try to avoid writing params as much as possible.
|
||||
"""
|
||||
cdef string k = self.check_key(key)
|
||||
dat = ensure_bytes(dat)
|
||||
self.p.put(k, dat)
|
||||
cdef string dat_bytes = ensure_bytes(dat)
|
||||
with nogil:
|
||||
self.p.put(k, dat_bytes)
|
||||
|
||||
def put_bool(self, key, val):
|
||||
def put_bool(self, key, bool val):
|
||||
cdef string k = self.check_key(key)
|
||||
self.p.putBool(k, val)
|
||||
with nogil:
|
||||
self.p.putBool(k, val)
|
||||
|
||||
def delete(self, key):
|
||||
cdef string k = self.check_key(key)
|
||||
self.p.remove(k)
|
||||
with nogil:
|
||||
self.p.remove(k)
|
||||
|
||||
def get_params_path(self):
|
||||
return self.p.get_params_path().decode("utf-8")
|
||||
|
||||
4
installer/continue_openpilot.sh
Executable file
4
installer/continue_openpilot.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
cd /data/openpilot
|
||||
exec ./launch_openpilot.sh
|
||||
@@ -16,6 +16,15 @@ fi
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
||||
|
||||
function two_init {
|
||||
if [ ! -f "/system/fonts/NotoSansTC-Regular.otf" ] || [ -L "/system/fonts/NotoSansTC-Regular.otf" ]; then
|
||||
mount -o remount,rw /system
|
||||
find /system/fonts/NotoSans*.otf -type l -delete
|
||||
cp -frv /usr/share/fonts/NotoSans* /system/fonts/
|
||||
cp -fr /data/openpilot/selfdrive/dragonpilot/fonts.xml /system/etc/fonts.xml
|
||||
chmod 644 /system/etc/fonts.xml
|
||||
chmod 644 /system/fonts/NotoSans*
|
||||
mount -o remount,r /system
|
||||
fi
|
||||
|
||||
# Wifi scan
|
||||
wpa_cli IFNAME=wlan0 SCAN
|
||||
@@ -93,7 +102,6 @@ function two_init {
|
||||
if [ ! -f "$BASEDIR/prebuilt" ]; then
|
||||
# Clean old build products, but preserve the scons cache
|
||||
cd $DIR
|
||||
scons --clean
|
||||
git clean -xdf
|
||||
git submodule foreach --recursive git clean -xdf
|
||||
fi
|
||||
@@ -118,71 +126,27 @@ function two_init {
|
||||
}
|
||||
|
||||
function tici_init {
|
||||
# wait longer for weston to come up
|
||||
if [ -f "$BASEDIR/prebuilt" ]; then
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
sudo su -c 'echo "performance" > /sys/class/devfreq/soc:qcom,memlat-cpu0/governor'
|
||||
sudo su -c 'echo "performance" > /sys/class/devfreq/soc:qcom,memlat-cpu4/governor'
|
||||
nmcli connection modify --temporary lte gsm.auto-config yes
|
||||
nmcli connection modify --temporary lte gsm.home-only yes
|
||||
|
||||
# set success flag for current boot slot
|
||||
sudo abctl --set_success
|
||||
|
||||
# Check if AGNOS update is required
|
||||
if [ $(< /VERSION) != "$AGNOS_VERSION" ]; then
|
||||
# Get number of slot to switch to
|
||||
CUR_SLOT=$(abctl --boot_slot)
|
||||
if [[ "$CUR_SLOT" == "_a" ]]; then
|
||||
OTHER_SLOT="_b"
|
||||
OTHER_SLOT_NUMBER="1"
|
||||
else
|
||||
OTHER_SLOT="_a"
|
||||
OTHER_SLOT_NUMBER="0"
|
||||
fi
|
||||
echo "Cur slot $CUR_SLOT, target $OTHER_SLOT"
|
||||
|
||||
# Get expected hashes from manifest
|
||||
AGNOS_PY="$DIR/selfdrive/hardware/tici/agnos.py"
|
||||
MANIFEST="$DIR/selfdrive/hardware/tici/agnos.json"
|
||||
SYSTEM_HASH_EXPECTED=$(jq -r ".[] | select(.name == \"system\") | .hash_raw" $MANIFEST)
|
||||
SYSTEM_SIZE=$(jq -r ".[] | select(.name == \"system\") | .size" $MANIFEST)
|
||||
BOOT_HASH_EXPECTED=$(jq -r ".[] | select(.name == \"boot\") | .hash_raw" $MANIFEST)
|
||||
BOOT_SIZE=$(jq -r ".[] | select(.name == \"boot\") | .size" $MANIFEST)
|
||||
echo "Expected hashes:"
|
||||
echo "System: $SYSTEM_HASH_EXPECTED"
|
||||
echo "Boot: $BOOT_HASH_EXPECTED"
|
||||
|
||||
# Read hashes from alternate partitions, should already be flashed by updated
|
||||
SYSTEM_HASH=$(dd if="/dev/disk/by-partlabel/system$OTHER_SLOT" bs=1 skip="$SYSTEM_SIZE" count=64 2>/dev/null)
|
||||
BOOT_HASH=$(dd if="/dev/disk/by-partlabel/boot$OTHER_SLOT" bs=1 skip="$BOOT_SIZE" count=64 2>/dev/null)
|
||||
echo "Found hashes:"
|
||||
echo "System: $SYSTEM_HASH"
|
||||
echo "Boot: $BOOT_HASH"
|
||||
|
||||
if [[ "$SYSTEM_HASH" == "$SYSTEM_HASH_EXPECTED" && "$BOOT_HASH" == "$BOOT_HASH_EXPECTED" ]]; then
|
||||
echo "Swapping active slot to $OTHER_SLOT_NUMBER"
|
||||
|
||||
# Clean hashes before swapping to prevent looping
|
||||
dd if=/dev/zero of="/dev/disk/by-partlabel/system$OTHER_SLOT" bs=1 seek="$SYSTEM_SIZE" count=64
|
||||
dd if=/dev/zero of="/dev/disk/by-partlabel/boot$OTHER_SLOT" bs=1 seek="$BOOT_SIZE" count=64
|
||||
sync
|
||||
|
||||
abctl --set_active "$OTHER_SLOT_NUMBER"
|
||||
|
||||
sleep 1
|
||||
sudo reboot
|
||||
else
|
||||
echo "Hash mismatch, downloading agnos"
|
||||
if $DIR/selfdrive/hardware/tici/agnos.py $MANIFEST; then
|
||||
echo "Download done, swapping active slot to $OTHER_SLOT_NUMBER"
|
||||
|
||||
# Clean hashes before swapping to prevent looping
|
||||
dd if=/dev/zero of="/dev/disk/by-partlabel/system$OTHER_SLOT" bs=1 seek="$SYSTEM_SIZE" count=64
|
||||
dd if=/dev/zero of="/dev/disk/by-partlabel/boot$OTHER_SLOT" bs=1 seek="$BOOT_SIZE" count=64
|
||||
sync
|
||||
|
||||
abctl --set_active "$OTHER_SLOT_NUMBER"
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
if $AGNOS_PY --verify $MANIFEST; then
|
||||
sudo reboot
|
||||
fi
|
||||
$DIR/selfdrive/hardware/tici/updater $AGNOS_PY $MANIFEST
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -235,7 +199,7 @@ function launch {
|
||||
|
||||
# handle pythonpath
|
||||
ln -sfn $(pwd) /data/pythonpath
|
||||
export PYTHONPATH="$PWD"
|
||||
export PYTHONPATH="$PWD:$PWD/pyextra"
|
||||
|
||||
# dp - ignore chmod changes
|
||||
git -C $DIR config core.fileMode false
|
||||
|
||||
@@ -11,7 +11,7 @@ if [ -z "$REQUIRED_NEOS_VERSION" ]; then
|
||||
fi
|
||||
|
||||
if [ -z "$AGNOS_VERSION" ]; then
|
||||
export AGNOS_VERSION="0.18"
|
||||
export AGNOS_VERSION="1.2"
|
||||
fi
|
||||
|
||||
if [ -z "$PASSIVE" ]; then
|
||||
|
||||
Binary file not shown.
@@ -275,7 +275,7 @@ BO_ 316 GAS_PEDAL: 8 PCM
|
||||
|
||||
BO_ 342 STEERING_SENSORS: 6 EPS
|
||||
SG_ STEER_ANGLE : 7|16@0- (-0.1,0) [-500|500] "deg" EON
|
||||
SG_ STEER_ANGLE_RATE : 23|16@0- (1,0) [-3000|3000] "deg/s" EON
|
||||
SG_ STEER_ANGLE_RATE : 23|16@0- (-1,0) [-3000|3000] "deg/s" EON
|
||||
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 43|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
|
||||
@@ -257,7 +257,7 @@ CM_ "acura_rdx_2018_can.dbc starts here";
|
||||
|
||||
BO_ 342 STEERING_SENSORS: 6 EPS
|
||||
SG_ STEER_ANGLE : 7|16@0- (-0.1,0) [-500|500] "deg" EON
|
||||
SG_ STEER_ANGLE_RATE : 23|16@0- (1,0) [-3000|3000] "deg/s" EON
|
||||
SG_ STEER_ANGLE_RATE : 23|16@0- (-1,0) [-3000|3000] "deg/s" EON
|
||||
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 43|4@0+ (1,0) [0|15] "" EON
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ BO_ 232 BRAKE_HOLD: 7 XXX
|
||||
|
||||
BO_ 342 STEERING_SENSORS: 6 EPS
|
||||
SG_ STEER_ANGLE : 7|16@0- (-0.1,0) [-500|500] "deg" EON
|
||||
SG_ STEER_ANGLE_RATE : 23|16@0- (1,0) [-3000|3000] "deg/s" EON
|
||||
SG_ STEER_ANGLE_RATE : 23|16@0- (-1,0) [-3000|3000] "deg/s" EON
|
||||
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 43|4@0+ (1,0) [0|15] "" EON
|
||||
|
||||
|
||||
@@ -5,9 +5,11 @@ unsigned int honda_checksum(unsigned int address, uint64_t d, int l) {
|
||||
d >>= 4; // remove checksum
|
||||
|
||||
int s = 0;
|
||||
bool extended = address > 0x7FF; // extended can
|
||||
while (address) { s += (address & 0xF); address >>= 4; }
|
||||
while (d) { s += (d & 0xF); d >>= 4; }
|
||||
s = 8-s;
|
||||
if (extended) s += 3;
|
||||
s &= 0xF;
|
||||
|
||||
return s;
|
||||
|
||||
@@ -370,6 +370,48 @@ BO_ 891 STALK_STATUS_2: 8 XXX
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 13274 LKAS_HUD_A: 5 ADAS
|
||||
SG_ CAM_TEMP_HIGH : 7|1@0+ (1,0) [0|255] "" BDY
|
||||
SG_ SET_ME_X41 : 6|7@0+ (1,0) [0|127] "" BDY
|
||||
SG_ BOH : 6|7@0+ (1,0) [0|127] "" BDY
|
||||
SG_ DASHED_LANES : 14|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ DTC : 13|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LKAS_PROBLEM : 12|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LKAS_OFF : 11|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SOLID_LANES : 10|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_RIGHT : 9|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ STEERING_REQUIRED : 8|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BOH : 23|2@0+ (1,0) [0|4] "" BDY
|
||||
SG_ LDW_PROBLEM : 21|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BEEP : 17|2@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01 : 20|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_ON : 28|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_OFF : 27|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ CLEAN_WINDSHIELD : 26|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ COUNTER : 37|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CHECKSUM : 35|4@0+ (1,0) [0|15] "" BDY
|
||||
|
||||
BO_ 13275 LKAS_HUD_B: 8 ADAS
|
||||
SG_ CAM_TEMP_HIGH : 7|1@0+ (1,0) [0|255] "" BDY
|
||||
SG_ SET_ME_X41 : 6|7@0+ (1,0) [0|127] "" BDY
|
||||
SG_ BOH : 6|7@0+ (1,0) [0|127] "" BDY
|
||||
SG_ DASHED_LANES : 14|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ DTC : 13|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LKAS_PROBLEM : 12|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LKAS_OFF : 11|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SOLID_LANES : 10|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_RIGHT : 9|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ STEERING_REQUIRED : 8|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BOH : 23|2@0+ (1,0) [0|4] "" BDY
|
||||
SG_ LDW_PROBLEM : 21|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BEEP : 17|2@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01 : 20|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_ON : 28|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_OFF : 27|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ CLEAN_WINDSHIELD : 26|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" BDY
|
||||
|
||||
CM_ SG_ 479 AEB_STATUS "set for the duration of AEB event";
|
||||
CM_ SG_ 479 AEB_BRAKING "set when braking is commanded during AEB event";
|
||||
CM_ SG_ 479 AEB_PREPARE "set 1s before AEB";
|
||||
|
||||
@@ -370,6 +370,48 @@ BO_ 891 STALK_STATUS_2: 8 XXX
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 13274 LKAS_HUD_A: 5 ADAS
|
||||
SG_ CAM_TEMP_HIGH : 7|1@0+ (1,0) [0|255] "" BDY
|
||||
SG_ SET_ME_X41 : 6|7@0+ (1,0) [0|127] "" BDY
|
||||
SG_ BOH : 6|7@0+ (1,0) [0|127] "" BDY
|
||||
SG_ DASHED_LANES : 14|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ DTC : 13|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LKAS_PROBLEM : 12|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LKAS_OFF : 11|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SOLID_LANES : 10|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_RIGHT : 9|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ STEERING_REQUIRED : 8|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BOH : 23|2@0+ (1,0) [0|4] "" BDY
|
||||
SG_ LDW_PROBLEM : 21|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BEEP : 17|2@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01 : 20|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_ON : 28|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_OFF : 27|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ CLEAN_WINDSHIELD : 26|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ COUNTER : 37|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CHECKSUM : 35|4@0+ (1,0) [0|15] "" BDY
|
||||
|
||||
BO_ 13275 LKAS_HUD_B: 8 ADAS
|
||||
SG_ CAM_TEMP_HIGH : 7|1@0+ (1,0) [0|255] "" BDY
|
||||
SG_ SET_ME_X41 : 6|7@0+ (1,0) [0|127] "" BDY
|
||||
SG_ BOH : 6|7@0+ (1,0) [0|127] "" BDY
|
||||
SG_ DASHED_LANES : 14|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ DTC : 13|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LKAS_PROBLEM : 12|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LKAS_OFF : 11|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SOLID_LANES : 10|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_RIGHT : 9|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ STEERING_REQUIRED : 8|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BOH : 23|2@0+ (1,0) [0|4] "" BDY
|
||||
SG_ LDW_PROBLEM : 21|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BEEP : 17|2@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01 : 20|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_ON : 28|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_OFF : 27|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ CLEAN_WINDSHIELD : 26|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" BDY
|
||||
|
||||
CM_ SG_ 479 AEB_STATUS "set for the duration of AEB event";
|
||||
CM_ SG_ 479 AEB_BRAKING "set when braking is commanded during AEB event";
|
||||
CM_ SG_ 479 AEB_PREPARE "set 1s before AEB";
|
||||
|
||||
@@ -370,6 +370,48 @@ BO_ 891 STALK_STATUS_2: 8 XXX
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 13274 LKAS_HUD_A: 5 ADAS
|
||||
SG_ CAM_TEMP_HIGH : 7|1@0+ (1,0) [0|255] "" BDY
|
||||
SG_ SET_ME_X41 : 6|7@0+ (1,0) [0|127] "" BDY
|
||||
SG_ BOH : 6|7@0+ (1,0) [0|127] "" BDY
|
||||
SG_ DASHED_LANES : 14|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ DTC : 13|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LKAS_PROBLEM : 12|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LKAS_OFF : 11|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SOLID_LANES : 10|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_RIGHT : 9|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ STEERING_REQUIRED : 8|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BOH : 23|2@0+ (1,0) [0|4] "" BDY
|
||||
SG_ LDW_PROBLEM : 21|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BEEP : 17|2@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01 : 20|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_ON : 28|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_OFF : 27|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ CLEAN_WINDSHIELD : 26|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ COUNTER : 37|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CHECKSUM : 35|4@0+ (1,0) [0|15] "" BDY
|
||||
|
||||
BO_ 13275 LKAS_HUD_B: 8 ADAS
|
||||
SG_ CAM_TEMP_HIGH : 7|1@0+ (1,0) [0|255] "" BDY
|
||||
SG_ SET_ME_X41 : 6|7@0+ (1,0) [0|127] "" BDY
|
||||
SG_ BOH : 6|7@0+ (1,0) [0|127] "" BDY
|
||||
SG_ DASHED_LANES : 14|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ DTC : 13|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LKAS_PROBLEM : 12|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LKAS_OFF : 11|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SOLID_LANES : 10|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_RIGHT : 9|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ STEERING_REQUIRED : 8|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BOH : 23|2@0+ (1,0) [0|4] "" BDY
|
||||
SG_ LDW_PROBLEM : 21|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BEEP : 17|2@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01 : 20|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_ON : 28|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_OFF : 27|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ CLEAN_WINDSHIELD : 26|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" BDY
|
||||
|
||||
CM_ SG_ 479 AEB_STATUS "set for the duration of AEB event";
|
||||
CM_ SG_ 479 AEB_BRAKING "set when braking is commanded during AEB event";
|
||||
CM_ SG_ 479 AEB_PREPARE "set 1s before AEB";
|
||||
|
||||
@@ -370,6 +370,48 @@ BO_ 891 STALK_STATUS_2: 8 XXX
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 13274 LKAS_HUD_A: 5 ADAS
|
||||
SG_ CAM_TEMP_HIGH : 7|1@0+ (1,0) [0|255] "" BDY
|
||||
SG_ SET_ME_X41 : 6|7@0+ (1,0) [0|127] "" BDY
|
||||
SG_ BOH : 6|7@0+ (1,0) [0|127] "" BDY
|
||||
SG_ DASHED_LANES : 14|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ DTC : 13|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LKAS_PROBLEM : 12|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LKAS_OFF : 11|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SOLID_LANES : 10|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_RIGHT : 9|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ STEERING_REQUIRED : 8|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BOH : 23|2@0+ (1,0) [0|4] "" BDY
|
||||
SG_ LDW_PROBLEM : 21|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BEEP : 17|2@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01 : 20|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_ON : 28|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_OFF : 27|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ CLEAN_WINDSHIELD : 26|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ COUNTER : 37|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CHECKSUM : 35|4@0+ (1,0) [0|15] "" BDY
|
||||
|
||||
BO_ 13275 LKAS_HUD_B: 8 ADAS
|
||||
SG_ CAM_TEMP_HIGH : 7|1@0+ (1,0) [0|255] "" BDY
|
||||
SG_ SET_ME_X41 : 6|7@0+ (1,0) [0|127] "" BDY
|
||||
SG_ BOH : 6|7@0+ (1,0) [0|127] "" BDY
|
||||
SG_ DASHED_LANES : 14|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ DTC : 13|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LKAS_PROBLEM : 12|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LKAS_OFF : 11|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SOLID_LANES : 10|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_RIGHT : 9|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ STEERING_REQUIRED : 8|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BOH : 23|2@0+ (1,0) [0|4] "" BDY
|
||||
SG_ LDW_PROBLEM : 21|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BEEP : 17|2@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01 : 20|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_ON : 28|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_OFF : 27|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ CLEAN_WINDSHIELD : 26|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" BDY
|
||||
|
||||
CM_ SG_ 479 AEB_STATUS "set for the duration of AEB event";
|
||||
CM_ SG_ 479 AEB_BRAKING "set when braking is commanded during AEB event";
|
||||
CM_ SG_ 479 AEB_PREPARE "set 1s before AEB";
|
||||
|
||||
@@ -370,6 +370,48 @@ BO_ 891 STALK_STATUS_2: 8 XXX
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 13274 LKAS_HUD_A: 5 ADAS
|
||||
SG_ CAM_TEMP_HIGH : 7|1@0+ (1,0) [0|255] "" BDY
|
||||
SG_ SET_ME_X41 : 6|7@0+ (1,0) [0|127] "" BDY
|
||||
SG_ BOH : 6|7@0+ (1,0) [0|127] "" BDY
|
||||
SG_ DASHED_LANES : 14|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ DTC : 13|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LKAS_PROBLEM : 12|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LKAS_OFF : 11|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SOLID_LANES : 10|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_RIGHT : 9|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ STEERING_REQUIRED : 8|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BOH : 23|2@0+ (1,0) [0|4] "" BDY
|
||||
SG_ LDW_PROBLEM : 21|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BEEP : 17|2@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01 : 20|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_ON : 28|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_OFF : 27|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ CLEAN_WINDSHIELD : 26|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ COUNTER : 37|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CHECKSUM : 35|4@0+ (1,0) [0|15] "" BDY
|
||||
|
||||
BO_ 13275 LKAS_HUD_B: 8 ADAS
|
||||
SG_ CAM_TEMP_HIGH : 7|1@0+ (1,0) [0|255] "" BDY
|
||||
SG_ SET_ME_X41 : 6|7@0+ (1,0) [0|127] "" BDY
|
||||
SG_ BOH : 6|7@0+ (1,0) [0|127] "" BDY
|
||||
SG_ DASHED_LANES : 14|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ DTC : 13|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LKAS_PROBLEM : 12|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LKAS_OFF : 11|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SOLID_LANES : 10|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_RIGHT : 9|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ STEERING_REQUIRED : 8|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BOH : 23|2@0+ (1,0) [0|4] "" BDY
|
||||
SG_ LDW_PROBLEM : 21|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BEEP : 17|2@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01 : 20|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_ON : 28|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_OFF : 27|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ CLEAN_WINDSHIELD : 26|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" BDY
|
||||
|
||||
CM_ SG_ 479 AEB_STATUS "set for the duration of AEB event";
|
||||
CM_ SG_ 479 AEB_BRAKING "set when braking is commanded during AEB event";
|
||||
CM_ SG_ 479 AEB_PREPARE "set 1s before AEB";
|
||||
|
||||
@@ -257,7 +257,7 @@ CM_ "honda_crv_touring_2016_can.dbc starts here";
|
||||
|
||||
BO_ 342 STEERING_SENSORS: 6 EPS
|
||||
SG_ STEER_ANGLE : 7|16@0- (-0.1,0) [-500|500] "deg" EON
|
||||
SG_ STEER_ANGLE_RATE : 23|16@0- (1,0) [-3000|3000] "deg/s" EON
|
||||
SG_ STEER_ANGLE_RATE : 23|16@0- (-1,0) [-3000|3000] "deg/s" EON
|
||||
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 43|4@0+ (1,0) [0|15] "" EON
|
||||
|
||||
|
||||
@@ -275,7 +275,7 @@ BO_ 304 GAS_PEDAL_2: 8 PCM
|
||||
|
||||
BO_ 342 STEERING_SENSORS: 6 EPS
|
||||
SG_ STEER_ANGLE : 7|16@0- (-0.1,0) [-500|500] "deg" EON
|
||||
SG_ STEER_ANGLE_RATE : 23|16@0- (1,0) [-3000|3000] "deg/s" EON
|
||||
SG_ STEER_ANGLE_RATE : 23|16@0- (-1,0) [-3000|3000] "deg/s" EON
|
||||
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 43|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
|
||||
@@ -271,7 +271,7 @@ BO_ 316 GAS_PEDAL: 8 PCM
|
||||
|
||||
BO_ 342 STEERING_SENSORS: 6 EPS
|
||||
SG_ STEER_ANGLE : 7|16@0- (-0.1,0) [-500|500] "deg" EON
|
||||
SG_ STEER_ANGLE_RATE : 23|16@0- (1,0) [-3000|3000] "deg/s" EON
|
||||
SG_ STEER_ANGLE_RATE : 23|16@0- (-1,0) [-3000|3000] "deg/s" EON
|
||||
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 43|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
|
||||
@@ -370,6 +370,48 @@ BO_ 891 STALK_STATUS_2: 8 XXX
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 13274 LKAS_HUD_A: 5 ADAS
|
||||
SG_ CAM_TEMP_HIGH : 7|1@0+ (1,0) [0|255] "" BDY
|
||||
SG_ SET_ME_X41 : 6|7@0+ (1,0) [0|127] "" BDY
|
||||
SG_ BOH : 6|7@0+ (1,0) [0|127] "" BDY
|
||||
SG_ DASHED_LANES : 14|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ DTC : 13|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LKAS_PROBLEM : 12|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LKAS_OFF : 11|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SOLID_LANES : 10|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_RIGHT : 9|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ STEERING_REQUIRED : 8|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BOH : 23|2@0+ (1,0) [0|4] "" BDY
|
||||
SG_ LDW_PROBLEM : 21|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BEEP : 17|2@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01 : 20|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_ON : 28|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_OFF : 27|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ CLEAN_WINDSHIELD : 26|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ COUNTER : 37|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CHECKSUM : 35|4@0+ (1,0) [0|15] "" BDY
|
||||
|
||||
BO_ 13275 LKAS_HUD_B: 8 ADAS
|
||||
SG_ CAM_TEMP_HIGH : 7|1@0+ (1,0) [0|255] "" BDY
|
||||
SG_ SET_ME_X41 : 6|7@0+ (1,0) [0|127] "" BDY
|
||||
SG_ BOH : 6|7@0+ (1,0) [0|127] "" BDY
|
||||
SG_ DASHED_LANES : 14|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ DTC : 13|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LKAS_PROBLEM : 12|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LKAS_OFF : 11|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SOLID_LANES : 10|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_RIGHT : 9|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ STEERING_REQUIRED : 8|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BOH : 23|2@0+ (1,0) [0|4] "" BDY
|
||||
SG_ LDW_PROBLEM : 21|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BEEP : 17|2@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01 : 20|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_ON : 28|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ LDW_OFF : 27|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ CLEAN_WINDSHIELD : 26|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" BDY
|
||||
|
||||
CM_ SG_ 479 AEB_STATUS "set for the duration of AEB event";
|
||||
CM_ SG_ 479 AEB_BRAKING "set when braking is commanded during AEB event";
|
||||
CM_ SG_ 479 AEB_PREPARE "set 1s before AEB";
|
||||
|
||||
@@ -267,7 +267,7 @@ BO_ 316 GAS_PEDAL: 8 PCM
|
||||
|
||||
BO_ 342 STEERING_SENSORS: 6 EPS
|
||||
SG_ STEER_ANGLE : 7|16@0- (-0.1,0) [-500|500] "deg" EON
|
||||
SG_ STEER_ANGLE_RATE : 23|16@0- (1,0) [-3000|3000] "deg/s" EON
|
||||
SG_ STEER_ANGLE_RATE : 23|16@0- (-1,0) [-3000|3000] "deg/s" EON
|
||||
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 43|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
|
||||
@@ -275,7 +275,7 @@ BO_ 316 GAS_PEDAL: 8 PCM
|
||||
|
||||
BO_ 342 STEERING_SENSORS: 6 EPS
|
||||
SG_ STEER_ANGLE : 7|16@0- (-0.1,0) [-500|500] "deg" EON
|
||||
SG_ STEER_ANGLE_RATE : 23|16@0- (1,0) [-3000|3000] "deg/s" EON
|
||||
SG_ STEER_ANGLE_RATE : 23|16@0- (-1,0) [-3000|3000] "deg/s" EON
|
||||
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 43|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
|
||||
@@ -270,7 +270,7 @@ BO_ 316 GAS_PEDAL: 8 PCM
|
||||
|
||||
BO_ 342 STEERING_SENSORS: 6 EPS
|
||||
SG_ STEER_ANGLE : 7|16@0- (-0.1,0) [-500|500] "deg" EON
|
||||
SG_ STEER_ANGLE_RATE : 23|16@0- (1,0) [-3000|3000] "deg/s" EON
|
||||
SG_ STEER_ANGLE_RATE : 23|16@0- (-1,0) [-3000|3000] "deg/s" EON
|
||||
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 43|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
|
||||
@@ -1028,10 +1028,7 @@ BO_ 48 EMS18: 6 EMS
|
||||
|
||||
BO_ 1322 CLU15: 8 CLU
|
||||
SG_ CF_Clu_VehicleSpeed : 0|8@1+ (1.0,0.0) [0.0|255.0] "" BCM
|
||||
SG_ CF_Clu_InhibitP : 9|1@1+ (1.0,0.0) [0.0|1.0] "" BCM
|
||||
SG_ CF_Clu_InhibitR : 10|1@1+ (1.0,0.0) [0.0|1.0] "" BCM
|
||||
SG_ CF_Clu_InhibitN : 11|1@1+ (1.0,0.0) [0.0|1.0] "" BCM
|
||||
SG_ CF_Clu_InhibitD : 12|1@1+ (1.0,0.0) [0.0|1.0] "" BCM
|
||||
SG_ CF_Clu_Gear : 9|4@1+ (1,0) [0|15] "" BCM
|
||||
SG_ CF_Clu_HudInfoSet : 13|7@1+ (1.0,0.0) [0.0|127.0] "" HUD
|
||||
SG_ CF_Clu_HudFontColorSet : 20|2@1+ (1.0,0.0) [0.0|3.0] "" HUD
|
||||
SG_ CF_Clu_HudBrightUpSW : 22|2@1+ (1.0,0.0) [0.0|3.0] "" HUD
|
||||
@@ -1196,7 +1193,7 @@ BO_ 1313 GW_DDM_PE: 8 BCM
|
||||
SG_ C_RRDoorStatus : 6|2@1+ (1.0,0.0) [0.0|3.0] "" CLU
|
||||
SG_ C_TrunkStatus : 8|2@1+ (1.0,0.0) [0.0|3.0] "" CLU
|
||||
SG_ C_OSMirrorStatus : 10|2@1+ (1.0,0.0) [0.0|3.0] "" CLU
|
||||
|
||||
|
||||
BO_ 1056 SCC11: 8 SCC
|
||||
SG_ MainMode_ACC : 0|1@1+ (1,0) [0|1] "" CLU,EMS,ESC
|
||||
SG_ SCCInfoDisplay : 1|3@1+ (1,0) [0|7] "" CLU,ESC
|
||||
@@ -1523,7 +1520,8 @@ BO_ 881 E_EMS11: 8 XXX
|
||||
SG_ Gear_Change : 12|1@0+ (1,0) [0|31] "" XXX
|
||||
SG_ Cruise_Limit_Status : 13|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ Cruise_Limit_Target : 23|8@1+ (1,0) [0|15] "" XXX
|
||||
SG_ Accel_Pedal_Pos : 31|8@1+ (1,0) [0|7] "" XXX
|
||||
SG_ Accel_Pedal_Pos : 31|8@1+ (1,0) [0|254] "" XXX
|
||||
SG_ CR_Vcu_AccPedDep_Pos : 56|8@1+ (1,0) [0|254] "" XXX
|
||||
|
||||
BO_ 1355 EV_PC6: 8 CGW
|
||||
SG_ CF_Vcu_SbwWarnMsg : 16|3@1+ (1,0) [0|7] "" Vector__XXX
|
||||
@@ -1639,8 +1637,14 @@ BO_ 1042 ICM_412h: 8 ICM
|
||||
SG_ PopupMessageOutput_7Level : 54|1@0+ (1,0) [0|1] "" Vector__XXX
|
||||
SG_ PopupMessageOutput_8Level : 55|1@0+ (1,0) [0|1] "" Vector__XXX
|
||||
|
||||
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_ 882 Elect_Gear_Shifter 5 "D" 8 "S" 6 "N" 7 "R" 0 "P";
|
||||
VAL_ 1322 CF_Clu_Gear 1 "P" 2 "R" 4 "N" 8 "D";
|
||||
VAL_ 909 CF_VSM_Warn 2 "FCW" 3 "AEB";
|
||||
VAL_ 1157 LFA_Icon_State 0 "no_wheel" 1 "white_wheel" 2 "green_wheel" 3 "green_wheel_blink";
|
||||
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";
|
||||
VAL_ 1157 HDA_Icon_State 0 "no_hda" 1 "white_hda" 2 "green_hda";
|
||||
VAL_ 1157 HDA_SysWarning 0 "no_message" 1 "driving_convenience_systems_cancelled" 2 "highway_drive_assist_system_cancelled";
|
||||
|
||||
CM_ "BO_ E_EMS11: All (plug-in) hybrids use this gas signal: CR_Vcu_AccPedDep_Pos, and all EVs use the Accel_Pedal_Pos signal. See hyundai/values.py for a specific car list";
|
||||
|
||||
@@ -163,7 +163,7 @@ BO_ 742 LEAD_INFO: 8 DSU
|
||||
|
||||
BO_ 835 ACC_CONTROL: 8 DSU
|
||||
SG_ ACCEL_CMD : 7|16@0- (0.001,0) [-20|20] "m/s2" HCU
|
||||
SG_ SET_ME_X01 : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ ACC_TYPE : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ DISTANCE : 20|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ MINI_CAR : 21|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X3 : 19|4@0+ (1,0) [0|15] "" XXX
|
||||
@@ -196,6 +196,9 @@ BO_ 951 ESP_CONTROL: 8 ESP
|
||||
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1020 SOLAR_SENSOR: 8 XXX
|
||||
SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1041 ACC_HUD: 8 DSU
|
||||
SG_ FCW : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X20 : 15|8@0+ (1,0) [0|1] "" XXX
|
||||
@@ -333,6 +336,7 @@ CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active";
|
||||
CM_ SG_ 643 COUNTER "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 BRAKE_STATUS "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 PRECOLLISION_ACTIVE "set 0.5s before any braking";
|
||||
CM_ SG_ 835 ACC_TYPE "if 2, car is likely to have a permanent low speed lockout. 1 is ok";
|
||||
CM_ SG_ 835 PERMIT_BRAKING "Original ACC has this going high when a car in front is detected. In openpilot and before the PERMIT_BRAKING name, this was 'SET_ME_1' and is hardcoded to be high. Unsure if only informational or has an effect though existing usage in openpilot is to always set it to 1. Originally 'PMTBRKG' in the leaked toyota_2017_ref_pt.dbc file and name expansion speculated to be PerMiT BRaKinG.";
|
||||
CM_ SG_ 835 ACCEL_CMD_ALT "Copy of main ACCEL_CMD, but across 8 bits instead of 16 bits like ACCEL_CMD. Unsure if only informational or has an effect. Likely informational as existing openpilot sets this to 0 and no loss of functionality observed. Originally 'AT_RAW' in leaked toyota_2017_ref_pt.dbc file.";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in UI with user set unit";
|
||||
@@ -360,6 +364,7 @@ VAL_ 467 LOW_SPEED_LOCKOUT 2 "low speed locked" 1 "ok";
|
||||
VAL_ 614 STATE 3 "enabled" 1 "disabled";
|
||||
VAL_ 614 DIRECTION_CMD 3 "right" 2 "center" 1 "left";
|
||||
VAL_ 643 STATE 0 "normal" 1 "adaptive_cruise_control" 3 "emergency_braking";
|
||||
VAL_ 835 ACC_TYPE 2 "permanent low speed lockout" 1 "ok";
|
||||
VAL_ 921 CRUISE_CONTROL_STATE 2 "disabled" 11 "hold" 10 "hold_waiting_user_cmd" 6 "enabled" 5 "faulted";
|
||||
VAL_ 1042 LDA_ALERT 3 "hold with continuous beep" 2 "LDA unavailable" 1 "hold" 0 "none";
|
||||
VAL_ 1042 BARRIERS 3 "both" 2 "right" 1 "left" 0 "none";
|
||||
|
||||
@@ -163,7 +163,7 @@ BO_ 742 LEAD_INFO: 8 DSU
|
||||
|
||||
BO_ 835 ACC_CONTROL: 8 DSU
|
||||
SG_ ACCEL_CMD : 7|16@0- (0.001,0) [-20|20] "m/s2" HCU
|
||||
SG_ SET_ME_X01 : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ ACC_TYPE : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ DISTANCE : 20|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ MINI_CAR : 21|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X3 : 19|4@0+ (1,0) [0|15] "" XXX
|
||||
@@ -196,6 +196,9 @@ BO_ 951 ESP_CONTROL: 8 ESP
|
||||
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1020 SOLAR_SENSOR: 8 XXX
|
||||
SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1041 ACC_HUD: 8 DSU
|
||||
SG_ FCW : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X20 : 15|8@0+ (1,0) [0|1] "" XXX
|
||||
@@ -333,6 +336,7 @@ CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active";
|
||||
CM_ SG_ 643 COUNTER "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 BRAKE_STATUS "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 PRECOLLISION_ACTIVE "set 0.5s before any braking";
|
||||
CM_ SG_ 835 ACC_TYPE "if 2, car is likely to have a permanent low speed lockout. 1 is ok";
|
||||
CM_ SG_ 835 PERMIT_BRAKING "Original ACC has this going high when a car in front is detected. In openpilot and before the PERMIT_BRAKING name, this was 'SET_ME_1' and is hardcoded to be high. Unsure if only informational or has an effect though existing usage in openpilot is to always set it to 1. Originally 'PMTBRKG' in the leaked toyota_2017_ref_pt.dbc file and name expansion speculated to be PerMiT BRaKinG.";
|
||||
CM_ SG_ 835 ACCEL_CMD_ALT "Copy of main ACCEL_CMD, but across 8 bits instead of 16 bits like ACCEL_CMD. Unsure if only informational or has an effect. Likely informational as existing openpilot sets this to 0 and no loss of functionality observed. Originally 'AT_RAW' in leaked toyota_2017_ref_pt.dbc file.";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in UI with user set unit";
|
||||
@@ -360,6 +364,7 @@ VAL_ 467 LOW_SPEED_LOCKOUT 2 "low speed locked" 1 "ok";
|
||||
VAL_ 614 STATE 3 "enabled" 1 "disabled";
|
||||
VAL_ 614 DIRECTION_CMD 3 "right" 2 "center" 1 "left";
|
||||
VAL_ 643 STATE 0 "normal" 1 "adaptive_cruise_control" 3 "emergency_braking";
|
||||
VAL_ 835 ACC_TYPE 2 "permanent low speed lockout" 1 "ok";
|
||||
VAL_ 921 CRUISE_CONTROL_STATE 2 "disabled" 11 "hold" 10 "hold_waiting_user_cmd" 6 "enabled" 5 "faulted";
|
||||
VAL_ 1042 LDA_ALERT 3 "hold with continuous beep" 2 "LDA unavailable" 1 "hold" 0 "none";
|
||||
VAL_ 1042 BARRIERS 3 "both" 2 "right" 1 "left" 0 "none";
|
||||
|
||||
@@ -163,7 +163,7 @@ BO_ 742 LEAD_INFO: 8 DSU
|
||||
|
||||
BO_ 835 ACC_CONTROL: 8 DSU
|
||||
SG_ ACCEL_CMD : 7|16@0- (0.001,0) [-20|20] "m/s2" HCU
|
||||
SG_ SET_ME_X01 : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ ACC_TYPE : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ DISTANCE : 20|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ MINI_CAR : 21|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X3 : 19|4@0+ (1,0) [0|15] "" XXX
|
||||
@@ -196,6 +196,9 @@ BO_ 951 ESP_CONTROL: 8 ESP
|
||||
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1020 SOLAR_SENSOR: 8 XXX
|
||||
SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1041 ACC_HUD: 8 DSU
|
||||
SG_ FCW : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X20 : 15|8@0+ (1,0) [0|1] "" XXX
|
||||
@@ -333,6 +336,7 @@ CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active";
|
||||
CM_ SG_ 643 COUNTER "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 BRAKE_STATUS "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 PRECOLLISION_ACTIVE "set 0.5s before any braking";
|
||||
CM_ SG_ 835 ACC_TYPE "if 2, car is likely to have a permanent low speed lockout. 1 is ok";
|
||||
CM_ SG_ 835 PERMIT_BRAKING "Original ACC has this going high when a car in front is detected. In openpilot and before the PERMIT_BRAKING name, this was 'SET_ME_1' and is hardcoded to be high. Unsure if only informational or has an effect though existing usage in openpilot is to always set it to 1. Originally 'PMTBRKG' in the leaked toyota_2017_ref_pt.dbc file and name expansion speculated to be PerMiT BRaKinG.";
|
||||
CM_ SG_ 835 ACCEL_CMD_ALT "Copy of main ACCEL_CMD, but across 8 bits instead of 16 bits like ACCEL_CMD. Unsure if only informational or has an effect. Likely informational as existing openpilot sets this to 0 and no loss of functionality observed. Originally 'AT_RAW' in leaked toyota_2017_ref_pt.dbc file.";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in UI with user set unit";
|
||||
@@ -360,6 +364,7 @@ VAL_ 467 LOW_SPEED_LOCKOUT 2 "low speed locked" 1 "ok";
|
||||
VAL_ 614 STATE 3 "enabled" 1 "disabled";
|
||||
VAL_ 614 DIRECTION_CMD 3 "right" 2 "center" 1 "left";
|
||||
VAL_ 643 STATE 0 "normal" 1 "adaptive_cruise_control" 3 "emergency_braking";
|
||||
VAL_ 835 ACC_TYPE 2 "permanent low speed lockout" 1 "ok";
|
||||
VAL_ 921 CRUISE_CONTROL_STATE 2 "disabled" 11 "hold" 10 "hold_waiting_user_cmd" 6 "enabled" 5 "faulted";
|
||||
VAL_ 1042 LDA_ALERT 3 "hold with continuous beep" 2 "LDA unavailable" 1 "hold" 0 "none";
|
||||
VAL_ 1042 BARRIERS 3 "both" 2 "right" 1 "left" 0 "none";
|
||||
|
||||
@@ -163,7 +163,7 @@ BO_ 742 LEAD_INFO: 8 DSU
|
||||
|
||||
BO_ 835 ACC_CONTROL: 8 DSU
|
||||
SG_ ACCEL_CMD : 7|16@0- (0.001,0) [-20|20] "m/s2" HCU
|
||||
SG_ SET_ME_X01 : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ ACC_TYPE : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ DISTANCE : 20|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ MINI_CAR : 21|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X3 : 19|4@0+ (1,0) [0|15] "" XXX
|
||||
@@ -196,6 +196,9 @@ BO_ 951 ESP_CONTROL: 8 ESP
|
||||
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1020 SOLAR_SENSOR: 8 XXX
|
||||
SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1041 ACC_HUD: 8 DSU
|
||||
SG_ FCW : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X20 : 15|8@0+ (1,0) [0|1] "" XXX
|
||||
@@ -333,6 +336,7 @@ CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active";
|
||||
CM_ SG_ 643 COUNTER "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 BRAKE_STATUS "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 PRECOLLISION_ACTIVE "set 0.5s before any braking";
|
||||
CM_ SG_ 835 ACC_TYPE "if 2, car is likely to have a permanent low speed lockout. 1 is ok";
|
||||
CM_ SG_ 835 PERMIT_BRAKING "Original ACC has this going high when a car in front is detected. In openpilot and before the PERMIT_BRAKING name, this was 'SET_ME_1' and is hardcoded to be high. Unsure if only informational or has an effect though existing usage in openpilot is to always set it to 1. Originally 'PMTBRKG' in the leaked toyota_2017_ref_pt.dbc file and name expansion speculated to be PerMiT BRaKinG.";
|
||||
CM_ SG_ 835 ACCEL_CMD_ALT "Copy of main ACCEL_CMD, but across 8 bits instead of 16 bits like ACCEL_CMD. Unsure if only informational or has an effect. Likely informational as existing openpilot sets this to 0 and no loss of functionality observed. Originally 'AT_RAW' in leaked toyota_2017_ref_pt.dbc file.";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in UI with user set unit";
|
||||
@@ -360,6 +364,7 @@ VAL_ 467 LOW_SPEED_LOCKOUT 2 "low speed locked" 1 "ok";
|
||||
VAL_ 614 STATE 3 "enabled" 1 "disabled";
|
||||
VAL_ 614 DIRECTION_CMD 3 "right" 2 "center" 1 "left";
|
||||
VAL_ 643 STATE 0 "normal" 1 "adaptive_cruise_control" 3 "emergency_braking";
|
||||
VAL_ 835 ACC_TYPE 2 "permanent low speed lockout" 1 "ok";
|
||||
VAL_ 921 CRUISE_CONTROL_STATE 2 "disabled" 11 "hold" 10 "hold_waiting_user_cmd" 6 "enabled" 5 "faulted";
|
||||
VAL_ 1042 LDA_ALERT 3 "hold with continuous beep" 2 "LDA unavailable" 1 "hold" 0 "none";
|
||||
VAL_ 1042 BARRIERS 3 "both" 2 "right" 1 "left" 0 "none";
|
||||
|
||||
@@ -163,7 +163,7 @@ BO_ 742 LEAD_INFO: 8 DSU
|
||||
|
||||
BO_ 835 ACC_CONTROL: 8 DSU
|
||||
SG_ ACCEL_CMD : 7|16@0- (0.001,0) [-20|20] "m/s2" HCU
|
||||
SG_ SET_ME_X01 : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ ACC_TYPE : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ DISTANCE : 20|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ MINI_CAR : 21|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X3 : 19|4@0+ (1,0) [0|15] "" XXX
|
||||
@@ -196,6 +196,9 @@ BO_ 951 ESP_CONTROL: 8 ESP
|
||||
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1020 SOLAR_SENSOR: 8 XXX
|
||||
SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1041 ACC_HUD: 8 DSU
|
||||
SG_ FCW : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X20 : 15|8@0+ (1,0) [0|1] "" XXX
|
||||
@@ -333,6 +336,7 @@ CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active";
|
||||
CM_ SG_ 643 COUNTER "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 BRAKE_STATUS "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 PRECOLLISION_ACTIVE "set 0.5s before any braking";
|
||||
CM_ SG_ 835 ACC_TYPE "if 2, car is likely to have a permanent low speed lockout. 1 is ok";
|
||||
CM_ SG_ 835 PERMIT_BRAKING "Original ACC has this going high when a car in front is detected. In openpilot and before the PERMIT_BRAKING name, this was 'SET_ME_1' and is hardcoded to be high. Unsure if only informational or has an effect though existing usage in openpilot is to always set it to 1. Originally 'PMTBRKG' in the leaked toyota_2017_ref_pt.dbc file and name expansion speculated to be PerMiT BRaKinG.";
|
||||
CM_ SG_ 835 ACCEL_CMD_ALT "Copy of main ACCEL_CMD, but across 8 bits instead of 16 bits like ACCEL_CMD. Unsure if only informational or has an effect. Likely informational as existing openpilot sets this to 0 and no loss of functionality observed. Originally 'AT_RAW' in leaked toyota_2017_ref_pt.dbc file.";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in UI with user set unit";
|
||||
@@ -360,6 +364,7 @@ VAL_ 467 LOW_SPEED_LOCKOUT 2 "low speed locked" 1 "ok";
|
||||
VAL_ 614 STATE 3 "enabled" 1 "disabled";
|
||||
VAL_ 614 DIRECTION_CMD 3 "right" 2 "center" 1 "left";
|
||||
VAL_ 643 STATE 0 "normal" 1 "adaptive_cruise_control" 3 "emergency_braking";
|
||||
VAL_ 835 ACC_TYPE 2 "permanent low speed lockout" 1 "ok";
|
||||
VAL_ 921 CRUISE_CONTROL_STATE 2 "disabled" 11 "hold" 10 "hold_waiting_user_cmd" 6 "enabled" 5 "faulted";
|
||||
VAL_ 1042 LDA_ALERT 3 "hold with continuous beep" 2 "LDA unavailable" 1 "hold" 0 "none";
|
||||
VAL_ 1042 BARRIERS 3 "both" 2 "right" 1 "left" 0 "none";
|
||||
|
||||
@@ -163,7 +163,7 @@ BO_ 742 LEAD_INFO: 8 DSU
|
||||
|
||||
BO_ 835 ACC_CONTROL: 8 DSU
|
||||
SG_ ACCEL_CMD : 7|16@0- (0.001,0) [-20|20] "m/s2" HCU
|
||||
SG_ SET_ME_X01 : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ ACC_TYPE : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ DISTANCE : 20|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ MINI_CAR : 21|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X3 : 19|4@0+ (1,0) [0|15] "" XXX
|
||||
@@ -196,6 +196,9 @@ BO_ 951 ESP_CONTROL: 8 ESP
|
||||
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1020 SOLAR_SENSOR: 8 XXX
|
||||
SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1041 ACC_HUD: 8 DSU
|
||||
SG_ FCW : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X20 : 15|8@0+ (1,0) [0|1] "" XXX
|
||||
@@ -333,6 +336,7 @@ CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active";
|
||||
CM_ SG_ 643 COUNTER "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 BRAKE_STATUS "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 PRECOLLISION_ACTIVE "set 0.5s before any braking";
|
||||
CM_ SG_ 835 ACC_TYPE "if 2, car is likely to have a permanent low speed lockout. 1 is ok";
|
||||
CM_ SG_ 835 PERMIT_BRAKING "Original ACC has this going high when a car in front is detected. In openpilot and before the PERMIT_BRAKING name, this was 'SET_ME_1' and is hardcoded to be high. Unsure if only informational or has an effect though existing usage in openpilot is to always set it to 1. Originally 'PMTBRKG' in the leaked toyota_2017_ref_pt.dbc file and name expansion speculated to be PerMiT BRaKinG.";
|
||||
CM_ SG_ 835 ACCEL_CMD_ALT "Copy of main ACCEL_CMD, but across 8 bits instead of 16 bits like ACCEL_CMD. Unsure if only informational or has an effect. Likely informational as existing openpilot sets this to 0 and no loss of functionality observed. Originally 'AT_RAW' in leaked toyota_2017_ref_pt.dbc file.";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in UI with user set unit";
|
||||
@@ -360,6 +364,7 @@ VAL_ 467 LOW_SPEED_LOCKOUT 2 "low speed locked" 1 "ok";
|
||||
VAL_ 614 STATE 3 "enabled" 1 "disabled";
|
||||
VAL_ 614 DIRECTION_CMD 3 "right" 2 "center" 1 "left";
|
||||
VAL_ 643 STATE 0 "normal" 1 "adaptive_cruise_control" 3 "emergency_braking";
|
||||
VAL_ 835 ACC_TYPE 2 "permanent low speed lockout" 1 "ok";
|
||||
VAL_ 921 CRUISE_CONTROL_STATE 2 "disabled" 11 "hold" 10 "hold_waiting_user_cmd" 6 "enabled" 5 "faulted";
|
||||
VAL_ 1042 LDA_ALERT 3 "hold with continuous beep" 2 "LDA unavailable" 1 "hold" 0 "none";
|
||||
VAL_ 1042 BARRIERS 3 "both" 2 "right" 1 "left" 0 "none";
|
||||
|
||||
734
opendbc/tesla_can.dbc
Normal file
734
opendbc/tesla_can.dbc
Normal file
@@ -0,0 +1,734 @@
|
||||
VERSION ""
|
||||
|
||||
|
||||
NS_ :
|
||||
NS_DESC_
|
||||
CM_
|
||||
BA_DEF_
|
||||
BA_
|
||||
VAL_
|
||||
CAT_DEF_
|
||||
CAT_
|
||||
FILTER
|
||||
BA_DEF_DEF_
|
||||
EV_DATA_
|
||||
ENVVAR_DATA_
|
||||
SGTYPE_
|
||||
SGTYPE_VAL_
|
||||
BA_DEF_SGTYPE_
|
||||
BA_SGTYPE_
|
||||
SIG_TYPE_REF_
|
||||
VAL_TABLE_
|
||||
SIG_GROUP_
|
||||
SIG_VALTYPE_
|
||||
SIGTYPE_VALTYPE_
|
||||
BO_TX_BU_
|
||||
BA_DEF_REL_
|
||||
BA_REL_
|
||||
BA_DEF_DEF_REL_
|
||||
BU_SG_REL_
|
||||
BU_EV_REL_
|
||||
BU_BO_REL_
|
||||
SG_MUL_VAL_
|
||||
|
||||
BS_:
|
||||
|
||||
BU_:
|
||||
NEO
|
||||
MCU
|
||||
GTW
|
||||
EPAS
|
||||
DI
|
||||
ESP
|
||||
SBW
|
||||
STW
|
||||
APP
|
||||
DAS
|
||||
XXX
|
||||
|
||||
VAL_TABLE_ StW_AnglHP_Spd 16383 "SNA" ;
|
||||
VAL_TABLE_ DI_aebFaultReason 15 "DI_AEB_FAULT_DAS_REQ_DI_UNAVAIL" 14 "DI_AEB_FAULT_ACCEL_REQ_INVALID" 13 "DI_AEB_FAULT_MIN_TIME_BTWN_EVENTS" 12 "DI_AEB_FAULT_ESP_MIA" 11 "DI_AEB_FAULT_ESP_FAULT" 10 "DI_AEB_FAULT_EPB_NOT_PARKED" 9 "DI_AEB_FAULT_ACCEL_OUT_OF_BOUNDS" 8 "DI_AEB_FAULT_PM_REQUEST" 7 "DI_AEB_FAULT_VEL_EST_ABNORMAL" 6 "DI_AEB_FAULT_DAS_SNA" 5 "DI_AEB_FAULT_DAS_CONTROL_MIA" 4 "DI_AEB_FAULT_SPEED_DELTA" 3 "DI_AEB_FAULT_EBR_FAULT" 2 "DI_AEB_FAULT_PM_MIA" 1 "DI_AEB_FAULT_EPB_MIA" 0 "DI_AEB_FAULT_NONE" ;
|
||||
VAL_TABLE_ DI_aebLockState 3 "AEB_LOCK_STATE_SNA" 2 "AEB_LOCK_STATE_UNUSED" 1 "AEB_LOCK_STATE_UNLOCKED" 0 "AEB_LOCK_STATE_LOCKED" ;
|
||||
VAL_TABLE_ DI_aebSmState 7 "DI_AEB_STATE_FAULT" 6 "DI_AEB_STATE_EXIT" 5 "DI_AEB_STATE_STANDSTILL" 4 "DI_AEB_STATE_STOPPING" 3 "DI_AEB_STATE_ENABLE" 2 "DI_AEB_STATE_ENABLE_INIT" 1 "DI_AEB_STATE_STANDBY" 0 "DI_AEB_STATE_UNAVAILABLE" ;
|
||||
VAL_TABLE_ DI_aebState 7 "AEB_CAN_STATE_SNA" 4 "AEB_CAN_STATE_FAULT" 3 "AEB_CAN_STATE_STANDSTILL" 2 "AEB_CAN_STATE_ENABLED" 1 "AEB_CAN_STATE_STANDBY" 0 "AEB_CAN_STATE_UNAVAILABLE" ;
|
||||
VAL_TABLE_ DI_epbInterfaceReady 1 "EPB_INTERFACE_READY" 0 "EPB_INTERFACE_NOT_READY" ;
|
||||
VAL_TABLE_ DI_gear 7 "DI_GEAR_SNA" 4 "DI_GEAR_D" 3 "DI_GEAR_N" 2 "DI_GEAR_R" 1 "DI_GEAR_P" 0 "DI_GEAR_INVALID" ;
|
||||
VAL_TABLE_ DI_gpoReason 8 "DI_GPO_NUMREASONS" 7 "DI_GPO_CAPACITOR_OVERTEMP" 6 "DI_GPO_NOT_ENOUGH_12V" 5 "DI_GPO_NO_BATTERY_POWER" 4 "DI_GPO_AMBIENT_OVERTEMP" 3 "DI_GPO_FLUID_DELTAT" 2 "DI_GPO_STATOR_OVERTEMP" 1 "DI_GPO_HEATSINK_OVERTEMP" 0 "DI_GPO_OUTLET_OVERTEMP" ;
|
||||
VAL_TABLE_ DI_immobilizerCondition 1 "DI_IMM_CONDITION_LEARNED" 0 "DI_IMM_CONDITION_VIRGIN_SNA" ;
|
||||
VAL_TABLE_ DI_immobilizerState 7 "DI_IMM_STATE_FAULT" 6 "DI_IMM_STATE_FAULTRETRY" 5 "DI_IMM_STATE_RESET" 4 "DI_IMM_STATE_LEARN" 3 "DI_IMM_STATE_DISARMED" 2 "DI_IMM_STATE_AUTHENTICATING" 1 "DI_IMM_STATE_REQUEST" 0 "DI_IMM_STATE_INIT_SNA" ;
|
||||
VAL_TABLE_ DI_limpReason 24 "DI_LIMP_NUMREASONS" 23 "DI_LIMP_CAPACITOR_OVERTEMP" 22 "DI_LIMP_GTW_MIA" 21 "DI_LIMP_TRQCMD_VALIDITY_UNKNOWN" 20 "DI_LIMP_DI_MIA" 19 "DI_LIMP_CONFIG_MISMATCH" 18 "DI_LIMP_HEATSINK_TEMP" 17 "DI_LIMP_PMREQUEST" 16 "DI_LIMP_PMHEARTBEAT" 15 "DI_LIMP_TRQ_CROSS_CHECK" 14 "DI_LIMP_EXTERNAL_COMMAND" 13 "DI_LIMP_WRONG_CS_CALIBRATION" 12 "DI_LIMP_STATOR_TEMP" 11 "DI_LIMP_DELTAT_TOO_NEGATIVE" 10 "DI_LIMP_DELTAT_TOO_POSITIVE" 9 "DI_LIMP_AMBIENT_TEMP" 8 "DI_LIMP_OUTLET_TEMP" 7 "DI_LIMP_LOW_FLOW" 6 "DI_LIMP_BMS_MIA" 5 "DI_LIMP_12V_SUPPLY_UNDERVOLTAGE" 4 "DI_LIMP_NO_FLUID" 3 "DI_LIMP_NO_FUNC_HEATSINK_SENSOR" 2 "DI_LIMP_NO_FUNC_STATORT_SENSOR" 1 "DI_LIMP_BUSV_SENSOR_IRRATIONAL" 0 "DI_LIMP_PHASE_IMBALANCE" ;
|
||||
VAL_TABLE_ DI_mode 2 "DI_MODE_DYNO" 1 "DI_MODE_DRIVE" 0 "DI_MODE_UNDEF" ;
|
||||
VAL_TABLE_ DI_motorType 14 "DI_MOTOR_F2AE" 13 "DI_MOTOR_F2AD" 12 "DI_MOTOR_F2AC" 11 "DI_MOTOR_F2AB" 10 "DI_MOTOR_F1AC" 9 "DI_MOTOR_SSR1A" 8 "DI_MOTOR_F1A" 7 "DI_MOTOR_M7M6" 6 "DI_MOTOR_M8A" 5 "DI_MOTOR_M7M5" 4 "DI_MOTOR_M7M4" 3 "DI_MOTOR_M7M3" 2 "DI_MOTOR_ROADSTER_SPORT" 1 "DI_MOTOR_ROADSTER_BASE" 0 "DI_MOTOR_SNA" ;
|
||||
VAL_TABLE_ DI_speedUnits 1 "DI_SPEED_KPH" 0 "DI_SPEED_MPH" ;
|
||||
VAL_TABLE_ DI_state 4 "DI_STATE_ENABLE" 3 "DI_STATE_FAULT" 2 "DI_STATE_CLEAR_FAULT" 1 "DI_STATE_STANDBY" 0 "DI_STATE_PREAUTH" ;
|
||||
VAL_TABLE_ DI_velocityEstimatorState 4 "VE_STATE_BACKUP_MOTOR" 3 "VE_STATE_BACKUP_WHEELS_B" 2 "VE_STATE_BACKUP_WHEELS_A" 1 "VE_STATE_WHEELS_NORMAL" 0 "VE_STATE_NOT_INITIALIZED" ;
|
||||
|
||||
|
||||
BO_ 1160 DAS_steeringControl: 4 NEO
|
||||
SG_ DAS_steeringControlType : 23|2@0+ (1,0) [0|0] "" EPAS
|
||||
SG_ DAS_steeringControlChecksum : 31|8@0+ (1,0) [0|0] "" EPAS
|
||||
SG_ DAS_steeringControlCounter : 19|4@0+ (1,0) [0|0] "" EPAS
|
||||
SG_ DAS_steeringAngleRequest : 6|15@0+ (0.1,-1638.35) [-1638.35|1638.35] "deg" EPAS
|
||||
SG_ DAS_steeringHapticRequest : 7|1@0+ (1,0) [0|0] "" EPAS
|
||||
|
||||
BO_ 257 GTW_epasControl: 3 NEO
|
||||
SG_ GTW_epasControlChecksum : 23|8@0+ (1,0) [0|255] "" NEO
|
||||
SG_ GTW_epasControlCounter : 11|4@0+ (1,0) [0|15] "" NEO
|
||||
SG_ GTW_epasControlType : 15|2@0+ (1,0) [-1|4] "" NEO
|
||||
SG_ GTW_epasEmergencyOn : 7|1@0+ (1,0) [-1|2] "" NEO
|
||||
SG_ GTW_epasLDWEnabled : 12|1@0+ (1,0) [-1|2] "" NEO
|
||||
SG_ GTW_epasPowerMode : 6|4@0+ (1,0) [4|14] "" NEO
|
||||
SG_ GTW_epasTuneRequest : 2|3@0+ (1,0) [-1|8] "" NEO
|
||||
|
||||
BO_ 880 EPAS_sysStatus: 8 EPAS
|
||||
SG_ EPAS_currentTuneMode : 7|4@0+ (1,0) [8|15] "" NEO
|
||||
SG_ EPAS_eacErrorCode : 23|4@0+ (1,0) [-1|16] "" NEO
|
||||
SG_ EPAS_eacStatus : 55|3@0+ (1,0) [5|7] "" NEO
|
||||
SG_ EPAS_handsOnLevel : 39|2@0+ (1,0) [-1|4] "" NEO
|
||||
SG_ EPAS_internalSAS : 37|14@0+ (0.1,-819.200012) [0|0] "deg" NEO
|
||||
SG_ EPAS_steeringFault : 2|1@0+ (1,0) [-1|2] "" NEO
|
||||
SG_ EPAS_steeringRackForce : 1|10@0+ (50,-25575) [0|0] "N" NEO
|
||||
SG_ EPAS_steeringReduced : 3|1@0+ (1,0) [-1|2] "" NEO
|
||||
SG_ EPAS_sysStatusChecksum : 63|8@0+ (1,0) [0|255] "" NEO
|
||||
SG_ EPAS_sysStatusCounter : 51|4@0+ (1,0) [0|15] "" NEO
|
||||
SG_ EPAS_torsionBarTorque : 19|12@0+ (0.01,-20.5) [0|0] "Nm" NEO
|
||||
|
||||
BO_ 3 STW_ANGL_STAT: 8 STW
|
||||
SG_ StW_Angl : 5|14@0+ (0.5,-2048) [0|0] "deg" NEO
|
||||
SG_ StW_AnglSpd : 21|14@0+ (0.5,-2048) [0|0] "/s" NEO
|
||||
SG_ StW_AnglSens_Stat : 33|2@0+ (1,0) [-1|4] "" NEO
|
||||
SG_ StW_AnglSens_Id : 35|2@0+ (1,0) [3|3] "" NEO
|
||||
SG_ MC_STW_ANGL_STAT : 55|4@0+ (1,0) [0|15] "" NEO
|
||||
SG_ CRC_STW_ANGL_STAT : 63|8@0+ (1,0) [0|255] "" NEO
|
||||
|
||||
BO_ 14 STW_ANGLHP_STAT: 8 STW
|
||||
|
||||
SG_ StW_AnglHP : 5|14@0+ (0.1,-819.2) [-819.2|819] "deg" NEO
|
||||
SG_ StW_AnglHP_Spd : 21|14@0+ (0.5,-4096) [-4096|4095.5] "deg/s" NEO
|
||||
SG_ StW_AnglHP_Sens_Stat : 33|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ StW_AnglHP_Sens_Id : 35|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ MC_STW_ANGLHP_STAT : 55|4@0+ (1,0) [0|15] "" NEO
|
||||
SG_ CRC_STW_ANGLHP_STAT : 63|8@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 264 DI_torque1: 8 DI
|
||||
SG_ DI_torqueDriver : 0|13@1- (0.25,0) [-750|750] "Nm" NEO
|
||||
SG_ DI_torque1Counter : 13|3@1+ (1,0) [0|0] "" NEO
|
||||
SG_ DI_torqueMotor : 16|13@1- (0.25,0) [-750|750] "Nm" NEO
|
||||
SG_ DI_soptState : 29|3@1+ (1,0) [0|0] "" NEO
|
||||
SG_ DI_motorRPM : 32|16@1- (1,0) [-17000|17000] "RPM" NEO
|
||||
SG_ DI_pedalPos : 48|8@1+ (0.4,0) [0|100] "%" NEO
|
||||
SG_ DI_torque1Checksum : 56|8@1+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 280 DI_torque2: 6 DI
|
||||
SG_ DI_torqueEstimate : 0|12@1- (0.5,0) [-750|750] "Nm" NEO
|
||||
SG_ DI_gear : 12|3@1+ (1,0) [0|0] "" NEO
|
||||
SG_ DI_brakePedal : 15|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ DI_vehicleSpeed : 16|12@1+ (0.05,-25) [-25|179.75] "MPH" NEO
|
||||
SG_ DI_gearRequest : 28|3@1+ (1,0) [0|0] "" NEO
|
||||
SG_ DI_torqueInterfaceFailure : 31|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ DI_torque2Counter : 32|4@1+ (1,0) [0|0] "" NEO
|
||||
SG_ DI_brakePedalState : 36|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ DI_epbParkRequest : 38|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ DI_epbInterfaceReady : 39|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ DI_torque2Checksum : 40|8@1+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 309 ESP_135h: 5 ESP
|
||||
SG_ ESP_135hChecksum : 23|8@0+ (1,0) [0|255] "" NEO
|
||||
SG_ ESP_135hCounter : 11|4@0+ (1,0) [0|15] "" NEO
|
||||
SG_ ESP_absBrakeEvent : 2|1@0+ (1,0) [-1|2] "" NEO
|
||||
SG_ ESP_brakeDiscWipingActive : 4|1@0+ (1,0) [-1|2] "" NEO
|
||||
SG_ ESP_brakeLamp : 3|1@0+ (1,0) [-1|2] "" NEO
|
||||
SG_ ESP_espFaultLamp : 6|1@0+ (1,0) [-1|2] "" NEO
|
||||
SG_ ESP_espLampFlash : 7|1@0+ (1,0) [-1|2] "" NEO
|
||||
SG_ ESP_hillStartAssistActive : 1|2@0+ (1,0) [-1|4] "" NEO
|
||||
SG_ ESP_messagePumpService : 24|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ ESP_messagePumpFailure : 25|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ ESP_messageEBDFailure : 26|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ ESP_absFaultLamp : 27|1@0+ (1,0) [-1|2] "" NEO
|
||||
SG_ ESP_tcDisabledByFault : 28|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ ESP_messageDynoModeActive : 29|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ ESP_hydraulicBoostEnabled : 30|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ ESP_espOffLamp : 31|1@0+ (1,0) [-1|2] "" NEO
|
||||
SG_ ESP_stabilityControlSts : 14|3@0+ (1,0) [6|7] "" NEO
|
||||
SG_ ESP_tcLampFlash : 5|1@0+ (1,0) [-1|2] "" NEO
|
||||
SG_ ESP_tcOffLamp : 15|1@0+ (1,0) [0|1] "" NEO
|
||||
|
||||
BO_ 341 ESP_B: 8 ESP
|
||||
SG_ ESP_BChecksum : 39|8@0+ (1,0) [0|255] "" NEO,EPAS
|
||||
SG_ ESP_BCounter : 62|4@0+ (1,0) [1|15] "" NEO,EPAS
|
||||
SG_ ESP_vehicleSpeed : 47|16@0+ (0.00999999978,0) [0|0] "kph" NEO,EPAS
|
||||
SG_ ESP_vehicleSpeedQF : 57|2@0+ (1,0) [1|2] "" NEO,EPAS
|
||||
SG_ ESP_wheelPulseCountFrL : 7|8@0+ (1,0) [0|254] "" NEO,EPAS
|
||||
SG_ ESP_wheelPulseCountFrR : 15|8@0+ (1,0) [0|254] "" NEO,EPAS
|
||||
SG_ ESP_wheelPulseCountReL : 23|8@0+ (1,0) [0|254] "" NEO,EPAS
|
||||
SG_ ESP_wheelPulseCountReR : 31|8@0+ (1,0) [0|254] "" NEO,EPAS
|
||||
|
||||
BO_ 513 SDM1: 5 GTW
|
||||
SG_ SDM_bcklPassStatus : 3|2@0+ (1,0) [0|3] "" NEO
|
||||
SG_ SDM_bcklDrivStatus : 5|2@0+ (1,0) [0|3] "" NEO
|
||||
|
||||
BO_ 532 EPB_epasControl: 3 EPB
|
||||
SG_ EPB_epasControlChecksum : 23|8@0+ (1,0) [0|255] "" NEO,EPAS
|
||||
SG_ EPB_epasControlCounter : 11|4@0+ (1,0) [0|15] "" NEO,EPAS
|
||||
SG_ EPB_epasEACAllow : 2|3@0+ (1,0) [4|7] "" NEO,EPAS
|
||||
|
||||
BO_ 792 GTW_carState: 8 GTW
|
||||
SG_ YEAR : 0|7@1+ (1,2000) [2000|2127] "Year" NEO
|
||||
SG_ CERRD : 7|1@1+ (1,0) [0|1] "" NEO
|
||||
SG_ MONTH : 8|4@1+ (1,0) [1|12] "Month" NEO
|
||||
SG_ DOOR_STATE_FL : 12|2@1+ (1,0) [0|3] "" NEO
|
||||
SG_ DOOR_STATE_FR : 14|2@1+ (1,0) [0|3] "" NEO
|
||||
SG_ SECOND : 16|6@1+ (1,0) [0|59] "s" NEO
|
||||
SG_ DOOR_STATE_RL : 22|2@1+ (1,0) [0|3] "" NEO
|
||||
SG_ Hour : 24|5@1+ (1,0) [0|23] "h" NEO
|
||||
SG_ DOOR_STATE_RR : 29|2@1+ (1,0) [0|3] "" NEO
|
||||
SG_ DAY : 32|5@1+ (1,0) [0|31] "" NEO
|
||||
SG_ MINUTE : 40|6@1+ (1,0) [0|59] "min" NEO
|
||||
SG_ BOOT_STATE : 46|2@1+ (1,0) [0|3] "" NEO
|
||||
SG_ GTW_updateInProgress : 48|2@1+ (1,0) [0|3] "" NEO
|
||||
SG_ DOOR_STATE_FrontTrunk : 50|2@1+ (1,0) [0|3] "" NEO
|
||||
SG_ MCU_factoryMode : 52|1@1+ (1,0) [0|1] "" NEO
|
||||
SG_ MCU_transportModeOn : 53|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ BC_headLightLStatus : 55|2@0+ (1,0) [0|3] "" NEO
|
||||
SG_ BC_headLightRStatus : 57|2@0+ (1,0) [0|3] "" NEO
|
||||
SG_ BC_indicatorLStatus : 59|2@0+ (1,0) [0|3] "" NEO
|
||||
SG_ BC_indicatorRStatus : 61|2@0+ (1,0) [0|3] "" NEO
|
||||
|
||||
BO_ 872 DI_state: 8 DI
|
||||
SG_ DI_systemState : 0|3@1+ (1,0) [0|0] "" NEO
|
||||
SG_ DI_vehicleHoldState : 3|3@1+ (1,0) [0|0] "" NEO
|
||||
SG_ DI_proximity : 6|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ DI_driveReady : 7|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ DI_regenLight : 8|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ DI_state : 9|3@1+ (1,0) [0|0] "" NEO
|
||||
SG_ DI_cruiseState : 12|4@1+ (1,0) [0|0] "" NEO
|
||||
SG_ DI_analogSpeed : 16|12@1+ (0.1,0) [0|150] "speed" NEO
|
||||
SG_ DI_immobilizerState : 28|3@1+ (1,0) [0|0] "" NEO
|
||||
SG_ DI_speedUnits : 31|1@1+ (1,0) [0|1] "" NEO
|
||||
SG_ DI_cruiseSet : 32|9@1+ (0.5,0) [0|255.5] "speed" NEO
|
||||
SG_ DI_aebState : 41|3@1+ (1,0) [0|0] "" NEO
|
||||
SG_ DI_stateCounter : 44|4@1+ (1,0) [0|0] "" NEO
|
||||
SG_ DI_digitalSpeed : 48|8@1+ (1,0) [0|250] "" NEO
|
||||
SG_ DI_stateChecksum : 56|8@1+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 109 SBW_RQ_SCCM: 4 STW
|
||||
SG_ StW_Sw_Stat3 : 0|3@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MsgTxmtId : 6|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ TSL_RND_Posn_StW : 8|4@1+ (1,0) [0|0] "" NEO
|
||||
SG_ TSL_P_Psd_StW : 12|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MC_SBW_RQ_SCCM : 20|4@1+ (1,0) [0|15] "" NEO
|
||||
SG_ CRC_SBW_RQ_SCCM : 24|8@1+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 69 STW_ACTN_RQ: 8 STW
|
||||
SG_ SpdCtrlLvr_Stat : 0|6@1+ (1,0) [0|0] "" NEO
|
||||
SG_ VSL_Enbl_Rq : 6|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ SpdCtrlLvrStat_Inv : 7|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ DTR_Dist_Rq : 8|8@1+ (1,0) [0|200] "" NEO
|
||||
SG_ TurnIndLvr_Stat : 16|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ HiBmLvr_Stat : 18|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ WprWashSw_Psd : 20|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ WprWash_R_Sw_Posn_V2 : 22|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ StW_Lvr_Stat : 24|3@1+ (1,0) [0|0] "" NEO
|
||||
SG_ StW_Cond_Flt : 27|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ StW_Cond_Psd : 28|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ HrnSw_Psd : 30|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ StW_Sw00_Psd : 32|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ StW_Sw01_Psd : 33|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ StW_Sw02_Psd : 34|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ StW_Sw03_Psd : 35|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ StW_Sw04_Psd : 36|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ StW_Sw05_Psd : 37|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ StW_Sw06_Psd : 38|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ StW_Sw07_Psd : 39|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ StW_Sw08_Psd : 40|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ StW_Sw09_Psd : 41|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ StW_Sw10_Psd : 42|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ StW_Sw11_Psd : 43|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ StW_Sw12_Psd : 44|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ StW_Sw13_Psd : 45|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ StW_Sw14_Psd : 46|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ StW_Sw15_Psd : 47|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ WprSw6Posn : 48|3@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MC_STW_ACTN_RQ : 52|4@1+ (1,0) [0|15] "" NEO
|
||||
SG_ CRC_STW_ACTN_RQ : 56|8@1+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 643 BODY_R1: 8 GTW
|
||||
SG_ AirTemp_Insd : 47|8@0+ (0.25,0) [0|63.5] "C" NEO
|
||||
SG_ AirTemp_Outsd : 63|8@0+ (0.5,-40) [-40|86.5] "C" NEO
|
||||
SG_ Bckl_Sw_RL_Stat_SAM_R : 49|2@0+ (1,0) [-1|4] "" NEO
|
||||
SG_ Bckl_Sw_RM_Stat_SAM_R : 53|2@0+ (1,0) [-1|4] "" NEO
|
||||
SG_ Bckl_Sw_RR_Stat_SAM_R : 51|2@0+ (1,0) [-1|4] "" NEO
|
||||
SG_ DL_RLtch_Stat : 9|2@0+ (1,0) [-1|4] "" NEO
|
||||
SG_ DrRLtch_FL_Stat : 1|2@0+ (1,0) [-1|4] "" NEO
|
||||
SG_ DrRLtch_FR_Stat : 3|2@0+ (1,0) [-1|4] "" NEO
|
||||
SG_ DrRLtch_RL_Stat : 5|2@0+ (1,0) [-1|4] "" NEO
|
||||
SG_ DrRLtch_RR_Stat : 7|2@0+ (1,0) [-1|4] "" NEO
|
||||
SG_ EngHd_Stat : 11|2@0+ (1,0) [-1|4] "" NEO
|
||||
SG_ LoBm_On_Rq : 32|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ HiBm_On : 33|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ Hrn_On : 26|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ IrLmp_D_Lt_Flt : 34|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ IrLmp_P_Rt_Flt : 35|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ LgtSens_Twlgt : 18|3@0+ (1,0) [0|7] "Steps" NEO
|
||||
SG_ LgtSens_SNA : 19|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ LgtSens_Tunnel : 20|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ LgtSens_Flt : 21|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ LgtSens_Night : 22|1@0+ (1,0) [-1|2] "" NEO
|
||||
SG_ ADL_LoBm_On_Rq : 23|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ LoBm_D_Lt_Flt : 36|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ LoBm_P_Rt_Flt : 37|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ MPkBrk_Stat : 28|1@0+ (1,0) [-1|2] "" NEO
|
||||
SG_ RevGr_Engg : 39|2@0+ (1,0) [-1|4] "" NEO
|
||||
SG_ StW_Cond_Stat : 55|2@0+ (1,0) [-1|4] "" NEO
|
||||
SG_ Term54_Actv : 27|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ Trlr_Stat : 25|2@0+ (1,0) [-1|4] "" NEO
|
||||
SG_ VTA_Alm_Actv : 13|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ WprOutsdPkPosn : 29|1@0+ (1,0) [0|1] "" NEO
|
||||
|
||||
BO_ 760 UI_gpsVehicleSpeed: 8 GTW
|
||||
SG_ UI_gpsHDOP : 0|8@1+ (0.1,0) [0|25.5] "1" DAS
|
||||
SG_ UI_gpsVehicleHeading : 8|16@1+ (0.0078125,0) [0|511.9921875] "deg" DAS
|
||||
SG_ UI_gpsVehicleSpeed : 24|16@1+ (0.00390625,0) [0|250.996] "km/hr" Vector__XXX
|
||||
SG_ UI_userSpeedOffset : 40|6@1+ (1,-30) [-30|33] "kph/mph" DAS
|
||||
SG_ UI_mapSpeedLimitUnits : 46|1@1+ (1,0) [0|1] "" DAS
|
||||
SG_ UI_userSpeedOffsetUnits : 47|1@1+ (1,0) [0|1] "" DAS
|
||||
SG_ UI_mppSpeedLimit : 48|5@1+ (5,0) [0|155] "kph/mph" DAS
|
||||
SG_ UI_gpsNmeaMIA : 53|1@1+ (1,0) [0|0] "" DAS
|
||||
|
||||
BO_ 536 MCU_chassisControl: 8 GTW
|
||||
SG_ MCU_dasDebugEnable : 0|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_parkBrakeRequest : 1|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_trailerModeCH : 3|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_fcwSensitivity : 4|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_fcwEnable : 6|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_latControlEnable : 8|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_accOvertakeEnable : 10|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_ldwEnable : 12|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_aebEnable : 14|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_bsdEnable : 16|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_ahlbEnable : 18|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_parkSetting : 20|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_pedalSafetyEnable : 22|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_frontDefrostReq_das : 24|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_autoParkRequest : 26|4@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_redLightStopSignEnable : 30|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_enableCreepTorqueCH : 32|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_narrowGarages : 33|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_rebootAutopilot : 34|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_enableAutowipers : 35|1@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_overPaintedUSS : 38|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_selfParkTune : 40|4@1+ (1,0) [0|15] "" NEO
|
||||
SG_ MCU_towModeEnable : 44|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_zeroSpeedConfirmed : 46|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_aesEnable : 48|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_autoLaneChangeEnable : 50|2@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_chassisControlCounter : 52|4@1+ (1,0) [0|0] "" NEO
|
||||
SG_ MCU_chassisControlChecksum : 56|8@1+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 904 MCU_clusterBacklightRequest: 3 NEO
|
||||
SG_ MCU_clusterBacklightOn : 7|1@1+ (1,0) [0|1] "" NEO
|
||||
SG_ MCU_clusterBrightnessLevel : 8|8@1+ (0.5,0) [0|127.5] "%" NEO
|
||||
SG_ MCU_clusterReadyForDrive : 6|1@1+ (1,0) [-1|2] "" NEO
|
||||
SG_ MCU_clusterReadyForPowerOff : 5|1@1+ (1,0) [0|1] "" NEO
|
||||
|
||||
BO_ 984 MCU_locationStatus: 8 MCU
|
||||
SG_ MCU_gpsAccuracy : 57|7@1+ (0.2,0) [0|0] "m" NEO
|
||||
SG_ MCU_latitude : 0|28@1- (1E-06,0) [0|0] "deg" NEO
|
||||
SG_ MCU_longitude : 28|29@1- (1E-06,0) [0|0] "deg" NEO
|
||||
|
||||
BO_ 104 MCU_locationStatus2: 8 MCU
|
||||
SG_ MCU_elevation : 0|32@1- (0.1,0) [0|0] "m" GTW
|
||||
SG_ MCU_navigonExpectedSpeed : 32|7@1+ (1,0) [0|126] "mph" GTW
|
||||
|
||||
BO_ 840 GTW_status: 8 GTW
|
||||
SG_ GTW_accGoingDown : 6|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ GTW_accRailReq : 8|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ GTW_brakePressed : 1|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ GTW_driveGoingDown : 7|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ GTW_driveRailReq : 0|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ GTW_driverIsLeaving : 5|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ GTW_driverPresent : 2|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ GTW_hvacGoingDown : 11|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ GTW_hvacRailReq : 9|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ GTW_icPowerOff : 4|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ GTW_notEnough12VForDrive : 3|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ GTW_preconditionRequest : 10|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ GTW_statusChecksum : 63|8@0+ (1,0) [0|255] "" NEO
|
||||
SG_ GTW_statusCounter : 51|4@0+ (1,0) [0|15] "" NEO
|
||||
|
||||
BO_ 920 GTW_carConfig: 8 GTW
|
||||
SG_ GTW_performanceConfig : 2|3@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GTW_fourWheelDrive : 4|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GTW_unknown1 : 5|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GTW_dasHw : 7|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GTW_parkAssistInstalled : 9|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GTW_forwardRadarHw : 11|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GTW_airSuspensionInstalled : 14|3@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GTW_unknown2 : 15|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GTW_country : 23|16@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GTW_parkSensorGeometryType : 33|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GTW_rhd : 34|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GTW_bodyControlsType : 35|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GTW_radarPosition : 39|4@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GTW_rearCornerRadarHw : 41|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GTW_frontCornerRadarHw : 43|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GTW_epasType : 45|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GTW_chassisType : 47|2@0+ (1,0) [0|2] "" NEO
|
||||
SG_ GTW_wheelType : 52|5@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GTW_rearSeatControllerMask : 55|3@0+ (1,0) [0|7] "" NEO
|
||||
SG_ GTW_euVehicle : 56|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GTW_foldingMirrorsInstalled : 57|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GTW_brakeHwType : 59|2@0+ (1,0) [0|2] "" NEO
|
||||
SG_ GTW_autopilot : 61|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GTW_unknown3 : 63|2@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 1006 UI_autopilotControl: 8 GTW
|
||||
SG_ UI_autopilotControlIndex M : 0|3@1+ (1,0) [0|7] "" APP,APS
|
||||
SG_ UI_hovEnabled m0 : 3|1@1+ (1,0) [0|0] "" APP,APS
|
||||
SG_ UI_donDisableAutoWiperDuration m0 : 4|3@1+ (1,0) [0|0] "" APP,APS
|
||||
SG_ UI_donDisableOnAutoWiperSpeed m0 : 7|4@1+ (1,0) [0|0] "" APP,APS
|
||||
SG_ UI_blindspotMinSpeed m0 : 11|4@1+ (1,0) [0|0] "" APP,APS
|
||||
SG_ UI_blindspotDistance m0 : 15|3@1+ (1,0) [0|0] "" APP,APS
|
||||
SG_ UI_blindspotTTC m0 : 18|3@1+ (1,0) [0|0] "" APP,APS
|
||||
SG_ UI_donStopEndOfRampBuffer m0 : 21|3@1+ (1,0) [0|0] "" APP,APS
|
||||
SG_ UI_donDisableCutin m0 : 24|1@1+ (1,0) [0|0] "" APP,APS
|
||||
SG_ UI_donMinGoreWidthForAbortMap m0 : 25|4@1+ (1,0) [0|0] "" APP,APS
|
||||
SG_ UI_donAlcProgGoreAbortThres m0 : 29|4@1+ (1,0) [0|0] "" APP,APS
|
||||
SG_ UI_donMinGoreWidthForAbortNotMap m0 : 33|4@1+ (1,0) [0|0] "" APP,APS
|
||||
SG_ UI_alcDisableUltrasonicCheck m0 : 37|1@1+ (1,0) [0|0] "" APP,APS
|
||||
SG_ UI_alcUltrasonicDistance m0 : 38|4@1+ (1,0) [0|0] "" APP,APS
|
||||
SG_ UI_alcUltrasonicWaitTime m0 : 42|3@1+ (1,0) [0|0] "" APP,APS
|
||||
SG_ UI_alcEgoLeadingReactionAccel m0 : 48|2@1+ (1,0) [0|0] "" APP,APS
|
||||
SG_ UI_alcMergIntervalRearDHyst m0 : 50|2@1+ (1,0) [0|0] "" APP,APS
|
||||
SG_ UI_alcMergingIntervalHeadwayHyst m0 : 52|2@1+ (1,0) [0|0] "" APP,APS
|
||||
SG_ UI_alcAssertivenessRate m0 : 54|2@1+ (1,0) [0|0] "" APP,APS
|
||||
SG_ UI_alcViewRangeSensitivity m0 : 56|2@1+ (1,0) [0|0] "" APP,APS
|
||||
SG_ UI_camBlockLaneCheckDisable m1 : 3|1@1+ (1,0) [0|0] "" APP,APS
|
||||
SG_ UI_camBlockLaneCheckThreshold m1 : 4|6@1+ (0.01587,0) [0|1] "%" APP,APS
|
||||
SG_ UI_camBlockBlurDisable m1 : 10|1@1+ (1,0) [0|0] "" APP,APS
|
||||
SG_ UI_camBlockBlurThreshold m1 : 11|6@1+ (0.01587,0) [0|1] "%" APP,APS
|
||||
|
||||
BO_ 728 UI_csaOfframpCurvature: 8 GTW
|
||||
SG_ UI_csaOfframpCurvC2 : 0|16@1- (1E-06,0) [-0.032768|0.032767] "1/m" DAS
|
||||
SG_ UI_csaOfframpCurvC3 : 16|16@1- (4E-09,0) [-0.000131072|0.000131068] "1/m2" DAS
|
||||
SG_ UI_csaOfframpCurvRange : 32|8@1+ (2,0) [0|510] "m" DAS
|
||||
SG_ UI_csaOfframpCurvCounter : 40|8@1+ (1,0) [0|255] "" Vector__XXX
|
||||
SG_ UI_csaOfframpCurvUsingTspline : 48|1@1+ (1,0) [0|1] "" DAS
|
||||
SG_ UI_csaOfframpCurvReserved : 49|7@1+ (1,0) [0|0] "" Vector__XXX
|
||||
SG_ UI_csaOfframpCurvChecksum : 56|8@1+ (1,0) [0|0] "" Vector__XXX
|
||||
|
||||
BO_ 744 UI_csaRoadCurvature: 8 GTW
|
||||
SG_ UI_csaRoadCurvC2 : 0|16@1- (1E-06,0) [-0.032768|0.032767] "1/m" DAS
|
||||
SG_ UI_csaRoadCurvC3 : 16|16@1- (4E-09,0) [-0.000131072|0.000131068] "1/m2" DAS
|
||||
SG_ UI_csaRoadCurvRange : 32|8@1+ (2,0) [0|510] "m" DAS
|
||||
SG_ UI_csaRoadCurvCounter : 40|8@1+ (1,0) [0|255] "" Vector__XXX
|
||||
SG_ UI_csaRoadCurvUsingTspline : 48|1@1+ (1,0) [0|1] "" DAS
|
||||
SG_ UI_csaRoadCurvReserved : 49|7@1+ (1,0) [0|0] "" Vector__XXX
|
||||
SG_ UI_csaRoadCurvChecksum : 56|8@1+ (1,0) [0|0] "" Vector__XXX
|
||||
|
||||
BO_ 1080 UI_driverAssistAnonDebugParams: 8 GTW
|
||||
SG_ UI_anonDebugParam1 : 0|7@1+ (1,0) [0|100] "" DAS
|
||||
SG_ UI_anonDebugFlag1 : 7|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_anonDebugParam2 : 8|7@1+ (1,0) [0|100] "" DAS
|
||||
SG_ UI_anonDebugFlag2 : 15|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_anonDebugParam3 : 16|7@1+ (1,0) [0|100] "" DAS
|
||||
SG_ UI_anonDebugFlag3 : 23|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_anonDebugParam4 : 24|7@1+ (1,0) [0|100] "" DAS
|
||||
SG_ UI_anonDebugFlag4 : 31|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_anonDebugParam5 : 32|7@1+ (1,0) [0|100] "" DAS
|
||||
SG_ UI_anonDebugParam6 : 40|7@1+ (1,0) [0|100] "" DAS
|
||||
SG_ UI_anonDebugParam7 : 48|7@1+ (1,0) [0|100] "" DAS
|
||||
SG_ UI_visionSpeedSlider : 56|7@1+ (1,0) [0|100] "" DAS
|
||||
|
||||
BO_ 1000 UI_driverAssistControl: 8 GTW
|
||||
SG_ UI_autopilotControlRequest : 0|1@1+ (1,0) [1|0] "" DAS
|
||||
SG_ UI_ulcStalkConfirm : 1|1@1+ (1,0) [1|0] "" DAS
|
||||
SG_ UI_summonHeartbeat : 2|2@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_curvSpeedAdaptDisable : 4|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_dasDeveloper : 5|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_enableVinAssociation : 6|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_lssLkaEnabled : 7|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_lssLdwEnabled : 8|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_autoSummonEnable : 10|1@1+ (1,0) [0|1] "" DAS
|
||||
SG_ UI_exceptionListEnable : 11|1@1+ (1,0) [0|1] "" APP
|
||||
SG_ UI_roadCheckDisable : 12|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_driveOnMapsEnable : 13|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_handsOnRequirementDisable : 14|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_forksEnable : 15|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_fuseLanesDisable : 16|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_fuseHPPDisable : 17|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_fuseVehiclesDisable : 18|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_enableNextGenACC : 19|1@1+ (1,0) [0|1] "" APP
|
||||
SG_ UI_visionSpeedType : 20|2@1+ (1,0) [0|0] "" APP
|
||||
SG_ UI_curvatureDatabaseOnly : 22|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_lssElkEnabled : 23|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_summonExitType : 24|2@1+ (1,0) [0|3] "" DAS
|
||||
SG_ UI_summonEntryType : 26|2@1+ (1,0) [0|3] "" DAS
|
||||
SG_ UI_selfParkRequest : 28|4@1+ (1,0) [0|15] "" DAS,PARK
|
||||
SG_ UI_summonReverseDist : 32|6@1+ (1,0) [0|63] "" DAS
|
||||
SG_ UI_undertakeAssistEnable : 38|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_adaptiveSetSpeedEnable : 39|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_drivingSide : 40|2@1+ (1,0) [0|3] "" DAS
|
||||
SG_ UI_enableClipTelemetry : 42|1@1+ (1,0) [0|0] "" APP
|
||||
SG_ UI_enableTripTelemetry : 43|1@1+ (1,0) [0|0] "" APP
|
||||
SG_ UI_enableRoadSegmentTelemetry : 44|1@1+ (1,0) [0|0] "" APP
|
||||
SG_ UI_followNavRouteEnable : 46|1@1+ (1,0) [0|0] "" APP
|
||||
SG_ UI_ulcSpeedConfig : 48|2@1+ (1,0) [0|3] "" APP
|
||||
SG_ UI_ulcBlindSpotConfig : 50|2@1+ (1,0) [0|3] "" APP
|
||||
SG_ UI_autopilotAlwaysOn : 52|1@1+ (1,0) [0|1] "" APP
|
||||
SG_ UI_accFromZero : 53|1@1+ (1,0) [0|1] "" APP
|
||||
SG_ UI_alcOffHighwayEnable : 54|1@1+ (1,0) [0|1] "" APP
|
||||
SG_ UI_validationLoop : 55|1@1+ (1,0) [0|1] "" APP
|
||||
SG_ UI_ulcOffHighway : 56|1@1+ (1,0) [0|1] "" APP
|
||||
SG_ UI_enableNavRouteCSA : 57|1@1+ (1,0) [0|1] "" APP
|
||||
SG_ UI_enableCutinExperiments : 58|1@1+ (1,0) [0|1] "" APP
|
||||
SG_ UI_source3D : 60|3@1+ (1,0) [0|7] "" APP
|
||||
SG_ UI_enableVisionOnlyStops : 63|1@1+ (1,0) [0|1] "" APP
|
||||
|
||||
BO_ 968 UI_driverAssistMapData: 8 GTW
|
||||
SG_ UI_mapSpeedLimitDependency : 0|3@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_roadClass : 3|3@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_inSuperchargerGeofence : 6|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_mapSpeedUnits : 7|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_mapSpeedLimit : 8|5@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_mapSpeedLimitType : 13|3@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_countryCode : 16|10@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_streetCount : 26|2@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_gpsRoadMatch : 28|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_navRouteActive : 29|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_parallelAutoparkEnabled : 30|1@1+ (1,0) [0|1] "" DAS
|
||||
SG_ UI_perpendicularAutoparkEnabled : 31|1@1+ (1,0) [0|1] "" DAS
|
||||
SG_ UI_nextBranchDist : 32|5@1+ (10,0) [0|300] "m" DAS
|
||||
SG_ UI_controlledAccess : 37|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_nextBranchLeftOffRamp : 38|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_nextBranchRightOffRamp : 39|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_rejectLeftLane : 40|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_rejectRightLane : 41|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_rejectHPP : 42|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_rejectNav : 43|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_rejectLeftFreeSpace : 44|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_rejectRightFreeSpace : 45|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_rejectAutosteer : 46|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_rejectHandsOn : 47|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_acceptBottsDots : 48|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_autosteerRestricted : 49|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_pmmEnabled : 50|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_scaEnabled : 51|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_mapDataCounter : 52|4@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_mapDataChecksum : 56|8@1+ (1,0) [0|0] "" DAS
|
||||
|
||||
BO_ 568 UI_driverAssistRoadSign: 8 GTW
|
||||
SG_ UI_roadSign M : 0|8@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_splineLocConfidence : 40|7@1+ (1,0) [0|100] "" DAS
|
||||
SG_ UI_splineID : 48|4@1+ (1,0) [0|15] "" Vector__XXX
|
||||
SG_ UI_roadSignCounter : 52|4@1+ (1,0) [0|0] "" Vector__XXX
|
||||
SG_ UI_roadSignChecksum : 56|8@1+ (1,0) [0|0] "" Vector__XXX
|
||||
SG_ UI_dummyData m0 : 8|1@1+ (1,0) [0|0] "" Vector__XXX
|
||||
SG_ UI_stopSignStopLineDist m1 : 8|10@1+ (0.25,-8) [-8|247.5] "m" Vector__XXX
|
||||
SG_ UI_stopSignStopLineConf m1 : 18|7@1+ (1,0) [0|100] "" Vector__XXX
|
||||
SG_ UI_trafficLightStopLineDist m2 : 8|10@1+ (0.25,-8) [-8|247.5] "m" Vector__XXX
|
||||
SG_ UI_trafficLightStopLineConf m2 : 18|7@1+ (1,0) [0|100] "" Vector__XXX
|
||||
SG_ UI_baseMapSpeedLimitMPS m3 : 8|8@1+ (0.25,0) [0|63.75] "m/s" DAS
|
||||
SG_ UI_bottomQrtlFleetSpeedMPS m3 : 16|8@1+ (0.25,0) [0|63.75] "m/s" DAS
|
||||
SG_ UI_topQrtlFleetSpeedMPS m3 : 24|8@1+ (0.25,0) [0|63.75] "m/s" DAS
|
||||
SG_ UI_meanFleetSplineSpeedMPS m4 : 8|8@1+ (0.25,0) [0|63.75] "m/s" DAS
|
||||
SG_ UI_medianFleetSpeedMPS m4 : 16|8@1+ (0.25,0) [0|63.75] "m/s" DAS
|
||||
SG_ UI_meanFleetSplineAccelMPS2 m4 : 24|8@1+ (0.05,-6.35) [-6.35|6.4] "m/s^2" DAS
|
||||
SG_ UI_rampType m4 : 32|3@1+ (1,0) [0|7] "" DAS
|
||||
SG_ UI_currSplineIdFull m5 : 8|32@1+ (1,0) [0|1] "" APP
|
||||
|
||||
|
||||
BO_ 696 UI_radarMapData: 8 GTW
|
||||
SG_ UI_radarTargetDx : 0|8@1+ (1,-95) [-95|160] "m" DAS
|
||||
SG_ UI_radarTargetDxEnd : 8|8@1+ (1,0) [0|255] "m" DAS
|
||||
SG_ UI_radarTargetTrustMap : 16|1@1+ (1,0) [0|1] "" DAS
|
||||
SG_ UI_radarEnableBraking : 17|1@1+ (1,0) [0|1] "" DAS
|
||||
SG_ UI_radarMapDataCounter : 52|4@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_radarMapDataChecksum : 56|8@1+ (1,0) [0|0] "" DAS
|
||||
|
||||
BO_ 712 UI_roadCurvature: 8 GTW
|
||||
SG_ UI_roadCurvC0 : 0|11@1- (0.02,0) [-20.48|20.46] "m" DAS
|
||||
SG_ UI_roadCurvC1 : 11|10@1- (0.00075,0) [-0.384|0.38325] "1" DAS
|
||||
SG_ UI_roadCurvC2 : 21|14@1- (7.5E-06,0) [-0.03072|0.03071625] "1/m" DAS
|
||||
SG_ UI_roadCurvC3 : 35|13@1- (3E-08,0) [-0.00012288|0.00012285] "1/m2" DAS
|
||||
SG_ UI_roadCurvRange : 48|6@1+ (4,0) [0|252] "m" DAS
|
||||
SG_ UI_roadCurvHealth : 54|2@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_roadCurvChecksum : 56|8@1+ (1,0) [0|0] "" Vector__XXX
|
||||
|
||||
BO_ 582 UI_solarData: 5 GTW
|
||||
SG_ UI_solarAzimuthAngle : 0|16@1- (1,0) [0|360] "deg" APP
|
||||
SG_ UI_solarAzimuthAngleCarRef : 16|9@1- (1,0) [-180|180] "deg" APP
|
||||
SG_ UI_isSunUp : 25|1@1+ (1,0) [0|0] "" Vector__XXX
|
||||
SG_ UI_solarElevationAngle : 32|8@1- (1,0) [-90|90] "deg" APP
|
||||
|
||||
BO_ 824 UI_status: 8 GTW
|
||||
SG_ UI_touchActive : 0|1@1+ (1,0) [0|0] "" IC
|
||||
SG_ UI_audioActive : 1|1@1+ (1,0) [0|0] "" IC
|
||||
SG_ UI_bluetoothActive : 2|1@1+ (1,0) [0|0] "" IC
|
||||
SG_ UI_cellActive : 3|1@1+ (1,0) [0|0] "" IC
|
||||
SG_ UI_displayReady : 4|1@1+ (1,0) [0|0] "" IC
|
||||
SG_ UI_gpsActive : 5|1@1+ (1,0) [0|0] "" IC
|
||||
SG_ UI_wifiConnected : 6|1@1+ (1,0) [0|0] "" IC,APP
|
||||
SG_ UI_systemActive : 7|1@1+ (1,0) [0|0] "" IC
|
||||
SG_ UI_xmActive : 8|1@1+ (1,0) [0|0] "" IC
|
||||
SG_ UI_displayOn : 9|1@1+ (1,0) [0|0] "" IC,APP
|
||||
SG_ UI_readyForDrive : 10|1@1+ (1,0) [0|0] "" IC
|
||||
SG_ UI_cellConnected : 11|1@1+ (1,0) [0|0] "" IC,APP
|
||||
SG_ UI_vpnActive : 12|1@1+ (1,0) [0|0] "" IC,APP
|
||||
SG_ UI_wifiActive : 13|1@1+ (1,0) [0|0] "" IC
|
||||
SG_ UI_cameraActive : 14|1@1+ (1,0) [0|0] "" IC,APP
|
||||
SG_ UI_usbActive : 15|1@1+ (1,0) [0|0] "" IC
|
||||
SG_ UI_screenshotActive : 16|1@1+ (1,0) [0|0] "" IC,APP
|
||||
SG_ UI_monitorModemPower : 17|1@1+ (1,0) [0|0] "" Vector__XXX
|
||||
SG_ UI_factoryReset : 18|2@1+ (1,0) [0|3] "" Vector__XXX
|
||||
SG_ UI_cellNetworkTechnology : 20|4@1+ (1,0) [0|15] "" APP
|
||||
SG_ UI_tegraCoreTemperature : 24|8@1+ (1,-64) [0|0] "deg C" IC
|
||||
SG_ UI_tegraAmbientTemperature : 32|8@1+ (1,-64) [0|0] "deg C" IC
|
||||
SG_ UI_googleWifiUsages : 40|8@1+ (1,0) [0|0] "" Vector__XXX
|
||||
SG_ UI_autopilotTrial : 48|2@1+ (1,0) [0|0] "" APP
|
||||
SG_ UI_cellSignalBars : 50|3@1+ (1,0) [0|7] "" APP
|
||||
SG_ UI_hardwareType : 53|2@1+ (1,0) [0|3] "" APP
|
||||
SG_ UI_developmentCar : 55|1@1+ (1,0) [0|0] "" Vector__XXX
|
||||
SG_ UI_cellReceiverPower : 56|8@1+ (1,-128) [-128|127] "dB" APP
|
||||
|
||||
BO_ 1064 UI_telemetryControl: 8 GTW
|
||||
SG_ UI_TCR_enable : 0|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_TCR_moveStateStanding : 1|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_TCR_moveStateStopped : 2|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_TCR_moveStateMoving : 3|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_TCR_moveStateIndeterm : 4|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_TCR_classConstElem : 5|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_TCR_classMovingPed : 6|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_TCR_classMovingTwoWheel : 7|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_TCR_classMovingFourWheel : 8|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_TCR_classUnknown : 9|1@1+ (1,0) [0|0] "" DAS
|
||||
SG_ UI_TCR_downSampleFactor : 16|4@1+ (1,0) [0|15] "" Vector__XXX
|
||||
SG_ UI_TCR_wExist : 24|5@1+ (1,0) [0|31] "" Vector__XXX
|
||||
SG_ UI_TCR_vehSpeed : 32|8@1+ (1,0) [0|0] "" Vector__XXX
|
||||
SG_ UI_TCR_minRCS : 40|8@1+ (0.25,-14) [-14|49.75] "dB" Vector__XXX
|
||||
SG_ UI_TCR_maxDy : 48|5@1+ (0.5,0) [0|15.5] "m" Vector__XXX
|
||||
SG_ UI_TCR_maxObjects : 56|5@1+ (1,0) [0|31] "" Vector__XXX
|
||||
SG_ UI_TCR_maxRoadClass : 61|3@1+ (1,0) [0|7] "" Vector__XXX
|
||||
|
||||
BO_ 522 BrakeMessage: 8 XXX
|
||||
SG_ driverBrakeStatus : 2|2@1+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 921 AutopilotStatus: 8 XXX
|
||||
SG_ autopilotStatus : 0|4@1+ (1,0) [0|0] "" XXX
|
||||
|
||||
VAL_ 3 StW_Angl 16383 "SNA" ;
|
||||
VAL_ 3 StW_AnglSens_Id 2 "MUST" 0 "PSBL" 1 "SELF" ;
|
||||
VAL_ 3 StW_AnglSens_Stat 2 "ERR" 3 "ERR_INI" 1 "INI" 0 "OK" ;
|
||||
VAL_ 3 StW_AnglSpd 16383 "SNA" ;
|
||||
VAL_ 14 StW_AnglHP 16383 "SNA" ;
|
||||
VAL_ 14 StW_AnglHP_Spd 16383 "SNA" ;
|
||||
VAL_ 14 StW_AnglHP_Sens_Stat 3 "SNA" 2 "ERR" 1 "INI" 0 "OK" ;
|
||||
VAL_ 14 StW_AnglHP_Sens_Id 3 "SNA" 2 "KOSTAL" 1 "DELPHI" 0 "TEST" ;
|
||||
VAL_ 69 SpdCtrlLvr_Stat 32 "DN_1ST" 16 "UP_1ST" 8 "DN_2ND" 4 "UP_2ND" 2 "RWD" 1 "FWD" 0 "IDLE" ;
|
||||
VAL_ 69 DTR_Dist_Rq 255 "SNA" 200 "ACC_DIST_7" 166 "ACC_DIST_6" 133 "ACC_DIST_5" 100 "ACC_DIST_4" 66 "ACC_DIST_3" 33 "ACC_DIST_2" 0 "ACC_DIST_1" ;
|
||||
VAL_ 69 TurnIndLvr_Stat 3 "SNA" 2 "RIGHT" 1 "LEFT" 0 "IDLE" ;
|
||||
VAL_ 69 HiBmLvr_Stat 3 "SNA" 2 "HIBM_FLSH_ON_PSD" 1 "HIBM_ON_PSD" 0 "IDLE" ;
|
||||
VAL_ 69 WprWashSw_Psd 3 "SNA" 2 "WASH" 1 "TIPWIPE" 0 "NPSD" ;
|
||||
VAL_ 69 WprWash_R_Sw_Posn_V2 3 "SNA" 2 "WASH" 1 "INTERVAL" 0 "OFF" ;
|
||||
VAL_ 69 StW_Lvr_Stat 4 "STW_BACK" 3 "STW_FWD" 2 "STW_DOWN" 1 "STW_UP" 0 "NPSD" ;
|
||||
VAL_ 69 StW_Cond_Psd 3 "SNA" 2 "DOWN" 1 "UP" 0 "NPSD" ;
|
||||
VAL_ 69 HrnSw_Psd 3 "SNA" 2 "NDEF2" 1 "PSD" 0 "NPSD" ;
|
||||
VAL_ 69 StW_Sw00_Psd 1 "PRESSED" 0 "NOT_PRESSED_SNA" ;
|
||||
VAL_ 69 StW_Sw01_Psd 1 "PRESSED" 0 "NOT_PRESSED_SNA" ;
|
||||
VAL_ 69 StW_Sw03_Psd 1 "PRESSED" 0 "NOT_PRESSED_SNA" ;
|
||||
VAL_ 69 StW_Sw04_Psd 1 "PRESSED" 0 "NOT_PRESSED_SNA" ;
|
||||
VAL_ 69 WprSw6Posn 7 "SNA" 6 "STAGE2" 5 "STAGE1" 4 "INTERVAL4" 3 "INTERVAL3" 2 "INTERVAL2" 1 "INTERVAL1" 0 "OFF" ;
|
||||
VAL_ 257 GTW_epasControlType 0 "WITHOUT" 1 "WITH_ANGLE" 3 "WITH_BOTH" 2 "WITH_TORQUE" ;
|
||||
VAL_ 109 StW_Sw_Stat3 7 "SNA" 6 "NDEF6" 5 "NDEF5" 4 "NDEF4" 3 "PLUS_MINUS" 2 "MINUS" 1 "PLUS" 0 "NPSD" ;
|
||||
VAL_ 109 MsgTxmtId 3 "NDEF3" 2 "NDEF2" 1 "SCCM" 0 "EWM" ;
|
||||
VAL_ 109 TSL_RND_Posn_StW 15 "SNA" 8 "D" 6 "INI" 4 "N_DOWN" 2 "N_UP" 1 "R" 0 "IDLE" ;
|
||||
VAL_ 109 TSL_P_Psd_StW 3 "SNA" 2 "INI" 1 "PSD" 0 "IDLE" ;
|
||||
VAL_ 257 GTW_epasEmergencyOn 1 "EMERGENCY_POWER" 0 "NONE" ;
|
||||
VAL_ 257 GTW_epasLDWEnabled 1 "ALLOWED" 0 "INHIBITED" ;
|
||||
VAL_ 257 GTW_epasPowerMode 0 "DRIVE_OFF" 1 "DRIVE_ON" 3 "LOAD_SHED" 2 "SHUTTING_DOWN" 15 "SNA" ;
|
||||
VAL_ 257 GTW_epasTuneRequest 1 "DM_COMFORT" 3 "DM_SPORT" 2 "DM_STANDARD" 0 "FAIL_SAFE_DEFAULT" 4 "RWD_COMFORT" 6 "RWD_SPORT" 5 "RWD_STANDARD" 7 "SNA" ;
|
||||
VAL_ 264 DI_torqueDriver -4096 "SNA" ;
|
||||
VAL_ 264 DI_torqueMotor -4096 "SNA" ;
|
||||
VAL_ 264 DI_soptState 7 "SOPT_TEST_SNA" 4 "SOPT_TEST_NOT_RUN" 3 "SOPT_TEST_PASSED" 2 "SOPT_TEST_FAILED" 1 "SOPT_TEST_IN_PROGRESS" 0 "SOPT_PRE_TEST" ;
|
||||
VAL_ 264 DI_motorRPM -32768 "SNA" ;
|
||||
VAL_ 264 DI_pedalPos 255 "SNA" ;
|
||||
VAL_ 280 DI_torqueEstimate -2048 "SNA" ;
|
||||
VAL_ 280 DI_gear 7 "DI_GEAR_SNA" 4 "DI_GEAR_D" 3 "DI_GEAR_N" 2 "DI_GEAR_R" 1 "DI_GEAR_P" 0 "DI_GEAR_INVALID" ;
|
||||
VAL_ 280 DI_brakePedal 1 "Applied" 0 "Not_applied" ;
|
||||
VAL_ 280 DI_vehicleSpeed 4095 "SNA" ;
|
||||
VAL_ 280 DI_gearRequest 7 "DI_GEAR_SNA" 4 "DI_GEAR_D" 3 "DI_GEAR_N" 2 "DI_GEAR_R" 1 "DI_GEAR_P" 0 "DI_GEAR_INVALID" ;
|
||||
VAL_ 280 DI_torqueInterfaceFailure 1 "TORQUE_INTERFACE_FAILED" 0 "TORQUE_INTERFACE_NORMAL" ;
|
||||
VAL_ 280 DI_brakePedalState 3 "SNA" 2 "INVALID" 1 "ON" 0 "OFF" ;
|
||||
VAL_ 280 DI_epbParkRequest 1 "Park_requested" 0 "No_request" ;
|
||||
VAL_ 280 DI_epbInterfaceReady 1 "EPB_INTERFACE_READY" 0 "EPB_INTERFACE_NOT_READY" ;
|
||||
VAL_ 309 ESP_absBrakeEvent 1 "ACTIVE" 0 "NOT_ACTIVE" ;
|
||||
VAL_ 309 ESP_brakeDiscWipingActive 1 "ACTIVE" 0 "INACTIVE" ;
|
||||
VAL_ 309 ESP_brakeLamp 0 "OFF" 1 "ON" ;
|
||||
VAL_ 309 ESP_espFaultLamp 0 "OFF" 1 "ON" ;
|
||||
VAL_ 309 ESP_espLampFlash 1 "FLASH" 0 "OFF" ;
|
||||
VAL_ 309 ESP_hillStartAssistActive 1 "ACTIVE" 0 "INACTIVE" 2 "NOT_AVAILABLE" 3 "SNA" ;
|
||||
VAL_ 309 ESP_absFaultLamp 0 "OFF" 1 "ON" ;
|
||||
VAL_ 309 ESP_espOffLamp 0 "OFF" 1 "ON" ;
|
||||
VAL_ 309 ESP_stabilityControlSts 2 "ENGAGED" 3 "FAULTED" 5 "INIT" 4 "NOT_CONFIGURED" 0 "OFF" 1 "ON" ;
|
||||
VAL_ 309 ESP_tcLampFlash 1 "FLASH" 0 "OFF" ;
|
||||
VAL_ 568 UI_mapSpeedLimit 31 "SNA" 30 "UNLIMITED" 29 "LESS_OR_EQ_160" 28 "LESS_OR_EQ_150" 27 "LESS_OR_EQ_140" 26 "LESS_OR_EQ_130" 25 "LESS_OR_EQ_120" 24 "LESS_OR_EQ_115" 23 "LESS_OR_EQ_110" 22 "LESS_OR_EQ_105" 21 "LESS_OR_EQ_100" 20 "LESS_OR_EQ_95" 19 "LESS_OR_EQ_90" 18 "LESS_OR_EQ_85" 17 "LESS_OR_EQ_80" 16 "LESS_OR_EQ_75" 15 "LESS_OR_EQ_70" 14 "LESS_OR_EQ_65" 13 "LESS_OR_EQ_60" 12 "LESS_OR_EQ_55" 11 "LESS_OR_EQ_50" 10 "LESS_OR_EQ_45" 9 "LESS_OR_EQ_40" 8 "LESS_OR_EQ_35" 7 "LESS_OR_EQ_30" 6 "LESS_OR_EQ_25" 5 "LESS_OR_EQ_20" 4 "LESS_OR_EQ_15" 3 "LESS_OR_EQ_10" 2 "LESS_OR_EQ_7" 1 "LESS_OR_EQ_5" 0 "UNKNOWN" ;
|
||||
VAL_ 522 driverBrakeStatus 2 "APPLIED" 1 "NOT_APPLIED" ;
|
||||
VAL_ 760 UI_mapSpeedLimitUnits 1 "KPH" 0 "MPH" ;
|
||||
VAL_ 760 UI_userSpeedOffsetUnits 1 "KPH" 0 "MPH" ;
|
||||
VAL_ 643 AirTemp_Insd 255 "SNA" ;
|
||||
VAL_ 643 AirTemp_Outsd 254 "INIT" 255 "SNA" ;
|
||||
VAL_ 643 Bckl_Sw_RL_Stat_SAM_R 2 "FLT" 1 "NOT" 0 "OK" 3 "SNA" ;
|
||||
VAL_ 643 Bckl_Sw_RM_Stat_SAM_R 2 "FLT" 1 "NOT" 0 "OK" 3 "SNA" ;
|
||||
VAL_ 643 Bckl_Sw_RR_Stat_SAM_R 2 "FLT" 1 "NOT" 0 "OK" 3 "SNA" ;
|
||||
VAL_ 643 DL_RLtch_Stat 1 "CLS" 0 "NDEF0" 2 "OPN" 3 "SNA" ;
|
||||
VAL_ 643 DrRLtch_FL_Stat 1 "CLS" 0 "NDEF0" 2 "OPN" 3 "SNA" ;
|
||||
VAL_ 643 DrRLtch_FR_Stat 1 "CLS" 0 "NDEF0" 2 "OPN" 3 "SNA" ;
|
||||
VAL_ 643 DrRLtch_RL_Stat 1 "CLS" 0 "NDEF0" 2 "OPN" 3 "SNA" ;
|
||||
VAL_ 643 DrRLtch_RR_Stat 1 "CLS" 0 "NDEF0" 2 "OPN" 3 "SNA" ;
|
||||
VAL_ 643 EngHd_Stat 1 "CLS" 0 "NDEF0" 2 "OPN" 3 "SNA" ;
|
||||
VAL_ 643 LgtSens_Night 0 "DAY" 1 "NIGHT" ;
|
||||
VAL_ 643 MPkBrk_Stat 1 "ENGG" 0 "RELS" ;
|
||||
VAL_ 643 RevGr_Engg 0 "DISENGG" 1 "ENGG" 2 "NDEF2" 3 "SNA" ;
|
||||
VAL_ 643 StW_Cond_Stat 3 "BLINK" 1 "NDEF1" 0 "OFF" 2 "ON" ;
|
||||
VAL_ 643 Trlr_Stat 2 "NDEF2" 0 "NONE" 1 "OK" 3 "SNA" ;
|
||||
VAL_ 792 BOOT_STATE 2 "Init" 3 "SNA" 0 "closed" 1 "open" ;
|
||||
VAL_ 792 CERRD 1 "CAN error detect" 0 "no Can error detected" ;
|
||||
VAL_ 792 DAY 1 "Init" 0 "SNA" ;
|
||||
VAL_ 792 DOOR_STATE_FL 2 "Init" 3 "SNA" 0 "closed" 1 "open" ;
|
||||
VAL_ 792 DOOR_STATE_FR 2 "Init" 3 "SNA" 0 "closed" 1 "open" ;
|
||||
VAL_ 792 DOOR_STATE_FrontTrunk 2 "Init" 3 "SNA" 0 "closed" 1 "open" ;
|
||||
VAL_ 792 DOOR_STATE_RL 2 "Init" 3 "SNA" 0 "closed" 1 "open" ;
|
||||
VAL_ 792 DOOR_STATE_RR 2 "Init" 3 "SNA" 0 "closed" 1 "open" ;
|
||||
VAL_ 792 GTW_updateInProgress 1 "IN_PROGRESS" 2 "IN_PROGRESS_NOT_USED" 3 "IN_PROGRESS_SNA" 0 "NOT_IN_PROGRESS" ;
|
||||
VAL_ 792 Hour 30 "Init" 31 "SNA" ;
|
||||
VAL_ 792 MCU_factoryMode 1 "FACTORY_MODE" 0 "NORMAL_MODE" ;
|
||||
VAL_ 792 MCU_transportModeOn 0 "NORMAL_MODE" ;
|
||||
VAL_ 792 MINUTE 62 "Init" 63 "SNA" ;
|
||||
VAL_ 792 MONTH 1 "Init" 15 "SNA" ;
|
||||
VAL_ 792 SECOND 62 "Init" 63 "SNA" ;
|
||||
VAL_ 792 YEAR 126 "Init" 127 "SNA" ;
|
||||
VAL_ 872 DI_aebState 2 "ENABLED" 4 "FAULT" 7 "SNA" 1 "STANDBY" 3 "STANDSTILL" 0 "UNAVAILABLE" ;
|
||||
VAL_ 872 DI_analogSpeed 4095 "SNA" ;
|
||||
VAL_ 872 DI_cruiseState 2 "ENABLED" 5 "FAULT" 0 "OFF" 4 "OVERRIDE" 7 "PRE_CANCEL" 6 "PRE_FAULT" 1 "STANDBY" 3 "STANDSTILL" ;
|
||||
VAL_ 872 DI_digitalSpeed 255 "SNA" ;
|
||||
VAL_ 872 DI_immobilizerState 2 "AUTHENTICATING" 3 "DISARMED" 6 "FAULT" 4 "IDLE" 0 "INIT_SNA" 1 "REQUEST" 5 "RESET" ;
|
||||
VAL_ 872 DI_speedUnits 1 "KPH" 0 "MPH" ;
|
||||
VAL_ 872 DI_state 3 "ABORT" 4 "ENABLE" 2 "FAULT" 1 "STANDBY" 0 "UNAVAILABLE" ;
|
||||
VAL_ 872 DI_systemState 3 "ABORT" 4 "ENABLE" 2 "FAULT" 1 "STANDBY" 0 "UNAVAILABLE" ;
|
||||
VAL_ 872 DI_vehicleHoldState 2 "BLEND_IN" 4 "BLEND_OUT" 6 "FAULT" 7 "INIT" 5 "PARK" 1 "STANDBY" 3 "STANDSTILL" 0 "UNAVAILABLE" ;
|
||||
VAL_ 880 EPAS_currentTuneMode 1 "DM_COMFORT" 3 "DM_SPORT" 2 "DM_STANDARD" 0 "FAIL_SAFE_DEFAULT" 4 "RWD_COMFORT" 6 "RWD_SPORT" 5 "RWD_STANDARD" 7 "UNAVAILABLE" ;
|
||||
VAL_ 880 EPAS_eacErrorCode 14 "EAC_ERROR_EPB_INHIBIT" 3 "EAC_ERROR_HANDS_ON" 7 "EAC_ERROR_HIGH_ANGLE_RATE_REQ" 9 "EAC_ERROR_HIGH_ANGLE_RATE_SAFETY" 6 "EAC_ERROR_HIGH_ANGLE_REQ" 8 "EAC_ERROR_HIGH_ANGLE_SAFETY" 10 "EAC_ERROR_HIGH_MMOT_SAFETY" 11 "EAC_ERROR_HIGH_TORSION_SAFETY" 0 "EAC_ERROR_IDLE" 12 "EAC_ERROR_LOW_ASSIST" 2 "EAC_ERROR_MAX_SPEED" 1 "EAC_ERROR_MIN_SPEED" 13 "EAC_ERROR_PINION_VEL_DIFF" 4 "EAC_ERROR_TMP_FAULT" 5 "EAR_ERROR_MAX_STEER_DELTA" 15 "SNA" ;
|
||||
VAL_ 880 EPAS_eacStatus 2 "EAC_ACTIVE" 1 "EAC_AVAILABLE" 3 "EAC_FAULT" 0 "EAC_INHIBITED" 4 "SNA" ;
|
||||
VAL_ 880 EPAS_handsOnLevel 0 "0" 1 "1" 2 "2" 3 "3" ;
|
||||
VAL_ 880 EPAS_steeringFault 1 "FAULT" 0 "NO_FAULT" ;
|
||||
VAL_ 880 EPAS_steeringRackForce 1022 "NOT_IN_SPEC" 1023 "SNA" ;
|
||||
VAL_ 880 EPAS_steeringReduced 0 "NORMAL_ASSIST" 1 "REDUCED_ASSIST" ;
|
||||
VAL_ 880 EPAS_torsionBarTorque 0 "SEE_SPECIFICATION" 4095 "SNA" 4094 "UNDEFINABLE_DATA" ;
|
||||
VAL_ 904 MCU_clusterReadyForDrive 0 "NO_SNA" 1 "YES" ;
|
||||
VAL_ 921 autopilotStatus 5 "ACTIVE_NAVIGATE_ON_AUTOPILOT" 4 "ACTIVE_2" 3 "ACTIVE_1" 2 "AVAILABLE" 1 "UNAVAILABLE" 0 "DISABLED" ;
|
||||
VAL_ 1160 DAS_steeringAngleRequest 16384 "ZERO_ANGLE" ;
|
||||
VAL_ 1160 DAS_steeringControlType 1 "ANGLE_CONTROL" 3 "DISABLED" 0 "NONE" 2 "RESERVED" ;
|
||||
VAL_ 1160 DAS_steeringHapticRequest 1 "ACTIVE" 0 "IDLE" ;
|
||||
|
||||
|
||||
CM_ "CHFFR_METRIC 1160 DAS_steeringAngleRequest STEER_ANGLE 0.1098666 180; CHFFR_METRIC 264 DI_motorRPM ENGINE_RPM 1 0";
|
||||
@@ -163,7 +163,7 @@ BO_ 742 LEAD_INFO: 8 DSU
|
||||
|
||||
BO_ 835 ACC_CONTROL: 8 DSU
|
||||
SG_ ACCEL_CMD : 7|16@0- (0.001,0) [-20|20] "m/s2" HCU
|
||||
SG_ SET_ME_X01 : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ ACC_TYPE : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ DISTANCE : 20|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ MINI_CAR : 21|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X3 : 19|4@0+ (1,0) [0|15] "" XXX
|
||||
@@ -196,6 +196,9 @@ BO_ 951 ESP_CONTROL: 8 ESP
|
||||
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1020 SOLAR_SENSOR: 8 XXX
|
||||
SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1041 ACC_HUD: 8 DSU
|
||||
SG_ FCW : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X20 : 15|8@0+ (1,0) [0|1] "" XXX
|
||||
@@ -333,6 +336,7 @@ CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active";
|
||||
CM_ SG_ 643 COUNTER "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 BRAKE_STATUS "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 PRECOLLISION_ACTIVE "set 0.5s before any braking";
|
||||
CM_ SG_ 835 ACC_TYPE "if 2, car is likely to have a permanent low speed lockout. 1 is ok";
|
||||
CM_ SG_ 835 PERMIT_BRAKING "Original ACC has this going high when a car in front is detected. In openpilot and before the PERMIT_BRAKING name, this was 'SET_ME_1' and is hardcoded to be high. Unsure if only informational or has an effect though existing usage in openpilot is to always set it to 1. Originally 'PMTBRKG' in the leaked toyota_2017_ref_pt.dbc file and name expansion speculated to be PerMiT BRaKinG.";
|
||||
CM_ SG_ 835 ACCEL_CMD_ALT "Copy of main ACCEL_CMD, but across 8 bits instead of 16 bits like ACCEL_CMD. Unsure if only informational or has an effect. Likely informational as existing openpilot sets this to 0 and no loss of functionality observed. Originally 'AT_RAW' in leaked toyota_2017_ref_pt.dbc file.";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in UI with user set unit";
|
||||
@@ -360,6 +364,7 @@ VAL_ 467 LOW_SPEED_LOCKOUT 2 "low speed locked" 1 "ok";
|
||||
VAL_ 614 STATE 3 "enabled" 1 "disabled";
|
||||
VAL_ 614 DIRECTION_CMD 3 "right" 2 "center" 1 "left";
|
||||
VAL_ 643 STATE 0 "normal" 1 "adaptive_cruise_control" 3 "emergency_braking";
|
||||
VAL_ 835 ACC_TYPE 2 "permanent low speed lockout" 1 "ok";
|
||||
VAL_ 921 CRUISE_CONTROL_STATE 2 "disabled" 11 "hold" 10 "hold_waiting_user_cmd" 6 "enabled" 5 "faulted";
|
||||
VAL_ 1042 LDA_ALERT 3 "hold with continuous beep" 2 "LDA unavailable" 1 "hold" 0 "none";
|
||||
VAL_ 1042 BARRIERS 3 "both" 2 "right" 1 "left" 0 "none";
|
||||
|
||||
@@ -163,7 +163,7 @@ BO_ 742 LEAD_INFO: 8 DSU
|
||||
|
||||
BO_ 835 ACC_CONTROL: 8 DSU
|
||||
SG_ ACCEL_CMD : 7|16@0- (0.001,0) [-20|20] "m/s2" HCU
|
||||
SG_ SET_ME_X01 : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ ACC_TYPE : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ DISTANCE : 20|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ MINI_CAR : 21|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X3 : 19|4@0+ (1,0) [0|15] "" XXX
|
||||
@@ -196,6 +196,9 @@ BO_ 951 ESP_CONTROL: 8 ESP
|
||||
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1020 SOLAR_SENSOR: 8 XXX
|
||||
SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1041 ACC_HUD: 8 DSU
|
||||
SG_ FCW : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X20 : 15|8@0+ (1,0) [0|1] "" XXX
|
||||
@@ -333,6 +336,7 @@ CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active";
|
||||
CM_ SG_ 643 COUNTER "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 BRAKE_STATUS "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 PRECOLLISION_ACTIVE "set 0.5s before any braking";
|
||||
CM_ SG_ 835 ACC_TYPE "if 2, car is likely to have a permanent low speed lockout. 1 is ok";
|
||||
CM_ SG_ 835 PERMIT_BRAKING "Original ACC has this going high when a car in front is detected. In openpilot and before the PERMIT_BRAKING name, this was 'SET_ME_1' and is hardcoded to be high. Unsure if only informational or has an effect though existing usage in openpilot is to always set it to 1. Originally 'PMTBRKG' in the leaked toyota_2017_ref_pt.dbc file and name expansion speculated to be PerMiT BRaKinG.";
|
||||
CM_ SG_ 835 ACCEL_CMD_ALT "Copy of main ACCEL_CMD, but across 8 bits instead of 16 bits like ACCEL_CMD. Unsure if only informational or has an effect. Likely informational as existing openpilot sets this to 0 and no loss of functionality observed. Originally 'AT_RAW' in leaked toyota_2017_ref_pt.dbc file.";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in UI with user set unit";
|
||||
@@ -360,6 +364,7 @@ VAL_ 467 LOW_SPEED_LOCKOUT 2 "low speed locked" 1 "ok";
|
||||
VAL_ 614 STATE 3 "enabled" 1 "disabled";
|
||||
VAL_ 614 DIRECTION_CMD 3 "right" 2 "center" 1 "left";
|
||||
VAL_ 643 STATE 0 "normal" 1 "adaptive_cruise_control" 3 "emergency_braking";
|
||||
VAL_ 835 ACC_TYPE 2 "permanent low speed lockout" 1 "ok";
|
||||
VAL_ 921 CRUISE_CONTROL_STATE 2 "disabled" 11 "hold" 10 "hold_waiting_user_cmd" 6 "enabled" 5 "faulted";
|
||||
VAL_ 1042 LDA_ALERT 3 "hold with continuous beep" 2 "LDA unavailable" 1 "hold" 0 "none";
|
||||
VAL_ 1042 BARRIERS 3 "both" 2 "right" 1 "left" 0 "none";
|
||||
|
||||
@@ -163,7 +163,7 @@ BO_ 742 LEAD_INFO: 8 DSU
|
||||
|
||||
BO_ 835 ACC_CONTROL: 8 DSU
|
||||
SG_ ACCEL_CMD : 7|16@0- (0.001,0) [-20|20] "m/s2" HCU
|
||||
SG_ SET_ME_X01 : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ ACC_TYPE : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ DISTANCE : 20|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ MINI_CAR : 21|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X3 : 19|4@0+ (1,0) [0|15] "" XXX
|
||||
@@ -196,6 +196,9 @@ BO_ 951 ESP_CONTROL: 8 ESP
|
||||
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1020 SOLAR_SENSOR: 8 XXX
|
||||
SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1041 ACC_HUD: 8 DSU
|
||||
SG_ FCW : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X20 : 15|8@0+ (1,0) [0|1] "" XXX
|
||||
@@ -333,6 +336,7 @@ CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active";
|
||||
CM_ SG_ 643 COUNTER "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 BRAKE_STATUS "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 PRECOLLISION_ACTIVE "set 0.5s before any braking";
|
||||
CM_ SG_ 835 ACC_TYPE "if 2, car is likely to have a permanent low speed lockout. 1 is ok";
|
||||
CM_ SG_ 835 PERMIT_BRAKING "Original ACC has this going high when a car in front is detected. In openpilot and before the PERMIT_BRAKING name, this was 'SET_ME_1' and is hardcoded to be high. Unsure if only informational or has an effect though existing usage in openpilot is to always set it to 1. Originally 'PMTBRKG' in the leaked toyota_2017_ref_pt.dbc file and name expansion speculated to be PerMiT BRaKinG.";
|
||||
CM_ SG_ 835 ACCEL_CMD_ALT "Copy of main ACCEL_CMD, but across 8 bits instead of 16 bits like ACCEL_CMD. Unsure if only informational or has an effect. Likely informational as existing openpilot sets this to 0 and no loss of functionality observed. Originally 'AT_RAW' in leaked toyota_2017_ref_pt.dbc file.";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in UI with user set unit";
|
||||
@@ -360,6 +364,7 @@ VAL_ 467 LOW_SPEED_LOCKOUT 2 "low speed locked" 1 "ok";
|
||||
VAL_ 614 STATE 3 "enabled" 1 "disabled";
|
||||
VAL_ 614 DIRECTION_CMD 3 "right" 2 "center" 1 "left";
|
||||
VAL_ 643 STATE 0 "normal" 1 "adaptive_cruise_control" 3 "emergency_braking";
|
||||
VAL_ 835 ACC_TYPE 2 "permanent low speed lockout" 1 "ok";
|
||||
VAL_ 921 CRUISE_CONTROL_STATE 2 "disabled" 11 "hold" 10 "hold_waiting_user_cmd" 6 "enabled" 5 "faulted";
|
||||
VAL_ 1042 LDA_ALERT 3 "hold with continuous beep" 2 "LDA unavailable" 1 "hold" 0 "none";
|
||||
VAL_ 1042 BARRIERS 3 "both" 2 "right" 1 "left" 0 "none";
|
||||
|
||||
@@ -163,7 +163,7 @@ BO_ 742 LEAD_INFO: 8 DSU
|
||||
|
||||
BO_ 835 ACC_CONTROL: 8 DSU
|
||||
SG_ ACCEL_CMD : 7|16@0- (0.001,0) [-20|20] "m/s2" HCU
|
||||
SG_ SET_ME_X01 : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ ACC_TYPE : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ DISTANCE : 20|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ MINI_CAR : 21|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X3 : 19|4@0+ (1,0) [0|15] "" XXX
|
||||
@@ -196,6 +196,9 @@ BO_ 951 ESP_CONTROL: 8 ESP
|
||||
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1020 SOLAR_SENSOR: 8 XXX
|
||||
SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1041 ACC_HUD: 8 DSU
|
||||
SG_ FCW : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X20 : 15|8@0+ (1,0) [0|1] "" XXX
|
||||
@@ -333,6 +336,7 @@ CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active";
|
||||
CM_ SG_ 643 COUNTER "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 BRAKE_STATUS "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 PRECOLLISION_ACTIVE "set 0.5s before any braking";
|
||||
CM_ SG_ 835 ACC_TYPE "if 2, car is likely to have a permanent low speed lockout. 1 is ok";
|
||||
CM_ SG_ 835 PERMIT_BRAKING "Original ACC has this going high when a car in front is detected. In openpilot and before the PERMIT_BRAKING name, this was 'SET_ME_1' and is hardcoded to be high. Unsure if only informational or has an effect though existing usage in openpilot is to always set it to 1. Originally 'PMTBRKG' in the leaked toyota_2017_ref_pt.dbc file and name expansion speculated to be PerMiT BRaKinG.";
|
||||
CM_ SG_ 835 ACCEL_CMD_ALT "Copy of main ACCEL_CMD, but across 8 bits instead of 16 bits like ACCEL_CMD. Unsure if only informational or has an effect. Likely informational as existing openpilot sets this to 0 and no loss of functionality observed. Originally 'AT_RAW' in leaked toyota_2017_ref_pt.dbc file.";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in UI with user set unit";
|
||||
@@ -360,6 +364,7 @@ VAL_ 467 LOW_SPEED_LOCKOUT 2 "low speed locked" 1 "ok";
|
||||
VAL_ 614 STATE 3 "enabled" 1 "disabled";
|
||||
VAL_ 614 DIRECTION_CMD 3 "right" 2 "center" 1 "left";
|
||||
VAL_ 643 STATE 0 "normal" 1 "adaptive_cruise_control" 3 "emergency_braking";
|
||||
VAL_ 835 ACC_TYPE 2 "permanent low speed lockout" 1 "ok";
|
||||
VAL_ 921 CRUISE_CONTROL_STATE 2 "disabled" 11 "hold" 10 "hold_waiting_user_cmd" 6 "enabled" 5 "faulted";
|
||||
VAL_ 1042 LDA_ALERT 3 "hold with continuous beep" 2 "LDA unavailable" 1 "hold" 0 "none";
|
||||
VAL_ 1042 BARRIERS 3 "both" 2 "right" 1 "left" 0 "none";
|
||||
|
||||
@@ -163,7 +163,7 @@ BO_ 742 LEAD_INFO: 8 DSU
|
||||
|
||||
BO_ 835 ACC_CONTROL: 8 DSU
|
||||
SG_ ACCEL_CMD : 7|16@0- (0.001,0) [-20|20] "m/s2" HCU
|
||||
SG_ SET_ME_X01 : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ ACC_TYPE : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ DISTANCE : 20|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ MINI_CAR : 21|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X3 : 19|4@0+ (1,0) [0|15] "" XXX
|
||||
@@ -196,6 +196,9 @@ BO_ 951 ESP_CONTROL: 8 ESP
|
||||
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1020 SOLAR_SENSOR: 8 XXX
|
||||
SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1041 ACC_HUD: 8 DSU
|
||||
SG_ FCW : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X20 : 15|8@0+ (1,0) [0|1] "" XXX
|
||||
@@ -333,6 +336,7 @@ CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active";
|
||||
CM_ SG_ 643 COUNTER "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 BRAKE_STATUS "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 PRECOLLISION_ACTIVE "set 0.5s before any braking";
|
||||
CM_ SG_ 835 ACC_TYPE "if 2, car is likely to have a permanent low speed lockout. 1 is ok";
|
||||
CM_ SG_ 835 PERMIT_BRAKING "Original ACC has this going high when a car in front is detected. In openpilot and before the PERMIT_BRAKING name, this was 'SET_ME_1' and is hardcoded to be high. Unsure if only informational or has an effect though existing usage in openpilot is to always set it to 1. Originally 'PMTBRKG' in the leaked toyota_2017_ref_pt.dbc file and name expansion speculated to be PerMiT BRaKinG.";
|
||||
CM_ SG_ 835 ACCEL_CMD_ALT "Copy of main ACCEL_CMD, but across 8 bits instead of 16 bits like ACCEL_CMD. Unsure if only informational or has an effect. Likely informational as existing openpilot sets this to 0 and no loss of functionality observed. Originally 'AT_RAW' in leaked toyota_2017_ref_pt.dbc file.";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in UI with user set unit";
|
||||
@@ -360,6 +364,7 @@ VAL_ 467 LOW_SPEED_LOCKOUT 2 "low speed locked" 1 "ok";
|
||||
VAL_ 614 STATE 3 "enabled" 1 "disabled";
|
||||
VAL_ 614 DIRECTION_CMD 3 "right" 2 "center" 1 "left";
|
||||
VAL_ 643 STATE 0 "normal" 1 "adaptive_cruise_control" 3 "emergency_braking";
|
||||
VAL_ 835 ACC_TYPE 2 "permanent low speed lockout" 1 "ok";
|
||||
VAL_ 921 CRUISE_CONTROL_STATE 2 "disabled" 11 "hold" 10 "hold_waiting_user_cmd" 6 "enabled" 5 "faulted";
|
||||
VAL_ 1042 LDA_ALERT 3 "hold with continuous beep" 2 "LDA unavailable" 1 "hold" 0 "none";
|
||||
VAL_ 1042 BARRIERS 3 "both" 2 "right" 1 "left" 0 "none";
|
||||
|
||||
@@ -193,7 +193,7 @@ BO_ 742 LEAD_INFO: 8 DSU
|
||||
|
||||
BO_ 835 ACC_CONTROL: 8 DSU
|
||||
SG_ ACCEL_CMD : 7|16@0- (0.001,0) [-20|20] "m/s2" HCU
|
||||
SG_ SET_ME_X01 : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ ACC_TYPE : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ DISTANCE : 20|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ MINI_CAR : 21|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X3 : 19|4@0+ (1,0) [0|15] "" XXX
|
||||
@@ -226,6 +226,9 @@ BO_ 951 ESP_CONTROL: 8 ESP
|
||||
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1020 SOLAR_SENSOR: 8 XXX
|
||||
SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1041 ACC_HUD: 8 DSU
|
||||
SG_ FCW : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X20 : 15|8@0+ (1,0) [0|1] "" XXX
|
||||
@@ -347,6 +350,14 @@ BO_ 1163 RSA3: 8 FCM
|
||||
SG_ OVSPVALH : 27|4@0+ (1,-5) [0|0] "" XXX
|
||||
SG_ TSRSPU : 33|2@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 956 GEAR_PACKET2: 8 XXX
|
||||
SG_ SPORT_ON : 2|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ GEAR : 13|6@0+ (1,0) [0|63] "" XXX
|
||||
SG_ SPORT_GEAR_ON : 33|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SPORT_GEAR : 38|3@0+ (1,0) [0|7] "" XXX
|
||||
SG_ ECON_ON : 40|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DRIVE_ENGAGED : 47|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
CM_ SG_ 36 ACCEL_Y "unit is tbd";
|
||||
CM_ SG_ 36 YAW_RATE "verify";
|
||||
CM_ SG_ 36 STEERING_TORQUE "does not seem the steer torque, tbd";
|
||||
@@ -363,6 +374,7 @@ CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active";
|
||||
CM_ SG_ 643 COUNTER "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 BRAKE_STATUS "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 PRECOLLISION_ACTIVE "set 0.5s before any braking";
|
||||
CM_ SG_ 835 ACC_TYPE "if 2, car is likely to have a permanent low speed lockout. 1 is ok";
|
||||
CM_ SG_ 835 PERMIT_BRAKING "Original ACC has this going high when a car in front is detected. In openpilot and before the PERMIT_BRAKING name, this was 'SET_ME_1' and is hardcoded to be high. Unsure if only informational or has an effect though existing usage in openpilot is to always set it to 1. Originally 'PMTBRKG' in the leaked toyota_2017_ref_pt.dbc file and name expansion speculated to be PerMiT BRaKinG.";
|
||||
CM_ SG_ 835 ACCEL_CMD_ALT "Copy of main ACCEL_CMD, but across 8 bits instead of 16 bits like ACCEL_CMD. Unsure if only informational or has an effect. Likely informational as existing openpilot sets this to 0 and no loss of functionality observed. Originally 'AT_RAW' in leaked toyota_2017_ref_pt.dbc file.";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in UI with user set unit";
|
||||
@@ -390,16 +402,19 @@ VAL_ 467 LOW_SPEED_LOCKOUT 2 "low speed locked" 1 "ok";
|
||||
VAL_ 614 STATE 3 "enabled" 1 "disabled";
|
||||
VAL_ 614 DIRECTION_CMD 3 "right" 2 "center" 1 "left";
|
||||
VAL_ 643 STATE 0 "normal" 1 "adaptive_cruise_control" 3 "emergency_braking";
|
||||
VAL_ 835 ACC_TYPE 2 "permanent low speed lockout" 1 "ok";
|
||||
VAL_ 921 CRUISE_CONTROL_STATE 2 "disabled" 11 "hold" 10 "hold_waiting_user_cmd" 6 "enabled" 5 "faulted";
|
||||
VAL_ 956 SPORT_ON 0 "off" 1 "on";
|
||||
VAL_ 956 ECON_ON 0 "off" 1 "on";
|
||||
VAL_ 1042 LDA_ALERT 3 "hold with continuous beep" 2 "LDA unavailable" 1 "hold" 0 "none";
|
||||
VAL_ 1042 BARRIERS 3 "both" 2 "right" 1 "left" 0 "none";
|
||||
VAL_ 1042 RIGHT_LINE 3 "orange" 2 "faded" 1 "solid" 0 "none";
|
||||
VAL_ 1042 LEFT_LINE 3 "orange" 2 "faded" 1 "solid" 0 "none";
|
||||
VAL_ 1553 UNITS 1 "km" 2 "miles";
|
||||
VAL_ 1556 TURN_SIGNALS 3 "none" 2 "right" 1 "left";
|
||||
VAL_ 1161 TSGN1 1 "speed sign" 0 "none";
|
||||
VAL_ 1161 TSGN1 36 "speed sign mph" 1 "speed sign kph" 0 "none";
|
||||
VAL_ 1161 TSGN2 1 "speed sign" 0 "none";
|
||||
VAL_ 1161 SPLSGN2 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
VAL_ 1161 SPLSGN2 15 "conditional blank" 6 "snow" 5 "rain" 4 "wet road" 5 "rain" 3 "left" 2 "right" 1 "time" 0 "none";
|
||||
VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highway" 17 "no highway" 18 "motorway" 19 "no motorway" 20 "in city" 21 "outside city" 22 "pedestrian area" 23 "no pedestrian area" 65 "no overtaking left" 66 "no overtaking right" 67 "overtaking allowed again" 81 "no right turn" 97 "stop" 105 "yield" 113 "stop" 114 "yield us" 129 "no entry" 138 "no entry tss2" 145 "do not enter";
|
||||
VAL_ 1162 SPLSGN3 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
|
||||
|
||||
@@ -193,7 +193,7 @@ BO_ 742 LEAD_INFO: 8 DSU
|
||||
|
||||
BO_ 835 ACC_CONTROL: 8 DSU
|
||||
SG_ ACCEL_CMD : 7|16@0- (0.001,0) [-20|20] "m/s2" HCU
|
||||
SG_ SET_ME_X01 : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ ACC_TYPE : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ DISTANCE : 20|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ MINI_CAR : 21|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X3 : 19|4@0+ (1,0) [0|15] "" XXX
|
||||
@@ -226,6 +226,9 @@ BO_ 951 ESP_CONTROL: 8 ESP
|
||||
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1020 SOLAR_SENSOR: 8 XXX
|
||||
SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1041 ACC_HUD: 8 DSU
|
||||
SG_ FCW : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X20 : 15|8@0+ (1,0) [0|1] "" XXX
|
||||
@@ -363,6 +366,7 @@ CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active";
|
||||
CM_ SG_ 643 COUNTER "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 BRAKE_STATUS "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 PRECOLLISION_ACTIVE "set 0.5s before any braking";
|
||||
CM_ SG_ 835 ACC_TYPE "if 2, car is likely to have a permanent low speed lockout. 1 is ok";
|
||||
CM_ SG_ 835 PERMIT_BRAKING "Original ACC has this going high when a car in front is detected. In openpilot and before the PERMIT_BRAKING name, this was 'SET_ME_1' and is hardcoded to be high. Unsure if only informational or has an effect though existing usage in openpilot is to always set it to 1. Originally 'PMTBRKG' in the leaked toyota_2017_ref_pt.dbc file and name expansion speculated to be PerMiT BRaKinG.";
|
||||
CM_ SG_ 835 ACCEL_CMD_ALT "Copy of main ACCEL_CMD, but across 8 bits instead of 16 bits like ACCEL_CMD. Unsure if only informational or has an effect. Likely informational as existing openpilot sets this to 0 and no loss of functionality observed. Originally 'AT_RAW' in leaked toyota_2017_ref_pt.dbc file.";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in UI with user set unit";
|
||||
@@ -390,6 +394,7 @@ VAL_ 467 LOW_SPEED_LOCKOUT 2 "low speed locked" 1 "ok";
|
||||
VAL_ 614 STATE 3 "enabled" 1 "disabled";
|
||||
VAL_ 614 DIRECTION_CMD 3 "right" 2 "center" 1 "left";
|
||||
VAL_ 643 STATE 0 "normal" 1 "adaptive_cruise_control" 3 "emergency_braking";
|
||||
VAL_ 835 ACC_TYPE 2 "permanent low speed lockout" 1 "ok";
|
||||
VAL_ 921 CRUISE_CONTROL_STATE 2 "disabled" 11 "hold" 10 "hold_waiting_user_cmd" 6 "enabled" 5 "faulted";
|
||||
VAL_ 1042 LDA_ALERT 3 "hold with continuous beep" 2 "LDA unavailable" 1 "hold" 0 "none";
|
||||
VAL_ 1042 BARRIERS 3 "both" 2 "right" 1 "left" 0 "none";
|
||||
@@ -437,6 +442,7 @@ BO_ 956 GEAR_PACKET: 8 XXX
|
||||
SG_ SPORT_ON : 2|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ GEAR : 13|6@0+ (1,0) [0|63] "" XXX
|
||||
SG_ ECON_ON : 40|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SPORT_ON_2 : 55|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
CM_ SG_ 548 BRAKE_PRESSURE "seems prop to pedal force";
|
||||
CM_ SG_ 548 BRAKE_POSITION "seems proportional to pedal displacement, unclear the max value of 0x1c8";
|
||||
@@ -446,3 +452,4 @@ VAL_ 610 LKA_STATE 25 "temporary_fault" 9 "temporary_fault2" 5 "active" 1 "stand
|
||||
VAL_ 956 GEAR 0 "D" 1 "S" 8 "N" 16 "R" 32 "P";
|
||||
VAL_ 956 SPORT_ON 0 "off" 1 "on";
|
||||
VAL_ 956 ECON_ON 0 "off" 1 "on";
|
||||
VAL_ 956 SPORT_ON_2 0 "off" 1 "on";
|
||||
|
||||
@@ -163,7 +163,7 @@ BO_ 742 LEAD_INFO: 8 DSU
|
||||
|
||||
BO_ 835 ACC_CONTROL: 8 DSU
|
||||
SG_ ACCEL_CMD : 7|16@0- (0.001,0) [-20|20] "m/s2" HCU
|
||||
SG_ SET_ME_X01 : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ ACC_TYPE : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ DISTANCE : 20|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ MINI_CAR : 21|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X3 : 19|4@0+ (1,0) [0|15] "" XXX
|
||||
@@ -196,6 +196,9 @@ BO_ 951 ESP_CONTROL: 8 ESP
|
||||
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1020 SOLAR_SENSOR: 8 XXX
|
||||
SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1041 ACC_HUD: 8 DSU
|
||||
SG_ FCW : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X20 : 15|8@0+ (1,0) [0|1] "" XXX
|
||||
@@ -333,6 +336,7 @@ CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active";
|
||||
CM_ SG_ 643 COUNTER "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 BRAKE_STATUS "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 PRECOLLISION_ACTIVE "set 0.5s before any braking";
|
||||
CM_ SG_ 835 ACC_TYPE "if 2, car is likely to have a permanent low speed lockout. 1 is ok";
|
||||
CM_ SG_ 835 PERMIT_BRAKING "Original ACC has this going high when a car in front is detected. In openpilot and before the PERMIT_BRAKING name, this was 'SET_ME_1' and is hardcoded to be high. Unsure if only informational or has an effect though existing usage in openpilot is to always set it to 1. Originally 'PMTBRKG' in the leaked toyota_2017_ref_pt.dbc file and name expansion speculated to be PerMiT BRaKinG.";
|
||||
CM_ SG_ 835 ACCEL_CMD_ALT "Copy of main ACCEL_CMD, but across 8 bits instead of 16 bits like ACCEL_CMD. Unsure if only informational or has an effect. Likely informational as existing openpilot sets this to 0 and no loss of functionality observed. Originally 'AT_RAW' in leaked toyota_2017_ref_pt.dbc file.";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in UI with user set unit";
|
||||
@@ -360,6 +364,7 @@ VAL_ 467 LOW_SPEED_LOCKOUT 2 "low speed locked" 1 "ok";
|
||||
VAL_ 614 STATE 3 "enabled" 1 "disabled";
|
||||
VAL_ 614 DIRECTION_CMD 3 "right" 2 "center" 1 "left";
|
||||
VAL_ 643 STATE 0 "normal" 1 "adaptive_cruise_control" 3 "emergency_braking";
|
||||
VAL_ 835 ACC_TYPE 2 "permanent low speed lockout" 1 "ok";
|
||||
VAL_ 921 CRUISE_CONTROL_STATE 2 "disabled" 11 "hold" 10 "hold_waiting_user_cmd" 6 "enabled" 5 "faulted";
|
||||
VAL_ 1042 LDA_ALERT 3 "hold with continuous beep" 2 "LDA unavailable" 1 "hold" 0 "none";
|
||||
VAL_ 1042 BARRIERS 3 "both" 2 "right" 1 "left" 0 "none";
|
||||
|
||||
@@ -163,7 +163,7 @@ BO_ 742 LEAD_INFO: 8 DSU
|
||||
|
||||
BO_ 835 ACC_CONTROL: 8 DSU
|
||||
SG_ ACCEL_CMD : 7|16@0- (0.001,0) [-20|20] "m/s2" HCU
|
||||
SG_ SET_ME_X01 : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ ACC_TYPE : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ DISTANCE : 20|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ MINI_CAR : 21|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X3 : 19|4@0+ (1,0) [0|15] "" XXX
|
||||
@@ -196,6 +196,9 @@ BO_ 951 ESP_CONTROL: 8 ESP
|
||||
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1020 SOLAR_SENSOR: 8 XXX
|
||||
SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1041 ACC_HUD: 8 DSU
|
||||
SG_ FCW : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X20 : 15|8@0+ (1,0) [0|1] "" XXX
|
||||
@@ -333,6 +336,7 @@ CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active";
|
||||
CM_ SG_ 643 COUNTER "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 BRAKE_STATUS "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 PRECOLLISION_ACTIVE "set 0.5s before any braking";
|
||||
CM_ SG_ 835 ACC_TYPE "if 2, car is likely to have a permanent low speed lockout. 1 is ok";
|
||||
CM_ SG_ 835 PERMIT_BRAKING "Original ACC has this going high when a car in front is detected. In openpilot and before the PERMIT_BRAKING name, this was 'SET_ME_1' and is hardcoded to be high. Unsure if only informational or has an effect though existing usage in openpilot is to always set it to 1. Originally 'PMTBRKG' in the leaked toyota_2017_ref_pt.dbc file and name expansion speculated to be PerMiT BRaKinG.";
|
||||
CM_ SG_ 835 ACCEL_CMD_ALT "Copy of main ACCEL_CMD, but across 8 bits instead of 16 bits like ACCEL_CMD. Unsure if only informational or has an effect. Likely informational as existing openpilot sets this to 0 and no loss of functionality observed. Originally 'AT_RAW' in leaked toyota_2017_ref_pt.dbc file.";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in UI with user set unit";
|
||||
@@ -360,6 +364,7 @@ VAL_ 467 LOW_SPEED_LOCKOUT 2 "low speed locked" 1 "ok";
|
||||
VAL_ 614 STATE 3 "enabled" 1 "disabled";
|
||||
VAL_ 614 DIRECTION_CMD 3 "right" 2 "center" 1 "left";
|
||||
VAL_ 643 STATE 0 "normal" 1 "adaptive_cruise_control" 3 "emergency_braking";
|
||||
VAL_ 835 ACC_TYPE 2 "permanent low speed lockout" 1 "ok";
|
||||
VAL_ 921 CRUISE_CONTROL_STATE 2 "disabled" 11 "hold" 10 "hold_waiting_user_cmd" 6 "enabled" 5 "faulted";
|
||||
VAL_ 1042 LDA_ALERT 3 "hold with continuous beep" 2 "LDA unavailable" 1 "hold" 0 "none";
|
||||
VAL_ 1042 BARRIERS 3 "both" 2 "right" 1 "left" 0 "none";
|
||||
|
||||
@@ -163,7 +163,7 @@ BO_ 742 LEAD_INFO: 8 DSU
|
||||
|
||||
BO_ 835 ACC_CONTROL: 8 DSU
|
||||
SG_ ACCEL_CMD : 7|16@0- (0.001,0) [-20|20] "m/s2" HCU
|
||||
SG_ SET_ME_X01 : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ ACC_TYPE : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ DISTANCE : 20|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ MINI_CAR : 21|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X3 : 19|4@0+ (1,0) [0|15] "" XXX
|
||||
@@ -196,6 +196,9 @@ BO_ 951 ESP_CONTROL: 8 ESP
|
||||
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1020 SOLAR_SENSOR: 8 XXX
|
||||
SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1041 ACC_HUD: 8 DSU
|
||||
SG_ FCW : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X20 : 15|8@0+ (1,0) [0|1] "" XXX
|
||||
@@ -333,6 +336,7 @@ CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active";
|
||||
CM_ SG_ 643 COUNTER "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 BRAKE_STATUS "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 PRECOLLISION_ACTIVE "set 0.5s before any braking";
|
||||
CM_ SG_ 835 ACC_TYPE "if 2, car is likely to have a permanent low speed lockout. 1 is ok";
|
||||
CM_ SG_ 835 PERMIT_BRAKING "Original ACC has this going high when a car in front is detected. In openpilot and before the PERMIT_BRAKING name, this was 'SET_ME_1' and is hardcoded to be high. Unsure if only informational or has an effect though existing usage in openpilot is to always set it to 1. Originally 'PMTBRKG' in the leaked toyota_2017_ref_pt.dbc file and name expansion speculated to be PerMiT BRaKinG.";
|
||||
CM_ SG_ 835 ACCEL_CMD_ALT "Copy of main ACCEL_CMD, but across 8 bits instead of 16 bits like ACCEL_CMD. Unsure if only informational or has an effect. Likely informational as existing openpilot sets this to 0 and no loss of functionality observed. Originally 'AT_RAW' in leaked toyota_2017_ref_pt.dbc file.";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in UI with user set unit";
|
||||
@@ -360,6 +364,7 @@ VAL_ 467 LOW_SPEED_LOCKOUT 2 "low speed locked" 1 "ok";
|
||||
VAL_ 614 STATE 3 "enabled" 1 "disabled";
|
||||
VAL_ 614 DIRECTION_CMD 3 "right" 2 "center" 1 "left";
|
||||
VAL_ 643 STATE 0 "normal" 1 "adaptive_cruise_control" 3 "emergency_braking";
|
||||
VAL_ 835 ACC_TYPE 2 "permanent low speed lockout" 1 "ok";
|
||||
VAL_ 921 CRUISE_CONTROL_STATE 2 "disabled" 11 "hold" 10 "hold_waiting_user_cmd" 6 "enabled" 5 "faulted";
|
||||
VAL_ 1042 LDA_ALERT 3 "hold with continuous beep" 2 "LDA unavailable" 1 "hold" 0 "none";
|
||||
VAL_ 1042 BARRIERS 3 "both" 2 "right" 1 "left" 0 "none";
|
||||
|
||||
@@ -163,7 +163,7 @@ BO_ 742 LEAD_INFO: 8 DSU
|
||||
|
||||
BO_ 835 ACC_CONTROL: 8 DSU
|
||||
SG_ ACCEL_CMD : 7|16@0- (0.001,0) [-20|20] "m/s2" HCU
|
||||
SG_ SET_ME_X01 : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ ACC_TYPE : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ DISTANCE : 20|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ MINI_CAR : 21|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X3 : 19|4@0+ (1,0) [0|15] "" XXX
|
||||
@@ -196,6 +196,9 @@ BO_ 951 ESP_CONTROL: 8 ESP
|
||||
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1020 SOLAR_SENSOR: 8 XXX
|
||||
SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1041 ACC_HUD: 8 DSU
|
||||
SG_ FCW : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X20 : 15|8@0+ (1,0) [0|1] "" XXX
|
||||
@@ -333,6 +336,7 @@ CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active";
|
||||
CM_ SG_ 643 COUNTER "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 BRAKE_STATUS "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 PRECOLLISION_ACTIVE "set 0.5s before any braking";
|
||||
CM_ SG_ 835 ACC_TYPE "if 2, car is likely to have a permanent low speed lockout. 1 is ok";
|
||||
CM_ SG_ 835 PERMIT_BRAKING "Original ACC has this going high when a car in front is detected. In openpilot and before the PERMIT_BRAKING name, this was 'SET_ME_1' and is hardcoded to be high. Unsure if only informational or has an effect though existing usage in openpilot is to always set it to 1. Originally 'PMTBRKG' in the leaked toyota_2017_ref_pt.dbc file and name expansion speculated to be PerMiT BRaKinG.";
|
||||
CM_ SG_ 835 ACCEL_CMD_ALT "Copy of main ACCEL_CMD, but across 8 bits instead of 16 bits like ACCEL_CMD. Unsure if only informational or has an effect. Likely informational as existing openpilot sets this to 0 and no loss of functionality observed. Originally 'AT_RAW' in leaked toyota_2017_ref_pt.dbc file.";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in UI with user set unit";
|
||||
@@ -360,6 +364,7 @@ VAL_ 467 LOW_SPEED_LOCKOUT 2 "low speed locked" 1 "ok";
|
||||
VAL_ 614 STATE 3 "enabled" 1 "disabled";
|
||||
VAL_ 614 DIRECTION_CMD 3 "right" 2 "center" 1 "left";
|
||||
VAL_ 643 STATE 0 "normal" 1 "adaptive_cruise_control" 3 "emergency_braking";
|
||||
VAL_ 835 ACC_TYPE 2 "permanent low speed lockout" 1 "ok";
|
||||
VAL_ 921 CRUISE_CONTROL_STATE 2 "disabled" 11 "hold" 10 "hold_waiting_user_cmd" 6 "enabled" 5 "faulted";
|
||||
VAL_ 1042 LDA_ALERT 3 "hold with continuous beep" 2 "LDA unavailable" 1 "hold" 0 "none";
|
||||
VAL_ 1042 BARRIERS 3 "both" 2 "right" 1 "left" 0 "none";
|
||||
|
||||
@@ -1334,6 +1334,14 @@ BO_ 981 Licht_Anf_01: 8 XXX
|
||||
BO_ 1440 RLS_01: 8 XXX
|
||||
|
||||
BO_ 870 Blinkmodi_02: 8 XXX
|
||||
SG_ Hazard_Switch : 20|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ Comfort_Signal_Left : 23|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ Comfort_Signal_Right : 24|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ Left_Turn_Exterior_Bulb_1 : 25|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ Right_Turn_Exterior_Bulb_1 : 26|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ Left_Turn_Exterior_Bulb_2 : 27|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ Right_Turn_Exterior_Bulb_2 : 28|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ Fast_Send_Rate_Active : 37|1@1+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1385 HVEM_04: 8 XXX
|
||||
|
||||
@@ -1364,6 +1372,14 @@ CM_ SG_ 294 254 "May be zero when sent by older cameras";
|
||||
CM_ SG_ 294 Assist_Torque "Heading control input, torque";
|
||||
CM_ SG_ 294 Assist_VZ "Heading control input, direction (sign)";
|
||||
CM_ SG_ 294 HCA_Available "Must be 1 for steering rack to accept HCA commands";
|
||||
CM_ SG_ 870 Hazard_Switch "Four-way flashers active";
|
||||
CM_ SG_ 870 Comfort_Signal_Left "Comfort turn signal active, left";
|
||||
CM_ SG_ 870 Comfort_Signal_Right "Comfort turn signal active, right";
|
||||
CM_ SG_ 870 Left_Turn_Exterior_Bulb_1 "Probably front";
|
||||
CM_ SG_ 870 Right_Turn_Exterior_Bulb_1 "Probably front";
|
||||
CM_ SG_ 870 Left_Turn_Exterior_Bulb_2 "Probably rear";
|
||||
CM_ SG_ 870 Right_Turn_Exterior_Bulb_2 "Probably rear";
|
||||
CM_ SG_ 870 Fast_Send_Rate_Active "CAN message send rate";
|
||||
CM_ SG_ 919 LDW_DLC "Probable DLC (distance to line crossing)";
|
||||
CM_ SG_ 919 LDW_TLC "Probable TLC (time to line crossing)";
|
||||
CM_ SG_ 919 LDW_Unknown "Might be a steering pressed / driver active flag";
|
||||
@@ -1383,3 +1399,4 @@ VAL_ 159 EPS_HCA_Status 0 "disabled" 1 "initializing" 2 "fault" 3 "ready" 4 "rej
|
||||
VAL_ 173 GE_Fahrstufe 5 "P" 6 "R" 7 "N" 8 "D" 9 "S" 10 "E" 14 "T";
|
||||
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";
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
EON = os.path.isfile('/EON')
|
||||
TICI = os.path.isfile('/TICI')
|
||||
PC = not (EON or TICI)
|
||||
|
||||
PREFIX = "arm-none-eabi-"
|
||||
BUILDER = "DEV"
|
||||
|
||||
if os.getenv("PEDAL"):
|
||||
PROJECT = "pedal"
|
||||
STARTUP_FILE = "startup_stm32f205xx.s"
|
||||
STARTUP_FILE = "stm32fx/startup_stm32f205xx.s"
|
||||
LINKER_SCRIPT = "stm32fx/stm32fx_flash.ld"
|
||||
MAIN = "pedal/main.c"
|
||||
PROJECT_FLAGS = [
|
||||
"-mcpu=cortex-m3",
|
||||
@@ -20,10 +17,13 @@ if os.getenv("PEDAL"):
|
||||
"-O2",
|
||||
"-DPEDAL",
|
||||
]
|
||||
if os.getenv("PEDAL_USB"):
|
||||
PROJECT_FLAGS.append("-DPEDAL_USB")
|
||||
|
||||
else:
|
||||
PROJECT = "panda"
|
||||
STARTUP_FILE = "startup_stm32f413xx.s"
|
||||
STARTUP_FILE = "stm32fx/startup_stm32f413xx.s"
|
||||
LINKER_SCRIPT = "stm32fx/stm32fx_flash.ld"
|
||||
MAIN = "main.c"
|
||||
PROJECT_FLAGS = [
|
||||
"-mcpu=cortex-m4",
|
||||
@@ -34,6 +34,7 @@ else:
|
||||
"-fsingle-precision-constant",
|
||||
"-Os",
|
||||
"-g",
|
||||
"-DPANDA",
|
||||
]
|
||||
|
||||
if FindFile('dp_vw_panda', '/data/params/d') != None:
|
||||
@@ -46,10 +47,6 @@ else:
|
||||
if (int(f.read().strip())) == 1:
|
||||
PROJECT_FLAGS += ['-Dfake_black_panda']
|
||||
|
||||
if not PC:
|
||||
PROJECT_FLAGS += ["-DEON"]
|
||||
BUILDER = "EON"
|
||||
|
||||
|
||||
def get_version(builder, build_type):
|
||||
version_file = File('../VERSION').srcnode().abspath
|
||||
@@ -95,7 +92,7 @@ def objcopy(source, target, env, for_signature):
|
||||
return '$OBJCOPY -O binary %s %s' % (source[0], target[0])
|
||||
|
||||
|
||||
linkerscript_fn = File("stm32_flash.ld").srcnode().abspath
|
||||
linkerscript_fn = File(LINKER_SCRIPT).srcnode().abspath
|
||||
|
||||
flags = [
|
||||
"-Wall",
|
||||
@@ -122,7 +119,7 @@ else:
|
||||
flags += ["-DALLOW_DEBUG"]
|
||||
|
||||
includes = [
|
||||
"inc",
|
||||
"stm32fx/inc",
|
||||
"..",
|
||||
".",
|
||||
]
|
||||
|
||||
@@ -213,9 +213,6 @@ void black_init(void) {
|
||||
if (car_harness_status == HARNESS_STATUS_FLIPPED) {
|
||||
can_flip_buses(0, 2);
|
||||
}
|
||||
|
||||
// init multiplexer
|
||||
can_set_obd(car_harness_status, false);
|
||||
}
|
||||
|
||||
const harness_configuration black_harness_config = {
|
||||
@@ -235,6 +232,11 @@ const harness_configuration black_harness_config = {
|
||||
const board board_black = {
|
||||
.board_type = "Black",
|
||||
.harness_config = &black_harness_config,
|
||||
.has_gps = true,
|
||||
.has_hw_gmlan = false,
|
||||
.has_obd = true,
|
||||
.has_lin = false,
|
||||
.has_rtc = false,
|
||||
.init = black_init,
|
||||
.enable_can_transceiver = black_enable_can_transceiver,
|
||||
.enable_can_transceivers = black_enable_can_transceivers,
|
||||
|
||||
@@ -18,6 +18,11 @@ typedef void (*board_set_siren)(bool enabled);
|
||||
struct board {
|
||||
const char *board_type;
|
||||
const harness_configuration *harness_config;
|
||||
const bool has_gps;
|
||||
const bool has_hw_gmlan;
|
||||
const bool has_obd;
|
||||
const bool has_lin;
|
||||
const bool has_rtc;
|
||||
board_init init;
|
||||
board_enable_can_transceiver enable_can_transceiver;
|
||||
board_enable_can_transceivers enable_can_transceivers;
|
||||
@@ -69,11 +74,3 @@ struct board {
|
||||
|
||||
// ********************* Globals **********************
|
||||
uint8_t usb_power_mode = USB_POWER_NONE;
|
||||
|
||||
// ************ Board function prototypes *************
|
||||
bool board_has_gps(void);
|
||||
bool board_has_gmlan(void);
|
||||
bool board_has_obd(void);
|
||||
bool board_has_lin(void);
|
||||
bool board_has_rtc(void);
|
||||
bool board_has_relay(void);
|
||||
@@ -204,9 +204,6 @@ void dos_init(void) {
|
||||
can_flip_buses(0, 2);
|
||||
}
|
||||
|
||||
// init multiplexer
|
||||
can_set_obd(car_harness_status, false);
|
||||
|
||||
// Init clock source as internal free running
|
||||
dos_set_clock_source_mode(CLOCK_SOURCE_MODE_FREE_RUNNING);
|
||||
}
|
||||
@@ -228,6 +225,11 @@ const harness_configuration dos_harness_config = {
|
||||
const board board_dos = {
|
||||
.board_type = "Dos",
|
||||
.harness_config = &dos_harness_config,
|
||||
.has_gps = false,
|
||||
.has_hw_gmlan = false,
|
||||
.has_obd = true,
|
||||
.has_lin = false,
|
||||
.has_rtc = true,
|
||||
.init = dos_init,
|
||||
.enable_can_transceiver = dos_enable_can_transceiver,
|
||||
.enable_can_transceivers = dos_enable_can_transceivers,
|
||||
|
||||
@@ -36,6 +36,11 @@ void grey_set_gps_mode(uint8_t mode) {
|
||||
const board board_grey = {
|
||||
.board_type = "Grey",
|
||||
.harness_config = &white_harness_config,
|
||||
.has_gps = true,
|
||||
.has_hw_gmlan = true,
|
||||
.has_obd = false,
|
||||
.has_lin = true,
|
||||
.has_rtc = false,
|
||||
.init = grey_init,
|
||||
.enable_can_transceiver = white_enable_can_transceiver,
|
||||
.enable_can_transceivers = white_enable_can_transceivers,
|
||||
|
||||
@@ -109,6 +109,11 @@ const harness_configuration pedal_harness_config = {
|
||||
const board board_pedal = {
|
||||
.board_type = "Pedal",
|
||||
.harness_config = &pedal_harness_config,
|
||||
.has_gps = false,
|
||||
.has_hw_gmlan = false,
|
||||
.has_obd = false,
|
||||
.has_lin = false,
|
||||
.has_rtc = false,
|
||||
.init = pedal_init,
|
||||
.enable_can_transceiver = pedal_enable_can_transceiver,
|
||||
.enable_can_transceivers = pedal_enable_can_transceivers,
|
||||
|
||||
@@ -247,9 +247,6 @@ void uno_init(void) {
|
||||
can_flip_buses(0, 2);
|
||||
}
|
||||
|
||||
// init multiplexer
|
||||
can_set_obd(car_harness_status, false);
|
||||
|
||||
// Switch to phone usb mode if harness connection is powered by less than 7V
|
||||
if(adc_get_voltage() < 7000U){
|
||||
uno_set_usb_switch(true);
|
||||
@@ -278,6 +275,11 @@ const harness_configuration uno_harness_config = {
|
||||
const board board_uno = {
|
||||
.board_type = "Uno",
|
||||
.harness_config = &uno_harness_config,
|
||||
.has_gps = true,
|
||||
.has_hw_gmlan = false,
|
||||
.has_obd = true,
|
||||
.has_lin = false,
|
||||
.has_rtc = true,
|
||||
.init = uno_init,
|
||||
.enable_can_transceiver = uno_enable_can_transceiver,
|
||||
.enable_can_transceivers = uno_enable_can_transceivers,
|
||||
|
||||
@@ -78,13 +78,6 @@ void white_set_gps_mode(uint8_t mode) {
|
||||
set_gpio_output(GPIOC, 14, 0);
|
||||
set_gpio_output(GPIOC, 5, 0);
|
||||
break;
|
||||
#ifndef EON
|
||||
case GPS_ENABLED:
|
||||
// ESP ON
|
||||
set_gpio_output(GPIOC, 14, 1);
|
||||
set_gpio_output(GPIOC, 5, 1);
|
||||
break;
|
||||
#endif
|
||||
case GPS_BOOTMODE:
|
||||
set_gpio_output(GPIOC, 14, 1);
|
||||
set_gpio_output(GPIOC, 5, 0);
|
||||
@@ -158,71 +151,8 @@ uint32_t white_read_current(void){
|
||||
return adc_get(ADCCHAN_CURRENT);
|
||||
}
|
||||
|
||||
uint32_t marker = 0;
|
||||
void white_usb_power_mode_tick(uint32_t uptime){
|
||||
|
||||
// on EON or BOOTSTUB, no state machine
|
||||
#if !defined(BOOTSTUB) && !defined(EON)
|
||||
#define CURRENT_THRESHOLD 0xF00U
|
||||
#define CLICKS 5U // 5 seconds to switch modes
|
||||
|
||||
uint32_t current = white_read_current();
|
||||
|
||||
// ~0x9a = 500 ma
|
||||
// puth(current); puts("\n");
|
||||
|
||||
switch (usb_power_mode) {
|
||||
case USB_POWER_CLIENT:
|
||||
if ((uptime - marker) >= CLICKS) {
|
||||
if (!is_enumerated) {
|
||||
puts("USBP: didn't enumerate, switching to CDP mode\n");
|
||||
// switch to CDP
|
||||
white_set_usb_power_mode(USB_POWER_CDP);
|
||||
marker = uptime;
|
||||
}
|
||||
}
|
||||
// keep resetting the timer if it's enumerated
|
||||
if (is_enumerated) {
|
||||
marker = uptime;
|
||||
}
|
||||
break;
|
||||
case USB_POWER_CDP:
|
||||
// been CLICKS clicks since we switched to CDP
|
||||
if ((uptime - marker) >= CLICKS) {
|
||||
// measure current draw, if positive and no enumeration, switch to DCP
|
||||
if (!is_enumerated && (current < CURRENT_THRESHOLD)) {
|
||||
puts("USBP: no enumeration with current draw, switching to DCP mode\n");
|
||||
white_set_usb_power_mode(USB_POWER_DCP);
|
||||
marker = uptime;
|
||||
}
|
||||
}
|
||||
// keep resetting the timer if there's no current draw in CDP
|
||||
if (current >= CURRENT_THRESHOLD) {
|
||||
marker = uptime;
|
||||
}
|
||||
break;
|
||||
case USB_POWER_DCP:
|
||||
// been at least CLICKS clicks since we switched to DCP
|
||||
if ((uptime - marker) >= CLICKS) {
|
||||
// if no current draw, switch back to CDP
|
||||
if (current >= CURRENT_THRESHOLD) {
|
||||
puts("USBP: no current draw, switching back to CDP mode\n");
|
||||
white_set_usb_power_mode(USB_POWER_CDP);
|
||||
marker = uptime;
|
||||
}
|
||||
}
|
||||
// keep resetting the timer if there's current draw in DCP
|
||||
if (current < CURRENT_THRESHOLD) {
|
||||
marker = uptime;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
puts("USB power mode invalid\n"); // set_usb_power_mode prevents assigning invalid values
|
||||
break;
|
||||
}
|
||||
#else
|
||||
UNUSED(uptime);
|
||||
#endif
|
||||
}
|
||||
|
||||
void white_set_ir_power(uint8_t percentage){
|
||||
@@ -313,7 +243,7 @@ void white_grey_common_init(void) {
|
||||
// Init usb power mode
|
||||
uint32_t voltage = adc_get_voltage();
|
||||
// Init in CDP mode only if panda is powered by 12V.
|
||||
// Otherwise a PC would not be able to flash a standalone panda with EON build
|
||||
// Otherwise a PC would not be able to flash a standalone panda
|
||||
if (voltage > 8000U) { // 8V threshold
|
||||
white_set_usb_power_mode(USB_POWER_CDP);
|
||||
} else {
|
||||
@@ -335,6 +265,11 @@ const harness_configuration white_harness_config = {
|
||||
const board board_white = {
|
||||
.board_type = "White",
|
||||
.harness_config = &white_harness_config,
|
||||
.has_gps = false,
|
||||
.has_hw_gmlan = true,
|
||||
.has_obd = false,
|
||||
.has_lin = true,
|
||||
.has_rtc = false,
|
||||
.init = white_init,
|
||||
.enable_can_transceiver = white_enable_can_transceiver,
|
||||
.enable_can_transceivers = white_enable_can_transceivers,
|
||||
|
||||
@@ -3,62 +3,24 @@
|
||||
#define VERS_TAG 0x53524556
|
||||
#define MIN_VERSION 2
|
||||
|
||||
#include "config.h"
|
||||
#include "obj/gitversion.h"
|
||||
|
||||
#ifdef STM32F4
|
||||
#define PANDA
|
||||
#include "stm32f4xx.h"
|
||||
#include "stm32f4xx_hal_gpio_ex.h"
|
||||
#else
|
||||
#include "stm32f2xx.h"
|
||||
#include "stm32f2xx_hal_gpio_ex.h"
|
||||
#endif
|
||||
|
||||
// ******************** Prototypes ********************
|
||||
void puts(const char *a){ UNUSED(a); }
|
||||
void puth(unsigned int i){ UNUSED(i); }
|
||||
void puth2(unsigned int i){ UNUSED(i); }
|
||||
typedef struct board board;
|
||||
typedef struct harness_configuration harness_configuration;
|
||||
// No CAN support on bootloader
|
||||
void can_flip_buses(uint8_t bus1, uint8_t bus2){UNUSED(bus1); UNUSED(bus2);}
|
||||
void can_set_obd(int harness_orientation, bool obd){UNUSED(harness_orientation); UNUSED(obd);}
|
||||
|
||||
// ********************* Globals **********************
|
||||
int hw_type = 0;
|
||||
const board *current_board;
|
||||
|
||||
// ********************* Includes *********************
|
||||
#include "libc.h"
|
||||
#include "provision.h"
|
||||
#include "critical.h"
|
||||
#include "faults.h"
|
||||
#include "config.h"
|
||||
|
||||
#include "drivers/registers.h"
|
||||
#include "drivers/interrupts.h"
|
||||
#include "drivers/clock.h"
|
||||
#include "drivers/llgpio.h"
|
||||
#include "drivers/adc.h"
|
||||
#include "drivers/pwm.h"
|
||||
|
||||
#include "board.h"
|
||||
|
||||
#include "gpio.h"
|
||||
|
||||
#include "drivers/spi.h"
|
||||
#include "drivers/usb.h"
|
||||
//#include "drivers/uart.h"
|
||||
|
||||
#include "early_init.h"
|
||||
#include "provision.h"
|
||||
|
||||
#include "crypto/rsa.h"
|
||||
#include "crypto/sha.h"
|
||||
|
||||
#include "obj/cert.h"
|
||||
|
||||
#include "obj/gitversion.h"
|
||||
#include "spi_flasher.h"
|
||||
|
||||
void __initialize_hardware_early(void) {
|
||||
early();
|
||||
early_initialization();
|
||||
}
|
||||
|
||||
void fail(void) {
|
||||
@@ -77,7 +39,7 @@ int main(void) {
|
||||
|
||||
disable_interrupts();
|
||||
clock_init();
|
||||
detect_configuration();
|
||||
detect_external_debug_serial();
|
||||
detect_board_type();
|
||||
|
||||
if (enter_bootloader_mode == ENTER_SOFTLOADER_MAGIC) {
|
||||
@@ -121,4 +83,3 @@ good:
|
||||
((void(*)(void)) _app_start[1])();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
14
panda/board/bootstub_declarations.h
Normal file
14
panda/board/bootstub_declarations.h
Normal file
@@ -0,0 +1,14 @@
|
||||
// ******************** Prototypes ********************
|
||||
void puts(const char *a){ UNUSED(a); }
|
||||
void puth(uint8_t i){ UNUSED(i); }
|
||||
void puth2(uint8_t i){ UNUSED(i); }
|
||||
typedef struct board board;
|
||||
typedef struct harness_configuration harness_configuration;
|
||||
// No CAN support on bootloader
|
||||
void can_flip_buses(uint8_t bus1, uint8_t bus2){UNUSED(bus1); UNUSED(bus2);}
|
||||
void pwm_init(TIM_TypeDef *TIM, uint8_t channel);
|
||||
void pwm_set(TIM_TypeDef *TIM, uint8_t channel, uint8_t percentage);
|
||||
|
||||
// ********************* Globals **********************
|
||||
uint8_t hw_type = 0;
|
||||
const board *current_board;
|
||||
@@ -7,22 +7,14 @@
|
||||
//#define DEBUG_SPI
|
||||
//#define DEBUG_FAULTS
|
||||
|
||||
#ifdef STM32F4
|
||||
#define PANDA
|
||||
#include "stm32f4xx.h"
|
||||
#else
|
||||
#include "stm32f2xx.h"
|
||||
#endif
|
||||
|
||||
#define USB_VID 0xbbaaU
|
||||
|
||||
#ifdef BOOTSTUB
|
||||
#define USB_PID 0xddeeU
|
||||
#define USB_PID 0xddeeU
|
||||
#else
|
||||
#define USB_PID 0xddccU
|
||||
#define USB_PID 0xddccU
|
||||
#endif
|
||||
|
||||
#include <stdbool.h>
|
||||
#define NULL ((void*)0)
|
||||
#define COMPILE_TIME_ASSERT(pred) ((void)sizeof(char[1 - (2 * ((int)(!(pred))))]))
|
||||
|
||||
@@ -42,8 +34,7 @@
|
||||
|
||||
#define MAX_RESP_LEN 0x40U
|
||||
|
||||
// Around (1Mbps / 8 bits/byte / 12 bytes per message)
|
||||
#define CAN_INTERRUPT_RATE 12000U
|
||||
#include <stdbool.h>
|
||||
#include "stm32fx/stm32fx_config.h"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
uint8_t crc_checksum(uint8_t *dat, int len, const uint8_t poly) {
|
||||
uint8_t crc = 0xFF;
|
||||
int i, j;
|
||||
uint8_t crc = 0xFFU;
|
||||
int i;
|
||||
int j;
|
||||
for (i = len - 1; i >= 0; i--) {
|
||||
crc ^= dat[i];
|
||||
for (j = 0; j < 8; j++) {
|
||||
|
||||
@@ -18,10 +18,13 @@ uint32_t can_rx_errs = 0;
|
||||
uint32_t can_send_errs = 0;
|
||||
uint32_t can_fwd_errs = 0;
|
||||
uint32_t gmlan_send_errs = 0;
|
||||
extern int can_live, pending_can_live;
|
||||
|
||||
extern int can_live;
|
||||
extern int pending_can_live;
|
||||
|
||||
// must reinit after changing these
|
||||
extern int can_loopback, can_silent;
|
||||
extern int can_loopback;
|
||||
extern int can_silent;
|
||||
extern uint32_t can_speed[4];
|
||||
|
||||
void can_set_forwarding(int from, int to);
|
||||
@@ -42,19 +45,23 @@ uint32_t ignition_can_cnt = 0U;
|
||||
#define ALL_CAN_SILENT 0xFF
|
||||
#define ALL_CAN_LIVE 0
|
||||
|
||||
int can_live = 0, pending_can_live = 0, can_loopback = 0, can_silent = ALL_CAN_SILENT;
|
||||
int can_live = 0;
|
||||
int pending_can_live = 0;
|
||||
int can_loopback = 0;
|
||||
int can_silent = ALL_CAN_SILENT;
|
||||
|
||||
// ********************* instantiate queues *********************
|
||||
|
||||
#define can_buffer(x, size) \
|
||||
CAN_FIFOMailBox_TypeDef elems_##x[size]; \
|
||||
can_ring can_##x = { .w_ptr = 0, .r_ptr = 0, .fifo_size = size, .elems = (CAN_FIFOMailBox_TypeDef *)&elems_##x };
|
||||
can_ring can_##x = { .w_ptr = 0, .r_ptr = 0, .fifo_size = (size), .elems = (CAN_FIFOMailBox_TypeDef *)&(elems_##x) };
|
||||
|
||||
can_buffer(rx_q, 0x1000)
|
||||
can_buffer(tx1_q, 0x100)
|
||||
can_buffer(tx2_q, 0x100)
|
||||
can_buffer(tx3_q, 0x100)
|
||||
can_buffer(txgmlan_q, 0x100)
|
||||
// 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
|
||||
@@ -65,7 +72,6 @@ int can_err_cnt = 0;
|
||||
int can_overflow_cnt = 0;
|
||||
|
||||
// ********************* interrupt safe queue *********************
|
||||
|
||||
bool can_pop(can_ring *q, CAN_FIFOMailBox_TypeDef *elem) {
|
||||
bool ret = 0;
|
||||
|
||||
@@ -181,7 +187,7 @@ void can_flip_buses(uint8_t bus1, uint8_t bus2){
|
||||
|
||||
// TODO: Cleanup with new abstraction
|
||||
void can_set_gmlan(uint8_t bus) {
|
||||
if(board_has_gmlan()){
|
||||
if(current_board->has_hw_gmlan){
|
||||
// first, disable GMLAN on prev bus
|
||||
uint8_t prev_bus = can_num_lookup[3];
|
||||
if (bus != prev_bus) {
|
||||
@@ -229,34 +235,6 @@ void can_set_gmlan(uint8_t bus) {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: remove
|
||||
void can_set_obd(uint8_t harness_orientation, bool obd){
|
||||
if(obd){
|
||||
puts("setting CAN2 to be OBD\n");
|
||||
} else {
|
||||
puts("setting CAN2 to be normal\n");
|
||||
}
|
||||
if(board_has_obd()){
|
||||
if(obd != (bool)(harness_orientation == HARNESS_STATUS_NORMAL)){
|
||||
// B5,B6: disable normal mode
|
||||
set_gpio_mode(GPIOB, 5, MODE_INPUT);
|
||||
set_gpio_mode(GPIOB, 6, MODE_INPUT);
|
||||
// B12,B13: CAN2 mode
|
||||
set_gpio_alternate(GPIOB, 12, GPIO_AF9_CAN2);
|
||||
set_gpio_alternate(GPIOB, 13, GPIO_AF9_CAN2);
|
||||
} else {
|
||||
// B5,B6: CAN2 mode
|
||||
set_gpio_alternate(GPIOB, 5, GPIO_AF9_CAN2);
|
||||
set_gpio_alternate(GPIOB, 6, GPIO_AF9_CAN2);
|
||||
// B12,B13: disable normal mode
|
||||
set_gpio_mode(GPIOB, 12, MODE_INPUT);
|
||||
set_gpio_mode(GPIOB, 13, MODE_INPUT);
|
||||
}
|
||||
} else {
|
||||
puts("OBD CAN not available on this board\n");
|
||||
}
|
||||
}
|
||||
|
||||
// CAN error
|
||||
void can_sce(CAN_TypeDef *CAN) {
|
||||
ENTER_CRITICAL();
|
||||
@@ -286,7 +264,6 @@ void can_sce(CAN_TypeDef *CAN) {
|
||||
}
|
||||
|
||||
// ***************************** CAN *****************************
|
||||
|
||||
void process_can(uint8_t can_number) {
|
||||
if (can_number != 0xffU) {
|
||||
|
||||
@@ -479,4 +456,3 @@ bool can_init(uint8_t can_number) {
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,39 +1,14 @@
|
||||
uint16_t fan_tach_counter = 0U;
|
||||
uint16_t fan_rpm = 0U;
|
||||
|
||||
void fan_set_power(uint8_t percentage){
|
||||
pwm_set(TIM3, 3, percentage);
|
||||
}
|
||||
|
||||
uint16_t fan_tach_counter = 0U;
|
||||
uint16_t fan_rpm = 0U;
|
||||
|
||||
// Can be way more acurate than this, but this is probably good enough for our purposes.
|
||||
|
||||
// Call this every second
|
||||
void fan_tick(void){
|
||||
// 4 interrupts per rotation
|
||||
fan_rpm = fan_tach_counter * 15U;
|
||||
fan_tach_counter = 0U;
|
||||
}
|
||||
|
||||
// TACH interrupt handler
|
||||
void EXTI2_IRQ_Handler(void) {
|
||||
volatile unsigned int pr = EXTI->PR & (1U << 2);
|
||||
if ((pr & (1U << 2)) != 0U) {
|
||||
fan_tach_counter++;
|
||||
}
|
||||
EXTI->PR = (1U << 2);
|
||||
}
|
||||
|
||||
void fan_init(void){
|
||||
// 5000RPM * 4 tach edges / 60 seconds
|
||||
REGISTER_INTERRUPT(EXTI2_IRQn, EXTI2_IRQ_Handler, 700U, FAULT_INTERRUPT_RATE_TACH)
|
||||
|
||||
// Init PWM speed control
|
||||
pwm_init(TIM3, 3);
|
||||
|
||||
// Init TACH interrupt
|
||||
register_set(&(SYSCFG->EXTICR[0]), SYSCFG_EXTICR1_EXTI2_PD, 0xF00U);
|
||||
register_set_bits(&(EXTI->IMR), (1U << 2));
|
||||
register_set_bits(&(EXTI->RTSR), (1U << 2));
|
||||
register_set_bits(&(EXTI->FTSR), (1U << 2));
|
||||
NVIC_EnableIRQ(EXTI2_IRQn);
|
||||
}
|
||||
@@ -288,4 +288,3 @@ bool bitbang_gmlan(CAN_FIFOMailBox_TypeDef *to_bang) {
|
||||
}
|
||||
return gmlan_send_ok;
|
||||
}
|
||||
|
||||
|
||||
@@ -63,3 +63,13 @@ int get_gpio_input(GPIO_TypeDef *GPIO, unsigned int pin) {
|
||||
return (GPIO->IDR & (1U << pin)) == (1U << pin);
|
||||
}
|
||||
|
||||
// Detection with internal pullup
|
||||
#define PULL_EFFECTIVE_DELAY 4096
|
||||
bool detect_with_pull(GPIO_TypeDef *GPIO, int pin, int mode) {
|
||||
set_gpio_mode(GPIO, pin, MODE_INPUT);
|
||||
set_gpio_pullup(GPIO, pin, mode);
|
||||
for (volatile int i=0; i<PULL_EFFECTIVE_DELAY; i++);
|
||||
bool ret = get_gpio_input(GPIO, pin);
|
||||
set_gpio_pullup(GPIO, pin, PULL_NONE);
|
||||
return ret;
|
||||
}
|
||||
@@ -3,9 +3,6 @@ uint8_t car_harness_status = 0U;
|
||||
#define HARNESS_STATUS_NORMAL 1U
|
||||
#define HARNESS_STATUS_FLIPPED 2U
|
||||
|
||||
// Threshold voltage (mV) for either of the SBUs to be below before deciding harness is connected
|
||||
#define HARNESS_CONNECTED_THRESHOLD 2500U
|
||||
|
||||
struct harness_configuration {
|
||||
const bool has_harness;
|
||||
GPIO_TypeDef *GPIO_SBU1;
|
||||
|
||||
@@ -6,21 +6,22 @@ typedef struct interrupt {
|
||||
uint32_t call_rate_fault;
|
||||
} interrupt;
|
||||
|
||||
void interrupt_timer_init(void);
|
||||
|
||||
void unused_interrupt_handler(void) {
|
||||
// Something is wrong if this handler is called!
|
||||
puts("Unused interrupt handler called!\n");
|
||||
fault_occurred(FAULT_UNUSED_INTERRUPT_HANDLED);
|
||||
}
|
||||
|
||||
#define NUM_INTERRUPTS 102U // There are 102 external interrupt sources (see stm32f413.h)
|
||||
interrupt interrupts[NUM_INTERRUPTS];
|
||||
|
||||
#define REGISTER_INTERRUPT(irq_num, func_ptr, call_rate, rate_fault) \
|
||||
interrupts[irq_num].irq_type = irq_num; \
|
||||
interrupts[irq_num].handler = func_ptr; \
|
||||
interrupts[irq_num].irq_type = (irq_num); \
|
||||
interrupts[irq_num].handler = (func_ptr); \
|
||||
interrupts[irq_num].call_counter = 0U; \
|
||||
interrupts[irq_num].max_call_rate = call_rate; \
|
||||
interrupts[irq_num].call_rate_fault = rate_fault;
|
||||
interrupts[irq_num].max_call_rate = (call_rate); \
|
||||
interrupts[irq_num].call_rate_fault = (rate_fault);
|
||||
|
||||
bool check_interrupt_rate = false;
|
||||
|
||||
@@ -36,13 +37,13 @@ void handle_interrupt(IRQn_Type irq_type){
|
||||
}
|
||||
|
||||
// Reset interrupt counter every second
|
||||
void TIM6_DAC_IRQ_Handler(void) {
|
||||
if (TIM6->SR != 0) {
|
||||
void interrupt_timer_handler(void) {
|
||||
if (INTERRUPT_TIMER->SR != 0) {
|
||||
for(uint16_t i=0U; i<NUM_INTERRUPTS; i++){
|
||||
interrupts[i].call_counter = 0U;
|
||||
}
|
||||
}
|
||||
TIM6->SR = 0;
|
||||
INTERRUPT_TIMER->SR = 0;
|
||||
}
|
||||
|
||||
void init_interrupts(bool check_rate_limit){
|
||||
@@ -52,113 +53,6 @@ void init_interrupts(bool check_rate_limit){
|
||||
interrupts[i].handler = unused_interrupt_handler;
|
||||
}
|
||||
|
||||
// Init timer 10 for a 1s interval
|
||||
register_set_bits(&(RCC->APB1ENR), RCC_APB1ENR_TIM6EN); // Enable interrupt timer peripheral
|
||||
REGISTER_INTERRUPT(TIM6_DAC_IRQn, TIM6_DAC_IRQ_Handler, 1, FAULT_INTERRUPT_RATE_INTERRUPTS)
|
||||
register_set(&(TIM6->PSC), (732-1), 0xFFFFU);
|
||||
register_set(&(TIM6->DIER), TIM_DIER_UIE, 0x5F5FU);
|
||||
register_set(&(TIM6->CR1), TIM_CR1_CEN, 0x3FU);
|
||||
TIM6->SR = 0;
|
||||
NVIC_EnableIRQ(TIM6_DAC_IRQn);
|
||||
// Init interrupt timer for a 1s interval
|
||||
interrupt_timer_init();
|
||||
}
|
||||
|
||||
// ********************* Bare interrupt handlers *********************
|
||||
// Only implemented the STM32F413 interrupts for now, the STM32F203 specific ones do not fall into the scope of SIL2
|
||||
|
||||
void WWDG_IRQHandler(void) {handle_interrupt(WWDG_IRQn);}
|
||||
void PVD_IRQHandler(void) {handle_interrupt(PVD_IRQn);}
|
||||
void TAMP_STAMP_IRQHandler(void) {handle_interrupt(TAMP_STAMP_IRQn);}
|
||||
void RTC_WKUP_IRQHandler(void) {handle_interrupt(RTC_WKUP_IRQn);}
|
||||
void FLASH_IRQHandler(void) {handle_interrupt(FLASH_IRQn);}
|
||||
void RCC_IRQHandler(void) {handle_interrupt(RCC_IRQn);}
|
||||
void EXTI0_IRQHandler(void) {handle_interrupt(EXTI0_IRQn);}
|
||||
void EXTI1_IRQHandler(void) {handle_interrupt(EXTI1_IRQn);}
|
||||
void EXTI2_IRQHandler(void) {handle_interrupt(EXTI2_IRQn);}
|
||||
void EXTI3_IRQHandler(void) {handle_interrupt(EXTI3_IRQn);}
|
||||
void EXTI4_IRQHandler(void) {handle_interrupt(EXTI4_IRQn);}
|
||||
void DMA1_Stream0_IRQHandler(void) {handle_interrupt(DMA1_Stream0_IRQn);}
|
||||
void DMA1_Stream1_IRQHandler(void) {handle_interrupt(DMA1_Stream1_IRQn);}
|
||||
void DMA1_Stream2_IRQHandler(void) {handle_interrupt(DMA1_Stream2_IRQn);}
|
||||
void DMA1_Stream3_IRQHandler(void) {handle_interrupt(DMA1_Stream3_IRQn);}
|
||||
void DMA1_Stream4_IRQHandler(void) {handle_interrupt(DMA1_Stream4_IRQn);}
|
||||
void DMA1_Stream5_IRQHandler(void) {handle_interrupt(DMA1_Stream5_IRQn);}
|
||||
void DMA1_Stream6_IRQHandler(void) {handle_interrupt(DMA1_Stream6_IRQn);}
|
||||
void ADC_IRQHandler(void) {handle_interrupt(ADC_IRQn);}
|
||||
void CAN1_TX_IRQHandler(void) {handle_interrupt(CAN1_TX_IRQn);}
|
||||
void CAN1_RX0_IRQHandler(void) {handle_interrupt(CAN1_RX0_IRQn);}
|
||||
void CAN1_RX1_IRQHandler(void) {handle_interrupt(CAN1_RX1_IRQn);}
|
||||
void CAN1_SCE_IRQHandler(void) {handle_interrupt(CAN1_SCE_IRQn);}
|
||||
void EXTI9_5_IRQHandler(void) {handle_interrupt(EXTI9_5_IRQn);}
|
||||
void TIM1_BRK_TIM9_IRQHandler(void) {handle_interrupt(TIM1_BRK_TIM9_IRQn);}
|
||||
void TIM1_UP_TIM10_IRQHandler(void) {handle_interrupt(TIM1_UP_TIM10_IRQn);}
|
||||
void TIM1_TRG_COM_TIM11_IRQHandler(void) {handle_interrupt(TIM1_TRG_COM_TIM11_IRQn);}
|
||||
void TIM1_CC_IRQHandler(void) {handle_interrupt(TIM1_CC_IRQn);}
|
||||
void TIM2_IRQHandler(void) {handle_interrupt(TIM2_IRQn);}
|
||||
void TIM3_IRQHandler(void) {handle_interrupt(TIM3_IRQn);}
|
||||
void TIM4_IRQHandler(void) {handle_interrupt(TIM4_IRQn);}
|
||||
void I2C1_EV_IRQHandler(void) {handle_interrupt(I2C1_EV_IRQn);}
|
||||
void I2C1_ER_IRQHandler(void) {handle_interrupt(I2C1_ER_IRQn);}
|
||||
void I2C2_EV_IRQHandler(void) {handle_interrupt(I2C2_EV_IRQn);}
|
||||
void I2C2_ER_IRQHandler(void) {handle_interrupt(I2C2_ER_IRQn);}
|
||||
void SPI1_IRQHandler(void) {handle_interrupt(SPI1_IRQn);}
|
||||
void SPI2_IRQHandler(void) {handle_interrupt(SPI2_IRQn);}
|
||||
void USART1_IRQHandler(void) {handle_interrupt(USART1_IRQn);}
|
||||
void USART2_IRQHandler(void) {handle_interrupt(USART2_IRQn);}
|
||||
void USART3_IRQHandler(void) {handle_interrupt(USART3_IRQn);}
|
||||
void EXTI15_10_IRQHandler(void) {handle_interrupt(EXTI15_10_IRQn);}
|
||||
void RTC_Alarm_IRQHandler(void) {handle_interrupt(RTC_Alarm_IRQn);}
|
||||
void OTG_FS_WKUP_IRQHandler(void) {handle_interrupt(OTG_FS_WKUP_IRQn);}
|
||||
void TIM8_BRK_TIM12_IRQHandler(void) {handle_interrupt(TIM8_BRK_TIM12_IRQn);}
|
||||
void TIM8_UP_TIM13_IRQHandler(void) {handle_interrupt(TIM8_UP_TIM13_IRQn);}
|
||||
void TIM8_TRG_COM_TIM14_IRQHandler(void) {handle_interrupt(TIM8_TRG_COM_TIM14_IRQn);}
|
||||
void TIM8_CC_IRQHandler(void) {handle_interrupt(TIM8_CC_IRQn);}
|
||||
void DMA1_Stream7_IRQHandler(void) {handle_interrupt(DMA1_Stream7_IRQn);}
|
||||
void FSMC_IRQHandler(void) {handle_interrupt(FSMC_IRQn);}
|
||||
void SDIO_IRQHandler(void) {handle_interrupt(SDIO_IRQn);}
|
||||
void TIM5_IRQHandler(void) {handle_interrupt(TIM5_IRQn);}
|
||||
void SPI3_IRQHandler(void) {handle_interrupt(SPI3_IRQn);}
|
||||
void UART4_IRQHandler(void) {handle_interrupt(UART4_IRQn);}
|
||||
void UART5_IRQHandler(void) {handle_interrupt(UART5_IRQn);}
|
||||
void TIM6_DAC_IRQHandler(void) {handle_interrupt(TIM6_DAC_IRQn);}
|
||||
void TIM7_IRQHandler(void) {handle_interrupt(TIM7_IRQn);}
|
||||
void DMA2_Stream0_IRQHandler(void) {handle_interrupt(DMA2_Stream0_IRQn);}
|
||||
void DMA2_Stream1_IRQHandler(void) {handle_interrupt(DMA2_Stream1_IRQn);}
|
||||
void DMA2_Stream2_IRQHandler(void) {handle_interrupt(DMA2_Stream2_IRQn);}
|
||||
void DMA2_Stream3_IRQHandler(void) {handle_interrupt(DMA2_Stream3_IRQn);}
|
||||
void DMA2_Stream4_IRQHandler(void) {handle_interrupt(DMA2_Stream4_IRQn);}
|
||||
void CAN2_TX_IRQHandler(void) {handle_interrupt(CAN2_TX_IRQn);}
|
||||
void CAN2_RX0_IRQHandler(void) {handle_interrupt(CAN2_RX0_IRQn);}
|
||||
void CAN2_RX1_IRQHandler(void) {handle_interrupt(CAN2_RX1_IRQn);}
|
||||
void CAN2_SCE_IRQHandler(void) {handle_interrupt(CAN2_SCE_IRQn);}
|
||||
void OTG_FS_IRQHandler(void) {handle_interrupt(OTG_FS_IRQn);}
|
||||
void DMA2_Stream5_IRQHandler(void) {handle_interrupt(DMA2_Stream5_IRQn);}
|
||||
void DMA2_Stream6_IRQHandler(void) {handle_interrupt(DMA2_Stream6_IRQn);}
|
||||
void DMA2_Stream7_IRQHandler(void) {handle_interrupt(DMA2_Stream7_IRQn);}
|
||||
void USART6_IRQHandler(void) {handle_interrupt(USART6_IRQn);}
|
||||
void I2C3_EV_IRQHandler(void) {handle_interrupt(I2C3_EV_IRQn);}
|
||||
void I2C3_ER_IRQHandler(void) {handle_interrupt(I2C3_ER_IRQn);}
|
||||
#ifdef STM32F4
|
||||
void DFSDM1_FLT0_IRQHandler(void) {handle_interrupt(DFSDM1_FLT0_IRQn);}
|
||||
void DFSDM1_FLT1_IRQHandler(void) {handle_interrupt(DFSDM1_FLT1_IRQn);}
|
||||
void CAN3_TX_IRQHandler(void) {handle_interrupt(CAN3_TX_IRQn);}
|
||||
void CAN3_RX0_IRQHandler(void) {handle_interrupt(CAN3_RX0_IRQn);}
|
||||
void CAN3_RX1_IRQHandler(void) {handle_interrupt(CAN3_RX1_IRQn);}
|
||||
void CAN3_SCE_IRQHandler(void) {handle_interrupt(CAN3_SCE_IRQn);}
|
||||
void RNG_IRQHandler(void) {handle_interrupt(RNG_IRQn);}
|
||||
void FPU_IRQHandler(void) {handle_interrupt(FPU_IRQn);}
|
||||
void UART7_IRQHandler(void) {handle_interrupt(UART7_IRQn);}
|
||||
void UART8_IRQHandler(void) {handle_interrupt(UART8_IRQn);}
|
||||
void SPI4_IRQHandler(void) {handle_interrupt(SPI4_IRQn);}
|
||||
void SPI5_IRQHandler(void) {handle_interrupt(SPI5_IRQn);}
|
||||
void SAI1_IRQHandler(void) {handle_interrupt(SAI1_IRQn);}
|
||||
void UART9_IRQHandler(void) {handle_interrupt(UART9_IRQn);}
|
||||
void UART10_IRQHandler(void) {handle_interrupt(UART10_IRQn);}
|
||||
void QUADSPI_IRQHandler(void) {handle_interrupt(QUADSPI_IRQn);}
|
||||
void FMPI2C1_EV_IRQHandler(void) {handle_interrupt(FMPI2C1_EV_IRQn);}
|
||||
void FMPI2C1_ER_IRQHandler(void) {handle_interrupt(FMPI2C1_ER_IRQn);}
|
||||
void LPTIM1_IRQHandler(void) {handle_interrupt(LPTIM1_IRQn);}
|
||||
void DFSDM2_FLT0_IRQHandler(void) {handle_interrupt(DFSDM2_FLT0_IRQn);}
|
||||
void DFSDM2_FLT1_IRQHandler(void) {handle_interrupt(DFSDM2_FLT1_IRQn);}
|
||||
void DFSDM2_FLT2_IRQHandler(void) {handle_interrupt(DFSDM2_FLT2_IRQn);}
|
||||
void DFSDM2_FLT3_IRQHandler(void) {handle_interrupt(DFSDM2_FLT3_IRQn);}
|
||||
#endif
|
||||
@@ -53,4 +53,4 @@ void pwm_set(TIM_TypeDef *TIM, uint8_t channel, uint8_t percentage){
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ typedef struct reg {
|
||||
// 10 bit hash with 23 as a prime
|
||||
#define REGISTER_MAP_SIZE 0x3FFU
|
||||
#define HASHING_PRIME 23U
|
||||
#define CHECK_COLLISION(hash, addr) (((uint32_t) register_map[hash].address != 0U) && (register_map[hash].address != addr))
|
||||
#define CHECK_COLLISION(hash, addr) (((uint32_t) register_map[hash].address != 0U) && (register_map[hash].address != (addr)))
|
||||
|
||||
reg register_map[REGISTER_MAP_SIZE];
|
||||
|
||||
@@ -78,4 +78,4 @@ void init_registers(void) {
|
||||
register_map[i].address = (volatile uint32_t *) 0U;
|
||||
register_map[i].check_mask = 0U;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#define RCC_BDCR_OPTIONS (RCC_BDCR_RTCEN | RCC_BDCR_RTCSEL_0 | RCC_BDCR_LSEON)
|
||||
#define RCC_BDCR_MASK (RCC_BDCR_RTCEN | RCC_BDCR_RTCSEL | RCC_BDCR_LSEMOD | RCC_BDCR_LSEBYP | RCC_BDCR_LSEON)
|
||||
|
||||
#define YEAR_OFFSET 2000U
|
||||
|
||||
@@ -14,95 +13,95 @@ typedef struct __attribute__((packed)) timestamp_t {
|
||||
} timestamp_t;
|
||||
|
||||
uint8_t to_bcd(uint16_t value){
|
||||
return (((value / 10U) & 0x0FU) << 4U) | ((value % 10U) & 0x0FU);
|
||||
return (((value / 10U) & 0x0FU) << 4U) | ((value % 10U) & 0x0FU);
|
||||
}
|
||||
|
||||
uint16_t from_bcd(uint8_t value){
|
||||
return (((value & 0xF0U) >> 4U) * 10U) + (value & 0x0FU);
|
||||
return (((value & 0xF0U) >> 4U) * 10U) + (value & 0x0FU);
|
||||
}
|
||||
|
||||
void rtc_init(void){
|
||||
if(board_has_rtc()){
|
||||
// Initialize RTC module and clock if not done already.
|
||||
if((RCC->BDCR & RCC_BDCR_MASK) != RCC_BDCR_OPTIONS){
|
||||
puts("Initializing RTC\n");
|
||||
// Reset backup domain
|
||||
register_set_bits(&(RCC->BDCR), RCC_BDCR_BDRST);
|
||||
if(current_board->has_rtc){
|
||||
// Initialize RTC module and clock if not done already.
|
||||
if((RCC->BDCR & RCC_BDCR_MASK) != RCC_BDCR_OPTIONS){
|
||||
puts("Initializing RTC\n");
|
||||
// Reset backup domain
|
||||
register_set_bits(&(RCC->BDCR), RCC_BDCR_BDRST);
|
||||
|
||||
// Disable write protection
|
||||
register_set_bits(&(PWR->CR), PWR_CR_DBP);
|
||||
// Disable write protection
|
||||
disable_bdomain_protection();
|
||||
|
||||
// Clear backup domain reset
|
||||
register_clear_bits(&(RCC->BDCR), RCC_BDCR_BDRST);
|
||||
// Clear backup domain reset
|
||||
register_clear_bits(&(RCC->BDCR), RCC_BDCR_BDRST);
|
||||
|
||||
// Set RTC options
|
||||
register_set(&(RCC->BDCR), RCC_BDCR_OPTIONS, RCC_BDCR_MASK);
|
||||
// Set RTC options
|
||||
register_set(&(RCC->BDCR), RCC_BDCR_OPTIONS, RCC_BDCR_MASK);
|
||||
|
||||
// Enable write protection
|
||||
register_clear_bits(&(PWR->CR), PWR_CR_DBP);
|
||||
}
|
||||
// Enable write protection
|
||||
enable_bdomain_protection();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void rtc_set_time(timestamp_t time){
|
||||
if(board_has_rtc()){
|
||||
puts("Setting RTC time\n");
|
||||
if(current_board->has_rtc){
|
||||
puts("Setting RTC time\n");
|
||||
|
||||
// Disable write protection
|
||||
register_set_bits(&(PWR->CR), PWR_CR_DBP);
|
||||
RTC->WPR = 0xCA;
|
||||
RTC->WPR = 0x53;
|
||||
// Disable write protection
|
||||
disable_bdomain_protection();
|
||||
RTC->WPR = 0xCA;
|
||||
RTC->WPR = 0x53;
|
||||
|
||||
// Enable initialization mode
|
||||
register_set_bits(&(RTC->ISR), RTC_ISR_INIT);
|
||||
while((RTC->ISR & RTC_ISR_INITF) == 0){}
|
||||
// Enable initialization mode
|
||||
register_set_bits(&(RTC->ISR), RTC_ISR_INIT);
|
||||
while((RTC->ISR & RTC_ISR_INITF) == 0){}
|
||||
|
||||
// Set time
|
||||
RTC->TR = (to_bcd(time.hour) << RTC_TR_HU_Pos) | (to_bcd(time.minute) << RTC_TR_MNU_Pos) | (to_bcd(time.second) << RTC_TR_SU_Pos);
|
||||
RTC->DR = (to_bcd(time.year - YEAR_OFFSET) << RTC_DR_YU_Pos) | (time.weekday << RTC_DR_WDU_Pos) | (to_bcd(time.month) << RTC_DR_MU_Pos) | (to_bcd(time.day) << RTC_DR_DU_Pos);
|
||||
// Set time
|
||||
RTC->TR = (to_bcd(time.hour) << RTC_TR_HU_Pos) | (to_bcd(time.minute) << RTC_TR_MNU_Pos) | (to_bcd(time.second) << RTC_TR_SU_Pos);
|
||||
RTC->DR = (to_bcd(time.year - YEAR_OFFSET) << RTC_DR_YU_Pos) | (time.weekday << RTC_DR_WDU_Pos) | (to_bcd(time.month) << RTC_DR_MU_Pos) | (to_bcd(time.day) << RTC_DR_DU_Pos);
|
||||
|
||||
// Set options
|
||||
register_set(&(RTC->CR), 0U, 0xFCFFFFU);
|
||||
// Set options
|
||||
register_set(&(RTC->CR), 0U, 0xFCFFFFU);
|
||||
|
||||
// Disable initalization mode
|
||||
register_clear_bits(&(RTC->ISR), RTC_ISR_INIT);
|
||||
// Disable initalization mode
|
||||
register_clear_bits(&(RTC->ISR), RTC_ISR_INIT);
|
||||
|
||||
// Wait for synchronization
|
||||
while((RTC->ISR & RTC_ISR_RSF) == 0){}
|
||||
// Wait for synchronization
|
||||
while((RTC->ISR & RTC_ISR_RSF) == 0){}
|
||||
|
||||
// Re-enable write protection
|
||||
RTC->WPR = 0x00;
|
||||
register_clear_bits(&(PWR->CR), PWR_CR_DBP);
|
||||
}
|
||||
// Re-enable write protection
|
||||
RTC->WPR = 0x00;
|
||||
enable_bdomain_protection();
|
||||
}
|
||||
}
|
||||
|
||||
timestamp_t rtc_get_time(void){
|
||||
timestamp_t result;
|
||||
// Init with zero values in case there is no RTC running
|
||||
result.year = 0U;
|
||||
result.month = 0U;
|
||||
result.day = 0U;
|
||||
result.weekday = 0U;
|
||||
result.hour = 0U;
|
||||
result.minute = 0U;
|
||||
result.second = 0U;
|
||||
timestamp_t result;
|
||||
// Init with zero values in case there is no RTC running
|
||||
result.year = 0U;
|
||||
result.month = 0U;
|
||||
result.day = 0U;
|
||||
result.weekday = 0U;
|
||||
result.hour = 0U;
|
||||
result.minute = 0U;
|
||||
result.second = 0U;
|
||||
|
||||
if(board_has_rtc()){
|
||||
// Wait until the register sync flag is set
|
||||
while((RTC->ISR & RTC_ISR_RSF) == 0){}
|
||||
if(current_board->has_rtc){
|
||||
// Wait until the register sync flag is set
|
||||
while((RTC->ISR & RTC_ISR_RSF) == 0){}
|
||||
|
||||
// Read time and date registers. Since our HSE > 7*LSE, this should be fine.
|
||||
uint32_t time = RTC->TR;
|
||||
uint32_t date = RTC->DR;
|
||||
// Read time and date registers. Since our HSE > 7*LSE, this should be fine.
|
||||
uint32_t time = RTC->TR;
|
||||
uint32_t date = RTC->DR;
|
||||
|
||||
// Parse values
|
||||
result.year = from_bcd((date & (RTC_DR_YT | RTC_DR_YU)) >> RTC_DR_YU_Pos) + YEAR_OFFSET;
|
||||
result.month = from_bcd((date & (RTC_DR_MT | RTC_DR_MU)) >> RTC_DR_MU_Pos);
|
||||
result.day = from_bcd((date & (RTC_DR_DT | RTC_DR_DU)) >> RTC_DR_DU_Pos);
|
||||
result.weekday = ((date & RTC_DR_WDU) >> RTC_DR_WDU_Pos);
|
||||
result.hour = from_bcd((time & (RTC_TR_HT | RTC_TR_HU)) >> RTC_TR_HU_Pos);
|
||||
result.minute = from_bcd((time & (RTC_TR_MNT | RTC_TR_MNU)) >> RTC_TR_MNU_Pos);
|
||||
result.second = from_bcd((time & (RTC_TR_ST | RTC_TR_SU)) >> RTC_TR_SU_Pos);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
// Parse values
|
||||
result.year = from_bcd((date & (RTC_DR_YT | RTC_DR_YU)) >> RTC_DR_YU_Pos) + YEAR_OFFSET;
|
||||
result.month = from_bcd((date & (RTC_DR_MT | RTC_DR_MU)) >> RTC_DR_MU_Pos);
|
||||
result.day = from_bcd((date & (RTC_DR_DT | RTC_DR_DU)) >> RTC_DR_DU_Pos);
|
||||
result.weekday = ((date & RTC_DR_WDU) >> RTC_DR_WDU_Pos);
|
||||
result.hour = from_bcd((time & (RTC_TR_HT | RTC_TR_HU)) >> RTC_TR_HU_Pos);
|
||||
result.minute = from_bcd((time & (RTC_TR_MNT | RTC_TR_MNU)) >> RTC_TR_MNU_Pos);
|
||||
result.second = from_bcd((time & (RTC_TR_ST | RTC_TR_SU)) >> RTC_TR_SU_Pos);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
void timer_init(TIM_TypeDef *TIM, int psc) {
|
||||
register_set(&(TIM->PSC), (psc-1), 0xFFFFU);
|
||||
register_set(&(TIM->DIER), TIM_DIER_UIE, 0x5F5FU);
|
||||
register_set(&(TIM->CR1), TIM_CR1_CEN, 0x3FU);
|
||||
TIM->SR = 0;
|
||||
}
|
||||
|
||||
31
panda/board/drivers/timers.h
Normal file
31
panda/board/drivers/timers.h
Normal file
@@ -0,0 +1,31 @@
|
||||
void timer_init(TIM_TypeDef *TIM, int psc) {
|
||||
register_set(&(TIM->PSC), (psc-1), 0xFFFFU);
|
||||
register_set(&(TIM->DIER), TIM_DIER_UIE, 0x5F5FU);
|
||||
register_set(&(TIM->CR1), TIM_CR1_CEN, 0x3FU);
|
||||
TIM->SR = 0;
|
||||
}
|
||||
|
||||
void microsecond_timer_init(void) {
|
||||
MICROSECOND_TIMER->PSC = (APB1_FREQ)-1U;
|
||||
MICROSECOND_TIMER->CR1 = TIM_CR1_CEN;
|
||||
MICROSECOND_TIMER->EGR = TIM_EGR_UG;
|
||||
}
|
||||
|
||||
uint32_t microsecond_timer_get(void) {
|
||||
return MICROSECOND_TIMER->CNT;
|
||||
}
|
||||
|
||||
void interrupt_timer_init(void) {
|
||||
enable_interrupt_timer();
|
||||
REGISTER_INTERRUPT(INTERRUPT_TIMER_IRQ, interrupt_timer_handler, 1, FAULT_INTERRUPT_RATE_INTERRUPTS)
|
||||
register_set(&(INTERRUPT_TIMER->PSC), ((uint16_t)(15.25*APB1_FREQ)-1U), 0xFFFFU);
|
||||
register_set(&(INTERRUPT_TIMER->DIER), TIM_DIER_UIE, 0x5F5FU);
|
||||
register_set(&(INTERRUPT_TIMER->CR1), TIM_CR1_CEN, 0x3FU);
|
||||
INTERRUPT_TIMER->SR = 0;
|
||||
NVIC_EnableIRQ(INTERRUPT_TIMER_IRQ);
|
||||
}
|
||||
|
||||
void tick_timer_init(void) {
|
||||
timer_init(TICK_TIMER, (uint16_t)((15.25*APB2_FREQ)/8U));
|
||||
NVIC_EnableIRQ(TICK_TIMER_IRQ);
|
||||
}
|
||||
@@ -24,29 +24,20 @@ typedef struct uart_ring {
|
||||
uart_ring uart_ring_##x = { \
|
||||
.w_ptr_tx = 0, \
|
||||
.r_ptr_tx = 0, \
|
||||
.elems_tx = ((uint8_t *)&elems_tx_##x), \
|
||||
.tx_fifo_size = size_tx, \
|
||||
.elems_tx = ((uint8_t *)&(elems_tx_##x)), \
|
||||
.tx_fifo_size = (size_tx), \
|
||||
.w_ptr_rx = 0, \
|
||||
.r_ptr_rx = 0, \
|
||||
.elems_rx = ((uint8_t *)&elems_rx_##x), \
|
||||
.rx_fifo_size = size_rx, \
|
||||
.uart = uart_ptr, \
|
||||
.callback = callback_ptr, \
|
||||
.dma_rx = rx_dma \
|
||||
.elems_rx = ((uint8_t *)&(elems_rx_##x)), \
|
||||
.rx_fifo_size = (size_rx), \
|
||||
.uart = (uart_ptr), \
|
||||
.callback = (callback_ptr), \
|
||||
.dma_rx = (rx_dma) \
|
||||
};
|
||||
|
||||
|
||||
// ***************************** Function prototypes *****************************
|
||||
void uart_init(uart_ring *q, int baud);
|
||||
|
||||
bool getc(uart_ring *q, char *elem);
|
||||
bool putc(uart_ring *q, char elem);
|
||||
|
||||
void puts(const char *a);
|
||||
void puth(unsigned int i);
|
||||
void hexdump(const void *a, int l);
|
||||
|
||||
void debug_ring_callback(uart_ring *ring);
|
||||
void uart_tx_ring(uart_ring *q);
|
||||
|
||||
// ******************************** UART buffers ********************************
|
||||
|
||||
@@ -83,239 +74,7 @@ uart_ring *get_ring_by_number(int a) {
|
||||
return ring;
|
||||
}
|
||||
|
||||
// ***************************** Interrupt handlers *****************************
|
||||
|
||||
void uart_tx_ring(uart_ring *q){
|
||||
ENTER_CRITICAL();
|
||||
// Send out next byte of TX buffer
|
||||
if (q->w_ptr_tx != q->r_ptr_tx) {
|
||||
// Only send if transmit register is empty (aka last byte has been sent)
|
||||
if ((q->uart->SR & USART_SR_TXE) != 0) {
|
||||
q->uart->DR = q->elems_tx[q->r_ptr_tx]; // This clears TXE
|
||||
q->r_ptr_tx = (q->r_ptr_tx + 1U) % q->tx_fifo_size;
|
||||
}
|
||||
|
||||
// Enable TXE interrupt if there is still data to be sent
|
||||
if(q->r_ptr_tx != q->w_ptr_tx){
|
||||
q->uart->CR1 |= USART_CR1_TXEIE;
|
||||
} else {
|
||||
q->uart->CR1 &= ~USART_CR1_TXEIE;
|
||||
}
|
||||
}
|
||||
EXIT_CRITICAL();
|
||||
}
|
||||
|
||||
void uart_rx_ring(uart_ring *q){
|
||||
// Do not read out directly if DMA enabled
|
||||
if (q->dma_rx == false) {
|
||||
ENTER_CRITICAL();
|
||||
|
||||
// Read out RX buffer
|
||||
uint8_t c = q->uart->DR; // This read after reading SR clears a bunch of interrupts
|
||||
|
||||
uint16_t next_w_ptr = (q->w_ptr_rx + 1U) % q->rx_fifo_size;
|
||||
// Do not overwrite buffer data
|
||||
if (next_w_ptr != q->r_ptr_rx) {
|
||||
q->elems_rx[q->w_ptr_rx] = c;
|
||||
q->w_ptr_rx = next_w_ptr;
|
||||
if (q->callback != NULL) {
|
||||
q->callback(q);
|
||||
}
|
||||
}
|
||||
|
||||
EXIT_CRITICAL();
|
||||
}
|
||||
}
|
||||
|
||||
// This function should be called on:
|
||||
// * Half-transfer DMA interrupt
|
||||
// * Full-transfer DMA interrupt
|
||||
// * UART IDLE detection
|
||||
uint32_t prev_w_index = 0;
|
||||
void dma_pointer_handler(uart_ring *q, uint32_t dma_ndtr) {
|
||||
ENTER_CRITICAL();
|
||||
uint32_t w_index = (q->rx_fifo_size - dma_ndtr);
|
||||
|
||||
// Check for new data
|
||||
if (w_index != prev_w_index){
|
||||
// Check for overflow
|
||||
if (
|
||||
((prev_w_index < q->r_ptr_rx) && (q->r_ptr_rx <= w_index)) || // No rollover
|
||||
((w_index < prev_w_index) && ((q->r_ptr_rx <= w_index) || (prev_w_index < q->r_ptr_rx))) // Rollover
|
||||
){
|
||||
// We lost data. Set the new read pointer to the oldest byte still available
|
||||
q->r_ptr_rx = (w_index + 1U) % q->rx_fifo_size;
|
||||
}
|
||||
|
||||
// Set write pointer
|
||||
q->w_ptr_rx = w_index;
|
||||
}
|
||||
|
||||
prev_w_index = w_index;
|
||||
EXIT_CRITICAL();
|
||||
}
|
||||
|
||||
// This read after reading SR clears all error interrupts. We don't want compiler warnings, nor optimizations
|
||||
#define UART_READ_DR(uart) volatile uint8_t t = (uart)->DR; UNUSED(t);
|
||||
|
||||
void uart_interrupt_handler(uart_ring *q) {
|
||||
ENTER_CRITICAL();
|
||||
|
||||
// Read UART status. This is also the first step necessary in clearing most interrupts
|
||||
uint32_t status = q->uart->SR;
|
||||
|
||||
// If RXNE is set, perform a read. This clears RXNE, ORE, IDLE, NF and FE
|
||||
if((status & USART_SR_RXNE) != 0U){
|
||||
uart_rx_ring(q);
|
||||
}
|
||||
|
||||
// Detect errors and clear them
|
||||
uint32_t err = (status & USART_SR_ORE) | (status & USART_SR_NE) | (status & USART_SR_FE) | (status & USART_SR_PE);
|
||||
if(err != 0U){
|
||||
#ifdef DEBUG_UART
|
||||
puts("Encountered UART error: "); puth(err); puts("\n");
|
||||
#endif
|
||||
UART_READ_DR(q->uart)
|
||||
}
|
||||
// Send if necessary
|
||||
uart_tx_ring(q);
|
||||
|
||||
// Run DMA pointer handler if the line is idle
|
||||
if(q->dma_rx && (status & USART_SR_IDLE)){
|
||||
// Reset IDLE flag
|
||||
UART_READ_DR(q->uart)
|
||||
|
||||
if(q == &uart_ring_gps){
|
||||
dma_pointer_handler(&uart_ring_gps, DMA2_Stream5->NDTR);
|
||||
} else {
|
||||
#ifdef DEBUG_UART
|
||||
puts("No IDLE dma_pointer_handler implemented for this UART.");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
EXIT_CRITICAL();
|
||||
}
|
||||
|
||||
void USART1_IRQ_Handler(void) { uart_interrupt_handler(&uart_ring_gps); }
|
||||
void USART2_IRQ_Handler(void) { uart_interrupt_handler(&uart_ring_debug); }
|
||||
void USART3_IRQ_Handler(void) { uart_interrupt_handler(&uart_ring_lin2); }
|
||||
void UART5_IRQ_Handler(void) { uart_interrupt_handler(&uart_ring_lin1); }
|
||||
|
||||
void DMA2_Stream5_IRQ_Handler(void) {
|
||||
ENTER_CRITICAL();
|
||||
|
||||
// Handle errors
|
||||
if((DMA2->HISR & DMA_HISR_TEIF5) || (DMA2->HISR & DMA_HISR_DMEIF5) || (DMA2->HISR & DMA_HISR_FEIF5)){
|
||||
#ifdef DEBUG_UART
|
||||
puts("Encountered UART DMA error. Clearing and restarting DMA...\n");
|
||||
#endif
|
||||
|
||||
// Clear flags
|
||||
DMA2->HIFCR = DMA_HIFCR_CTEIF5 | DMA_HIFCR_CDMEIF5 | DMA_HIFCR_CFEIF5;
|
||||
|
||||
// Re-enable the DMA if necessary
|
||||
DMA2_Stream5->CR |= DMA_SxCR_EN;
|
||||
}
|
||||
|
||||
// Re-calculate write pointer and reset flags
|
||||
dma_pointer_handler(&uart_ring_gps, DMA2_Stream5->NDTR);
|
||||
DMA2->HIFCR = DMA_HIFCR_CTCIF5 | DMA_HIFCR_CHTIF5;
|
||||
|
||||
EXIT_CRITICAL();
|
||||
}
|
||||
|
||||
// ***************************** Hardware setup *****************************
|
||||
|
||||
void dma_rx_init(uart_ring *q) {
|
||||
// Initialization is UART-dependent
|
||||
if(q == &uart_ring_gps){
|
||||
// DMA2, stream 5, channel 4
|
||||
|
||||
// Disable FIFO mode (enable direct)
|
||||
DMA2_Stream5->FCR &= ~DMA_SxFCR_DMDIS;
|
||||
|
||||
// Setup addresses
|
||||
DMA2_Stream5->PAR = (uint32_t)&(USART1->DR); // Source
|
||||
DMA2_Stream5->M0AR = (uint32_t)q->elems_rx; // Destination
|
||||
DMA2_Stream5->NDTR = q->rx_fifo_size; // Number of bytes to copy
|
||||
|
||||
// Circular, Increment memory, byte size, periph -> memory, enable
|
||||
// Transfer complete, half transfer, transfer error and direct mode error interrupt enable
|
||||
DMA2_Stream5->CR = DMA_SxCR_CHSEL_2 | DMA_SxCR_MINC | DMA_SxCR_CIRC | DMA_SxCR_HTIE | DMA_SxCR_TCIE | DMA_SxCR_TEIE | DMA_SxCR_DMEIE | DMA_SxCR_EN;
|
||||
|
||||
// Enable DMA receiver in UART
|
||||
q->uart->CR3 |= USART_CR3_DMAR;
|
||||
|
||||
// Enable UART IDLE interrupt
|
||||
q->uart->CR1 |= USART_CR1_IDLEIE;
|
||||
|
||||
// Enable interrupt
|
||||
NVIC_EnableIRQ(DMA2_Stream5_IRQn);
|
||||
} else {
|
||||
puts("Tried to initialize RX DMA for an unsupported UART\n");
|
||||
}
|
||||
}
|
||||
|
||||
#define __DIV(_PCLK_, _BAUD_) (((_PCLK_) * 25U) / (4U * (_BAUD_)))
|
||||
#define __DIVMANT(_PCLK_, _BAUD_) (__DIV((_PCLK_), (_BAUD_)) / 100U)
|
||||
#define __DIVFRAQ(_PCLK_, _BAUD_) ((((__DIV((_PCLK_), (_BAUD_)) - (__DIVMANT((_PCLK_), (_BAUD_)) * 100U)) * 16U) + 50U) / 100U)
|
||||
#define __USART_BRR(_PCLK_, _BAUD_) ((__DIVMANT((_PCLK_), (_BAUD_)) << 4) | (__DIVFRAQ((_PCLK_), (_BAUD_)) & 0x0FU))
|
||||
|
||||
void uart_set_baud(USART_TypeDef *u, unsigned int baud) {
|
||||
if (u == USART1) {
|
||||
// USART1 is on APB2
|
||||
u->BRR = __USART_BRR(48000000U, baud);
|
||||
} else {
|
||||
u->BRR = __USART_BRR(24000000U, baud);
|
||||
}
|
||||
}
|
||||
|
||||
void uart_init(uart_ring *q, int baud) {
|
||||
// Register interrupts (max data rate: 115200 baud)
|
||||
if(q->uart == USART1){
|
||||
REGISTER_INTERRUPT(USART1_IRQn, USART1_IRQ_Handler, 150000U, FAULT_INTERRUPT_RATE_UART_1)
|
||||
} else if (q->uart == USART2){
|
||||
REGISTER_INTERRUPT(USART2_IRQn, USART2_IRQ_Handler, 150000U, FAULT_INTERRUPT_RATE_UART_2)
|
||||
} else if (q->uart == USART3){
|
||||
REGISTER_INTERRUPT(USART3_IRQn, USART3_IRQ_Handler, 150000U, FAULT_INTERRUPT_RATE_UART_3)
|
||||
} else if (q->uart == UART5){
|
||||
REGISTER_INTERRUPT(UART5_IRQn, UART5_IRQ_Handler, 150000U, FAULT_INTERRUPT_RATE_UART_5)
|
||||
} else {
|
||||
// UART not used. Skip registering interrupts
|
||||
}
|
||||
if(q->dma_rx){
|
||||
REGISTER_INTERRUPT(DMA2_Stream5_IRQn, DMA2_Stream5_IRQ_Handler, 100U, FAULT_INTERRUPT_RATE_UART_DMA) // Called twice per buffer
|
||||
}
|
||||
|
||||
// Set baud and enable peripheral with TX and RX mode
|
||||
uart_set_baud(q->uart, baud);
|
||||
q->uart->CR1 = USART_CR1_UE | USART_CR1_TE | USART_CR1_RE;
|
||||
if ((q->uart == USART2) || (q->uart == USART3) || (q->uart == UART5)) {
|
||||
q->uart->CR1 |= USART_CR1_RXNEIE;
|
||||
}
|
||||
|
||||
// Enable UART interrupts
|
||||
if(q->uart == USART1){
|
||||
NVIC_EnableIRQ(USART1_IRQn);
|
||||
} else if (q->uart == USART2){
|
||||
NVIC_EnableIRQ(USART2_IRQn);
|
||||
} else if (q->uart == USART3){
|
||||
NVIC_EnableIRQ(USART3_IRQn);
|
||||
} else if (q->uart == UART5){
|
||||
NVIC_EnableIRQ(UART5_IRQn);
|
||||
} else {
|
||||
// UART not used. Skip enabling interrupts
|
||||
}
|
||||
|
||||
// Initialise RX DMA if used
|
||||
if(q->dma_rx){
|
||||
dma_rx_init(q);
|
||||
}
|
||||
}
|
||||
|
||||
// ************************* Low-level buffer functions *************************
|
||||
|
||||
bool getc(uart_ring *q, char *elem) {
|
||||
bool ret = false;
|
||||
|
||||
@@ -427,14 +186,14 @@ void putui(uint32_t i) {
|
||||
}
|
||||
|
||||
void puth(unsigned int i) {
|
||||
char c[] = "0123456789abcdef";
|
||||
const char c[] = "0123456789abcdef";
|
||||
for (int pos = 28; pos != -4; pos -= 4) {
|
||||
putch(c[(i >> (unsigned int)(pos)) & 0xFU]);
|
||||
}
|
||||
}
|
||||
|
||||
void puth2(unsigned int i) {
|
||||
char c[] = "0123456789abcdef";
|
||||
const char c[] = "0123456789abcdef";
|
||||
for (int pos = 4; pos != -4; pos -= 4) {
|
||||
putch(c[(i >> (unsigned int)(pos)) & 0xFU]);
|
||||
}
|
||||
|
||||
@@ -38,22 +38,6 @@ void usb_outep3_resume_if_paused(void);
|
||||
|
||||
// **** supporting defines ****
|
||||
|
||||
typedef struct
|
||||
{
|
||||
__IO uint32_t HPRT;
|
||||
}
|
||||
USB_OTG_HostPortTypeDef;
|
||||
|
||||
USB_OTG_GlobalTypeDef *USBx = USB_OTG_FS;
|
||||
|
||||
#define USBx_HOST ((USB_OTG_HostTypeDef *)((uint32_t)USBx + USB_OTG_HOST_BASE))
|
||||
#define USBx_HOST_PORT ((USB_OTG_HostPortTypeDef *)((uint32_t)USBx + USB_OTG_HOST_PORT_BASE))
|
||||
#define USBx_DEVICE ((USB_OTG_DeviceTypeDef *)((uint32_t)USBx + USB_OTG_DEVICE_BASE))
|
||||
#define USBx_INEP(i) ((USB_OTG_INEndpointTypeDef *)((uint32_t)USBx + USB_OTG_IN_ENDPOINT_BASE + ((i) * USB_OTG_EP_REG_SIZE)))
|
||||
#define USBx_OUTEP(i) ((USB_OTG_OUTEndpointTypeDef *)((uint32_t)USBx + USB_OTG_OUT_ENDPOINT_BASE + ((i) * USB_OTG_EP_REG_SIZE)))
|
||||
#define USBx_DFIFO(i) *(__IO uint32_t *)((uint32_t)USBx + USB_OTG_FIFO_BASE + ((i) * USB_OTG_FIFO_SIZE))
|
||||
#define USBx_PCGCCTL *(__IO uint32_t *)((uint32_t)USBx + USB_OTG_PCGCCTL_BASE)
|
||||
|
||||
#define USB_REQ_GET_STATUS 0x00
|
||||
#define USB_REQ_CLEAR_FEATURE 0x01
|
||||
#define USB_REQ_SET_FEATURE 0x03
|
||||
@@ -102,10 +86,6 @@ USB_OTG_GlobalTypeDef *USBx = USB_OTG_FS;
|
||||
#define STS_SETUP_COMP 4
|
||||
#define STS_SETUP_UPDT 6
|
||||
|
||||
#define USBD_FS_TRDT_VALUE 5U
|
||||
|
||||
#define USB_OTG_SPEED_FULL 3
|
||||
|
||||
uint8_t resp[MAX_RESP_LEN];
|
||||
|
||||
// for the repeating interfaces
|
||||
@@ -143,11 +123,7 @@ uint8_t device_desc[] = {
|
||||
0xFF, 0xFF, 0xFF, 0x40, // Class, Subclass, Protocol, Max Packet Size
|
||||
TOUSBORDER(USB_VID), // idVendor
|
||||
TOUSBORDER(USB_PID), // idProduct
|
||||
#ifdef STM32F4
|
||||
0x00, 0x23, // bcdDevice
|
||||
#else
|
||||
0x00, 0x22, // bcdDevice
|
||||
#endif
|
||||
0x01, 0x02, // Manufacturer, Product
|
||||
0x03, 0x01 // Serial Number, Num Configurations
|
||||
};
|
||||
@@ -410,7 +386,7 @@ void USB_WritePacket(const void *src, uint16_t len, uint32_t ep) {
|
||||
hexdump(src, len);
|
||||
#endif
|
||||
|
||||
uint8_t numpacket = (len + (MAX_RESP_LEN - 1U)) / MAX_RESP_LEN;
|
||||
uint32_t numpacket = (len + (MAX_RESP_LEN - 1U)) / MAX_RESP_LEN;
|
||||
uint32_t count32b = 0;
|
||||
count32b = (len + 3U) / 4U;
|
||||
|
||||
@@ -420,10 +396,12 @@ void USB_WritePacket(const void *src, uint16_t len, uint32_t ep) {
|
||||
USBx_INEP(ep)->DIEPCTL |= (USB_OTG_DIEPCTL_CNAK | USB_OTG_DIEPCTL_EPENA);
|
||||
|
||||
// load the FIFO
|
||||
const uint32_t *src_copy = (const uint32_t *)src;
|
||||
for (uint32_t i = 0; i < count32b; i++) {
|
||||
USBx_DFIFO(ep) = *src_copy;
|
||||
src_copy++;
|
||||
if (src != NULL) {
|
||||
const uint32_t *src_copy = (const uint32_t *)src;
|
||||
for (uint32_t i = 0; i < count32b; i++) {
|
||||
USBx_DFIFO(ep) = *src_copy;
|
||||
src_copy++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -949,7 +927,7 @@ void usb_irqhandler(void) {
|
||||
//USBx->GINTMSK = 0xFFFFFFFF & ~(USB_OTG_GINTMSK_NPTXFEM | USB_OTG_GINTMSK_PTXFEM | USB_OTG_GINTSTS_SOF | USB_OTG_GINTSTS_EOPF);
|
||||
}
|
||||
|
||||
void usb_outep3_resume_if_paused() {
|
||||
void usb_outep3_resume_if_paused(void) {
|
||||
ENTER_CRITICAL();
|
||||
if (!outep3_processing && (USBx_OUTEP(3)->DOEPCTL & USB_OTG_DOEPCTL_NAKSTS) != 0) {
|
||||
USBx_OUTEP(3)->DOEPTSIZ = (1U << 19) | 0x40U;
|
||||
@@ -958,14 +936,6 @@ void usb_outep3_resume_if_paused() {
|
||||
EXIT_CRITICAL();
|
||||
}
|
||||
|
||||
void OTG_FS_IRQ_Handler(void) {
|
||||
NVIC_DisableIRQ(OTG_FS_IRQn);
|
||||
//__disable_irq();
|
||||
usb_irqhandler();
|
||||
//__enable_irq();
|
||||
NVIC_EnableIRQ(OTG_FS_IRQn);
|
||||
}
|
||||
|
||||
bool usb_enumerated(void) {
|
||||
// This relies on the USB being suspended after no activity for 3ms.
|
||||
// Seems pretty stable in combination with the EOPF to reject noise.
|
||||
@@ -977,78 +947,3 @@ bool usb_enumerated(void) {
|
||||
usb_eopf_detected = false;
|
||||
return ret;
|
||||
}
|
||||
|
||||
// ***************************** USB init *****************************
|
||||
|
||||
void usb_init(void) {
|
||||
REGISTER_INTERRUPT(OTG_FS_IRQn, OTG_FS_IRQ_Handler, 1500000U, FAULT_INTERRUPT_RATE_USB) //TODO: Find out a better rate limit for USB. Now it's the 1.5MB/s rate
|
||||
|
||||
// full speed PHY, do reset and remove power down
|
||||
/*puth(USBx->GRSTCTL);
|
||||
puts(" resetting PHY\n");*/
|
||||
while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_AHBIDL) == 0);
|
||||
//puts("AHB idle\n");
|
||||
|
||||
// reset PHY here
|
||||
USBx->GRSTCTL |= USB_OTG_GRSTCTL_CSRST;
|
||||
while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_CSRST) == USB_OTG_GRSTCTL_CSRST);
|
||||
//puts("reset done\n");
|
||||
|
||||
// internal PHY, force device mode
|
||||
USBx->GUSBCFG = USB_OTG_GUSBCFG_PHYSEL | USB_OTG_GUSBCFG_FDMOD;
|
||||
|
||||
// slowest timings
|
||||
USBx->GUSBCFG |= ((USBD_FS_TRDT_VALUE << 10) & USB_OTG_GUSBCFG_TRDT);
|
||||
|
||||
// power up the PHY
|
||||
#ifdef STM32F4
|
||||
USBx->GCCFG = USB_OTG_GCCFG_PWRDWN;
|
||||
|
||||
//USBx->GCCFG |= USB_OTG_GCCFG_VBDEN | USB_OTG_GCCFG_SDEN |USB_OTG_GCCFG_PDEN | USB_OTG_GCCFG_DCDEN;
|
||||
|
||||
/* B-peripheral session valid override enable*/
|
||||
USBx->GOTGCTL |= USB_OTG_GOTGCTL_BVALOVAL;
|
||||
USBx->GOTGCTL |= USB_OTG_GOTGCTL_BVALOEN;
|
||||
#else
|
||||
USBx->GCCFG = USB_OTG_GCCFG_PWRDWN | USB_OTG_GCCFG_NOVBUSSENS;
|
||||
#endif
|
||||
|
||||
// be a device, slowest timings
|
||||
//USBx->GUSBCFG = USB_OTG_GUSBCFG_FDMOD | USB_OTG_GUSBCFG_PHYSEL | USB_OTG_GUSBCFG_TRDT | USB_OTG_GUSBCFG_TOCAL;
|
||||
//USBx->GUSBCFG |= (uint32_t)((USBD_FS_TRDT_VALUE << 10) & USB_OTG_GUSBCFG_TRDT);
|
||||
//USBx->GUSBCFG = USB_OTG_GUSBCFG_PHYSEL | USB_OTG_GUSBCFG_TRDT | USB_OTG_GUSBCFG_TOCAL;
|
||||
|
||||
// **** for debugging, doesn't seem to work ****
|
||||
//USBx->GUSBCFG |= USB_OTG_GUSBCFG_CTXPKT;
|
||||
|
||||
// reset PHY clock
|
||||
USBx_PCGCCTL = 0;
|
||||
|
||||
// enable the fancy OTG things
|
||||
// DCFG_FRAME_INTERVAL_80 is 0
|
||||
//USBx->GUSBCFG |= USB_OTG_GUSBCFG_HNPCAP | USB_OTG_GUSBCFG_SRPCAP;
|
||||
USBx_DEVICE->DCFG |= USB_OTG_SPEED_FULL | USB_OTG_DCFG_NZLSOHSK;
|
||||
|
||||
//USBx_DEVICE->DCFG = USB_OTG_DCFG_NZLSOHSK | USB_OTG_DCFG_DSPD;
|
||||
//USBx_DEVICE->DCFG = USB_OTG_DCFG_DSPD;
|
||||
|
||||
// clear pending interrupts
|
||||
USBx->GINTSTS = 0xBFFFFFFFU;
|
||||
|
||||
// setup USB interrupts
|
||||
// all interrupts except TXFIFO EMPTY
|
||||
//USBx->GINTMSK = 0xFFFFFFFF & ~(USB_OTG_GINTMSK_NPTXFEM | USB_OTG_GINTMSK_PTXFEM | USB_OTG_GINTSTS_SOF | USB_OTG_GINTSTS_EOPF);
|
||||
//USBx->GINTMSK = 0xFFFFFFFF & ~(USB_OTG_GINTMSK_NPTXFEM | USB_OTG_GINTMSK_PTXFEM);
|
||||
USBx->GINTMSK = USB_OTG_GINTMSK_USBRST | USB_OTG_GINTMSK_ENUMDNEM | USB_OTG_GINTMSK_OTGINT |
|
||||
USB_OTG_GINTMSK_RXFLVLM | USB_OTG_GINTMSK_GONAKEFFM | USB_OTG_GINTMSK_GINAKEFFM |
|
||||
USB_OTG_GINTMSK_OEPINT | USB_OTG_GINTMSK_IEPINT | USB_OTG_GINTMSK_USBSUSPM |
|
||||
USB_OTG_GINTMSK_CIDSCHGM | USB_OTG_GINTMSK_SRQIM | USB_OTG_GINTMSK_MMISM | USB_OTG_GINTMSK_EOPFM;
|
||||
|
||||
USBx->GAHBCFG = USB_OTG_GAHBCFG_GINT;
|
||||
|
||||
// DCTL startup value is 2 on new chip, 0 on old chip
|
||||
USBx_DEVICE->DCTL = 0;
|
||||
|
||||
// enable the IRQ
|
||||
NVIC_EnableIRQ(OTG_FS_IRQn);
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
// Early bringup
|
||||
#define ENTER_BOOTLOADER_MAGIC 0xdeadbeef
|
||||
#define ENTER_SOFTLOADER_MAGIC 0xdeadc0de
|
||||
#define BOOT_NORMAL 0xdeadb111
|
||||
#define ENTER_BOOTLOADER_MAGIC 0xdeadbeefU
|
||||
#define ENTER_SOFTLOADER_MAGIC 0xdeadc0deU
|
||||
#define BOOT_NORMAL 0xdeadb111U
|
||||
|
||||
extern void *g_pfnVectors;
|
||||
extern uint32_t enter_bootloader_mode;
|
||||
@@ -9,7 +9,7 @@ extern uint32_t enter_bootloader_mode;
|
||||
void jump_to_bootloader(void) {
|
||||
// do enter bootloader
|
||||
enter_bootloader_mode = 0;
|
||||
void (*bootloader)(void) = (void (*)(void)) (*((uint32_t *)0x1fff0004));
|
||||
void (*bootloader)(void) = (void (*)(void)) (*((uint32_t *)BOOTLOADER_ADDRESS));
|
||||
|
||||
// jump to bootloader
|
||||
enable_interrupts();
|
||||
@@ -20,7 +20,7 @@ void jump_to_bootloader(void) {
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
||||
void early(void) {
|
||||
void early_initialization(void) {
|
||||
// Reset global critical depth
|
||||
disable_interrupts();
|
||||
global_critical_depth = 0;
|
||||
@@ -38,27 +38,17 @@ void early(void) {
|
||||
|
||||
// if wrong chip, reboot
|
||||
volatile unsigned int id = DBGMCU->IDCODE;
|
||||
#ifdef STM32F4
|
||||
if ((id & 0xFFFU) != 0x463U) {
|
||||
if ((id & 0xFFFU) != MCU_IDCODE) {
|
||||
enter_bootloader_mode = ENTER_BOOTLOADER_MAGIC;
|
||||
}
|
||||
#else
|
||||
if ((id & 0xFFFU) != 0x411U) {
|
||||
enter_bootloader_mode = ENTER_BOOTLOADER_MAGIC;
|
||||
}
|
||||
#endif
|
||||
|
||||
// setup interrupt table
|
||||
SCB->VTOR = (uint32_t)&g_pfnVectors;
|
||||
|
||||
// early GPIOs float everything
|
||||
RCC->AHB1ENR = RCC_AHB1ENR_GPIOAEN | RCC_AHB1ENR_GPIOBEN | RCC_AHB1ENR_GPIOCEN;
|
||||
early_gpio_float();
|
||||
|
||||
GPIOA->MODER = 0; GPIOB->MODER = 0; GPIOC->MODER = 0;
|
||||
GPIOA->ODR = 0; GPIOB->ODR = 0; GPIOC->ODR = 0;
|
||||
GPIOA->PUPDR = 0; GPIOB->PUPDR = 0; GPIOC->PUPDR = 0;
|
||||
|
||||
detect_configuration();
|
||||
detect_external_debug_serial();
|
||||
detect_board_type();
|
||||
|
||||
if (enter_bootloader_mode == ENTER_BOOTLOADER_MAGIC) {
|
||||
@@ -24,7 +24,7 @@
|
||||
#define FAULT_REGISTER_DIVERGENT (1U << 18)
|
||||
#define FAULT_INTERRUPT_RATE_KLINE_INIT (1U << 19)
|
||||
#define FAULT_INTERRUPT_RATE_CLOCK_SOURCE (1U << 20)
|
||||
#define FAULT_INTERRUPT_RATE_TIM9 (1U << 21)
|
||||
#define FAULT_INTERRUPT_RATE_TICK (1U << 21)
|
||||
|
||||
// Permanent faults
|
||||
#define PERMANENT_FAULTS 0U
|
||||
@@ -49,4 +49,4 @@ void fault_recovered(uint32_t fault) {
|
||||
} else {
|
||||
puts("Cannot recover from a permanent fault!\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,4 +39,3 @@ int memcmp(const void * ptr1, const void * ptr2, unsigned int num) {
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,45 +1,21 @@
|
||||
//#define EON
|
||||
//#define PANDA
|
||||
|
||||
// ********************* Includes *********************
|
||||
#include "config.h"
|
||||
#include "obj/gitversion.h"
|
||||
|
||||
#include "main_declarations.h"
|
||||
#include "critical.h"
|
||||
|
||||
#include "libc.h"
|
||||
#include "provision.h"
|
||||
#include "faults.h"
|
||||
|
||||
#include "drivers/registers.h"
|
||||
#include "drivers/interrupts.h"
|
||||
|
||||
#include "drivers/llcan.h"
|
||||
#include "drivers/llgpio.h"
|
||||
#include "drivers/adc.h"
|
||||
#include "drivers/pwm.h"
|
||||
|
||||
#include "board.h"
|
||||
|
||||
#include "drivers/uart.h"
|
||||
#include "drivers/usb.h"
|
||||
#include "drivers/gmlan_alt.h"
|
||||
#include "drivers/kline_init.h"
|
||||
#include "drivers/timer.h"
|
||||
#include "drivers/clock.h"
|
||||
|
||||
#include "gpio.h"
|
||||
|
||||
#ifndef EON
|
||||
#include "drivers/spi.h"
|
||||
#endif
|
||||
#include "early_init.h"
|
||||
#include "provision.h"
|
||||
|
||||
#include "power_saving.h"
|
||||
#include "safety.h"
|
||||
|
||||
#include "drivers/can.h"
|
||||
|
||||
#include "obj/gitversion.h"
|
||||
|
||||
extern int _app_start[0xc000]; // Only first 3 sectors of size 0x4000 are used
|
||||
|
||||
// When changing this struct, boardd and python/__init__.py needs to be kept up to date!
|
||||
@@ -133,14 +109,14 @@ void set_safety_mode(uint16_t mode, int16_t param) {
|
||||
// at all times. Let the CAN transceivers ACK traffic unless this is
|
||||
// BP/Uno where the physical relay makes it irrelevant. This makes
|
||||
// SILENT identical to NOOUTPUT for White/Grey Panda.
|
||||
if (board_has_obd()) {
|
||||
if (current_board->has_obd) {
|
||||
current_board->set_can_mode(CAN_MODE_NORMAL);
|
||||
can_silent = ALL_CAN_SILENT;
|
||||
} else {
|
||||
can_silent = ALL_CAN_LIVE;
|
||||
}
|
||||
#else
|
||||
if (board_has_obd()) {
|
||||
if (current_board->has_obd) {
|
||||
current_board->set_can_mode(CAN_MODE_NORMAL);
|
||||
}
|
||||
can_silent = ALL_CAN_SILENT;
|
||||
@@ -148,7 +124,7 @@ void set_safety_mode(uint16_t mode, int16_t param) {
|
||||
break;
|
||||
case SAFETY_NOOUTPUT:
|
||||
set_intercept_relay(false);
|
||||
if (board_has_obd()) {
|
||||
if (current_board->has_obd) {
|
||||
current_board->set_can_mode(CAN_MODE_NORMAL);
|
||||
}
|
||||
can_silent = ALL_CAN_LIVE;
|
||||
@@ -157,8 +133,12 @@ void set_safety_mode(uint16_t mode, int16_t param) {
|
||||
set_intercept_relay(false);
|
||||
heartbeat_counter = 0U;
|
||||
heartbeat_lost = false;
|
||||
if (board_has_obd()) {
|
||||
current_board->set_can_mode(CAN_MODE_OBD_CAN2);
|
||||
if (current_board->has_obd) {
|
||||
if (param == 0) {
|
||||
current_board->set_can_mode(CAN_MODE_OBD_CAN2);
|
||||
} else {
|
||||
current_board->set_can_mode(CAN_MODE_NORMAL);
|
||||
}
|
||||
}
|
||||
can_silent = ALL_CAN_LIVE;
|
||||
break;
|
||||
@@ -166,7 +146,7 @@ void set_safety_mode(uint16_t mode, int16_t param) {
|
||||
set_intercept_relay(true);
|
||||
heartbeat_counter = 0U;
|
||||
heartbeat_lost = false;
|
||||
if (board_has_obd()) {
|
||||
if (current_board->has_obd) {
|
||||
current_board->set_can_mode(CAN_MODE_NORMAL);
|
||||
}
|
||||
can_silent = ALL_CAN_LIVE;
|
||||
@@ -175,6 +155,12 @@ void set_safety_mode(uint16_t mode, int16_t param) {
|
||||
can_init_all();
|
||||
}
|
||||
|
||||
bool is_car_safety_mode(uint16_t mode) {
|
||||
return (mode != SAFETY_SILENT) &&
|
||||
(mode != SAFETY_NOOUTPUT) &&
|
||||
(mode != SAFETY_ELM327);
|
||||
}
|
||||
|
||||
// ***************************** USB port *****************************
|
||||
|
||||
int get_health_pkt(void *dat) {
|
||||
@@ -257,13 +243,13 @@ void usb_cb_ep3_out(void *usbdata, int len, bool hardwired) {
|
||||
}
|
||||
}
|
||||
|
||||
void usb_cb_ep3_out_complete() {
|
||||
void usb_cb_ep3_out_complete(void) {
|
||||
if (can_tx_check_min_slots_free(MAX_CAN_MSGS_PER_BULK_TRANSFER)) {
|
||||
usb_outep3_resume_if_paused();
|
||||
}
|
||||
}
|
||||
|
||||
void usb_cb_enumeration_complete() {
|
||||
void usb_cb_enumeration_complete(void) {
|
||||
puts("USB enumeration complete\n");
|
||||
is_enumerated = 1;
|
||||
}
|
||||
@@ -358,7 +344,7 @@ int usb_cb_control_msg(USB_Setup_TypeDef *setup, uint8_t *resp, bool hardwired)
|
||||
case 0xd0:
|
||||
// addresses are OTP
|
||||
if (setup->b.wValue.w == 1U) {
|
||||
(void)memcpy(resp, (uint8_t *)0x1fff79c0, 0x10);
|
||||
(void)memcpy(resp, (uint8_t *)DEVICE_SERIAL_NUMBER_ADDRESS, 0x10);
|
||||
resp_len = 0x10;
|
||||
} else {
|
||||
get_provision_chunk(resp);
|
||||
@@ -446,7 +432,7 @@ int usb_cb_control_msg(USB_Setup_TypeDef *setup, uint8_t *resp, bool hardwired)
|
||||
break;
|
||||
// **** 0xdb: set GMLAN (white/grey) or OBD CAN (black) multiplexing mode
|
||||
case 0xdb:
|
||||
if(board_has_obd()){
|
||||
if(current_board->has_obd){
|
||||
if (setup->b.wValue.w == 1U) {
|
||||
// Enable OBD CAN
|
||||
current_board->set_can_mode(CAN_MODE_OBD_CAN2);
|
||||
@@ -504,9 +490,7 @@ int usb_cb_control_msg(USB_Setup_TypeDef *setup, uint8_t *resp, bool hardwired)
|
||||
// **** 0xdf: set unsafe mode
|
||||
case 0xdf:
|
||||
// you can only set this if you are in a non car safety mode
|
||||
if ((current_safety_mode == SAFETY_SILENT) ||
|
||||
(current_safety_mode == SAFETY_NOOUTPUT) ||
|
||||
(current_safety_mode == SAFETY_ELM327)) {
|
||||
if (!is_car_safety_mode(current_safety_mode)) {
|
||||
unsafe_mode = setup->b.wValue.w;
|
||||
}
|
||||
break;
|
||||
@@ -584,7 +568,7 @@ int usb_cb_control_msg(USB_Setup_TypeDef *setup, uint8_t *resp, bool hardwired)
|
||||
break;
|
||||
// **** 0xf0: k-line/l-line wake-up pulse for KWP2000 fast initialization
|
||||
case 0xf0:
|
||||
if(board_has_lin()) {
|
||||
if(current_board->has_lin) {
|
||||
bool k = (setup->b.wValue.w == 0U) || (setup->b.wValue.w == 2U);
|
||||
bool l = (setup->b.wValue.w == 1U) || (setup->b.wValue.w == 2U);
|
||||
if (bitbang_wakeup(k, l)) {
|
||||
@@ -619,11 +603,12 @@ int usb_cb_control_msg(USB_Setup_TypeDef *setup, uint8_t *resp, bool hardwired)
|
||||
{
|
||||
heartbeat_counter = 0U;
|
||||
heartbeat_lost = false;
|
||||
heartbeat_disabled = false;
|
||||
break;
|
||||
}
|
||||
// **** 0xf4: k-line/l-line 5 baud initialization
|
||||
case 0xf4:
|
||||
if(board_has_lin()) {
|
||||
if(current_board->has_lin) {
|
||||
bool k = (setup->b.wValue.w == 0U) || (setup->b.wValue.w == 2U);
|
||||
bool l = (setup->b.wValue.w == 1U) || (setup->b.wValue.w == 2U);
|
||||
uint8_t five_baud_addr = (setup->b.wIndex.w & 0xFFU);
|
||||
@@ -644,6 +629,12 @@ int usb_cb_control_msg(USB_Setup_TypeDef *setup, uint8_t *resp, bool hardwired)
|
||||
case 0xf7:
|
||||
green_led_enabled = (setup->b.wValue.w != 0U);
|
||||
break;
|
||||
#ifdef ALLOW_DEBUG
|
||||
// **** 0xf8: disable heartbeat checks
|
||||
case 0xf8:
|
||||
heartbeat_disabled = true;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
puts("NO HANDLER ");
|
||||
puth(setup->b.bRequest);
|
||||
@@ -653,43 +644,11 @@ int usb_cb_control_msg(USB_Setup_TypeDef *setup, uint8_t *resp, bool hardwired)
|
||||
return resp_len;
|
||||
}
|
||||
|
||||
#ifndef EON
|
||||
int spi_cb_rx(uint8_t *data, int len, uint8_t *data_out) {
|
||||
// data[0] = endpoint
|
||||
// data[2] = length
|
||||
// data[4:] = data
|
||||
UNUSED(len);
|
||||
int resp_len = 0;
|
||||
switch (data[0]) {
|
||||
case 0:
|
||||
// control transfer
|
||||
resp_len = usb_cb_control_msg((USB_Setup_TypeDef *)(data+4), data_out, 0);
|
||||
break;
|
||||
case 1:
|
||||
// ep 1, read
|
||||
resp_len = usb_cb_ep1_in(data_out, 0x40, 0);
|
||||
break;
|
||||
case 2:
|
||||
// ep 2, send serial
|
||||
usb_cb_ep2_out(data+4, data[2], 0);
|
||||
break;
|
||||
case 3:
|
||||
// ep 3, send CAN
|
||||
usb_cb_ep3_out(data+4, data[2], 0);
|
||||
break;
|
||||
default:
|
||||
puts("SPI data invalid");
|
||||
break;
|
||||
}
|
||||
return resp_len;
|
||||
}
|
||||
#endif
|
||||
|
||||
// ***************************** main code *****************************
|
||||
|
||||
// cppcheck-suppress unusedFunction ; used in headers not included in cppcheck
|
||||
void __initialize_hardware_early(void) {
|
||||
early();
|
||||
early_initialization();
|
||||
}
|
||||
|
||||
void __attribute__ ((noinline)) enable_fpu(void) {
|
||||
@@ -697,19 +656,19 @@ void __attribute__ ((noinline)) enable_fpu(void) {
|
||||
SCB->CPACR |= ((3UL << (10U * 2U)) | (3UL << (11U * 2U)));
|
||||
}
|
||||
|
||||
// go into SILENT when the EON does not send a heartbeat for this amount of seconds.
|
||||
#define EON_HEARTBEAT_IGNITION_CNT_ON 5U
|
||||
#define EON_HEARTBEAT_IGNITION_CNT_OFF 2U
|
||||
// go into SILENT when heartbeat isn't received for this amount of seconds.
|
||||
#define HEARTBEAT_IGNITION_CNT_ON 5U
|
||||
#define HEARTBEAT_IGNITION_CNT_OFF 2U
|
||||
|
||||
// called at 8Hz
|
||||
uint8_t loop_counter = 0U;
|
||||
void TIM1_BRK_TIM9_IRQ_Handler(void) {
|
||||
if (TIM9->SR != 0) {
|
||||
void tick_handler(void) {
|
||||
if (TICK_TIMER->SR != 0) {
|
||||
// siren
|
||||
current_board->set_siren((loop_counter & 1U) && siren_enabled);
|
||||
current_board->set_siren((loop_counter & 1U) && (siren_enabled || (siren_countdown > 0U)));
|
||||
|
||||
// decimated to 1Hz
|
||||
if(loop_counter == 0U){
|
||||
if (loop_counter == 0U) {
|
||||
can_live = pending_can_live;
|
||||
|
||||
current_board->usb_power_mode_tick(uptime_cnt);
|
||||
@@ -742,39 +701,49 @@ void TIM1_BRK_TIM9_IRQ_Handler(void) {
|
||||
heartbeat_counter += 1U;
|
||||
}
|
||||
|
||||
#ifdef EON
|
||||
// check heartbeat counter if we are running EON code.
|
||||
// if the heartbeat has been gone for a while, go to SILENT safety mode and enter power save
|
||||
if (heartbeat_counter >= (check_started() ? EON_HEARTBEAT_IGNITION_CNT_ON : EON_HEARTBEAT_IGNITION_CNT_OFF)) {
|
||||
puts("EON hasn't sent a heartbeat for 0x");
|
||||
puth(heartbeat_counter);
|
||||
puts(" seconds. Safety is set to SILENT mode.\n");
|
||||
if (current_safety_mode != SAFETY_SILENT) {
|
||||
set_safety_mode(SAFETY_SILENT, 0U);
|
||||
}
|
||||
if (power_save_status != POWER_SAVE_STATUS_ENABLED) {
|
||||
set_power_save_state(POWER_SAVE_STATUS_ENABLED);
|
||||
}
|
||||
|
||||
// set flag to indicate the heartbeat was lost
|
||||
heartbeat_lost = true;
|
||||
|
||||
// Also disable IR when the heartbeat goes missing
|
||||
current_board->set_ir_power(0U);
|
||||
|
||||
// If enumerated but no heartbeat (phone up, boardd not running), turn the fan on to cool the device
|
||||
if(usb_enumerated()){
|
||||
current_board->set_fan_power(50U);
|
||||
} else {
|
||||
current_board->set_fan_power(0U);
|
||||
}
|
||||
if (siren_countdown > 0U) {
|
||||
siren_countdown -= 1U;
|
||||
}
|
||||
|
||||
// enter CDP mode when car starts to ensure we are charging a turned off EON
|
||||
if (check_started() && (usb_power_mode != USB_POWER_CDP)) {
|
||||
current_board->set_usb_power_mode(USB_POWER_CDP);
|
||||
if (!heartbeat_disabled) {
|
||||
// if the heartbeat has been gone for a while, go to SILENT safety mode and enter power save
|
||||
if (heartbeat_counter >= (check_started() ? HEARTBEAT_IGNITION_CNT_ON : HEARTBEAT_IGNITION_CNT_OFF)) {
|
||||
puts("device hasn't sent a heartbeat for 0x");
|
||||
puth(heartbeat_counter);
|
||||
puts(" seconds. Safety is set to SILENT mode.\n");
|
||||
|
||||
if (controls_allowed) {
|
||||
siren_countdown = 5U;
|
||||
}
|
||||
|
||||
// set flag to indicate the heartbeat was lost
|
||||
if (is_car_safety_mode(current_safety_mode)) {
|
||||
heartbeat_lost = true;
|
||||
}
|
||||
|
||||
if (current_safety_mode != SAFETY_SILENT) {
|
||||
set_safety_mode(SAFETY_SILENT, 0U);
|
||||
}
|
||||
if (power_save_status != POWER_SAVE_STATUS_ENABLED) {
|
||||
set_power_save_state(POWER_SAVE_STATUS_ENABLED);
|
||||
}
|
||||
|
||||
// Also disable IR when the heartbeat goes missing
|
||||
current_board->set_ir_power(0U);
|
||||
|
||||
// If enumerated but no heartbeat (phone up, boardd not running), turn the fan on to cool the device
|
||||
if(usb_enumerated()){
|
||||
current_board->set_fan_power(50U);
|
||||
} else {
|
||||
current_board->set_fan_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)) {
|
||||
current_board->set_usb_power_mode(USB_POWER_CDP);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// check registers
|
||||
check_registers();
|
||||
@@ -782,7 +751,7 @@ void TIM1_BRK_TIM9_IRQ_Handler(void) {
|
||||
// set ignition_can to false after 2s of no CAN seen
|
||||
if (ignition_can_cnt > 2U) {
|
||||
ignition_can = false;
|
||||
};
|
||||
}
|
||||
|
||||
// on to the next one
|
||||
uptime_cnt += 1U;
|
||||
@@ -796,24 +765,21 @@ void TIM1_BRK_TIM9_IRQ_Handler(void) {
|
||||
loop_counter++;
|
||||
loop_counter %= 8U;
|
||||
}
|
||||
TIM9->SR = 0;
|
||||
TICK_TIMER->SR = 0;
|
||||
}
|
||||
|
||||
#define MAX_FADE 8192U
|
||||
|
||||
int main(void) {
|
||||
// Init interrupt table
|
||||
init_interrupts(true);
|
||||
|
||||
// 8Hz timer
|
||||
REGISTER_INTERRUPT(TIM1_BRK_TIM9_IRQn, TIM1_BRK_TIM9_IRQ_Handler, 10U, FAULT_INTERRUPT_RATE_TIM9)
|
||||
|
||||
// shouldn't have interrupts here, but just in case
|
||||
disable_interrupts();
|
||||
|
||||
// init early devices
|
||||
clock_init();
|
||||
peripherals_init();
|
||||
detect_configuration();
|
||||
detect_external_debug_serial();
|
||||
detect_board_type();
|
||||
adc_init();
|
||||
|
||||
@@ -843,14 +809,14 @@ int main(void) {
|
||||
uart_init(&uart_ring_debug, 115200);
|
||||
}
|
||||
|
||||
if (board_has_gps()) {
|
||||
if (current_board->has_gps) {
|
||||
uart_init(&uart_ring_gps, 9600);
|
||||
} else {
|
||||
// enable ESP uart
|
||||
uart_init(&uart_ring_gps, 115200);
|
||||
}
|
||||
|
||||
if(board_has_lin()){
|
||||
if(current_board->has_lin){
|
||||
// enable LIN
|
||||
uart_init(&uart_ring_lin1, 10400);
|
||||
UART5->CR2 |= USART_CR2_LINEN;
|
||||
@@ -858,13 +824,7 @@ int main(void) {
|
||||
USART3->CR2 |= USART_CR2_LINEN;
|
||||
}
|
||||
|
||||
// init microsecond system timer
|
||||
// increments 1000000 times per second
|
||||
// generate an update to set the prescaler
|
||||
TIM2->PSC = 48-1;
|
||||
TIM2->CR1 = TIM_CR1_CEN;
|
||||
TIM2->EGR = TIM_EGR_UG;
|
||||
// use TIM2->CNT to read
|
||||
microsecond_timer_init();
|
||||
|
||||
// init to SILENT and can silent
|
||||
set_safety_mode(SAFETY_SILENT, 0);
|
||||
@@ -872,13 +832,9 @@ int main(void) {
|
||||
// enable CAN TXs
|
||||
current_board->enable_can_transceivers(true);
|
||||
|
||||
#ifndef EON
|
||||
spi_init();
|
||||
#endif
|
||||
|
||||
// 8hz
|
||||
timer_init(TIM9, 183);
|
||||
NVIC_EnableIRQ(TIM1_BRK_TIM9_IRQn);
|
||||
// 8Hz timer
|
||||
REGISTER_INTERRUPT(TICK_TIMER_IRQ, tick_handler, 10U, FAULT_INTERRUPT_RATE_TICK)
|
||||
tick_timer_init();
|
||||
|
||||
#ifdef DEBUG
|
||||
puts("DEBUG ENABLED\n");
|
||||
@@ -900,18 +856,18 @@ int main(void) {
|
||||
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_FADE; fade += div_mode){
|
||||
for(uint32_t fade = 0U; fade < MAX_LED_FADE; fade += div_mode){
|
||||
current_board->set_led(LED_RED, true);
|
||||
delay(fade >> 4);
|
||||
current_board->set_led(LED_RED, false);
|
||||
delay((MAX_FADE - fade) >> 4);
|
||||
delay((MAX_LED_FADE - fade) >> 4);
|
||||
}
|
||||
|
||||
for(uint32_t fade = MAX_FADE; fade > 0U; fade -= div_mode){
|
||||
for(uint32_t fade = MAX_LED_FADE; fade > 0U; fade -= div_mode){
|
||||
current_board->set_led(LED_RED, true);
|
||||
delay(fade >> 4);
|
||||
current_board->set_led(LED_RED, false);
|
||||
delay((MAX_FADE - fade) >> 4);
|
||||
delay((MAX_LED_FADE - fade) >> 4);
|
||||
}
|
||||
|
||||
#ifdef DEBUG_FAULTS
|
||||
|
||||
@@ -5,7 +5,8 @@ void puth2(unsigned int i);
|
||||
typedef struct board board;
|
||||
typedef struct harness_configuration harness_configuration;
|
||||
void can_flip_buses(uint8_t bus1, uint8_t bus2);
|
||||
void can_set_obd(uint8_t harness_orientation, bool obd);
|
||||
void pwm_init(TIM_TypeDef *TIM, uint8_t channel);
|
||||
void pwm_set(TIM_TypeDef *TIM, uint8_t channel, uint8_t percentage);
|
||||
|
||||
// ********************* Globals **********************
|
||||
uint8_t hw_type = 0;
|
||||
@@ -14,5 +15,7 @@ bool is_enumerated = 0;
|
||||
uint32_t heartbeat_counter = 0;
|
||||
uint32_t uptime_cnt = 0;
|
||||
bool heartbeat_lost = false;
|
||||
bool heartbeat_disabled = false;
|
||||
bool siren_enabled = false;
|
||||
uint32_t siren_countdown = 0;
|
||||
bool green_led_enabled = false;
|
||||
|
||||
@@ -1,32 +1,13 @@
|
||||
// ********************* Includes *********************
|
||||
//#define PEDAL_USB
|
||||
#include "../config.h"
|
||||
#include "libc.h"
|
||||
|
||||
#include "main_declarations.h"
|
||||
#include "critical.h"
|
||||
#include "faults.h"
|
||||
|
||||
#include "drivers/registers.h"
|
||||
#include "drivers/interrupts.h"
|
||||
#include "drivers/llcan.h"
|
||||
#include "drivers/llgpio.h"
|
||||
#include "drivers/adc.h"
|
||||
|
||||
#include "board.h"
|
||||
|
||||
#include "drivers/clock.h"
|
||||
#include "drivers/dac.h"
|
||||
#include "drivers/timer.h"
|
||||
|
||||
#include "gpio.h"
|
||||
#include "early_init.h"
|
||||
#include "crc.h"
|
||||
|
||||
#define CAN CAN1
|
||||
|
||||
//#define PEDAL_USB
|
||||
|
||||
#ifdef PEDAL_USB
|
||||
#include "drivers/uart.h"
|
||||
#include "drivers/usb.h"
|
||||
#else
|
||||
// no serial either
|
||||
@@ -41,12 +22,12 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
#define ENTER_BOOTLOADER_MAGIC 0xdeadbeef
|
||||
#define ENTER_BOOTLOADER_MAGIC 0xdeadbeefU
|
||||
uint32_t enter_bootloader_mode;
|
||||
|
||||
// cppcheck-suppress unusedFunction ; used in headers not included in cppcheck
|
||||
void __initialize_hardware_early(void) {
|
||||
early();
|
||||
early_initialization();
|
||||
}
|
||||
|
||||
// ********************* serial debugging *********************
|
||||
@@ -84,6 +65,11 @@ int usb_cb_control_msg(USB_Setup_TypeDef *setup, uint8_t *resp, bool hardwired)
|
||||
unsigned int resp_len = 0;
|
||||
uart_ring *ur = NULL;
|
||||
switch (setup->b.bRequest) {
|
||||
// **** 0xc1: get hardware type
|
||||
case 0xc1:
|
||||
resp[0] = hw_type;
|
||||
resp_len = 1;
|
||||
break;
|
||||
// **** 0xe0: uart read
|
||||
case 0xe0:
|
||||
ur = get_ring_by_number(setup->b.wValue.w);
|
||||
@@ -136,8 +122,7 @@ uint32_t current_index = 0;
|
||||
#define FAULT_TIMEOUT 5U
|
||||
#define FAULT_INVALID 6U
|
||||
uint8_t state = FAULT_STARTUP;
|
||||
|
||||
const uint8_t crc_poly = 0xD5; // standard crc8
|
||||
const uint8_t crc_poly = 0xD5U; // standard crc8
|
||||
|
||||
void CAN1_RX0_IRQ_Handler(void) {
|
||||
while ((CAN->RF0R & CAN_RF0R_FMP0) != 0) {
|
||||
@@ -286,7 +271,7 @@ int main(void) {
|
||||
REGISTER_INTERRUPT(CAN1_TX_IRQn, CAN1_TX_IRQ_Handler, CAN_INTERRUPT_RATE, FAULT_INTERRUPT_RATE_CAN_1)
|
||||
REGISTER_INTERRUPT(CAN1_RX0_IRQn, CAN1_RX0_IRQ_Handler, CAN_INTERRUPT_RATE, FAULT_INTERRUPT_RATE_CAN_1)
|
||||
REGISTER_INTERRUPT(CAN1_SCE_IRQn, CAN1_SCE_IRQ_Handler, CAN_INTERRUPT_RATE, FAULT_INTERRUPT_RATE_CAN_1)
|
||||
|
||||
|
||||
// Should run at around 732Hz (see init below)
|
||||
REGISTER_INTERRUPT(TIM3_IRQn, TIM3_IRQ_Handler, 1000U, FAULT_INTERRUPT_RATE_TIM3)
|
||||
|
||||
@@ -295,7 +280,7 @@ int main(void) {
|
||||
// init devices
|
||||
clock_init();
|
||||
peripherals_init();
|
||||
detect_configuration();
|
||||
detect_external_debug_serial();
|
||||
detect_board_type();
|
||||
|
||||
// init board
|
||||
|
||||
@@ -8,4 +8,4 @@ typedef struct harness_configuration harness_configuration;
|
||||
// ********************* Globals **********************
|
||||
uint8_t hw_type = 0;
|
||||
const board *current_board;
|
||||
bool is_enumerated = 0;
|
||||
bool is_enumerated = 0;
|
||||
|
||||
@@ -13,15 +13,15 @@ void set_power_save_state(int state) {
|
||||
bool enable = false;
|
||||
if (state == POWER_SAVE_STATUS_ENABLED) {
|
||||
puts("enable power savings\n");
|
||||
if (board_has_gps()) {
|
||||
char UBLOX_SLEEP_MSG[] = "\xb5\x62\x06\x04\x04\x00\x01\x00\x08\x00\x17\x78";
|
||||
if (current_board->has_gps) {
|
||||
const char UBLOX_SLEEP_MSG[] = "\xb5\x62\x06\x04\x04\x00\x01\x00\x08\x00\x17\x78";
|
||||
uart_ring *ur = get_ring_by_number(1);
|
||||
for (unsigned int i = 0; i < sizeof(UBLOX_SLEEP_MSG) - 1U; i++) while (!putc(ur, UBLOX_SLEEP_MSG[i]));
|
||||
}
|
||||
} else {
|
||||
puts("disable power savings\n");
|
||||
if (board_has_gps()) {
|
||||
char UBLOX_WAKE_MSG[] = "\xb5\x62\x06\x04\x04\x00\x01\x00\x09\x00\x18\x7a";
|
||||
if (current_board->has_gps) {
|
||||
const char UBLOX_WAKE_MSG[] = "\xb5\x62\x06\x04\x04\x00\x01\x00\x09\x00\x18\x7a";
|
||||
uart_ring *ur = get_ring_by_number(1);
|
||||
for (unsigned int i = 0; i < sizeof(UBLOX_WAKE_MSG) - 1U; i++) while (!putc(ur, UBLOX_WAKE_MSG[i]));
|
||||
}
|
||||
@@ -32,7 +32,7 @@ void set_power_save_state(int state) {
|
||||
// Volkswagen community port:
|
||||
// If this is a White or Grey Panda, always keep the CAN transceivers
|
||||
// powered up so that transparent forwarding is maintained.
|
||||
current_board->enable_can_transceivers(board_has_obd() ? enable : true);
|
||||
current_board->enable_can_transceivers(current_board->has_obd ? enable : true);
|
||||
#else
|
||||
current_board->enable_can_transceivers(enable);
|
||||
#endif
|
||||
@@ -44,13 +44,13 @@ void set_power_save_state(int state) {
|
||||
current_board->set_gps_mode(GPS_DISABLED);
|
||||
}
|
||||
|
||||
if(board_has_gmlan()){
|
||||
if(current_board->has_hw_gmlan){
|
||||
// turn on GMLAN
|
||||
set_gpio_output(GPIOB, 14, enable);
|
||||
set_gpio_output(GPIOB, 15, enable);
|
||||
}
|
||||
|
||||
if(board_has_lin()){
|
||||
if(current_board->has_lin){
|
||||
// turn on LIN
|
||||
set_gpio_output(GPIOB, 7, enable);
|
||||
set_gpio_output(GPIOA, 14, enable);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// SHA1 checksum = 0x1C - 0x20
|
||||
|
||||
void get_provision_chunk(uint8_t *resp) {
|
||||
(void)memcpy(resp, (uint8_t *)0x1fff79e0, PROVISION_CHUNK_LEN);
|
||||
(void)memcpy(resp, (uint8_t *)PROVISION_CHUNK_ADDRESS, PROVISION_CHUNK_LEN);
|
||||
if (memcmp(resp, "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff", 0x20) == 0) {
|
||||
(void)memcpy(resp, "unprovisioned\x00\x00\x00testing123\x00\x00\xa3\xa6\x99\xec", 0x20);
|
||||
}
|
||||
@@ -13,7 +13,6 @@ void get_provision_chunk(uint8_t *resp) {
|
||||
|
||||
uint8_t chunk[PROVISION_CHUNK_LEN];
|
||||
bool is_provisioned(void) {
|
||||
(void)memcpy(chunk, (uint8_t *)0x1fff79e0, PROVISION_CHUNK_LEN);
|
||||
(void)memcpy(chunk, (uint8_t *)PROVISION_CHUNK_ADDRESS, PROVISION_CHUNK_LEN);
|
||||
return (memcmp(chunk, "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff", 0x20) != 0);
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user