mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-12 18:34:25 +08:00
Compare commits
75 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f22f52235 | ||
|
|
2cfdc67610 | ||
|
|
6f3d10a4c4 | ||
|
|
589b6187a1 | ||
|
|
fe9ce203ee | ||
|
|
6b1efbf185 | ||
|
|
76494ab0be | ||
|
|
b63d51d3ef | ||
|
|
e07853bb5e | ||
|
|
866711ef2e | ||
|
|
0ea21f3545 | ||
|
|
ef8e6fb39f | ||
|
|
4568504c41 | ||
|
|
18c6482545 | ||
|
|
b0c83bb9a6 | ||
|
|
ce57ce4898 | ||
|
|
7d9f8c55e0 | ||
|
|
04c26981f0 | ||
|
|
7f6ea03066 | ||
|
|
de33bc4645 | ||
|
|
87fcd4537f | ||
|
|
e9ad7793f0 | ||
|
|
4bdf3b95f3 | ||
|
|
7fca1ba2f4 | ||
|
|
504d00353d | ||
|
|
ce67c75f1f | ||
|
|
27c7425b94 | ||
|
|
95509a58cd | ||
|
|
548608490a | ||
|
|
21b3f5321a | ||
|
|
7953078a31 | ||
|
|
b75d606c91 | ||
|
|
ca3e1ce9b0 | ||
|
|
58744df1c5 | ||
|
|
30b72e4be1 | ||
|
|
1181a00fe9 | ||
|
|
71f547219c | ||
|
|
35b08e1e3d | ||
|
|
fd2bead226 | ||
|
|
ae5cb7a0da | ||
|
|
e425c1cf59 | ||
|
|
e3ab9d6460 | ||
|
|
c210011c84 | ||
|
|
d5b884f824 | ||
|
|
2751d87d01 | ||
|
|
8849aa02a3 | ||
|
|
f49e9f4f09 | ||
|
|
f0a6db351e | ||
|
|
afdda0e5fc | ||
|
|
53b177b3c1 | ||
|
|
c6df34f55b | ||
|
|
28e3543ec4 | ||
|
|
ea6c19638c | ||
|
|
752df1681a | ||
|
|
7865525451 | ||
|
|
dcacbf606a | ||
|
|
4a5019d925 | ||
|
|
88d1dd2bad | ||
|
|
1b7b3b4e66 | ||
|
|
3e491431a3 | ||
|
|
f550656ee8 | ||
|
|
640ab12c72 | ||
|
|
affc00df1f | ||
|
|
e343c95720 | ||
|
|
89605ed88a | ||
|
|
10cb834c39 | ||
|
|
675d9feb0b | ||
|
|
c2e120c362 | ||
|
|
5ae7119646 | ||
|
|
5864323c7d | ||
|
|
577608be57 | ||
|
|
606c21bca4 | ||
|
|
cd25fac75d | ||
|
|
b111277f46 | ||
|
|
0fba33b093 |
6
.gitignore
vendored
6
.gitignore
vendored
@@ -2,7 +2,9 @@
|
||||
.tags
|
||||
.ipynb_checkpoints
|
||||
.idea
|
||||
.sconsign.dblite
|
||||
model2.png
|
||||
a.out
|
||||
|
||||
*.DSYM
|
||||
*.d
|
||||
@@ -18,6 +20,8 @@ model2.png
|
||||
*.class
|
||||
*.pyxbldc
|
||||
*.vcd
|
||||
lane.cpp
|
||||
loc*.cpp
|
||||
config.json
|
||||
clcache
|
||||
|
||||
@@ -26,5 +30,7 @@ selfdrive/boardd/boardd
|
||||
selfdrive/logcatd/logcatd
|
||||
selfdrive/proclogd/proclogd
|
||||
selfdrive/ui/ui
|
||||
selfdrive/test/tests/plant/out
|
||||
/src/
|
||||
|
||||
one
|
||||
|
||||
216
README.md
216
README.md
@@ -1,66 +1,102 @@
|
||||
[](#)
|
||||
|
||||
Welcome to openpilot
|
||||
======
|
||||
|
||||
[openpilot](http://github.com/commaai/openpilot) is an open source driving agent.
|
||||
|
||||
Currently it performs the functions of Adaptive Cruise Control (ACC) and Lane Keeping Assist System (LKAS) for Hondas, Acuras and Toyotas. It's about on par with Tesla Autopilot at launch, and better than [all other manufacturers](http://www.thedrive.com/tech/5707/the-war-for-autonomous-driving-part-iii-us-vs-germany-vs-japan).
|
||||
[openpilot](http://github.com/commaai/openpilot) is an open source driving agent. Currently it performs the functions of Adaptive Cruise Control (ACC) and Lane Keeping Assist System (LKAS) for Hondas, Acuras, Toyotas, and a Chevy. It's about on par with Tesla Autopilot and GM Super Cruise, and better than [all other manufacturers](http://www.thedrive.com/tech/5707/the-war-for-autonomous-driving-part-iii-us-vs-germany-vs-japan).
|
||||
|
||||
The openpilot codebase has been written to be concise and enable rapid prototyping. We look forward to your contributions - improving real vehicle automation has never been easier.
|
||||
|
||||
Here are [some](https://www.youtube.com/watch?v=9OwTJFuDI7g) [videos](https://www.youtube.com/watch?v=64Wvt5pYQmE) [of](https://www.youtube.com/watch?v=6IW7Nejsr3A) [it](https://www.youtube.com/watch?v=-VN1YcC83nA) [running](https://www.youtube.com/watch?v=EQJZvVeihZk). And a really cool [tutorial](https://www.youtube.com/watch?v=PwOnsT2UW5o).
|
||||
Community
|
||||
------
|
||||
|
||||
openpilot is developed by [comma.ai](https://comma.ai/) and users like you.
|
||||
|
||||
We have a [Twitter you should follow](https://twitter.com/comma_ai).
|
||||
|
||||
Also, we have a 3500+ person [community on slack](https://slack.comma.ai).
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="https://www.youtube.com/watch?v=9TDi0BHgXyo" title="YouTube" rel="noopener"><img src="https://i.imgur.com/gBTo7yB.png"></a></td>
|
||||
<td><a href="https://www.youtube.com/watch?v=1zCtj3ckGFo" title="YouTube" rel="noopener"><img src="https://i.imgur.com/gNhhcep.png"></a></td>
|
||||
<td><a href="https://www.youtube.com/watch?v=Qd2mjkBIRx0" title="YouTube" rel="noopener"><img src="https://i.imgur.com/tFnSexp.png"></a></td>
|
||||
<td><a href="https://www.youtube.com/watch?v=ju12vlBm59E" title="YouTube" rel="noopener"><img src="https://i.imgur.com/3BKiJVy.png"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://www.youtube.com/watch?v=Z5VY5FzgNt4" title="YouTube" rel="noopener"><img src="https://i.imgur.com/3I9XOK2.png"></a></td>
|
||||
<td><a href="https://www.youtube.com/watch?v=blnhZC7OmMg" title="YouTube" rel="noopener"><img src="https://i.imgur.com/f9IgX6s.png"></a></td>
|
||||
<td><a href="https://www.youtube.com/watch?v=iRkz7FuJsA8" title="YouTube" rel="noopener"><img src="https://i.imgur.com/Vo5Zvmn.png"></a></td>
|
||||
<td><a href="https://www.youtube.com/watch?v=IHjEqAKDqjM" title="YouTube" rel="noopener"><img src="https://i.imgur.com/V9Zd81n.png"></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Hardware
|
||||
------
|
||||
|
||||
Right now openpilot supports the [EON Dashcam DevKit](https://shop.comma.ai/products/eon-dashcam-devkit). We'd like to support other platforms as well.
|
||||
Right now openpilot supports the [EON Dashcam DevKit](https://comma.ai/shop/products/eon-dashcam-devkit). We'd like to support other platforms as well.
|
||||
|
||||
Install openpilot on a neo device by entering ``https://openpilot.comma.ai`` during NEOS setup.
|
||||
|
||||
Supported Cars
|
||||
------
|
||||
|
||||
- Acura ILX 2016 with AcuraWatch Plus
|
||||
- Due to use of the cruise control for gas, it can only be enabled above 25 mph
|
||||
| Make | Model | Supported Package | Lateral | Longitudinal | No Accel Below | No Steer Below |
|
||||
| ------- | ---------------------- | -------------------- | ------- | ------------ | -------------- | -------------- |
|
||||
| Acura | ILX 2016 | AcuraWatch Plus | Yes | Yes | 25mph<sup>1</sup>| 25mph |
|
||||
| Acura | ILX 2017 | AcuraWatch Plus | Yes | Yes | 25mph<sup>1</sup>| 25mph |
|
||||
| Acura | RDX 2018 | AcuraWatch Plus | Yes | Yes | 25mph<sup>1</sup>| 12mph |
|
||||
| GM<sup>3</sup>| Volt 2017 | Driver Confidence II | Yes | Yes | 0mph | 7mph |
|
||||
| GM<sup>3</sup>| Volt 2018 | Driver Confidence II | Yes | Yes | 0mph | 7mph |
|
||||
| Honda | Accord 2018 | All | Yes | Stock | 0mph | 3mph |
|
||||
| Honda | Civic 2016 | Honda Sensing | Yes | Yes | 0mph | 12mph |
|
||||
| Honda | Civic 2017 | Honda Sensing | Yes | Yes | 0mph | 12mph |
|
||||
| Honda | Civic 2017 *(Hatch)* | Honda Sensing | Yes | Stock | 0mph | 12mph |
|
||||
| Honda | Civic 2018 | Honda Sensing | Yes | Yes | 0mph | 12mph |
|
||||
| Honda | CR-V 2015 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 12mph |
|
||||
| Honda | CR-V 2016 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 12mph |
|
||||
| Honda | CR-V 2017 | Honda Sensing | Yes | Stock | 0mph | 12mph |
|
||||
| Honda | CR-V 2018 | Honda Sensing | Yes | Stock | 0mph | 12mph |
|
||||
| Honda | Odyssey 2017 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 12mph |
|
||||
| Honda | Odyssey 2018 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 12mph |
|
||||
| Honda | Pilot 2017 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 12mph |
|
||||
| Honda | Pilot 2018 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 12mph |
|
||||
| Honda | Ridgeline 2017 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 12mph |
|
||||
| Honda | Ridgeline 2018 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 12mph |
|
||||
| Lexus | RX Hybrid 2017 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph |
|
||||
| Lexus | RX Hybrid 2018 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph |
|
||||
| Toyota | Camry 2018<sup>4</sup> | All | Yes | Stock | 0mph<sup>5</sup> | 0mph |
|
||||
| Toyota | C-HR 2018<sup>4</sup> | All | Yes | Stock | 0mph | 0mph |
|
||||
| Toyota | Corolla 2017 | All | Yes | Yes<sup>2</sup>| 20mph | 0mph |
|
||||
| Toyota | Corolla 2018 | All | Yes | Yes<sup>2</sup>| 20mph | 0mph |
|
||||
| Toyota | Prius 2016 | TSS-P | Yes | Yes<sup>2</sup>| 0mph | 0mph |
|
||||
| Toyota | Prius 2017 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph |
|
||||
| Toyota | Prius 2018 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph |
|
||||
| Toyota | Prius Prime 2017 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph |
|
||||
| Toyota | Prius Prime 2018 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph |
|
||||
| Toyota | Rav4 2016 | TSS-P | Yes | Yes<sup>2</sup>| 20mph | 0mph |
|
||||
| Toyota | Rav4 2017 | All | Yes | Yes<sup>2</sup>| 20mph | 0mph |
|
||||
| Toyota | Rav4 2018 | All | Yes | Yes<sup>2</sup>| 20mph | 0mph |
|
||||
| Toyota | Rav4 Hybrid 2017 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph |
|
||||
| Toyota | Rav4 Hybrid 2018 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph |
|
||||
|
||||
- Honda Civic 2016-2018 with Honda Sensing
|
||||
- Due to limitations in steering firmware, steering is disabled below 12 mph
|
||||
- Note that the hatchback model is not supported
|
||||
|
||||
- Honda CR-V Touring 2015-2016
|
||||
- Can only be enabled above 25 mph
|
||||
<sup>1</sup>[Comma Pedal](https://community.comma.ai/wiki/index.php/Comma_Pedal) is used to provide stop-and-go capability to some of the openpilot-supported cars that don't currently support stop-and-go. Here is how to [build a Comma Pedal](https://medium.com/@jfrux/comma-pedal-building-with-macrofab-6328bea791e8). ***NOTE: The Comma Pedal is not officially supported by [comma.ai](https://comma.ai)***
|
||||
<sup>2</sup>When disconnecting the Driver Support Unit (DSU), otherwise longitudinal control is stock ACC. For DSU locations, see [Toyota Wiki page](https://community.comma.ai/wiki/index.php/Toyota)
|
||||
<sup>3</sup>[GM installation guide](https://www.zoneos.com/volt.htm)
|
||||
<sup>4</sup>It needs an extra 120Ohm resistor ([pic1](https://i.imgur.com/CmdKtTP.jpg), [pic2](https://i.imgur.com/s2etUo6.jpg)) on bus 3 and giraffe switches set to 01X1 (11X1 for stock LKAS), where X depends on if you have the [comma power](https://comma.ai/shop/products/power/).
|
||||
<sup>5</sup>28mph for Camry 4CYL L, 4CYL LE and 4CYL SE which don't have Full-Speed Range Dynamic Radar Cruise Control.
|
||||
|
||||
- Honda Odyssey 2018 with Honda Sensing (alpha!)
|
||||
- Can only be enabled above 25 mph
|
||||
Community Maintained Cars
|
||||
------
|
||||
|
||||
- Acura RDX 2018 with AcuraWatch Plus (alpha!)
|
||||
- Can only be enabled above 25 mph
|
||||
| Make | Model | Supported Package | Lateral | Longitudinal | No Accel Below | No Steer Below |
|
||||
| ------- | ---------------------- | -------------------- | ------- | ------------ | -------------- | -------------- |
|
||||
| Honda | Fit 2018 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 12mph |
|
||||
|
||||
- Honda Pilot 2017 with Honda Sensing (alpha!)
|
||||
- Can only be enabled above 27 mph
|
||||
[[Honda Fit Pull Request]](https://github.com/commaai/openpilot/pull/266).
|
||||
|
||||
- Honda Ridgeline 2017 with Honda Sensing (alpha!)
|
||||
- Can only be enabled above 27 mph
|
||||
|
||||
- Toyota RAV-4 2016+ non-hybrid with TSS-P
|
||||
- By default it uses stock Toyota ACC for longitudinal control
|
||||
- openpilot longitudinal control available after unplugging the [Driving Support ECU](https://community.comma.ai/wiki/index.php/Toyota#Rav4_.28for_openpilot.29) and can be enabled above 20 mph
|
||||
|
||||
- Toyota Prius 2017 (alpha!)
|
||||
- By default it uses stock Toyota ACC for longitudinal control
|
||||
- openpilot longitudinal control available after unplugging the [Driving Support ECU](https://community.comma.ai/wiki/index.php/Toyota#Prius_.28for_openpilot.29)
|
||||
- Lateral control needs improvements
|
||||
|
||||
- Toyota RAV-4 2017 hybrid (alpha!)
|
||||
- By default it uses stock Toyota ACC for longitudinal control
|
||||
- openpilot longitudinal control available after unplugging the [Driving Support ECU](https://community.comma.ai/wiki/index.php/Toyota#Rav4_.28for_openpilot.29) and can do stop and go
|
||||
|
||||
- Toyota Corolla 2017 (alpha!)
|
||||
- By default it uses stock Toyota ACC for longitudinal control
|
||||
- openpilot longitudinal control available after unplugging the [Driving Support ECU](https://community.comma.ai/wiki/index.php/Toyota#Corolla_.28for_openpilot.29) and can be enabled above 20 mph
|
||||
|
||||
- Lexus RX 2017 hybrid (alpha!)
|
||||
- By default it uses stock Lexus ACC for longitudinal control
|
||||
- openpilot longitudinal control available after unplugging the [Driving Support ECU](https://community.comma.ai/wiki/index.php/Toyota#Lexus_RX_hybrid)
|
||||
Community Maintained Cars are not confirmed by comma.ai to meet our safety model. Be extra cautious using them.
|
||||
|
||||
In Progress Cars
|
||||
------
|
||||
@@ -68,41 +104,63 @@ In Progress Cars
|
||||
- 'Full Speed Range Dynamic Radar Cruise Control' is required to enable stop-and-go. Only the Prius, Camry and C-HR have this option.
|
||||
- Even though the Tundra, Sequoia and the Land Cruiser have TSS-P, they don't have Steering Assist and are not supported.
|
||||
- All LSS-P Lexus with Steering Assist or Lane Keep Assist.
|
||||
- 'All-Speed Range Dynamic Radar Cruise Control' is required to enable stop-and-go. Only the GS, GSH, GS, F, RX, RXH, LX, NX, NXH, LC, LCH, LS, LSH have this option.
|
||||
- 'All-Speed Range Dynamic Radar Cruise Control' is required to enable stop-and-go. Only the GS, GSH, F, RX, RXH, LX, NX, NXH, LC, LCH, LS, LSH have this option.
|
||||
- Even though the LX have TSS-P, it does not have Steering Assist and is not supported.
|
||||
|
||||
Community WIP Cars
|
||||
How can I add support for my car?
|
||||
------
|
||||
|
||||
- [Chevy Volt 2016-2018 Premier with Driver Confidence II](https://github.com/commaai/openpilot/pull/104)
|
||||
If your car has adaptive cruise control and lane keep assist, you are in luck. Using a [panda](https://comma.ai/shop/products/panda-obd-ii-dongle/) and [cabana](https://community.comma.ai/cabana/), you can understand how to make your car drive by wire.
|
||||
|
||||
- [Classic Tesla Model S (pre-AP)](https://github.com/commaai/openpilot/pull/145)
|
||||
We've written guides 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. These guides might help you after you have the basics figured out.
|
||||
|
||||
- BMW, Audi, Volvo, and Mercedes all use [FlexRay](https://en.wikipedia.org/wiki/FlexRay) and are unlikely to be supported any time soon.
|
||||
- We put time into a Ford port, but the steering has a 10 second cutout limitation that makes it unusable.
|
||||
- The 2016-2017 Honda Accord use a custom signaling protocol for steering that's unlikely to ever be upstreamed.
|
||||
|
||||
Directory structure
|
||||
------
|
||||
|
||||
- cereal -- The messaging spec used for all logs on the phone
|
||||
- common -- Library like functionality we've developed here
|
||||
- opendbc -- Files showing how to interpret data from cars
|
||||
- panda -- Code used to communicate on CAN and LIN
|
||||
- phonelibs -- Libraries used on the phone
|
||||
- selfdrive -- Code needed to drive the car
|
||||
- assets -- Fonts for ui
|
||||
- boardd -- Daemon to talk to the board
|
||||
- car -- Code that talks to the car and implements CarInterface
|
||||
- common -- Shared C/C++ code for the daemons
|
||||
- controls -- Python controls (PID loops etc) for the car
|
||||
- debug -- Tools to help you debug and do car ports
|
||||
- logcatd -- Android logcat as a service
|
||||
- loggerd -- Logger and uploader of car data
|
||||
- proclogd -- Logs information from proc
|
||||
- sensord -- IMU / GPS interface code
|
||||
- test/plant -- Car simulator running code through virtual maneuvers
|
||||
- ui -- The UI
|
||||
- visiond -- embedded vision pipeline
|
||||
.
|
||||
├── apk # The apk files used for the UI
|
||||
├── cereal # The messaging spec used for all logs on EON
|
||||
├── common # Library like functionality we've developed here
|
||||
├── installer/updater # Manages auto-updates of openpilot
|
||||
├── opendbc # Files showing how to interpret data from cars
|
||||
├── panda # Code used to communicate on CAN and LIN
|
||||
├── phonelibs # Libraries used on EON
|
||||
├── pyextra # Libraries used on EON
|
||||
└── selfdrive # Code needed to drive the car
|
||||
├── assets # Fonts and images for UI
|
||||
├── boardd # Daemon to talk to the board
|
||||
├── can # Helpers for parsing CAN messages
|
||||
├── car # Car specific code to read states and control actuators
|
||||
├── common # Shared C/C++ code for the daemons
|
||||
├── controls # Perception, planning and controls
|
||||
├── debug # Tools to help you debug and do car ports
|
||||
├── locationd # Soon to be home of precise location
|
||||
├── logcatd # Android logcat as a service
|
||||
├── loggerd # Logger and uploader of car data
|
||||
├── proclogd # Logs information from proc
|
||||
├── sensord # IMU / GPS interface code
|
||||
├── test # Car simulator running code through virtual maneuvers
|
||||
├── ui # The UI
|
||||
└── visiond # Embedded vision pipeline
|
||||
|
||||
To understand how the services interact, see `selfdrive/service_list.yaml`
|
||||
|
||||
User Data / chffr Account / Crash Reporting
|
||||
------
|
||||
|
||||
By default openpilot creates an account and includes a client for chffr, our dashcam app. We use your data to train better models and improve openpilot for everyone.
|
||||
|
||||
It's open source software, so you are free to disable it if you wish.
|
||||
|
||||
It logs the road facing camera, CAN, GPS, IMU, magnetometer, thermal sensors, crashes, and operating system logs.
|
||||
The user facing camera is only logged if you explicitly opt-in in settings.
|
||||
It does not log the microphone.
|
||||
|
||||
By using it, you agree to [our privacy policy](https://community.comma.ai/privacy.html). 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.ai. By accepting this agreement, you grant an irrevocable, perpetual, worldwide right to comma.ai for the use of this data.
|
||||
|
||||
Testing on PC
|
||||
------
|
||||
|
||||
@@ -113,42 +171,22 @@ There is rudimentary infrastructure to run a basic simulation and generate a rep
|
||||
./run_docker_tests.sh
|
||||
```
|
||||
|
||||
The results are written to `selfdrive/test/plant/out/index.html`
|
||||
The resulting plots are displayed in `selfdrive/test/tests/plant/out/longitudinal/index.html`
|
||||
|
||||
More extensive testing infrastructure and simulation environments are coming soon.
|
||||
|
||||
Adding Car Support
|
||||
------
|
||||
|
||||
comma.ai offers [bounties](http://comma.ai/bounties.html) for adding additional car support.
|
||||
|
||||
CR-V Touring support came in through this program. Chevy Volt is close. Accord is close as well.
|
||||
|
||||
User Data / chffr Account / Crash Reporting
|
||||
------
|
||||
|
||||
By default openpilot creates an account and includes a client for chffr, our dashcam app. We use your data to train better models and improve openpilot for everyone.
|
||||
|
||||
It's open source software, so you are free to disable it if you wish.
|
||||
|
||||
It logs the road facing camera, CAN, GPS, IMU, magnetometer, thermal sensors, crashes, and operating system logs.
|
||||
It does not log the user facing camera or the microphone.
|
||||
|
||||
By using it, you agree to [our privacy policy](https://beta.comma.ai/privacy.html). 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.ai. By accepting this agreement, you grant an irrevocable, perpetual, worldwide right to comma.ai for the use of this data.
|
||||
|
||||
Contributing
|
||||
------
|
||||
|
||||
We welcome both pull requests and issues on
|
||||
[github](http://github.com/commaai/openpilot). See the TODO file for a list of
|
||||
good places to start.
|
||||
[github](http://github.com/commaai/openpilot). Bug fixes and new car ports encouraged.
|
||||
|
||||
Want to get paid to work on openpilot? [comma.ai is hiring](http://comma.ai/positions.html)
|
||||
Want to get paid to work on openpilot? [comma.ai is hiring](https://comma.ai/jobs/)
|
||||
|
||||
Licensing
|
||||
------
|
||||
|
||||
openpilot is released under the MIT license.
|
||||
openpilot is released under the MIT license. Some parts of the software are released under other licenses as specified.
|
||||
|
||||
Any user of this software shall indemnify and hold harmless Comma.ai, Inc. and its directors, officers, employees, agents, stockholders, affiliates, subcontractors and customers from and against all allegations, claims, actions, suits, demands, damages, liabilities, obligations, losses, settlements, judgments, costs and expenses (including without limitation attorneys’ fees and costs) which arise out of, relate to or result from any use of this software by user.
|
||||
|
||||
|
||||
46
RELEASES.md
46
RELEASES.md
@@ -1,3 +1,49 @@
|
||||
Version 0.5.1 (2018-08-01)
|
||||
========================
|
||||
* Fix radar error on Civic sedan 2018
|
||||
* Improve thermal management logic
|
||||
* Alpha Toyota C-HR and Camry support!
|
||||
* Auto-switch Driver Monitoring to 3 min counter when inaccurate
|
||||
|
||||
Version 0.5 (2018-07-11)
|
||||
========================
|
||||
* Driver Monitoring (beta) option in settings!
|
||||
* Make visiond, loggerd and UI use less resources
|
||||
* 60 FPS UI
|
||||
* Better car parameters for most cars
|
||||
* New sidebar with stats
|
||||
* Remove Waze and Spotify to free up system resources
|
||||
* Remove rear view mirror option
|
||||
* Calibration 3x faster
|
||||
|
||||
Version 0.4.7.2 (2018-06-25)
|
||||
==========================
|
||||
* Fix loggerd lag issue
|
||||
* No longer prompt for updates
|
||||
* Mitigate right lane hugging for properly mounted EON (procedure on wiki)
|
||||
|
||||
Version 0.4.7.1 (2018-06-18)
|
||||
==========================
|
||||
* Fix Acura ILX steer faults
|
||||
* Fix bug in mock car
|
||||
|
||||
Version 0.4.7 (2018-06-15)
|
||||
==========================
|
||||
* New model!
|
||||
* GM Volt (and CT6 lateral) support!
|
||||
* Honda Bosch lateral support!
|
||||
* Improve actuator modeling to reduce lateral wobble
|
||||
* Minor refactor of car abstraction layer
|
||||
* Hack around orbd startup issue
|
||||
|
||||
Version 0.4.6 (2018-05-18)
|
||||
==========================
|
||||
* NEOSv6 required! Will autoupdate
|
||||
* Stability improvements
|
||||
* Fix all memory leaks
|
||||
* Update C++ compiler to clang6
|
||||
* Improve front camera exposure
|
||||
|
||||
Version 0.4.5 (2018-04-27)
|
||||
==========================
|
||||
* Release notes added to the update popup
|
||||
|
||||
80
SAFETY.md
80
SAFETY.md
@@ -6,7 +6,10 @@ Like other ACC and LKA systems, openpilot requires the driver to be alert and to
|
||||
pay attention at all times. We repeat, **driver alertness is necessary, but not
|
||||
sufficient, for openpilot to be used safely**.
|
||||
|
||||
Even with an attentive driver, we must make further efforts for the system to be
|
||||
In order to enforce driver alertness, openpilot includes a driver monitoring feature
|
||||
that alerts the driver when distracted.
|
||||
|
||||
However, even with an attentive driver, we must make further efforts for the system to be
|
||||
safe. We have designed openpilot with two other safety considerations.
|
||||
|
||||
1. The driver must always be capable to immediately retake manual control of the vehicle,
|
||||
@@ -20,7 +23,7 @@ Following are details of the car specific safety implementations:
|
||||
Honda/Acura
|
||||
------
|
||||
|
||||
- While the system is engaged, gas, brake and steer limits are subject to the same limits used by
|
||||
- While the system is engaged, gas, brake and steer commands are subject to the same limits used by
|
||||
the stock system.
|
||||
|
||||
- Without an interceptor, the gas is controlled by the Powertrain Control Module (PCM).
|
||||
@@ -28,16 +31,16 @@ Honda/Acura
|
||||
interceptor, the gas is clipped to 60%.
|
||||
|
||||
- The brake is controlled by the 0x1FA CAN message. This message allows full
|
||||
braking, although the board and the software clip it to 1/4th of the max.
|
||||
This is around .3g of braking.
|
||||
braking, although the panda firmware and openpilot clip it to 1/4th of the max.
|
||||
This is approximately 0.3g of braking.
|
||||
|
||||
- Steering is controlled by the 0xE4 CAN message. The Electronic Power Steering (EPS)
|
||||
controller in the car limits the torque to a very small amount, so regardless of the
|
||||
message, the controller cannot jerk the wheel.
|
||||
|
||||
- Brake and gas pedal pressed signals are contained in the 0x17C CAN message. A rising edge of
|
||||
either signal triggers a disengagement, which is enforced by the board and in software. The
|
||||
green led on the board signifies if the board is allowing control messages.
|
||||
either signals triggers a disengagement, which is enforced by the panda firmware and by openpilot. The
|
||||
white led on the panda signifies if the panda is allowing control messages.
|
||||
|
||||
- Honda CAN uses both a counter and a checksum to ensure integrity and prevent
|
||||
replay of the same message.
|
||||
@@ -45,29 +48,62 @@ Honda/Acura
|
||||
Toyota/Lexus
|
||||
------
|
||||
|
||||
- While the system is engaged, gas, brake and steer limits are subject to the same limits used by
|
||||
- While the system is engaged, gas, brake and steer commands are subject to the same limits used by
|
||||
the stock system.
|
||||
|
||||
- With the stock Driving Support Unit (DSU) enabled, the acceleration is controlled
|
||||
by the stock system and is subject to the stock adaptive cruise control limits. Without the
|
||||
stock DSU connected, the acceleration command is controlled by the 0x343 CAN message and its
|
||||
value is limited by the board and the software to between .3g of deceleration and .15g of
|
||||
acceleration. The acceleration command is ignored by the Engine Control Module (ECM) while the
|
||||
cruise control system is disengaged.
|
||||
- With the stock Driving Support Unit (DSU) connected (or in DSU-less models like Camry and C-HR),
|
||||
the acceleration is controlled by the stock system and is subject to the stock adaptive cruise
|
||||
control limits. Without the stock DSU connected, the acceleration command is controlled by the
|
||||
0x343 CAN message and its value is limited between .3g of deceleration and .15g of acceleration
|
||||
by the panda firmware and by openpilot. The acceleration command is ignored by the Engine Control
|
||||
Module (ECM) while the cruise control system is disengaged.
|
||||
|
||||
- Steering torque is controlled through the 0x2E4 CAN message and it's limited by the board and in
|
||||
software to a value of -1500 and 1500. In addition, the vehicle EPS unit will not respond to
|
||||
commands outside these limits. A steering torque rate limit is enforced by the board and in
|
||||
software so that the commanded steering torque must rise from 0 to max value no faster than
|
||||
1.5s. Commanded steering torque is limited by the board and in software to be no more than 350
|
||||
- Steering torque is controlled through the 0x2E4 CAN message and it's limited by the panda firmware and by
|
||||
openpilot to a value between -1500 and 1500. In addition, the vehicle EPS unit will not respond to
|
||||
commands outside these limits. A steering torque rate limit is enforced by the panda firmware and by
|
||||
openpilot, so that the commanded steering torque must rise from 0 to max value no faster than
|
||||
1.5s. Commanded steering torque is limited by the panda firmware and by openpilot to be no more than 350
|
||||
units above the actual EPS generated motor torque to ensure limited differences between
|
||||
commanded and actual torques.
|
||||
|
||||
- Brake and gas pedal pressed signals are contained in the 0x224 and 0x1D2 CAN messages,
|
||||
respectively. A rising edge of either signal triggers a disengagement, which is enforced by the
|
||||
board and in software. Additionally, the cruise control system disengages on the rising edge of
|
||||
respectively. A rising edge of either signals triggers a disengagement, which is enforced by the
|
||||
panda firmware and by openpilot. Additionally, the cruise control system disengages on the rising edge of
|
||||
the brake pedal pressed signal.
|
||||
|
||||
- The cruise control system state is contained in the 0x1D2 message. No control messages are
|
||||
allowed if the cruise control system is not active. This is enforced by the software and the
|
||||
board. The green led on the board signifies if the board is allowing control messages.
|
||||
allowed if the cruise control system is not active. This is enforced by openpilot and the
|
||||
panda firmware. The white led on the panda signifies if the panda is allowing control messages.
|
||||
|
||||
GM/Chevrolet
|
||||
------
|
||||
|
||||
- While the system is engaged, gas, brake and steer commands are subject to the same limits used by
|
||||
the stock system.
|
||||
|
||||
- The gas and regen are controlled by the 0x2CB message and it's limited by the panda firmware and by
|
||||
openpilot to a value between 1404 and 3072. the minimum value correspond to a mild decel due to regen,
|
||||
while 3072 correspond to approximately 0.18g of acceleration from stop.
|
||||
|
||||
- The friction brakes are controlled by the 0x315 message and its value is limited by the panda firmware
|
||||
and openpilot to 350. This is approximately 0.3g of braking.
|
||||
|
||||
- Steering torque is controlled through the 0x180 CAN message and it's limited by the panda firmware and by
|
||||
openpilot to a value between -255 and 255. In addition, the vehicle EPS unit will not fault when
|
||||
commands outside these limits. A steering torque rate limit is enforced by the panda firmware and by
|
||||
openpilot, so that the commanded steering torque must rise from 0 to max value no faster than
|
||||
0.75s. Commanded steering torque is gradually limited by the panda firmware and by openpilot if the driver's
|
||||
torque exceeds 12 units in the opposite dicrection to ensure limited applied torque against the
|
||||
driver's will.
|
||||
|
||||
- Brake pedal and gas pedal potentiometer signals are contained in the 0xF1 and 0x1A1 CAN messages,
|
||||
respectively. A rising edge of either signals triggers a disengagement, which is enforced by the
|
||||
panda firmware and by openpilot. Additionally, the cruise control system disengages on the rising edge of
|
||||
the brake pedal pressed signal. The regen paddle pressed signal is in the 0xBD message. When the
|
||||
regen paddle is pressed, a disengagement is enforced by both the firmware and by openpilot.
|
||||
|
||||
- GM CAN uses both a counter and a checksum to ensure integrity and prevent
|
||||
replay of the same message.
|
||||
|
||||
**Extra note"**: comma.ai strongly discourages the use of openpilot forks with safety code either missing or
|
||||
not fully meeting the above requirements.
|
||||
|
||||
Binary file not shown.
Binary file not shown.
2
apk/external/.gitignore
vendored
2
apk/external/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
src/*
|
||||
out/*
|
||||
BIN
apk/external/com.spotify.music.apkpatch
vendored
BIN
apk/external/com.spotify.music.apkpatch
vendored
Binary file not shown.
BIN
apk/external/com.waze.apkpatch
vendored
BIN
apk/external/com.waze.apkpatch
vendored
Binary file not shown.
122
apk/external/patcher.py
vendored
122
apk/external/patcher.py
vendored
@@ -1,122 +0,0 @@
|
||||
#!/usr/bin/env python2.7
|
||||
|
||||
import os
|
||||
import sys
|
||||
import glob
|
||||
import shutil
|
||||
import urllib2
|
||||
import hashlib
|
||||
import subprocess
|
||||
|
||||
|
||||
EXTERNAL_PATH = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
if os.path.exists("/init.qcom.rc"):
|
||||
# android
|
||||
APKPATCH = os.path.join(EXTERNAL_PATH, 'tools/apkpatch_android')
|
||||
SIGNAPK = os.path.join(EXTERNAL_PATH, 'tools/signapk_android')
|
||||
else:
|
||||
APKPATCH = os.path.join(EXTERNAL_PATH, 'tools/apkpatch')
|
||||
SIGNAPK = os.path.join(EXTERNAL_PATH, 'tools/signapk')
|
||||
|
||||
APKS = {
|
||||
'com.waze': {
|
||||
'src': 'https://apkcache.s3.amazonaws.com/com.waze_1021278.apk',
|
||||
'src_sha256': 'f00957e93e2389f9e30502ac54994b98ac769314b0963c263d4e8baa625ab0c2',
|
||||
'patch': 'com.waze.apkpatch',
|
||||
'out_sha256': 'fee880a91a44c738442cd05fd1b6d9b5817cbf755aa61c86325ada2bc443d5cf'
|
||||
},
|
||||
'com.spotify.music': {
|
||||
'src': 'https://apkcache.s3.amazonaws.com/com.spotify.music_24382006.apk',
|
||||
'src_sha256': '0610fea68ee7ba5f8e4e0732ad429d729dd6cbb8bc21222c4c99db6cb09fbff4',
|
||||
'patch': 'com.spotify.music.apkpatch',
|
||||
'out_sha256': '5a3d6f478c7e40403a98ccc8906d7e0ae12b06543b41f5df52149dd09c647c11'
|
||||
},
|
||||
}
|
||||
|
||||
def sha256_path(path):
|
||||
with open(path, 'rb') as f:
|
||||
return hashlib.sha256(f.read()).hexdigest()
|
||||
|
||||
def remove(path):
|
||||
try:
|
||||
os.remove(path)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
def process(download, patch):
|
||||
# clean up any junk apks
|
||||
for out_apk in glob.glob(os.path.join(EXTERNAL_PATH, 'out/*.apk')):
|
||||
app = os.path.basename(out_apk)[:-4]
|
||||
if app not in APKS:
|
||||
print "remove junk", out_apk
|
||||
remove(out_apk)
|
||||
|
||||
complete = True
|
||||
for k,v in APKS.iteritems():
|
||||
apk_path = os.path.join(EXTERNAL_PATH, 'out', k+'.apk')
|
||||
print "checking", apk_path
|
||||
if os.path.exists(apk_path) and sha256_path(apk_path) == v['out_sha256']:
|
||||
# nothing to do
|
||||
continue
|
||||
|
||||
complete = False
|
||||
|
||||
remove(apk_path)
|
||||
|
||||
src_path = os.path.join(EXTERNAL_PATH, 'src', v['src_sha256'])
|
||||
if not os.path.exists(src_path) or sha256_path(src_path) != v['src_sha256']:
|
||||
if not download:
|
||||
continue
|
||||
|
||||
print "downloading", v['src'], "to", src_path
|
||||
# download it
|
||||
resp = urllib2.urlopen(v['src'])
|
||||
data = resp.read()
|
||||
with open(src_path, 'wb') as src_f:
|
||||
src_f.write(data)
|
||||
|
||||
if sha256_path(src_path) != v['src_sha256']:
|
||||
print "download was corrupted..."
|
||||
continue
|
||||
|
||||
if not patch:
|
||||
continue
|
||||
|
||||
# ignoring lots of TOCTTOU here...
|
||||
|
||||
apk_temp = "/tmp/"+k+".patched"
|
||||
remove(apk_temp)
|
||||
apk_temp2 = "/tmp/"+k+".signed"
|
||||
remove(apk_temp2)
|
||||
|
||||
try:
|
||||
print "patching", v['patch']
|
||||
subprocess.check_call([APKPATCH, 'apply', src_path, apk_temp, os.path.join(EXTERNAL_PATH, v['patch'])])
|
||||
print "signing", apk_temp
|
||||
subprocess.check_call([SIGNAPK,
|
||||
os.path.join(EXTERNAL_PATH, 'tools/certificate.pem'), os.path.join(EXTERNAL_PATH, 'tools/key.pk8'),
|
||||
apk_temp, apk_temp2])
|
||||
|
||||
out_sha256 = sha256_path(apk_temp2) if os.path.exists(apk_temp2) else None
|
||||
|
||||
if out_sha256 == v['out_sha256']:
|
||||
print "done", apk_path
|
||||
shutil.move(apk_temp2, apk_path)
|
||||
else:
|
||||
print "patch was corrupted", apk_temp2, out_sha256
|
||||
finally:
|
||||
remove(apk_temp)
|
||||
remove(apk_temp2)
|
||||
|
||||
return complete
|
||||
|
||||
if __name__ == "__main__":
|
||||
ret = True
|
||||
if len(sys.argv) == 2 and sys.argv[1] == "download":
|
||||
ret = process(True, False)
|
||||
elif len(sys.argv) == 2 and sys.argv[1] == "patch":
|
||||
ret = process(False, True)
|
||||
else:
|
||||
ret = process(True, True)
|
||||
sys.exit(0 if ret else 1)
|
||||
BIN
apk/external/tools/ApkPatch.android.jar
vendored
BIN
apk/external/tools/ApkPatch.android.jar
vendored
Binary file not shown.
7
apk/external/tools/apkpatch_android
vendored
7
apk/external/tools/apkpatch_android
vendored
@@ -1,7 +0,0 @@
|
||||
#!/system/bin/sh
|
||||
|
||||
DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
|
||||
export LD_LIBRARY_PATH=/system/lib64
|
||||
export CLASSPATH="$DIR"/ApkPatch.android.jar
|
||||
exec app_process "$DIR" ApkPatch "$@"
|
||||
17
apk/external/tools/certificate.pem
vendored
17
apk/external/tools/certificate.pem
vendored
@@ -1,17 +0,0 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICtTCCAh4CCQDm79UqF+Dc5zANBgkqhkiG9w0BAQUFADCBnjELMAkGA1UEBhMC
|
||||
SUQxEzARBgNVBAgTCkphd2EgQmFyYXQxEDAOBgNVBAcTB0JhbmR1bmcxEjAQBgNV
|
||||
BAoTCUxvbmRhdGlnYTETMBEGA1UECxMKQW5kcm9pZERldjEaMBgGA1UEAxMRTG9y
|
||||
ZW5zaXVzIFcuIEwuIFQxIzAhBgkqhkiG9w0BCQEWFGxvcmVuekBsb25kYXRpZ2Eu
|
||||
bmV0MB4XDTEwMDUwNTA5MjEzOFoXDTEzMDEyODA5MjEzOFowgZ4xCzAJBgNVBAYT
|
||||
AklEMRMwEQYDVQQIEwpKYXdhIEJhcmF0MRAwDgYDVQQHEwdCYW5kdW5nMRIwEAYD
|
||||
VQQKEwlMb25kYXRpZ2ExEzARBgNVBAsTCkFuZHJvaWREZXYxGjAYBgNVBAMTEUxv
|
||||
cmVuc2l1cyBXLiBMLiBUMSMwIQYJKoZIhvcNAQkBFhRsb3JlbnpAbG9uZGF0aWdh
|
||||
Lm5ldDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAy2oWtbdVXMHGiS6cA3qi
|
||||
3VfZt5Vz9jTlux+TEcGx5h18ZKwclyo+z2B0L/p5bYdnrTdFEiD7IxvX+h3lu0JV
|
||||
B9rdXZdyrzXNOw5YFrsn2k7hKvB8KEBaga1gZEwodlc6N14H3FbZdZkIA9V716Pu
|
||||
e5CWBZ2VqU03lUJmKnpH8c8CAwEAATANBgkqhkiG9w0BAQUFAAOBgQBpNgXh8dw9
|
||||
uMjZxzLUXovV5ptHd61jAcZlQlffqPsz6/2QNfIShVdGH9jkm0IudfKkbvvOKive
|
||||
a77t9c4sDh2Sat2L/rx6BfTuS1+y9wFr1Ee8Rrr7wGHhRkx2qqGrXGVWqXn8aE3E
|
||||
P6e7BTPF0ibS+tG8cdDPEisqGFxw36nTNQ==
|
||||
-----END CERTIFICATE-----
|
||||
BIN
apk/external/tools/key.pk8
vendored
BIN
apk/external/tools/key.pk8
vendored
Binary file not shown.
BIN
apk/external/tools/signapk.android.jar
vendored
BIN
apk/external/tools/signapk.android.jar
vendored
Binary file not shown.
7
apk/external/tools/signapk_android
vendored
7
apk/external/tools/signapk_android
vendored
@@ -1,7 +0,0 @@
|
||||
#!/system/bin/sh
|
||||
|
||||
DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
|
||||
export LD_LIBRARY_PATH=/system/lib64
|
||||
export CLASSPATH="$DIR"/signapk.android.jar
|
||||
exec app_process "$DIR" com.android.signapk.SignApk "$@"
|
||||
@@ -57,6 +57,17 @@ struct CarEvent @0x9b1657f34caf3ad3 {
|
||||
plannerError @32;
|
||||
ipasOverride @33;
|
||||
debugAlert @34;
|
||||
steerTempUnavailableMute @35;
|
||||
resumeRequired @36;
|
||||
preDriverDistracted @37;
|
||||
promptDriverDistracted @38;
|
||||
driverDistracted @39;
|
||||
geofence @40;
|
||||
driverMonitorOn @41;
|
||||
driverMonitorOff @42;
|
||||
preDriverUnresponsive @43;
|
||||
promptDriverUnresponsive @44;
|
||||
driverUnresponsive @45;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,6 +179,7 @@ struct RadarState {
|
||||
enum Error {
|
||||
commIssue @0;
|
||||
fault @1;
|
||||
wrongConfig @2;
|
||||
}
|
||||
|
||||
# similar to LiveTracks
|
||||
@@ -263,9 +275,9 @@ struct CarParams {
|
||||
radarNameDEPRECATED @1 :Text;
|
||||
carFingerprint @2 :Text;
|
||||
|
||||
enableSteer @3 :Bool;
|
||||
enableGas @4 :Bool;
|
||||
enableBrake @5 :Bool;
|
||||
enableSteerDEPRECATED @3 :Bool;
|
||||
enableGasInterceptor @4 :Bool;
|
||||
enableBrakeDEPRECATED @5 :Bool;
|
||||
enableCruise @6 :Bool;
|
||||
enableCamera @26 :Bool;
|
||||
enableDsu @27 :Bool; # driving support unit
|
||||
@@ -294,6 +306,9 @@ struct CarParams {
|
||||
gm @4;
|
||||
hondaBosch @5;
|
||||
ford @6;
|
||||
cadillac @7;
|
||||
hyundai @8;
|
||||
chrysler @9;
|
||||
}
|
||||
|
||||
# things about the car in the manual
|
||||
@@ -330,4 +345,13 @@ struct CarParams {
|
||||
stoppingControl @34 :Bool; # Does the car allows full control even at lows speeds when stopping
|
||||
startAccel @35 :Float32; # Required acceleraton to overcome creep braking
|
||||
steerRateCost @40 :Float32; # Lateral MPC cost on steering rate
|
||||
steerControlType @46 :SteerControlType;
|
||||
radarOffCan @47 :Bool; # True when radar objects aren't visible on CAN
|
||||
|
||||
steerActuatorDelay @48 :Float32; # Steering wheel actuator delay in seconds
|
||||
|
||||
enum SteerControlType {
|
||||
torque @0;
|
||||
angle @1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@ struct Map(Key, Value) {
|
||||
|
||||
struct InitData {
|
||||
kernelArgs @0 :List(Text);
|
||||
kernelVersion @15 :Text;
|
||||
|
||||
gctx @1 :Text;
|
||||
dongleId @2 :Text;
|
||||
|
||||
@@ -32,6 +34,7 @@ struct InitData {
|
||||
|
||||
androidBuildInfo @5 :AndroidBuildInfo;
|
||||
androidSensors @6 :List(AndroidSensor);
|
||||
androidProperties @16 :Map(Text, Text);
|
||||
chffrAndroidExtra @7 :ChffrAndroidExtra;
|
||||
iosBuildInfo @14 :IosBuildInfo;
|
||||
|
||||
@@ -264,6 +267,15 @@ struct ThermalData {
|
||||
fanSpeed @10 :UInt16;
|
||||
started @11 :Bool;
|
||||
startedTs @13 :UInt64;
|
||||
|
||||
thermalStatus @14 :ThermalStatus;
|
||||
|
||||
enum ThermalStatus {
|
||||
green @0; # all processes run
|
||||
yellow @1; # critical processes run (kill uploader), engage still allowed
|
||||
red @2; # no engage, will disengage
|
||||
danger @3; # immediate process shutdown
|
||||
}
|
||||
}
|
||||
|
||||
struct HealthData {
|
||||
@@ -274,6 +286,7 @@ struct HealthData {
|
||||
controlsAllowed @3 :Bool;
|
||||
gasInterceptorDetected @4 :Bool;
|
||||
startedSignalDetected @5 :Bool;
|
||||
isGreyPanda @6 :Bool;
|
||||
}
|
||||
|
||||
struct LiveUI {
|
||||
@@ -384,11 +397,12 @@ struct Live100Data {
|
||||
alertText2 @25 :Text;
|
||||
alertStatus @38 :AlertStatus;
|
||||
alertSize @39 :AlertSize;
|
||||
alertBlinkingRate @42 :Float32;
|
||||
awarenessStatus @26 :Float32;
|
||||
|
||||
angleOffset @27 :Float32;
|
||||
|
||||
gpsPlannerActive @40 :Bool;
|
||||
engageable @41 :Bool; # can OP be engaged?
|
||||
driverMonitoringOn @43 :Bool;
|
||||
|
||||
enum ControlState {
|
||||
disabled @0;
|
||||
@@ -591,6 +605,7 @@ struct LiveLocationData {
|
||||
poseQuatECEF @19 :List(Float32);
|
||||
pitchCalibration @20 :Float32;
|
||||
yawCalibration @21 :Float32;
|
||||
imuFrame @22 :List(Float32);
|
||||
|
||||
struct Accuracy {
|
||||
pNEDError @0 :List(Float32);
|
||||
@@ -1519,6 +1534,18 @@ struct OrbKeyFrame {
|
||||
descriptors @3 :Data;
|
||||
}
|
||||
|
||||
struct DriverMonitoring {
|
||||
frameId @0 :UInt32;
|
||||
descriptor @1 :List(Float32);
|
||||
std @2 :Float32;
|
||||
}
|
||||
|
||||
struct Boot {
|
||||
wallTimeNanos @0 :UInt64;
|
||||
lastKmsg @1 :Data;
|
||||
lastPmsg @2 :Data;
|
||||
}
|
||||
|
||||
struct Event {
|
||||
# in nanoseconds?
|
||||
logMonoTime @0 :UInt64;
|
||||
@@ -1582,5 +1609,7 @@ struct Event {
|
||||
orbKeyFrame @56 :OrbKeyFrame;
|
||||
uiLayoutState @57 :UiLayoutState;
|
||||
orbFeaturesSummary @58 :OrbFeaturesSummary;
|
||||
driverMonitoring @59 :DriverMonitoring;
|
||||
boot @60 :Boot;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,100 +1,37 @@
|
||||
class HONDA:
|
||||
CIVIC = "HONDA CIVIC 2016 TOURING"
|
||||
ACURA_ILX = "ACURA ILX 2016 ACURAWATCH PLUS"
|
||||
CRV = "HONDA CR-V 2016 TOURING"
|
||||
ODYSSEY = "HONDA ODYSSEY 2018 EX-L"
|
||||
ACURA_RDX = "ACURA RDX 2018 ACURAWATCH PLUS"
|
||||
PILOT = "HONDA PILOT 2017 TOURING"
|
||||
RIDGELINE = "HONDA RIDGELINE 2017 BLACK EDITION"
|
||||
import os
|
||||
from common.basedir import BASEDIR
|
||||
|
||||
def get_fingerprint_list():
|
||||
# read all the folders in selfdrive/car and return a dict where:
|
||||
# - keys are all the car models for which we have a fingerprint
|
||||
# - values are lists dicts of messages that constitute the unique
|
||||
# CAN fingerprint of each car model and all its variants
|
||||
fingerprints = {}
|
||||
for car_folder in [x[0] for x in os.walk(BASEDIR + '/selfdrive/car')]:
|
||||
try:
|
||||
car_name = car_folder.split('/')[-1]
|
||||
values = __import__('selfdrive.car.%s.values' % car_name, fromlist=['FINGERPRINTS'])
|
||||
if hasattr(values, 'FINGERPRINTS'):
|
||||
car_fingerprints = values.FINGERPRINTS
|
||||
else:
|
||||
continue
|
||||
for f, v in car_fingerprints.items():
|
||||
fingerprints[f] = v
|
||||
except (ImportError, IOError):
|
||||
pass
|
||||
return fingerprints
|
||||
|
||||
|
||||
class TOYOTA:
|
||||
PRIUS = "TOYOTA PRIUS 2017"
|
||||
RAV4H = "TOYOTA RAV4 2017 HYBRID"
|
||||
RAV4 = "TOYOTA RAV4 2017"
|
||||
COROLLA = "TOYOTA COROLLA 2017"
|
||||
LEXUS_RXH = "LEXUS RX HYBRID 2017"
|
||||
|
||||
class GM:
|
||||
VOLT = "CHEVROLET VOLT PREMIER 2017"
|
||||
_FINGERPRINTS = get_fingerprint_list()
|
||||
|
||||
_DEBUG_ADDRESS = {1880: 8} # reserved for debug purposes
|
||||
|
||||
_FINGERPRINTS = {
|
||||
HONDA.ACURA_ILX: [{
|
||||
1024L: 5, 513L: 6, 1027L: 5, 1029L: 8, 929L: 4, 1057L: 5, 777L: 8, 1034L: 5, 1036L: 8, 398L: 3, 399L: 7, 145L: 8, 660L: 8, 985L: 3, 923L: 2, 542L: 7, 773L: 7, 800L: 8, 432L: 7, 419L: 8, 420L: 8, 1030L: 5, 422L: 8, 808L: 8, 428L: 8, 304L: 8, 819L: 7, 821L: 5, 57L: 3, 316L: 8, 545L: 4, 464L: 8, 1108L: 8, 597L: 8, 342L: 6, 983L: 8, 344L: 8, 804L: 8, 1039L: 8, 476L: 4, 892L: 8, 490L: 8, 1064L: 7, 882L: 2, 884L: 7, 887L: 8, 888L: 8, 380L: 8, 1365L: 5,
|
||||
# sent messages
|
||||
0xe4: 5, 0x1fa: 8, 0x200: 6, 0x30c: 8, 0x33d: 5,
|
||||
}],
|
||||
HONDA.ACURA_RDX: [{
|
||||
57L: 3, 145L: 8, 229L: 4, 308L: 5, 316L: 8, 342L: 6, 344L: 8, 380L: 8, 392L: 6, 398L: 3, 399L: 6, 404L: 4, 420L: 8, 422L: 8, 426L: 8, 432L: 7, 464L: 8, 474L: 5, 476L: 4, 487L: 4, 490L: 8, 506L: 8, 542L: 7, 545L: 4, 597L: 8, 660L: 8, 773L: 7, 777L: 8, 780L: 8, 800L: 8, 804L: 8, 808L: 8, 819L: 7, 821L: 5, 829L: 5, 882L: 2, 884L: 7, 887L: 8, 888L: 8, 892L: 8, 923L: 2, 929L: 4, 963L: 8, 965L: 8, 966L: 8, 967L: 8, 983L: 8, 985L: 3, 1024L: 5, 1027L: 5, 1029L: 8, 1033L: 5, 1034L: 5, 1036L: 8, 1039L: 8, 1057L: 5, 1064L: 7, 1108L: 8, 1365L: 5, 1424L: 5, 1729L: 1
|
||||
}],
|
||||
HONDA.CIVIC: [{
|
||||
1024L: 5, 513L: 6, 1027L: 5, 1029L: 8, 777L: 8, 1036L: 8, 1039L: 8, 1424L: 5, 401L: 8, 148L: 8, 662L: 4, 985L: 3, 795L: 8, 773L: 7, 800L: 8, 545L: 6, 420L: 8, 806L: 8, 808L: 8, 1322L: 5, 427L: 3, 428L: 8, 304L: 8, 432L: 7, 57L: 3, 450L: 8, 929L: 8, 330L: 8, 1302L: 8, 464L: 8, 1361L: 5, 1108L: 8, 597L: 8, 470L: 2, 344L: 8, 804L: 8, 399L: 7, 476L: 7, 1633L: 8, 487L: 4, 892L: 8, 490L: 8, 493L: 5, 884L: 8, 891L: 8, 380L: 8, 1365L: 5,
|
||||
# sent messages
|
||||
0xe4: 5, 0x1fa: 8, 0x200: 6, 0x30c: 8, 0x33d: 5, 0x35e: 8, 0x39f: 8,
|
||||
}],
|
||||
HONDA.CRV: [{
|
||||
57L: 3, 145L: 8, 316L: 8, 340L: 8, 342L: 6, 344L: 8, 380L: 8, 398L: 3, 399L: 6, 401L: 8, 420L: 8, 422L: 8, 426L: 8, 432L: 7, 464L: 8, 474L: 5, 476L: 4, 487L: 4, 490L: 8, 493L: 3, 507L: 1, 542L: 7, 545L: 4, 597L: 8, 660L: 8, 661L: 4, 773L: 7, 777L: 8, 800L: 8, 804L: 8, 808L: 8, 882L: 2, 884L: 7, 888L: 8, 891L: 8, 892L: 8, 923L: 2, 929L: 8, 983L: 8, 985L: 3, 1024L: 5, 1027L: 5, 1029L: 8, 1033L: 5, 1036L: 8, 1039L: 8, 1057L: 5, 1064L: 7, 1108L: 8, 1125L: 8, 1296L: 8, 1365L: 5, 1424L: 5, 1600L: 5, 1601L: 8,
|
||||
# sent messages
|
||||
0x194: 4, 0x1fa: 8, 0x30c: 8, 0x33d: 5,
|
||||
}],
|
||||
HONDA.ODYSSEY: [{
|
||||
57L: 3, 148L: 8, 228L: 5, 229L: 4, 316L: 8, 342L: 6, 344L: 8, 380L: 8, 399L: 7, 411L: 5, 419L: 8, 420L: 8, 427L: 3, 432L: 7, 450L: 8, 463L: 8, 464L: 8, 476L: 4, 490L: 8, 506L: 8, 542L: 7, 545L: 6, 597L: 8, 662L: 4, 773L: 7, 777L: 8, 780L: 8, 795L: 8, 800L: 8, 804L: 8, 806L: 8, 808L: 8, 817L: 4, 819L: 7, 821L: 5, 825L: 4, 829L: 5, 837L: 5, 856L: 7, 862L: 8, 871L: 8, 881L: 8, 882L: 4, 884L: 8, 891L: 8, 892L: 8, 905L: 8, 923L: 2, 927L: 8, 929L: 8, 963L: 8, 965L: 8, 966L: 8, 967L: 8, 983L: 8, 985L: 3, 1029L: 8, 1036L: 8, 1052L: 8, 1064L: 7, 1088L: 8, 1089L: 8, 1092L: 1, 1108L: 8, 1110L: 8, 1125L: 8, 1296L: 8, 1302L: 8, 1600L: 5, 1601L: 8, 1612L: 5, 1613L: 5, 1614L: 5, 1615L: 8, 1616L: 5, 1619L: 5, 1623L: 5, 1668L: 5
|
||||
},
|
||||
# Odyssey Elite
|
||||
{
|
||||
57L: 3, 148L: 8, 228L: 5, 229L: 4, 304L: 8, 342L: 6, 344L: 8, 380L: 8, 399L: 7, 411L: 5, 419L: 8, 420L: 8, 427L: 3, 432L: 7, 440L: 8, 450L: 8, 463L: 8, 464L: 8, 476L: 4, 490L: 8, 506L: 8, 507L: 1, 542L: 7, 545L: 6, 597L: 8, 662L: 4, 773L: 7, 777L: 8, 780L: 8, 795L: 8, 800L: 8, 804L: 8, 806L: 8, 808L: 8, 817L: 4, 819L: 7, 821L: 5, 825L: 4, 829L: 5, 837L: 5, 856L: 7, 862L: 8, 871L: 8, 881L: 8, 882L: 4, 884L: 8, 891L: 8, 892L: 8, 905L: 8, 923L: 2, 927L: 8, 929L: 8, 963L: 8, 965L: 8, 966L: 8, 967L: 8, 983L: 8, 985L: 3, 1029L: 8, 1036L: 8, 1052L: 8, 1064L: 7, 1088L: 8, 1089L: 8, 1092L: 1, 1108L: 8, 1110L: 8, 1125L: 8, 1296L: 8, 1302L: 8, 1600L: 5, 1601L: 8, 1612L: 5, 1613L: 5, 1614L: 5, 1616L: 5, 1619L: 5, 1623L: 5, 1668L: 5
|
||||
}],
|
||||
HONDA.PILOT: [{
|
||||
1600L: 5, 1027L: 5, 1668L: 5, 1029L: 8, 1601L: 8, 777L: 8, 891L: 8, 1036L: 8, 399L: 7, 1424L: 5, 145L: 8, 660L: 8, 985L: 3, 1616L: 5, 538L: 3, 795L: 8, 542L: 7, 773L: 7, 800L: 8, 545L: 5, 546L: 3, 419L: 8, 420L: 8, 422L: 8, 1064L: 7, 425L: 8, 426L: 8, 427L: 3, 432L: 7, 819L: 7, 308L: 5, 821L: 5, 57L: 3, 965L: 8, 316L: 8, 829L: 5, 1088L: 8, 1089L: 8, 963L: 8, 837L: 5, 966L: 8, 929L: 8, 780L: 8, 923L: 2, 1613L: 5, 334L: 8, 463L: 8, 464L: 8, 1618L: 5, 1108L: 8, 597L: 8, 342L: 6, 983L: 8, 856L: 7, 804L: 8, 1612L: 5, 476L: 4, 1125L: 8, 344L: 8, 1296L: 8, 379L: 8, 228L: 5, 229L: 4, 871L: 8, 892L: 8, 490L: 8, 808L: 8, 882L: 2, 884L: 7, 967L: 8, 506L: 8, 507L: 1, 380L: 8,
|
||||
}],
|
||||
HONDA.RIDGELINE: [{
|
||||
57L: 3, 145L: 8, 228L: 5, 229L: 4, 308L: 5, 316L: 8, 339L: 7, 342L: 6, 344L: 8, 380L: 8, 392L: 6, 399L: 7, 419L: 8, 420L: 8, 422L: 8, 425L: 8, 426L: 8, 427L: 3, 432L: 7, 464L: 8, 471L: 3, 476L: 4, 490L: 8, 506L: 8, 545L: 5, 546L: 3, 597L: 8, 660L: 8, 773L: 7, 777L: 8, 780L: 8, 795L: 8, 800L: 8, 804L: 8, 808L: 8, 819L: 7, 821L: 5, 829L: 5, 871L: 8, 882L: 2, 884L: 7, 892L: 8, 923L: 2, 927L: 8, 929L: 8, 963L: 8, 965L: 8, 966L: 8, 967L: 8, 983L: 8, 985L: 3, 1027L: 5, 1029L: 8, 1036L: 8, 1039L: 8, 1064L: 7, 1088L: 8, 1089L: 8, 1108L: 8, 1125L: 8, 1296L: 8, 1365L: 5, 1424L: 5, 1600L: 5, 1601L: 8, 1613L: 5, 1616L: 5, 1618L: 5, 1668L: 5, 2015L: 3
|
||||
}],
|
||||
TOYOTA.RAV4: [{
|
||||
36L: 8, 37L: 8, 170L: 8, 180L: 8, 186L: 4, 426L: 6, 452L: 8, 464L: 8, 466L: 8, 467L: 8, 547L: 8, 548L: 8, 552L: 4, 562L: 4, 608L: 8, 610L: 5, 643L: 7, 705L: 8, 725L: 2, 740L: 5, 800L: 8, 835L: 8, 836L: 8, 849L: 4, 869L: 7, 870L: 7, 871L: 2, 896L: 8, 897L: 8, 900L: 6, 902L: 6, 905L: 8, 911L: 8, 916L: 3, 918L: 7, 921L: 8, 933L: 8, 944L: 8, 945L: 8, 951L: 8, 955L: 4, 956L: 8, 979L: 2, 998L: 5, 999L: 7, 1000L: 8, 1001L: 8, 1005L: 2, 1008L: 2, 1014L: 8, 1017L: 8, 1041L: 8, 1042L: 8, 1043L: 8, 1044L: 8, 1056L: 8, 1059L: 1, 1114L: 8, 1161L: 8, 1162L: 8, 1163L: 8, 1176L: 8, 1177L: 8, 1178L: 8, 1179L: 8, 1180L: 8, 1181L: 8, 1190L: 8, 1191L: 8, 1192L: 8, 1196L: 8, 1227L: 8, 1228L: 8, 1235L: 8, 1237L: 8, 1263L: 8, 1264L: 8, 1279L: 8, 1408L: 8, 1409L: 8, 1410L: 8, 1552L: 8, 1553L: 8, 1554L: 8, 1555L: 8, 1556L: 8, 1557L: 8, 1561L: 8, 1562L: 8, 1568L: 8, 1569L: 8, 1570L: 8, 1571L: 8, 1572L: 8, 1584L: 8, 1589L: 8, 1592L: 8, 1593L: 8, 1595L: 8, 1596L: 8, 1597L: 8, 1600L: 8, 1656L: 8, 1664L: 8, 1728L: 8, 1745L: 8, 1779L: 8, 1904L: 8, 1912L: 8, 1990L: 8, 1998L: 8
|
||||
}],
|
||||
TOYOTA.RAV4H: [{
|
||||
36L: 8, 37L: 8, 170L: 8, 180L: 8, 186L: 4, 296L: 8, 426L: 6, 452L: 8, 464L: 8, 466L: 8, 467L: 8, 547L: 8, 548L: 8, 550L: 8, 552L: 4, 560L: 7, 562L: 4, 581L: 5, 608L: 8, 610L: 5, 643L: 7, 705L: 8, 713L: 8, 725L: 2, 740L: 5, 800L: 8, 835L: 8, 836L: 8, 849L: 4, 869L: 7, 870L: 7, 871L: 2, 896L: 8, 897L: 8, 900L: 6, 902L: 6, 905L: 8, 911L: 8, 916L: 3, 918L: 7, 921L: 8, 933L: 8, 944L: 8, 945L: 8, 950L: 8, 951L: 8, 953L: 3, 955L: 8, 956L: 8, 979L: 2, 998L: 5, 999L: 7, 1000L: 8, 1001L: 8, 1005L: 2, 1008L: 2, 1014L: 8, 1017L: 8, 1041L: 8, 1042L: 8, 1043L: 8, 1044L: 8, 1056L: 8, 1059L: 1, 1114L: 8, 1161L: 8, 1162L: 8, 1163L: 8, 1176L: 8, 1177L: 8, 1178L: 8, 1179L: 8, 1180L: 8, 1181L: 8, 1184L: 8, 1185L: 8, 1186L: 8, 1190L: 8, 1191L: 8, 1192L: 8, 1196L: 8, 1197L: 8, 1198L: 8, 1199L: 8, 1212L: 8, 1227L: 8, 1228L: 8, 1232L: 8, 1235L: 8, 1237L: 8, 1263L: 8, 1264L: 8, 1279L: 8, 1408L: 8, 1409L: 8, 1410L: 8, 1552L: 8, 1553L: 8, 1554L: 8, 1555L: 8, 1556L: 8, 1557L: 8, 1561L: 8, 1562L: 8, 1568L: 8, 1569L: 8, 1570L: 8, 1571L: 8, 1572L: 8, 1584L: 8, 1589L: 8, 1592L: 8, 1593L: 8, 1595L: 8, 1596L: 8, 1597L: 8, 1600L: 8, 1656L: 8, 1664L: 8, 1728L: 8, 1745L: 8, 1779L: 8, 1904L: 8, 1912L: 8, 1990L: 8, 1998L: 8
|
||||
}],
|
||||
TOYOTA.PRIUS: [{
|
||||
36L: 8, 37L: 8, 166L: 8, 170L: 8, 180L: 8, 295L: 8, 296L: 8, 426L: 6, 452L: 8, 466L: 8, 467L: 8, 550L: 8, 552L: 4, 560L: 7, 562L: 6, 581L: 5, 608L: 8, 610L: 8, 614L: 8, 643L: 7, 658L: 8, 713L: 8, 740L: 5, 742L: 8, 743L: 8, 800L: 8, 810L: 2, 814L: 8, 829L: 2, 830L: 7, 835L: 8, 836L: 8, 863L: 8, 869L: 7, 870L: 7, 871L: 2, 898L: 8, 900L: 6, 902L: 6, 905L: 8, 918L: 8, 921L: 8, 933L: 8, 944L: 8, 945L: 8, 950L: 8, 951L: 8, 953L: 8, 955L: 8, 956L: 8, 971L: 7, 975L: 5, 993L: 8, 998L: 5, 999L: 7, 1000L: 8, 1001L: 8, 1014L: 8, 1017L: 8, 1020L: 8, 1041L: 8, 1042L: 8, 1044L: 8, 1056L: 8, 1057L: 8, 1059L: 1, 1071L: 8, 1077L: 8, 1082L: 8, 1083L: 8, 1084L: 8, 1085L: 8, 1086L: 8, 1114L: 8, 1132L: 8, 1161L: 8, 1162L: 8, 1163L: 8, 1175L: 8, 1227L: 8, 1228L: 8, 1235L: 8, 1237L: 8, 1279L: 8, 1552L: 8, 1553L: 8, 1556L: 8, 1557L: 8, 1568L: 8, 1570L: 8, 1571L: 8, 1572L: 8, 1595L: 8, 1777L: 8, 1779L: 8, 1904L: 8, 1912L: 8, 1990L: 8, 1998L: 8
|
||||
},
|
||||
# Prius Prime
|
||||
{
|
||||
36L: 8, 37L: 8, 166L: 8, 170L: 8, 180L: 8, 295L: 8, 296L: 8, 426L: 6, 452L: 8, 466L: 8, 467L: 8, 550L: 8, 552L: 4, 560L: 7, 562L: 6, 581L: 5, 608L: 8, 610L: 8, 614L: 8, 643L: 7, 658L: 8, 713L: 8, 740L: 5, 742L: 8, 743L: 8, 800L: 8, 810L: 2, 814L: 8, 824L: 2, 829L: 2, 830L: 7, 835L: 8, 836L: 8, 863L: 8, 869L: 7, 870L: 7, 871L: 2,898L: 8, 900L: 6, 902L: 6, 905L: 8, 913L: 8, 918L: 8, 921L: 8, 933L: 8, 944L: 8, 945L: 8, 950L: 8, 951L: 8, 953L: 8, 955L: 8, 956L: 8, 971L: 7, 974L: 8, 975L: 5, 993L: 8, 998L: 5, 999L: 7, 1000L: 8, 1001L: 8, 1014L: 8, 1017L: 8, 1020L: 8, 1041L: 8, 1042L: 8, 1044L: 8, 1056L: 8, 1057L: 8, 1059L: 1, 1071L: 8, 1076L: 8, 1077L: 8, 1082L: 8, 1083L: 8, 1084L: 8, 1085L: 8, 1086L: 8, 1114L: 8, 1132L: 8, 1161L: 8, 1162L: 8, 1163L: 8, 1164L: 8, 1165L: 8, 1166L: 8, 1167L: 8, 1175L: 8, 1227L: 8, 1228L: 8, 1235L: 8, 1237L: 8, 1279L: 8, 1552L: 8, 1553L: 8, 1556L: 8, 1557L: 8, 1568L: 8, 1570L: 8, 1571L: 8, 1572L: 8, 1595L: 8, 1777L: 8, 1779L: 8, 1904L: 8, 1912L: 8, 1990L: 8, 1998L: 8
|
||||
},
|
||||
# Taiwanese Prius Prime
|
||||
{
|
||||
36L: 8, 37L: 8, 166L: 8, 170L: 8, 180L: 8, 295L: 8, 296L: 8, 426L: 6, 452L: 8, 466L: 8, 467L: 8, 550L: 8, 552L: 4, 560L: 7, 562L: 6, 581L: 5, 608L: 8, 610L: 8, 614L: 8, 643L: 7, 658L: 8, 713L: 8, 740L: 5, 742L: 8, 743L: 8, 800L: 8, 810L: 2, 814L: 8, 824L: 2, 829L: 2, 830L: 7, 835L: 8, 836L: 8, 845L: 5, 863L: 8, 869L: 7, 870L: 7, 871L: 2,898L: 8, 900L: 6, 902L: 6, 905L: 8, 913L: 8, 918L: 8, 921L: 8, 933L: 8, 944L: 8, 945L: 8, 950L: 8, 951L: 8, 953L: 8, 955L: 8, 956L: 8, 971L: 7, 974L: 8, 975L: 5, 993L: 8, 998L: 5, 999L: 7, 1000L: 8, 1001L: 8, 1005L: 2, 1014L: 8, 1017L: 8, 1020L: 8, 1041L: 8, 1042L: 8, 1044L: 8, 1056L: 8, 1057L: 8, 1059L: 1, 1071L: 8, 1076L: 8, 1077L: 8, 1082L: 8, 1083L: 8, 1084L: 8, 1085L: 8, 1086L: 8, 1114L: 8, 1132L: 8, 1161L: 8, 1162L: 8, 1163L: 8, 1164L: 8, 1165L: 8, 1166L: 8, 1167L: 8, 1175L: 8, 1227L: 8, 1228L: 8, 1235L: 8, 1237L: 8, 1264L: 8, 1279L: 8, 1552L: 8, 1553L: 8, 1556L: 8, 1557L: 8, 1568L: 8, 1570L: 8, 1571L: 8, 1572L: 8, 1595L: 8, 1777L: 8, 1779L: 8, 1904L: 8, 1912L: 8, 1990L: 8, 1998L: 8
|
||||
}],
|
||||
TOYOTA.COROLLA: [{
|
||||
36: 8, 37: 8, 170: 8, 180: 8, 186: 4, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 547: 8, 548: 8, 552: 4, 608: 8, 610: 5, 643: 7, 705: 8, 740: 5, 800: 8, 835: 8, 836: 8, 849: 4, 869: 7, 870: 7, 871: 2, 896: 8, 897: 8, 900: 6, 902: 6, 905: 8, 911: 8, 916: 2, 921: 8, 933: 8, 944: 8, 945: 8, 951: 8, 955: 4, 956: 8, 979: 2, 992: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1017: 8, 1041: 8, 1042: 8, 1043: 8, 1044: 8, 1056: 8, 1059: 1, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1196: 8, 1227: 8, 1235: 8, 1279: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1561: 8, 1562: 8, 1568: 8, 1569: 8, 1570: 8, 1571: 8, 1572: 8, 1584: 8, 1589: 8, 1592: 8, 1596: 8, 1597: 8, 1600: 8, 1664: 8, 1728: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
|
||||
},
|
||||
# Corolla LE 2017
|
||||
{
|
||||
36: 8, 37: 8, 170: 8, 180: 8, 186: 4, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 547: 8, 548: 8, 552: 4, 608: 8, 610: 5, 643: 7, 705: 8, 740: 5, 800: 8, 835: 8, 836: 8, 849: 4, 869: 7, 870: 7, 871: 2, 896: 8, 897: 8, 900: 6, 902: 6, 905: 8, 911: 8, 916: 2, 921: 8, 933: 8, 944: 8, 945: 8, 951: 8, 955: 4, 956: 8, 979: 2, 998: 5, 999: 7, 1000: 8, 1001: 8, 1017: 8, 1041: 8, 1042: 8, 1043: 8, 1044: 8, 1056: 8, 1059: 1, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1196: 8, 1227: 8, 1235: 8, 1279: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1561: 8, 1562: 8, 1568: 8, 1569: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1596: 8, 1597: 8, 1600: 8, 1664: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8, 2016: 8, 2017: 8, 2018: 8, 2019: 8, 2020: 8, 2021: 8, 2022: 8, 2023: 8, 2024: 8
|
||||
}],
|
||||
TOYOTA.LEXUS_RXH: [{
|
||||
36: 8, 37: 8, 166: 8, 170: 8, 180: 8, 295: 8, 296: 8, 426: 6, 452: 8, 466: 8, 467: 8, 550: 8, 552: 4, 560: 7, 562: 6, 581: 5, 608: 8, 610: 5, 643: 7, 658: 8, 713: 8, 740: 5, 742: 8, 743: 8, 800: 8, 810: 2, 812: 3, 814: 8, 830: 7, 835: 8, 836: 8, 845: 5, 863: 8, 869: 7, 870: 7, 871: 2, 898: 8, 900: 6, 902: 6, 905: 8, 913: 8, 918: 8, 921: 8, 933: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 8, 955: 8, 956: 8, 971: 7, 975: 6, 993: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1005: 2, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1059: 1, 1063: 8, 1071: 8, 1077: 8, 1082: 8, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1227: 8, 1228: 8, 1235: 8, 1237: 8, 1264: 8, 1279: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1575: 8, 1595: 8, 1777: 8, 1779: 8, 1808: 8, 1810: 8, 1816: 8, 1818: 8, 1840: 8, 1848: 8, 1904: 8, 1912: 8, 1940: 8, 1941: 8, 1948: 8, 1949: 8, 1952: 8, 1956: 8, 1960: 8, 1964: 8, 1986: 8, 1990: 8, 1994: 8, 1998: 8, 2004: 8, 2012: 8
|
||||
}],
|
||||
GM.VOLT: [{
|
||||
170: 8, 171: 8, 189: 7, 190: 6, 193: 8, 197: 8, 199: 4, 201: 8, 209: 7, 211: 2, 241: 6, 288: 5, 289: 8, 298: 8, 304: 1, 308: 4, 309: 8, 311: 8, 313: 8, 320: 3, 328: 1, 352: 5, 381: 6, 386: 8, 388: 8, 389: 2, 390: 7, 417: 7, 419: 1, 426: 7, 451: 8, 452: 8, 453: 6, 454: 8, 456: 8, 479: 3, 481: 7, 485: 8, 489: 8, 493: 8, 495: 4, 497: 8, 499: 3, 500: 6, 501: 8, 508: 8, 528: 4, 532: 6, 546: 7, 550: 8, 554: 3, 558: 8, 560: 8, 562: 8, 563: 5, 564: 5, 565: 5, 566: 5, 567: 3, 568: 1, 573: 1, 577: 8, 647: 3, 707: 8, 711: 6, 761: 7, 810: 8, 840: 5, 842: 5, 844: 8, 866: 4, 961: 8, 969: 8, 977: 8, 979: 7, 988: 6, 989: 8, 995: 7, 1001: 8, 1005: 6, 1009: 8, 1017: 8, 1019: 2, 1020: 8, 1105: 6, 1187: 4, 1217: 8, 1221: 5, 1223: 3, 1225: 7, 1227: 4, 1233: 8, 1249: 8, 1257: 6, 1265: 8, 1267: 1, 1273: 3, 1275: 3, 1280: 4, 1300: 8, 1322: 6, 1323: 4, 1328: 4, 1417: 8, 1601: 8, 1905: 7, 1906: 7, 1907: 7, 1910: 7, 1912: 7, 1922: 7, 1927: 7, 1928: 7, 2016: 8, 2020: 8, 2024: 8, 2028: 8
|
||||
}],
|
||||
}
|
||||
|
||||
# support additional internal only fingerprints
|
||||
try:
|
||||
from common.fingerprints_internal import add_additional_fingerprints
|
||||
add_additional_fingerprints(_FINGERPRINTS)
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
def is_valid_for_fingerprint(msg, car_fingerprint):
|
||||
adr = msg.address
|
||||
return msg.src != 0 or (adr in car_fingerprint and car_fingerprint[adr] == len(msg.dat))
|
||||
bus = msg.src
|
||||
# ignore addresses that are more than 11 bits
|
||||
return (adr in car_fingerprint and car_fingerprint[adr] == len(msg.dat)) or \
|
||||
bus != 0 or adr >= 0x800
|
||||
|
||||
|
||||
def eliminate_incompatible_cars(msg, candidate_cars):
|
||||
@@ -108,6 +45,7 @@ def eliminate_incompatible_cars(msg, candidate_cars):
|
||||
A list containing the subset of candidate_cars that could have sent msg.
|
||||
"""
|
||||
compatible_cars = []
|
||||
|
||||
for car_name in candidate_cars:
|
||||
car_fingerprints = _FINGERPRINTS[car_name]
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# pylint: skip-file
|
||||
from __future__ import print_function
|
||||
import abc
|
||||
import numpy as np
|
||||
# The EKF class contains the framework for an Extended Kalman Filter, but must be subclassed to use.
|
||||
@@ -92,8 +93,8 @@ class EKF:
|
||||
innovation = reading.data - reading.obs_model * self.state
|
||||
|
||||
if self.DEBUG:
|
||||
print "reading:\n",reading.data
|
||||
print "innovation:\n",innovation
|
||||
print("reading:\n",reading.data)
|
||||
print("innovation:\n",innovation)
|
||||
|
||||
# S = H*P*H' + R
|
||||
innovation_covar = reading.obs_model * self.covar * reading.obs_model.T + reading.covar
|
||||
@@ -103,12 +104,12 @@ class EKF:
|
||||
innovation_covar)
|
||||
|
||||
if self.DEBUG:
|
||||
print "gain:\n", kalman_gain
|
||||
print "innovation_covar:\n", innovation_covar
|
||||
print "innovation: ", innovation
|
||||
print "test: ", self.covar * reading.obs_model.T * (
|
||||
print("gain:\n", kalman_gain)
|
||||
print("innovation_covar:\n", innovation_covar)
|
||||
print("innovation: ", innovation)
|
||||
print("test: ", self.covar * reading.obs_model.T * (
|
||||
reading.obs_model * self.covar * reading.obs_model.T + reading.covar *
|
||||
0).I
|
||||
0).I)
|
||||
|
||||
# x = x + K*y
|
||||
self.state += kalman_gain*innovation
|
||||
@@ -124,9 +125,9 @@ class EKF:
|
||||
self.covar = aux_mtrx * self.covar * aux_mtrx.T + kalman_gain * reading.covar * kalman_gain.T
|
||||
|
||||
if self.DEBUG:
|
||||
print "After update"
|
||||
print "state\n", self.state
|
||||
print "covar:\n",self.covar
|
||||
print("After update")
|
||||
print("state\n", self.state)
|
||||
print("covar:\n",self.covar)
|
||||
|
||||
def update_scalar(self, reading):
|
||||
# like update but knowing that measurement is a scalar
|
||||
|
||||
@@ -18,7 +18,7 @@ def json_robust_dumps(obj):
|
||||
|
||||
class NiceOrderedDict(OrderedDict):
|
||||
def __str__(self):
|
||||
return '{'+', '.join("%r: %r" % p for p in self.iteritems())+'}'
|
||||
return json_robust_dumps(self)
|
||||
|
||||
class SwagFormatter(logging.Formatter):
|
||||
def __init__(self, swaglogger):
|
||||
@@ -62,6 +62,10 @@ class SwagFormatter(logging.Formatter):
|
||||
def format(self, record):
|
||||
return json_robust_dumps(self.format_dict(record))
|
||||
|
||||
class SwagErrorFilter(logging.Filter):
|
||||
def filter(self, record):
|
||||
return record.levelno < logging.ERROR
|
||||
|
||||
_tmpfunc = lambda: 0
|
||||
_srcfile = os.path.normcase(_tmpfunc.__code__.co_filename)
|
||||
|
||||
@@ -74,7 +78,7 @@ class SwagLogger(logging.Logger):
|
||||
self.log_local = local()
|
||||
self.log_local.ctx = {}
|
||||
|
||||
def findCaller(self):
|
||||
def findCaller(self, stack_info=None):
|
||||
"""
|
||||
Find the stack frame of the caller so that we can note the source
|
||||
file name, line number and function name.
|
||||
@@ -128,15 +132,43 @@ class SwagLogger(logging.Logger):
|
||||
if args:
|
||||
evt['args'] = args
|
||||
evt.update(kwargs)
|
||||
self.info(evt)
|
||||
ctx = self.get_ctx()
|
||||
if ctx:
|
||||
evt['ctx'] = self.get_ctx()
|
||||
if 'error' in kwargs:
|
||||
self.error(evt)
|
||||
else:
|
||||
self.info(evt)
|
||||
|
||||
if __name__ == "__main__":
|
||||
log = SwagLogger()
|
||||
|
||||
stdout_handler = logging.StreamHandler(sys.stdout)
|
||||
stdout_handler.setLevel(logging.INFO)
|
||||
stdout_handler.addFilter(SwagErrorFilter())
|
||||
log.addHandler(stdout_handler)
|
||||
|
||||
stderr_handler = logging.StreamHandler(sys.stderr)
|
||||
stderr_handler.setLevel(logging.ERROR)
|
||||
log.addHandler(stderr_handler)
|
||||
|
||||
log.info("asdasd %s", "a")
|
||||
log.info({'wut': 1})
|
||||
log.warning("warning")
|
||||
log.error("error")
|
||||
log.critical("critical")
|
||||
log.event("test", x="y")
|
||||
|
||||
with log.ctx():
|
||||
stdout_handler.setFormatter(SwagFormatter(log))
|
||||
stderr_handler.setFormatter(SwagFormatter(log))
|
||||
log.bind(user="some user")
|
||||
log.info("in req")
|
||||
log.event("do_req")
|
||||
print("")
|
||||
log.warning("warning")
|
||||
print("")
|
||||
log.error("error")
|
||||
print("")
|
||||
log.critical("critical")
|
||||
print("")
|
||||
log.event("do_req", a=1, b="c")
|
||||
|
||||
@@ -1,29 +1,18 @@
|
||||
def int_rnd(x):
|
||||
return int(round(x))
|
||||
|
||||
|
||||
def clip(x, lo, hi):
|
||||
return max(lo, min(hi, x))
|
||||
|
||||
|
||||
def interp(x, xp, fp):
|
||||
N = len(xp)
|
||||
if not hasattr(x, '__iter__'):
|
||||
def get_interp(xv):
|
||||
hi = 0
|
||||
while hi < N and x > xp[hi]:
|
||||
while hi < N and xv > xp[hi]:
|
||||
hi += 1
|
||||
low = hi - 1
|
||||
return fp[-1] if hi == N and x > xp[low] else (
|
||||
fp[0] if hi == 0 else
|
||||
(x - xp[low]) * (fp[hi] - fp[low]) / (xp[hi] - xp[low]) + fp[low])
|
||||
|
||||
result = []
|
||||
for v in x:
|
||||
hi = 0
|
||||
while hi < N and v > xp[hi]:
|
||||
hi += 1
|
||||
low = hi - 1
|
||||
result.append(fp[-1] if hi == N and v > xp[low] else (fp[
|
||||
0] if hi == 0 else (v - xp[low]) * (fp[hi] - fp[low]) / (xp[hi] - xp[low]
|
||||
) + fp[low]))
|
||||
return result
|
||||
return fp[-1] if hi == N and xv > xp[low] else (
|
||||
fp[0] if hi == 0 else
|
||||
(xv - xp[low]) * (fp[hi] - fp[low]) / (xp[hi] - xp[low]) + fp[low])
|
||||
return [get_interp(v) for v in x] if hasattr(
|
||||
x, '__iter__') else get_interp(x)
|
||||
|
||||
@@ -37,7 +37,7 @@ def mkdirs_exists_ok(path):
|
||||
raise
|
||||
|
||||
class TxType(Enum):
|
||||
PERSISTANT = 1
|
||||
PERSISTENT = 1
|
||||
CLEAR_ON_MANAGER_START = 2
|
||||
CLEAR_ON_CAR_START = 3
|
||||
|
||||
@@ -47,37 +47,38 @@ class UnknownKeyName(Exception):
|
||||
keys = {
|
||||
# written: manager
|
||||
# read: loggerd, uploaderd, offroad
|
||||
"DongleId": TxType.PERSISTANT,
|
||||
"AccessToken": TxType.PERSISTANT,
|
||||
"Version": TxType.PERSISTANT,
|
||||
"TrainingVersion": TxType.PERSISTANT,
|
||||
"GitCommit": TxType.PERSISTANT,
|
||||
"GitBranch": TxType.PERSISTANT,
|
||||
"GitRemote": TxType.PERSISTANT,
|
||||
"DongleId": TxType.PERSISTENT,
|
||||
"AccessToken": TxType.PERSISTENT,
|
||||
"Version": TxType.PERSISTENT,
|
||||
"TrainingVersion": TxType.PERSISTENT,
|
||||
"GitCommit": TxType.PERSISTENT,
|
||||
"GitBranch": TxType.PERSISTENT,
|
||||
"GitRemote": TxType.PERSISTENT,
|
||||
# written: baseui
|
||||
# read: ui, controls
|
||||
"IsMetric": TxType.PERSISTANT,
|
||||
"IsRearViewMirror": TxType.PERSISTANT,
|
||||
"IsFcwEnabled": TxType.PERSISTANT,
|
||||
"HasAcceptedTerms": TxType.PERSISTANT,
|
||||
"CompletedTrainingVersion": TxType.PERSISTANT,
|
||||
"IsUploadVideoOverCellularEnabled": TxType.PERSISTANT,
|
||||
"IsMetric": TxType.PERSISTENT,
|
||||
"IsFcwEnabled": TxType.PERSISTENT,
|
||||
"HasAcceptedTerms": TxType.PERSISTENT,
|
||||
"CompletedTrainingVersion": TxType.PERSISTENT,
|
||||
"IsUploadVideoOverCellularEnabled": TxType.PERSISTENT,
|
||||
"IsDriverMonitoringEnabled": TxType.PERSISTENT,
|
||||
"IsGeofenceEnabled": TxType.PERSISTENT,
|
||||
# written: visiond
|
||||
# read: visiond, controlsd
|
||||
"CalibrationParams": TxType.PERSISTANT,
|
||||
"CalibrationParams": TxType.PERSISTENT,
|
||||
# written: visiond
|
||||
# read: visiond, ui
|
||||
"CloudCalibration": TxType.PERSISTANT,
|
||||
"CloudCalibration": TxType.PERSISTENT,
|
||||
# written: controlsd
|
||||
# read: radard
|
||||
"CarParams": TxType.CLEAR_ON_CAR_START,
|
||||
|
||||
"Passive": TxType.PERSISTANT,
|
||||
"Passive": TxType.PERSISTENT,
|
||||
"DoUninstall": TxType.CLEAR_ON_MANAGER_START,
|
||||
"ShouldDoUpdate": TxType.CLEAR_ON_MANAGER_START,
|
||||
"IsUpdateAvailable": TxType.PERSISTANT,
|
||||
"IsUpdateAvailable": TxType.PERSISTENT,
|
||||
|
||||
"RecordFront": TxType.PERSISTANT,
|
||||
"RecordFront": TxType.PERSISTENT,
|
||||
}
|
||||
|
||||
def fsync_dir(path):
|
||||
@@ -315,7 +316,6 @@ class Params(object):
|
||||
|
||||
with self.env.begin(write=True) as txn:
|
||||
txn.put(key, dat)
|
||||
print "set", key
|
||||
|
||||
if __name__ == "__main__":
|
||||
params = Params()
|
||||
@@ -325,11 +325,11 @@ if __name__ == "__main__":
|
||||
for k in keys:
|
||||
pp = params.get(k)
|
||||
if pp is None:
|
||||
print k, "is None"
|
||||
print("%s is None" % k)
|
||||
elif all(ord(c) < 128 and ord(c) >= 32 for c in pp):
|
||||
print k, pp
|
||||
print("%s = %s" % (k, pp))
|
||||
else:
|
||||
print k, pp.encode("hex")
|
||||
print("%s = %s" % (k, pp.encode("hex")))
|
||||
|
||||
# Test multiprocess:
|
||||
# seq 0 100000 | xargs -P20 -I{} python common/params.py DongleId {} && sleep 0.05
|
||||
|
||||
@@ -36,11 +36,11 @@ class Profiler(object):
|
||||
if not self.enabled:
|
||||
return
|
||||
self.iter += 1
|
||||
print "******* Profiling *******"
|
||||
print("******* Profiling *******")
|
||||
for n, ms in sorted(self.cp.items(), key=lambda x: -x[1]):
|
||||
if n in self.cp_ignored:
|
||||
print "%30s: %7.2f percent: %3.0f" % (n, ms*1000.0, ms/self.tot*100), " IGNORED"
|
||||
print("%30s: %7.2f percent: %3.0f IGNORED" % (n, ms*1000.0, ms/self.tot*100))
|
||||
else:
|
||||
print "%30s: %7.2f percent: %3.0f" % (n, ms*1000.0, ms/self.tot*100)
|
||||
print "Iter clock: %2.6f TOTAL: %2.2f" % (self.tot/self.iter, self.tot)
|
||||
print("%30s: %7.2f percent: %3.0f" % (n, ms*1000.0, ms/self.tot*100))
|
||||
print("Iter clock: %2.6f TOTAL: %2.2f" % (self.tot/self.iter, self.tot))
|
||||
|
||||
|
||||
@@ -106,5 +106,3 @@ class Ratekeeper(object):
|
||||
self._remaining = remaining
|
||||
return lagged
|
||||
|
||||
if __name__ == "__main__":
|
||||
print sec_since_boot()
|
||||
|
||||
@@ -12,12 +12,14 @@ esq = 6.69437999014 * 0.001
|
||||
e1sq = 6.73949674228 * 0.001
|
||||
|
||||
|
||||
def geodetic2ecef(geodetic):
|
||||
def geodetic2ecef(geodetic, radians=False):
|
||||
geodetic = np.array(geodetic)
|
||||
input_shape = geodetic.shape
|
||||
geodetic = np.atleast_2d(geodetic)
|
||||
lat = (np.pi/180)*geodetic[:,0]
|
||||
lon = (np.pi/180)*geodetic[:,1]
|
||||
|
||||
ratio = 1.0 if radians else (np.pi / 180.0)
|
||||
lat = ratio*geodetic[:,0]
|
||||
lon = ratio*geodetic[:,1]
|
||||
alt = geodetic[:,2]
|
||||
|
||||
xi = np.sqrt(1 - esq * np.sin(lat)**2)
|
||||
@@ -28,41 +30,41 @@ def geodetic2ecef(geodetic):
|
||||
return ecef.reshape(input_shape)
|
||||
|
||||
|
||||
def ecef2geodetic(ecef):
|
||||
def ecef2geodetic(ecef, radians=False):
|
||||
"""
|
||||
Convert ECEF coordinates to geodetic using ferrari's method
|
||||
"""
|
||||
def ferrari(x, y, z):
|
||||
# ferrari's method
|
||||
r = np.sqrt(x * x + y * y)
|
||||
Esq = a * a - b * b
|
||||
F = 54 * b * b * z * z
|
||||
G = r * r + (1 - esq) * z * z - esq * Esq
|
||||
C = (esq * esq * F * r * r) / (pow(G, 3))
|
||||
S = np.cbrt(1 + C + np.sqrt(C * C + 2 * C))
|
||||
P = F / (3 * pow((S + 1 / S + 1), 2) * G * G)
|
||||
Q = np.sqrt(1 + 2 * esq * esq * P)
|
||||
r_0 = -(P * esq * r) / (1 + Q) + np.sqrt(0.5 * a * a*(1 + 1.0 / Q) - \
|
||||
P * (1 - esq) * z * z / (Q * (1 + Q)) - 0.5 * P * r * r)
|
||||
U = np.sqrt(pow((r - esq * r_0), 2) + z * z)
|
||||
V = np.sqrt(pow((r - esq * r_0), 2) + (1 - esq) * z * z)
|
||||
Z_0 = b * b * z / (a * V)
|
||||
h = U * (1 - b * b / (a * V))
|
||||
lat = (180/np.pi)*np.arctan((z + e1sq * Z_0) / r)
|
||||
lon = (180/np.pi)*np.arctan2(y, x)
|
||||
return lat, lon, h
|
||||
|
||||
geodetic = []
|
||||
ecef = np.array(ecef)
|
||||
# Save shape and export column
|
||||
ecef = np.atleast_1d(ecef)
|
||||
input_shape = ecef.shape
|
||||
ecef = np.atleast_2d(ecef)
|
||||
for p in ecef:
|
||||
geodetic.append(ferrari(*p))
|
||||
geodetic = np.array(geodetic)
|
||||
x, y, z = ecef[:, 0], ecef[:, 1], ecef[:, 2]
|
||||
|
||||
ratio = 1.0 if radians else (180.0 / np.pi)
|
||||
|
||||
# Conver from ECEF to geodetic using Ferrari's methods
|
||||
# https://en.wikipedia.org/wiki/Geographic_coordinate_conversion#Ferrari.27s_solution
|
||||
r = np.sqrt(x * x + y * y)
|
||||
Esq = a * a - b * b
|
||||
F = 54 * b * b * z * z
|
||||
G = r * r + (1 - esq) * z * z - esq * Esq
|
||||
C = (esq * esq * F * r * r) / (pow(G, 3))
|
||||
S = np.cbrt(1 + C + np.sqrt(C * C + 2 * C))
|
||||
P = F / (3 * pow((S + 1 / S + 1), 2) * G * G)
|
||||
Q = np.sqrt(1 + 2 * esq * esq * P)
|
||||
r_0 = -(P * esq * r) / (1 + Q) + np.sqrt(0.5 * a * a*(1 + 1.0 / Q) - \
|
||||
P * (1 - esq) * z * z / (Q * (1 + Q)) - 0.5 * P * r * r)
|
||||
U = np.sqrt(pow((r - esq * r_0), 2) + z * z)
|
||||
V = np.sqrt(pow((r - esq * r_0), 2) + (1 - esq) * z * z)
|
||||
Z_0 = b * b * z / (a * V)
|
||||
h = U * (1 - b * b / (a * V))
|
||||
lat = ratio*np.arctan((z + e1sq * Z_0) / r)
|
||||
lon = ratio*np.arctan2(y, x)
|
||||
|
||||
# stack the new columns and return to the original shape
|
||||
geodetic = np.column_stack((lat, lon, h))
|
||||
return geodetic.reshape(input_shape)
|
||||
|
||||
|
||||
|
||||
class LocalCoord(object):
|
||||
"""
|
||||
Allows conversions to local frames. In this case NED.
|
||||
|
||||
BIN
installer/updater/updater
Executable file
BIN
installer/updater/updater
Executable file
Binary file not shown.
@@ -5,14 +5,11 @@ if [ -z "$PASSIVE" ]; then
|
||||
fi
|
||||
|
||||
function launch {
|
||||
DO_UPDATE=$(cat /data/params/d/ShouldDoUpdate)
|
||||
# apply update
|
||||
if [ "$DO_UPDATE" == "1" ] && [ "$(git rev-parse HEAD)" != "$(git rev-parse @{u})" ]; then
|
||||
if [ "$(git rev-parse HEAD)" != "$(git rev-parse @{u})" ]; then
|
||||
git reset --hard @{u} &&
|
||||
git clean -xdf &&
|
||||
exec "${BASH_SOURCE[0]}"
|
||||
echo -n 0 > /data/params/d/ShouldDoUpdate
|
||||
echo -n 0 > /data/params/d/IsUpdateAvailable
|
||||
fi
|
||||
|
||||
# no cpu rationing for now
|
||||
@@ -22,18 +19,6 @@ function launch {
|
||||
echo 0-3 > /dev/cpuset/foreground/cpus
|
||||
echo 0-3 > /dev/cpuset/android/cpus
|
||||
|
||||
# check if NEOS update is required
|
||||
while [ "$(cat /VERSION)" -lt 4 ] && [ ! -e /data/media/0/noupdate ]; do
|
||||
# wait for network
|
||||
(cd selfdrive/ui/spinner && exec ./spinner 'waiting for network...') & spin_pid=$!
|
||||
until ping -W 1 -c 1 8.8.8.8; do sleep 1; done
|
||||
kill $spin_pid
|
||||
|
||||
# update NEOS
|
||||
curl -o /tmp/updater https://neos.comma.ai/updater && chmod +x /tmp/updater && /tmp/updater
|
||||
sleep 10
|
||||
done
|
||||
|
||||
export PYTHONPATH="$PWD"
|
||||
|
||||
# start manager
|
||||
|
||||
@@ -8,7 +8,7 @@ The project to democratize access to the decoder ring of your car.
|
||||
### DBC file basics
|
||||
|
||||
A DBC file encodes, in a humanly readable way, the information needed to understand a vehicle's CAN bus traffic. A vehicle might have multiple CAN buses and every CAN bus is represented by its own dbc file.
|
||||
Wondering what's the DBC file format? [Here](http://www.socialledge.com/sjsu/index.php?title=DBC_Format) a good overview.
|
||||
Wondering what's the DBC file format? [Here](http://www.socialledge.com/sjsu/index.php?title=DBC_Format) and [Here](https://github.com/stefanhoelzl/CANpy/blob/master/docs/DBC_Specification.md) a couple of good overviews.
|
||||
|
||||
### How to start reverse engineering cars
|
||||
|
||||
|
||||
@@ -99,13 +99,13 @@ BO_ 490 VEHICLE_DYNAMICS: 8 VSA
|
||||
BO_ 506 BRAKE_COMMAND: 8 ADAS
|
||||
SG_ COMPUTER_BRAKE : 7|10@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ ZEROS_BOH : 13|5@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ COMPUTER_BRAKE_REQUEST : 8|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ BRAKE_PUMP_REQUEST : 8|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_BOH2 : 23|3@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_OVERRIDE : 20|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_BOH3 : 19|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_FAULT_CMD : 18|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_CANCEL_CMD : 17|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ COMPUTER_BRAKE_REQUEST_2 : 16|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ COMPUTER_BRAKE_REQUEST : 16|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ SET_ME_0X80 : 31|8@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ BRAKE_LIGHTS : 39|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_STATES : 38|7@0+ (1,0) [0|1] "" EBCM
|
||||
|
||||
@@ -182,4 +182,4 @@ BO_TX_BU_ 769 : NEO,ADAS;
|
||||
|
||||
|
||||
CM_ SG_ 1024 RADAR_STATE "need to find out more diagnostic values";
|
||||
VAL_ 1024 RADAR_STATE 121 "ok" 110 "faulted";
|
||||
VAL_ 1024 RADAR_STATE 121 "ok" 110 "faulted" 105 "wrong_config";
|
||||
|
||||
@@ -1,6 +1,24 @@
|
||||
CM_ "AUTOGENERATED FILE, DO NOT EDIT"
|
||||
|
||||
|
||||
CM_ "Imported file _comma.dbc starts here"
|
||||
BO_ 512 GAS_COMMAND: 6 EON
|
||||
SG_ GAS_COMMAND : 7|16@0+ (0.253984064,-83.3) [0|1] "" INTERCEPTOR
|
||||
SG_ GAS_COMMAND2 : 23|16@0+ (0.126992032,-83.3) [0|1] "" INTERCEPTOR
|
||||
SG_ ENABLE : 39|1@0+ (1,0) [0|1] "" INTERCEPTOR
|
||||
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" INTERCEPTOR
|
||||
SG_ CHECKSUM : 43|4@0+ (1,0) [0|3] "" INTERCEPTOR
|
||||
|
||||
BO_ 513 GAS_SENSOR: 6 INTERCEPTOR
|
||||
SG_ INTERCEPTOR_GAS : 7|16@0+ (0.253984064,-83.3) [0|1] "" EON
|
||||
SG_ INTERCEPTOR_GAS2 : 23|16@0+ (0.126992032,-83.3) [0|1] "" EON
|
||||
SG_ STATE : 39|8@0+ (1,0) [0|255] "" EON
|
||||
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 43|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
VAL_ 513 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND" 1 "FAULT_BAD_CHECKSUM" 0 "NO_FAULT" ;
|
||||
|
||||
|
||||
CM_ "Imported file _honda_2017.dbc starts here"
|
||||
VERSION ""
|
||||
|
||||
@@ -81,13 +99,13 @@ BO_ 490 VEHICLE_DYNAMICS: 8 VSA
|
||||
BO_ 506 BRAKE_COMMAND: 8 ADAS
|
||||
SG_ COMPUTER_BRAKE : 7|10@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ ZEROS_BOH : 13|5@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ COMPUTER_BRAKE_REQUEST : 8|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ BRAKE_PUMP_REQUEST : 8|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_BOH2 : 23|3@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_OVERRIDE : 20|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_BOH3 : 19|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_FAULT_CMD : 18|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_CANCEL_CMD : 17|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ COMPUTER_BRAKE_REQUEST_2 : 16|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ COMPUTER_BRAKE_REQUEST : 16|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ SET_ME_0X80 : 31|8@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ BRAKE_LIGHTS : 39|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_STATES : 38|7@0+ (1,0) [0|1] "" EBCM
|
||||
@@ -211,6 +229,7 @@ VAL_ 829 BEEP 3 "single_beep" 2 "triple_beep" 1 "repeated_beep" 0 "no_beep" ;
|
||||
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
|
||||
|
||||
95
opendbc/cadillac_ct6_chassis.dbc
Normal file
95
opendbc/cadillac_ct6_chassis.dbc
Normal file
@@ -0,0 +1,95 @@
|
||||
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_: K182_PACM K43_PSCM K17_EBCM NEO K124_ASCM
|
||||
|
||||
|
||||
|
||||
BO_ 823 PACMParkAssitCmd: 7 NEO
|
||||
SG_ RollingCounter : 35|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ SteeringWheelChecksum : 47|16@0+ (1,0) [0|0] "" NEO
|
||||
SG_ SteeringWheelCmd : 23|16@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 560 EBCMRegen: 6 K17_EBCM
|
||||
SG_ Regen : 1|10@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 338 ASCMLKASteeringCmd: 6 NEO
|
||||
SG_ LKASteeringCmdActive : 7|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ LKASteeringCmd : 5|14@0- (1,0) [0|0] "" NEO
|
||||
SG_ RollingCounter : 23|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ SetMe1 : 21|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ LKASVehicleSpeed : 20|13@0+ (0.22,0) [0|0] "kph" NEO
|
||||
SG_ LKASMode : 36|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ LKASteeringCmdChecksum : 33|10@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 340 ASCMBLKASteeringCmd: 6 NEO
|
||||
SG_ LKASteeringCmdActive : 7|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ LKASteeringCmd : 5|14@0- (1,0) [0|0] "" NEO
|
||||
SG_ RollingCounter : 23|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ SetMe1 : 21|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ LKASVehicleSpeed : 20|13@0+ (0.22,0) [0|0] "kph" NEO
|
||||
SG_ LKASteeringCmdActive2 : 35|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ LKASteeringCmdChecksum : 33|10@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 368 EBCMFrictionBrakeStatus: 8 K17_EBCM
|
||||
SG_ FrictionBrakePressure : 23|16@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 789 EBCMFrictionBrakeCmd: 5 K17_EBCM
|
||||
SG_ RollingCounter : 37|6@0+ (1,0) [0|0] "" NEO
|
||||
SG_ FrictionBrakeMode : 7|4@0+ (1,0) [0|0] "" NEO
|
||||
SG_ FrictionBrakeChecksum : 23|16@0+ (1,0) [0|0] "" NEO
|
||||
SG_ FrictionBrakeCmd : 3|12@0- (1,0) [0|0] "" NEO
|
||||
|
||||
BO_TX_BU_ 823 : K43_PSCM,NEO;
|
||||
BO_TX_BU_ 789 : NEO,K17_EBCM;
|
||||
|
||||
|
||||
CM_ BU_ K182_PACM "Parking Assist Control Module";
|
||||
CM_ BU_ K43_PSCM "Power Steering Control Module";
|
||||
CM_ BU_ K17_EBCM "Electronic Brake Control Module";
|
||||
CM_ BU_ NEO "Comma NEO";
|
||||
CM_ BU_ K124_ASCM "Active Safety Control Module";
|
||||
BA_DEF_ "UseGMParameterIDs" INT 0 0;
|
||||
BA_DEF_ "ProtocolType" STRING ;
|
||||
BA_DEF_ "BusType" STRING ;
|
||||
BA_DEF_DEF_ "UseGMParameterIDs" 1;
|
||||
BA_DEF_DEF_ "ProtocolType" "GMLAN";
|
||||
BA_DEF_DEF_ "BusType" "";
|
||||
BA_ "UseGMParameterIDs" 0;
|
||||
BA_ "BusType" "CAN";
|
||||
BA_ "ProtocolType" "GMLAN";
|
||||
|
||||
VAL_ 338 LKASteeringCmdActive 1 "Active" 0 "Inactive" ;
|
||||
VAL_ 338 LKASMode 2 "supercruise" 1 "lkas" 0 "Inactive" ;
|
||||
3470
opendbc/cadillac_ct6_object.dbc
Normal file
3470
opendbc/cadillac_ct6_object.dbc
Normal file
File diff suppressed because it is too large
Load Diff
244
opendbc/cadillac_ct6_powertrain.dbc
Normal file
244
opendbc/cadillac_ct6_powertrain.dbc
Normal file
@@ -0,0 +1,244 @@
|
||||
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_: K16_BECM K73_TCIC K9_BCM K43_PSCM K17_EBCM K20_ECM K114B_HPCM NEO K124_ASCM
|
||||
VAL_TABLE_ TurnSignals 2 "Right Turn" 1 "Left Turn" 0 "None" ;
|
||||
VAL_TABLE_ ACCLeadCar 1 "Present" 0 "Not Present" ;
|
||||
VAL_TABLE_ ACCCmdActive 1 "Active" 0 "Inactive" ;
|
||||
VAL_TABLE_ BrakePedalPressed 1 "Pressed" 0 "Depressed" ;
|
||||
VAL_TABLE_ DistanceButton 1 "Active" 0 "Inactive" ;
|
||||
VAL_TABLE_ LKAButton 1 "Active" 0 "Inactive" ;
|
||||
VAL_TABLE_ ACCButtons 6 "Cancel" 5 "Main" 3 "Set" 2 "Resume" 1 "None" ;
|
||||
VAL_TABLE_ PRNDL 3 "Reverse" 2 "Drive" 1 "Neutral" 0 "Park" ;
|
||||
VAL_TABLE_ DoorStatus 1 "Opened" 0 "Closed" ;
|
||||
VAL_TABLE_ SeatBeltStatus 1 "Latched" 0 "Unlatched" ;
|
||||
VAL_TABLE_ LKASteeringCmdActive 1 "Active" 0 "Inactive" ;
|
||||
VAL_TABLE_ ACCGapLevel 3 "Far" 2 "Med" 1 "Near" 0 "Inactive" ;
|
||||
VAL_TABLE_ GasRegenCmdActiveInv 1 "Inactive" 0 "Active" ;
|
||||
VAL_TABLE_ GasRegenCmdActive 1 "Active" 0 "Inactive" ;
|
||||
VAL_TABLE_ LKATorqueDeliveredStatus 3 "Failed" 2 "Temp. Limited" 1 "Active" 0 "Inactive" ;
|
||||
VAL_TABLE_ HandsOffSWDetectionStatus 1 "Hands On" 0 "Hands Off" ;
|
||||
VAL_TABLE_ HandsOffSWDetectionMode 2 "Failed" 1 "Enabled" 0 "Disabled" ;
|
||||
|
||||
|
||||
BO_ 717 ASCM_2CD: 5 K124_ASCM
|
||||
|
||||
BO_ 869 ASCM_365: 4 K124_ASCM
|
||||
|
||||
BO_ 1034 ASCM_40A: 7 K124_ASCM
|
||||
|
||||
BO_ 1296 ASCM_510: 4 K124_ASCM
|
||||
|
||||
BO_ 1930 ASCM_78A: 7 K124_ASCM
|
||||
|
||||
BO_ 190 ECMAcceleratorPos: 6 K20_ECM
|
||||
SG_ BrakePedalPos : 15|8@0+ (1,0) [0|0] "sticky" NEO
|
||||
SG_ GasPedalAndAcc : 23|8@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 201 ECMEngineStatus: 8 K20_ECM
|
||||
SG_ EngineTPS : 39|8@0+ (0.392156863,0) [0|100.000000065] "%" NEO
|
||||
SG_ EngineRPM : 15|16@0+ (0.25,0) [0|0] "RPM" NEO
|
||||
|
||||
BO_ 209 EBCMBrakePedalTorque: 7 K17_EBCM
|
||||
SG_ BrakePedalTorque : 3|12@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 241 EBCMBrakePedalPosition: 6 K17_EBCM
|
||||
SG_ BrakePedalPosition : 15|8@0+ (1,0) [0|255] "" NEO
|
||||
|
||||
BO_ 298 BCMDoorBeltStatus: 8 K9_BCM
|
||||
SG_ RearLeftDoor : 8|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ FrontLeftDoor : 9|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ FrontRightDoor : 10|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ RearRightDoor : 23|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ LeftSeatBelt : 12|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ RightSeatBelt : 53|1@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 309 ECMPRDNL: 8 K20_ECM
|
||||
SG_ PRNDL : 2|3@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 320 BCMTurnSignals: 3 K9_BCM
|
||||
SG_ TurnSignals : 19|2@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 336 ASCMLKASStatus: 1 NEO
|
||||
SG_ Available : 7|1@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 338 ASCMLKASteeringCmd: 6 NEO
|
||||
SG_ LKASteeringCmdActive : 7|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ LKASteeringCmd : 5|14@0- (1,0) [0|0] "" NEO
|
||||
SG_ RollingCounter : 23|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ SetMe1 : 21|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ LKASVehicleSpeed : 20|13@0+ (0.22,0) [0|0] "kph" NEO
|
||||
SG_ LKASMode : 36|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ LKASteeringCmdChecksum : 33|10@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 340 ASCMBLKASteeringCmd: 6 NEO
|
||||
SG_ LKASteeringCmdActive : 7|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ LKASteeringCmd : 5|14@0- (1,0) [0|0] "" NEO
|
||||
SG_ RollingCounter : 23|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ SetMe1 : 21|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ LKASVehicleSpeed : 20|13@0+ (0.22,0) [0|0] "kph" NEO
|
||||
SG_ LKASMode : 36|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ LKASteeringCmdChecksum : 33|10@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 381 MSG_17D: 8 K20_ECM
|
||||
SG_ MSG17D_AccPower : 35|12@0- (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 356 PSCMStatus: 8 K43_PSCM
|
||||
SG_ LKATorqueDeliveredStatus : 7|3@0+ (1,0) [0|7] "" NEO
|
||||
SG_ LKADriverAppldTrq : 2|11@0- (0.01,0) [-10.24|10.23] "Nm" NEO
|
||||
SG_ LKATBDTorque : 21|14@0- (-0.005,0) [-10.24|10.23] "Nm" NEO
|
||||
SG_ RollingCounter : 39|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ LKATotalTorqueDelivered : 37|14@0- (0.01,0) [-10.24|10.23] "Nm" NEO
|
||||
|
||||
BO_ 417 AcceleratorPedal: 7 XXX
|
||||
SG_ AcceleratorPedal : 55|8@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 451 GasAndAcc: 8 XXX
|
||||
SG_ GasPedalAndAcc2 : 55|8@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 452 AcceleratorPedal2: 8 XXX
|
||||
SG_ AcceleratorPedal2 : 47|8@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 481 ASCMSteeringButton: 7 K124_ASCM
|
||||
SG_ DistanceButton : 22|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ LKAButton : 23|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ ACCButtons : 46|3@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 485 PSCMSteeringAngle: 8 K43_PSCM
|
||||
SG_ SteeringWheelAngle : 15|16@0- (0.0625,0) [-540|540] "deg" NEO
|
||||
SG_ SteeringWheelRate : 27|12@0- (0.5,0) [-100|100] "deg/s" NEO
|
||||
|
||||
BO_ 489 EBCMVehicleDynamic: 8 K17_EBCM
|
||||
SG_ YawRate : 51|12@0- (0.0625,0) [-2047|2047] "grad/s" NEO
|
||||
SG_ LateralAcceleration : 3|12@0- (0.0161,0) [-2047|2047] "m/s2" NEO
|
||||
SG_ BrakePedalPressed : 6|1@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 711 BECMBatteryVoltageCurrent: 6 K17_EBCM
|
||||
SG_ HVBatteryVoltage : 31|12@0+ (0.125,0) [0|511.875] "V" NEO
|
||||
SG_ HVBatteryCurrent : 12|13@0- (0.15,0) [-614.4|614.25] "A" NEO
|
||||
|
||||
BO_ 715 ASCMGasRegenCmd: 8 K124_ASCM
|
||||
SG_ GasRegenAlwaysOne : 9|1@0+ (1,1) [1|1] "" NEO
|
||||
SG_ GasRegenAlwaysThree : 15|2@0+ (1,1) [1|1] "" NEO
|
||||
SG_ GasRegenChecksum : 47|24@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GasRegenCmdActiveInv : 32|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GasRegenFullStopActive : 13|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GasRegenCmdActive : 0|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ RollingCounter : 7|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ RollingCounter2 : 36|4@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GasRegenAlwaysOne2 : 23|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ GasRegenCmd : 22|15@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 810 TCICOnStarGPSPosition: 8 K73_TCIC
|
||||
SG_ GPSLongitude : 39|32@0+ (1,0) [0|0] "milliarcsecond" NEO
|
||||
SG_ GPSLatitude : 7|32@0+ (1,0) [0|0] "milliarcsecond" NEO
|
||||
|
||||
BO_ 840 EBCMWheelSpdFront: 4 K17_EBCM
|
||||
SG_ FLWheelSpd : 7|16@0+ (0.0311,0) [0|255] "km/h" NEO
|
||||
SG_ FRWheelSpd : 23|16@0+ (0.0311,0) [0|255] "km/h" NEO
|
||||
|
||||
BO_ 842 EBCMWheelSpdRear: 4 K17_EBCM
|
||||
SG_ RLWheelSpd : 7|16@0+ (0.0311,0) [0|255] "km/h" NEO
|
||||
SG_ RRWheelSpd : 23|16@0+ (0.0311,0) [0|255] "km/h" NEO
|
||||
|
||||
BO_ 880 ASCMActiveCruiseControlStatus: 6 K124_ASCM
|
||||
SG_ ACCLeadCar : 44|1@0+ (1,0) [0|0] "" Vector__XXX
|
||||
SG_ ACCAlwaysOne2 : 32|1@0+ (1,0) [0|0] "" Vector__XXX
|
||||
SG_ ACCAlwaysOne : 0|1@0+ (1,0) [0|0] "" Vector__XXX
|
||||
SG_ ACCSpeedSetpoint : 19|12@0+ (1,0) [0|0] "km/h" NEO
|
||||
SG_ ACCGapLevel : 21|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ ACCResumeButton : 1|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ ACCCmdActive : 23|1@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 1001 ECMVehicleSpeed: 8 K20_ECM
|
||||
SG_ VehicleSpeed : 7|16@0+ (0.01,0) [0|0] "mph" NEO
|
||||
|
||||
BO_ 1033 ASCMKeepAlive: 7 NEO
|
||||
SG_ ASCMKeepAliveAllZero : 7|56@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 1217 ECMEngineCoolantTemp: 8 K20_ECM
|
||||
SG_ EngineCoolantTemp : 23|8@0+ (1,-40) [0|0] "°C" NEO
|
||||
|
||||
BO_ 1249 VIN_Part2: 8 K20_ECM
|
||||
SG_ VINPart2 : 7|64@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 1300 VIN_Part1: 8 K20_ECM
|
||||
SG_ VINPart1 : 7|64@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 1912 PSCM_778: 8 K43_PSCM
|
||||
|
||||
BO_TX_BU_ 338 : K124_ASCM,NEO;
|
||||
BO_TX_BU_ 880 : NEO,K124_ASCM;
|
||||
BO_TX_BU_ 1033 : K124_ASCM,NEO;
|
||||
BO_TX_BU_ 715 : NEO,K124_ASCM;
|
||||
|
||||
|
||||
CM_ BU_ K16_BECM "Battery Energy Control Module";
|
||||
CM_ BU_ K73_TCIC "Telematics Communication Control Module";
|
||||
CM_ BU_ K9_BCM "Body Control Module";
|
||||
CM_ BU_ K43_PSCM "Power Steering Control Module";
|
||||
CM_ BU_ K17_EBCM "Electronic Brake Control Module";
|
||||
CM_ BU_ K20_ECM "Engine Control Module";
|
||||
CM_ BU_ K114B_HPCM "Hybrid Powertrain Control Module";
|
||||
CM_ BU_ NEO "Comma NEO";
|
||||
CM_ BU_ K124_ASCM "Active Safety Control Module";
|
||||
CM_ SG_ 381 MSG17D_AccPower "Need to investigate";
|
||||
CM_ SG_ 190 GasPedalAndAcc "ACC baseline is 62";
|
||||
CM_ SG_ 451 GasPedalAndAcc2 "ACC baseline is 62";
|
||||
CM_ SG_ 715 RollingCounter2 "Values cycle between 0, 7, 10, 13";
|
||||
BA_DEF_ "UseGMParameterIDs" INT 0 0;
|
||||
BA_DEF_ "ProtocolType" STRING ;
|
||||
BA_DEF_ "BusType" STRING ;
|
||||
BA_DEF_DEF_ "UseGMParameterIDs" 1;
|
||||
BA_DEF_DEF_ "ProtocolType" "GMLAN";
|
||||
BA_DEF_DEF_ "BusType" "";
|
||||
BA_ "BusType" "CAN";
|
||||
BA_ "ProtocolType" "GMLAN";
|
||||
BA_ "UseGMParameterIDs" 0;
|
||||
VAL_ 481 DistanceButton 1 "Active" 0 "Inactive" ;
|
||||
VAL_ 481 LKAButton 1 "Active" 0 "Inactive" ;
|
||||
VAL_ 481 ACCButtons 6 "Cancel" 5 "Main" 3 "Set" 2 "Resume" 1 "None" ;
|
||||
VAL_ 309 PRNDL 3 "Reverse" 2 "Drive" 1 "Neutral" 0 "Park" ;
|
||||
VAL_ 338 LKASteeringCmdActive 1 "Active" 0 "Inactive" ;
|
||||
VAL_ 338 LKASMode 2 "supercruise" 1 "lkas" 0 "Inactive" ;
|
||||
VAL_ 880 ACCLeadCar 1 "Present" 0 "Not Present" ;
|
||||
VAL_ 880 ACCGapLevel 3 "Far" 2 "Med" 1 "Near" 0 "Inactive" ;
|
||||
VAL_ 880 ACCResumeButton 1 "Pressed" 0 "Depressed" ;
|
||||
VAL_ 880 ACCCmdActive 1 "Active" 0 "Inactive" ;
|
||||
VAL_ 356 LKATorqueDeliveredStatus 7 "Override Fault" 6 "LKAS Fault but Responsive" 5 "TBD but Responsive" 4 "TBD but Responsive" 3 "Fault" 1 "Active" 0 "Inactive" ;
|
||||
VAL_ 489 BrakePedalPressed 1 "Pressed" 0 "Depressed" ;
|
||||
VAL_ 715 GasRegenCmdActiveInv 1 "Inactive" 0 "Active" ;
|
||||
VAL_ 715 GasRegenCmdActive 1 "Active" 0 "Inactive" ;
|
||||
|
||||
@@ -37,12 +37,15 @@ BU_: XXX
|
||||
|
||||
|
||||
BO_ 258 STEERING: 8 XXX
|
||||
SG_ INCREMENTING_STEERING : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM_STEERING : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ UNKNOWN_STEERING : 48|3@1+ (1,0) [0|15] "" XXX
|
||||
SG_ STEERING_RATE : 20|13@0+ (0.3187251,-1305.498) [0|8191] "deg/s" XXX
|
||||
SG_ STEER_ANGLE : 4|13@0+ (0.3187251,-1307.888) [-360|360] "deg" XXX
|
||||
SG_ STEERING_RATE : 20|13@0+ (1,-4096) [0|8191] "" XXX
|
||||
|
||||
BO_ 514 SPEED: 4 XXX
|
||||
SG_ SPEED_LEFT : 7|16@0+ (0.07,0) [0|65535] "m/s" XXX
|
||||
SG_ SPEED_RIGHT : 23|16@0+ (0.07,0) [0|1023] "m/s" XXX
|
||||
BO_ 514 SPEED_1: 4 XXX
|
||||
SG_ SPEED_LEFT : 7|12@0+ (0.071028,0) [0|65535] "m/s" XXX
|
||||
SG_ SPEED_RIGHT : 23|12@0+ (0.071028,0) [0|1023] "m/s" XXX
|
||||
|
||||
BO_ 653 BRAKE_MODULE: 2 XXX
|
||||
SG_ BRAKE_PRESSURE : 15|8@0+ (1,0) [0|255] "" XXX
|
||||
@@ -59,49 +62,365 @@ BO_ 820 DOORS: 8 XXX
|
||||
SG_ HIGH_BEAM_DISPLAY : 58|1@1+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 746 GEAR: 5 XXX
|
||||
SG_ PRNDL : 0|3@1+ (1,0) [0|7] "" XXX
|
||||
SG_ PRNDL : 2|3@0+ (1,0) [0|7] "" XXX
|
||||
SG_ GEAR_CHECKSUM : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ GEAR_INCREMENTING : 31|4@0+ (1,0) [0|15] "" XXX
|
||||
|
||||
BO_ 284 NEW_MSG_1: 8 XXX
|
||||
SG_ BRAKE_RELATED : 3|12@0+ (1,0) [0|255] "" XXX
|
||||
SG_ BRAKE_RELATED_2 : 17|10@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SPEED : 37|14@0+ (1,0) [0|255] "" XXX
|
||||
BO_ 284 BRAKE_1: 8 XXX
|
||||
SG_ SPEED_RELATED_1 : 37|14@0+ (1,0) [0|255] "" XXX
|
||||
SG_ BRAKE_RELATED_1_2 : 18|11@0+ (1,0) [0|255] "" XXX
|
||||
SG_ BRAKE_RELATED_1_1 : 3|12@0+ (1,0) [0|255] "" XXX
|
||||
SG_ INCREMENTING_BRAKE : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM_BRAKE : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 320 NEW_MSG_2: 8 XXX
|
||||
SG_ SPEED_RELATED : 47|8@0+ (1,0) [0|63] "" XXX
|
||||
SG_ BRAKE_PRESSED : 2|3@0+ (1,0) [0|7] "" XXX
|
||||
BO_ 320 BRAKE_2: 8 XXX
|
||||
SG_ SPEED_RELATED_2 : 47|8@0+ (1,0) [0|63] "" XXX
|
||||
SG_ INCREMENTING_140 : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM_140 : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ BRAKE_PRESSED_2 : 2|3@0+ (1,0) [0|7] "" XXX
|
||||
SG_ BRAKE_PRESSED_ACC : 6|1@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 736 TRIP: 8 XXX
|
||||
SG_ DISTANCE_COUNTER : 7|16@0+ (0,0) [0|65535] "Meters" XXX
|
||||
SG_ DISTANCE_COUNTER : 7|16@0+ (1,0) [0|65535] "Meters" XXX
|
||||
SG_ DISTANCE_COUNTER_2 : 23|16@0+ (1,0) [0|65535] "Meters" XXX
|
||||
|
||||
BO_ 344 WHEEL_SPEEDS: 8 XXX
|
||||
SG_ WHEEL_SPEED_FL : 1|10@0+ (1,0) [0|65535] "" XXX
|
||||
SG_ WHEEL_SPEED_FR : 17|10@0+ (1,0) [0|255] "" XXX
|
||||
SG_ WHEEL_SPEED_RL : 33|10@0+ (1,0) [0|3] "" XXX
|
||||
SG_ WHEEL_SPEED_RR : 49|10@0+ (1,0) [0|255] "" XXX
|
||||
SG_ WHEEL_SPEED_FL : 3|12@0+ (0.0189408,0) [0|65535] "m/s" XXX
|
||||
SG_ WHEEL_SPEED_RR : 51|12@0+ (0.0189408,0) [0|255] "m/s" XXX
|
||||
SG_ WHEEL_SPEED_RL : 35|12@0+ (0.0189408,0) [0|3] "m/s" XXX
|
||||
SG_ WHEEL_SPEED_FR : 19|12@0+ (0.0189408,0) [0|255] "m/s" XXX
|
||||
|
||||
BO_ 792 STEERING_LEVERS: 8 XXX
|
||||
SG_ HIGH_BEAM_PUSHED_IN : 2|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ TURN_SIGNALS : 1|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ HIGH_BEAM_PUSHED_IN : 2|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ HIGH_BEAM_FLASH : 3|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ HIGH_BEAM_FLASH : 3|1@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 264 ACCEL_PEDAL_MSG: 8 XXX
|
||||
SG_ ACCEL_PEDAL : 32|4@1+ (1,-7) [0|15] "" XXX
|
||||
SG_ INCREMENTING_ACCEL_PEDAL : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM_ACCEL_PEDAL : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ ACCEL_PEDAL : 35|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 464 SEATBELT_STATUS: 8 XXX
|
||||
SG_ SEATBELT_DRIVER_UNLATCHED : 13|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 544 LKAS_INDICATOR_1: 8 XXX
|
||||
SG_ LKAS_IS_GREEN : 23|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ AUTO_PARK_HAS_CONTROL_1 : 20|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ AUTO_PARK_HAS_CONTROL_2 : 51|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ INCREMENTING_220 : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM_220 : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ UNKNOWN_220_2 : 34|11@0+ (1,0) [0|255] "" XXX
|
||||
SG_ UNKNOWN_220_1 : 19|12@0+ (1,0) [0|4095] "" XXX
|
||||
SG_ UNKNOWN_220_0 : 2|11@0+ (1,0) [0|63] "" XXX
|
||||
|
||||
BO_ 658 LKAS_INDICATOR_2: 6 XXX
|
||||
SG_ LKAS_INCREMENTING : 39|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ LKAS_CHECKSUM_2 : 40|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ LKAS_STEERING_TORQUE_MAYBE : 3|12@0- (1,0) [0|63] "" XXX
|
||||
|
||||
BO_ 678 LKAS_INDICATOR_3: 8 XXX
|
||||
SG_ WARNING_PLACE_HANDS : 22|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ LKAS_WHITE_OR_YELLOW : 0|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ LKAS_IS_YELLOW_2 : 19|1@1+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 705 AUTO_PARK_BUTTON: 8 XXX
|
||||
SG_ AUTO_PARK_TOGGLE_2 : 8|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ AUTO_PARK_TOGGLE_1 : 11|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ INCREASING_UNKNOWN : 32|7@1+ (1,0) [0|15] "" XXX
|
||||
|
||||
BO_ 719 AUTO_PARK_SIGNALS_1: 8 XXX
|
||||
SG_ AUTO_PARK_UNKNOWN_1 : 7|16@0+ (1,0) [0|31] "" XXX
|
||||
|
||||
BO_ 671 AUTO_PARK_SIGNALS_2: 8 XXX
|
||||
SG_ AUTO_PARK_PARALLEL : 21|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ AUTO_PARK_PERPENDICULAR_1 : 22|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ INCREMENTING : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ AUTO_PARK_CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ AUTO_PARK_MAYBE_TURNING : 3|12@0+ (1,0) [0|1023] "" XXX
|
||||
SG_ AUTO_PARK_TURNING_STATUS : 7|4@0+ (1,0) [0|15] "" XXX
|
||||
|
||||
BO_ 784 AUTO_PARK_LESS_INTERESTING: 8 XXX
|
||||
SG_ INCREASING_UNKNOWN : 48|8@1+ (1,0) [0|7] "" XXX
|
||||
SG_ AUTO_PARK_PERPENDICULAR_2 : 61|1@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 826 AUTO_PARK_SIGNALS_3: 8 XXX
|
||||
SG_ AUTO_PARK_HAS_CONTROL_3 : 1|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ HUMAN_HAS_CONTROL : 2|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ AUTO_PARK_GEAR_1 : 27|4@0+ (1,0) [0|255] "" XXX
|
||||
SG_ AUTO_PARK_GEAR_2 : 32|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ AUTO_PARK_GEAR_3 : 48|4@1+ (1,0) [0|15] "" XXX
|
||||
|
||||
BO_ 332 STEERING_2: 8 XXX
|
||||
SG_ INCREMENTING_14C : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ ENERGY_RELATED : 39|16@0+ (1,0) [0|65535] "" XXX
|
||||
SG_ STEER_ANGLE_2 : 7|13@0+ (0.3187251,-1307.888) [-360|360] "deg" XXX
|
||||
|
||||
BO_ 720 BLIND_SPOT_WARNINGS: 6 XXX
|
||||
SG_ BLIND_SPOT_RIGHT : 5|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BLIND_SPOT_LEFT : 2|1@1+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 331 BRAKE_3: 8 XXX
|
||||
SG_ BRAKE_RELATED_3 : 7|16@0+ (1,0) [0|65535] "" XXX
|
||||
SG_ INCREMENTING_14B : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM_14B : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 608 PARKSENSE_SIGNAL: 8 XXX
|
||||
SG_ PARKSENSE_DISABLED : 34|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ INCREMENTING_260 : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM_260 : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ IN_REVERSE : 10|1@1+ (1,0) [0|255] "" XXX
|
||||
SG_ AUTO_PARK_HAS_CONTROL_1 : 16|1@1+ (1,0) [0|255] "" XXX
|
||||
SG_ HUMAN_HAS_CONTROL : 17|1@1+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 729 LKAS_STATUS_1: 5 XXX
|
||||
SG_ LKAS_STATUS_OK : 31|16@0+ (1,0) [0|65535] "" XXX
|
||||
|
||||
BO_ 274 NEW_MSG_112: 2 XXX
|
||||
|
||||
BO_ 290 NEW_MSG_122: 6 XXX
|
||||
|
||||
BO_ 376 NEW_MSG_178: 3 XXX
|
||||
|
||||
BO_ 288 ACCEL_RELATED_120: 7 XXX
|
||||
SG_ UNKNOWN_INCREMENTING_120 : 47|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ UNKNOWN_CHECKSUM_120 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ ACCEL : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ GAS_ENGINE_RPM_MAYBE : 31|16@0+ (1,0) [0|65535] "" XXX
|
||||
|
||||
BO_ 257 ACCEL_RELATED_101: 5 XXX
|
||||
SG_ ENERGY_OR_RPM : 24|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 388 NEW_MSG_184: 4 XXX
|
||||
|
||||
BO_ 448 NEW_MSG_1c0: 6 XXX
|
||||
|
||||
BO_ 456 NEW_MSG_1c8: 4 XXX
|
||||
|
||||
BO_ 560 NEW_MSG_230: 4 XXX
|
||||
|
||||
BO_ 564 NEW_MSG_234: 4 XXX
|
||||
|
||||
BO_ 571 WHEEL_BUTTONS: 3 XXX
|
||||
SG_ CHECKSUM_23B : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ ACC_FOLLOW_DEC : 1|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ ACC_SPEED_INC : 2|1@0+ (1,0) [0|255] "" XXX
|
||||
SG_ ACC_SPEED_DEC : 3|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ ACC_FOLLOW_INC : 8|1@1+ (1,0) [0|15] "" XXX
|
||||
SG_ COUNTER : 15|4@0+ (1,0) [0|15] "" XXX
|
||||
|
||||
BO_ 669 NEW_MSG_29d: 3 XXX
|
||||
SG_ INCREMENTING_29D : 15|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM_29D : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 825 NEW_MSG_339: 2 XXX
|
||||
|
||||
BO_ 856 NEW_MSG_358: 4 XXX
|
||||
|
||||
BO_ 860 NEW_MSG_35c: 6 XXX
|
||||
|
||||
BO_ 924 NEW_MSG_39c: 3 XXX
|
||||
|
||||
BO_ 969 NEW_MSG_3c9: 4 XXX
|
||||
|
||||
BO_ 974 NEW_MSG_3ce: 5 XXX
|
||||
|
||||
BO_ 993 NEW_MSG_3e1: 7 XXX
|
||||
|
||||
BO_ 838 NEW_MSG_346: 2 XXX
|
||||
|
||||
BO_ 926 NEW_MSG_39e: 3 XXX
|
||||
|
||||
BO_ 168 ACCEL_RELATED_a8: 8 XXX
|
||||
SG_ ACCEL_RELATED : 23|16@0+ (1,0) [0|65535] "" XXX
|
||||
SG_ INCREMENTING_A8 : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM_A8 : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 270 ACCEL_RELATED_10e: 8 XXX
|
||||
SG_ ACCEL_OR_RPM : 7|16@0+ (1,0) [0|255] "" XXX
|
||||
SG_ INCREMENTING_ACCEL : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM_ACCEL : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ ELECTRIC_MOTOR : 23|16@0+ (1,0) [0|65535] "" XXX
|
||||
|
||||
BO_ 291 ENERGY_RELATED_123: 8 XXX
|
||||
SG_ ENERGY_GAIN_LOSS : 18|11@0- (1,0) [0|255] "" XXX
|
||||
SG_ INCREMENTING_123 : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM_123 : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ ENERGY_SMOOTHER_CURVE : 35|12@0+ (1,0) [0|2047] "" XXX
|
||||
|
||||
BO_ 294 ENERGY_RELATED_126: 8 XXX
|
||||
SG_ CHECKSUM_126 : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ UNKNOWN_126_1 : 3|12@0+ (1,0) [0|4095] "" XXX
|
||||
SG_ INCREMENTING_126 : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ UNKNOWN_126_2 : 35|12@0+ (1,0) [0|4095] "" XXX
|
||||
SG_ ENERGY_GAIN_LOSS_NOISY : 19|12@0+ (1,0) [0|2047] "" XXX
|
||||
|
||||
BO_ 300 NEW_MSG_12C: 8 XXX
|
||||
|
||||
BO_ 308 ACCEL_GAS_134: 8 XXX
|
||||
SG_ INCREMENTING_134 : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ ACCEL_134 : 40|4@1+ (1,0) [0|15] "" XXX
|
||||
|
||||
BO_ 532 ENERGY_RELATED_214: 8 XXX
|
||||
SG_ NOISY_SLOWLY_DECREASING : 16|9@0+ (1,0) [0|255] "" XXX
|
||||
SG_ ENERGY_RELATED : 0|9@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 559 ACCEL_GAS_22F: 8 XXX
|
||||
SG_ ACCEL_22F : 0|4@1+ (1,0) [0|255] "" XXX
|
||||
SG_ INCREMENTING_22F : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM_22F : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 655 CHARGING_MAYBE_28F: 8 XXX
|
||||
SG_ CHARGING : 0|2@1+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 660 BRAKE_RELATED_294: 8 XXX
|
||||
SG_ INCREMENTING_294 : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM_294 : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ BRAKE_PERHAPS_294 : 24|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 764 ACCEL_RELATED_2FC: 8 XXX
|
||||
SG_ ACCEL_2FC : 8|6@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 816 TRACTION_BUTTON: 8 XXX
|
||||
SG_ TRACTION_OFF : 19|1@1+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 878 ACCEL_RELATED_36E: 8 XXX
|
||||
SG_ ACCEL_OR_RPM_2 : 15|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ ACCEL_OR_RPM_1 : 0|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 324 SPEED_2: 8 XXX
|
||||
SG_ SPEED_2 : 31|16@0+ (0.01,0) [0|255] "m/s" XXX
|
||||
|
||||
BO_ 501 DASHBOARD: 8 XXX
|
||||
SG_ ACC_SPEED_CONFIG_KPH : 15|8@0+ (1,0) [0|3] "km/h" XXX
|
||||
SG_ ACC_SPEED_CONFIG_MPH : 23|8@0+ (1,0) [0|3] "mph" XXX
|
||||
SG_ ACC_DISTANCE_CONFIG_1 : 1|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ ACC_DISTANCE_CONFIG_2 : 41|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SPEED_DIGITAL : 63|8@0+ (1,0) [0|255] "mph" XXX
|
||||
|
||||
BO_ 639 NEW_MSG_27f: 8 XXX
|
||||
SG_ INCREASING : 40|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 701 NEW_MSG_2bd: 8 XXX
|
||||
SG_ unknown_1 : 32|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 832 UNKNOWN_340: 8 XXX
|
||||
SG_ SPEED_DIGITAL : 56|8@1+ (1,0) [0|255] "mph" XXX
|
||||
|
||||
BO_ 848 UNKNOWN_350: 8 XXX
|
||||
SG_ INCREASING_LSB : 0|6@1+ (1,0) [0|255] "" XXX
|
||||
SG_ INCREASING_MSB : 12|5@0+ (1,0) [0|31] "" XXX
|
||||
|
||||
BO_ 908 NEW_MSG_38c: 8 XXX
|
||||
SG_ INCREASING_MSB : 44|5@0+ (1,0) [0|31] "" XXX
|
||||
SG_ INCREASING_LSB : 56|6@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 938 NEW_MSG_3aa: 8 XXX
|
||||
SG_ INCREASING_UNKNOWN_1 : 32|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ INCREASING_UNKNOWN_2 : 56|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 940 NEW_MSG_3ac: 8 XXX
|
||||
SG_ INCREASING_1 : 32|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ INCREASING_2 : 56|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 941 NEW_MSG_3ad: 8 XXX
|
||||
SG_ INCREASING_1 : 32|5@1+ (1,0) [0|31] "" XXX
|
||||
SG_ INCREASING_2 : 56|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 500 ACC_2: 8 XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ COUNTER : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ ACC_STATUS_1 : 7|3@0+ (1,0) [0|255] "" XXX
|
||||
SG_ BRAKE_MAYBE : 18|11@0+ (1,0) [0|255] "" XXX
|
||||
SG_ ACC_STATUS_2 : 21|3@0+ (1,0) [0|255] "" XXX
|
||||
SG_ BRAKE_BOOL_1 : 36|1@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 625 ACC_1: 8 XXX
|
||||
SG_ SPEED : 24|8@1+ (1,0) [0|255] "km/h" XXX
|
||||
SG_ ACCEL_PERHAPS : 39|16@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ COUNTER : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
|
||||
BO_ 268 ACC_10c: 8 XXX
|
||||
SG_ BRAKE_PERHAPS : 48|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ COUNTER : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 384 NEW_MSG_180: 8 XXX
|
||||
SG_ NEW_SIGNAL_2 : 15|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ NEW_SIGNAL_1 : 7|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ NEW_SIGNAL_3 : 32|8@1+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 853 NEW_MSG_355: 8 XXX
|
||||
|
||||
BO_ 939 NEW_MSG_3ab: 8 XXX
|
||||
|
||||
BO_ 512 NEW_MSG_200: 8 XXX
|
||||
SG_ NEW_SIGNAL_1 : 16|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ INCREASING : 27|12@0+ (1,0) [0|127] "" XXX
|
||||
SG_ COUNTER : 48|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
|
||||
|
||||
|
||||
CM_ SG_ 258 UNKNOWN_STEERING "never goes above 4. see if human-applied torque";
|
||||
CM_ SG_ 258 STEER_ANGLE "positive is left (counter-clockwise)";
|
||||
CM_ SG_ 514 SPEED_LEFT "TODO find upper limit";
|
||||
CM_ SG_ 653 BRAKE_PRESSURE "max seems to be 148";
|
||||
CM_ SG_ 820 TURN_LIGHT_LEFT "oscillates with the light blinking";
|
||||
CM_ SG_ 820 TURN_LIGHT_RIGHT "hazard blinks both right and left lights";
|
||||
CM_ SG_ 746 PRNDL "4=D, 3=N, 2=R, 1=P";
|
||||
CM_ SG_ 284 BRAKE_RELATED "Correlates with braking";
|
||||
CM_ SG_ 284 SPEED "Another Speed Signal, Maybe RPMs?";
|
||||
CM_ SG_ 320 BRAKE_PRESSED "Value is 5 when brake is pressed";
|
||||
CM_ SG_ 746 GEAR_CHECKSUM "different than the LKAS checksum. unknown non-simple algorithm. just build a lookup table for it.";
|
||||
CM_ SG_ 284 SPEED_RELATED_1 "Another Speed Signal, Maybe RPMs?";
|
||||
CM_ SG_ 284 BRAKE_RELATED_1_1 "Correlates with braking";
|
||||
CM_ SG_ 320 BRAKE_PRESSED_2 "Value is 5 when brake is pressed by human, 1 when ACC brake";
|
||||
CM_ SG_ 320 BRAKE_PRESSED_ACC "set when ACC brakes";
|
||||
CM_ SG_ 792 TURN_SIGNALS "1=Left, 2=Right";
|
||||
CM_ SG_ 792 HIGH_BEAM_FLASH "use this for genericToggle";
|
||||
CM_ SG_ 264 ACCEL_PEDAL "not in ACC so seems to be actual pedal. Use for gasPressed";
|
||||
CM_ SG_ 544 AUTO_PARK_HAS_CONTROL_1 "set when autopark has control";
|
||||
CM_ SG_ 658 LKAS_INCREMENTING "each message increments, 0..f";
|
||||
CM_ SG_ 658 LKAS_CHECKSUM_2 "checksum calculated with https://gist.github.com/adhintz/94bf8d19b9075539f50172ab0fb24ba1";
|
||||
CM_ SG_ 658 LKAS_STEERING_TORQUE_MAYBE "1024 is straight. most sent by stock system is 1024+-230. + is left. typically changes by 2 or 3 each 0.01s";
|
||||
CM_ SG_ 678 WARNING_PLACE_HANDS "set when warning displays place hands on steering wheel";
|
||||
CM_ SG_ 678 LKAS_WHITE_OR_YELLOW "set when indicator is yellow or white. could indicate lkas not on track.";
|
||||
CM_ SG_ 678 LKAS_IS_YELLOW_2 "set when indicator is yellow. could indicate lkas is steering.";
|
||||
CM_ SG_ 705 AUTO_PARK_TOGGLE_1 "set briefly when turning on or off self-parking";
|
||||
CM_ SG_ 705 INCREASING_UNKNOWN "sometimes decreasing";
|
||||
CM_ SG_ 671 AUTO_PARK_PARALLEL "parallel parking mode";
|
||||
CM_ SG_ 671 AUTO_PARK_PERPENDICULAR_1 "perpendicular parking mode";
|
||||
CM_ SG_ 671 AUTO_PARK_MAYBE_TURNING "something with autopark turning the steering wheel maybe.";
|
||||
CM_ SG_ 671 AUTO_PARK_TURNING_STATUS "0 when not steering. when steering starts, 4 for two packets, and then 5 for the rest";
|
||||
CM_ SG_ 784 INCREASING_UNKNOWN "perhaps distance traveled";
|
||||
CM_ SG_ 826 AUTO_PARK_GEAR_1 "Reverse=0, Forward=f";
|
||||
CM_ SG_ 826 AUTO_PARK_GEAR_2 "Reverse=0, Forward=f";
|
||||
CM_ SG_ 826 AUTO_PARK_GEAR_3 "Reverse=0, Forward=f";
|
||||
CM_ SG_ 332 STEER_ANGLE_2 "slightly lags the other steer_angle signal. also more noisy.";
|
||||
CM_ SG_ 720 BLIND_SPOT_RIGHT "yellow triangle alert on side view mirror when a car is in your blind spot";
|
||||
CM_ SG_ 608 PARKSENSE_DISABLED "set if parksense is disabled";
|
||||
CM_ SG_ 729 LKAS_STATUS_OK "Set to 0x0820 when LKAS system is plugged in.";
|
||||
CM_ SG_ 288 UNKNOWN_CHECKSUM_120 "not the LKAS checksum";
|
||||
CM_ SG_ 288 GAS_ENGINE_RPM_MAYBE "lags acceleration, perhaps gas engine";
|
||||
CM_ SG_ 257 ENERGY_OR_RPM "perhaps energy consumption or RPMs";
|
||||
CM_ SG_ 270 ELECTRIC_MOTOR "0x7fff indicates electric motor not in use";
|
||||
CM_ SG_ 291 ENERGY_GAIN_LOSS "unsure what this actually is";
|
||||
CM_ SG_ 291 ENERGY_SMOOTHER_CURVE "unusre what it is, but smoother";
|
||||
CM_ SG_ 532 NOISY_SLOWLY_DECREASING "perhaps battery but do not know";
|
||||
CM_ SG_ 816 TRACTION_OFF "set when traction off button is enabled";
|
||||
CM_ SG_ 324 SPEED_2 "signal is approx half other speeds";
|
||||
CM_ SG_ 501 ACC_SPEED_CONFIG_KPH "speed configured for ACC";
|
||||
CM_ SG_ 501 ACC_SPEED_CONFIG_MPH "speed configured for ACC";
|
||||
CM_ SG_ 639 INCREASING "perhaps number of seconds divided by two for this drive";
|
||||
CM_ SG_ 848 INCREASING_LSB "lower part of time counter";
|
||||
CM_ SG_ 848 INCREASING_MSB "upper part of time counter";
|
||||
CM_ SG_ 908 INCREASING_MSB "time based";
|
||||
CM_ SG_ 500 ACC_STATUS_1 "2 briefly (9 packets) when ACC goes to green, 1 help when ACC coming to a stop and at a stop";
|
||||
CM_ SG_ 500 BRAKE_MAYBE "2046 in non-ACC and non-decel. Signal on deceleration. 818 for already stopped break.";
|
||||
CM_ SG_ 500 ACC_STATUS_2 "set to 1 in non-ACC, 3 when ACC enabled (white icon), and 7 when ACC in use (green icon)";
|
||||
CM_ SG_ 500 BRAKE_BOOL_1 "set to 1 when ACC decel. 0 on non-ACC and accel.";
|
||||
CM_ SG_ 625 SPEED "zero on non-acc drives";
|
||||
CM_ SG_ 625 ACCEL_PERHAPS "set to 7767 on non-ACC drives. ACC drive 40k is constant speed, 42k is accelerating";
|
||||
CM_ SG_ 268 BRAKE_PERHAPS "triggers only on ACC braking";
|
||||
CM_ SG_ 384 NEW_SIGNAL_1 "set in ACC gas driving. not set in electric human. not sure about gas human driving.";
|
||||
VAL_ 746 PRNDL 4 "Drive" 3 "Neutral" 2 "Reverse" 1 "Park" ;
|
||||
VAL_ 792 TURN_SIGNALS 2 "Right" 1 "Left" ;
|
||||
|
||||
230
opendbc/chrysler_pacifica_2017_hybrid_private_fusion.dbc
Normal file
230
opendbc/chrysler_pacifica_2017_hybrid_private_fusion.dbc
Normal file
@@ -0,0 +1,230 @@
|
||||
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_: XXX
|
||||
|
||||
|
||||
BO_ 544 a_1: 8 XXX
|
||||
SG_ track_id : 7|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ REL_ACCEL : 3|12@0+ (1,0) [0|31] "" XXX
|
||||
SG_ status1 : 23|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ REL_SPEED : 19|12@0+ (1,0) [0|65535] "" XXX
|
||||
SG_ status2 : 39|6@0+ (1,0) [0|15] "" XXX
|
||||
SG_ sig2 : 33|10@0+ (1,0) [0|255] "" XXX
|
||||
SG_ zeros : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ COUNTER : 48|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 576 b_1: 8 XXX
|
||||
SG_ sig0 : 0|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ sig1 : 15|16@0+ (1,0) [0|65535] "" XXX
|
||||
SG_ sig2 : 31|16@0+ (1,0) [0|255] "" XXX
|
||||
SG_ zeros : 47|12@0+ (1,0) [0|255] "" XXX
|
||||
SG_ COUNTER : 48|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 608 a_2: 8 XXX
|
||||
SG_ track_id : 7|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ REL_ACCEL : 3|12@0+ (1,0) [0|31] "" XXX
|
||||
SG_ status1 : 23|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ REL_SPEED : 19|12@0+ (1,0) [0|65535] "" XXX
|
||||
SG_ status2 : 39|6@0+ (1,0) [0|15] "" XXX
|
||||
SG_ sig2 : 33|10@0+ (1,0) [0|255] "" XXX
|
||||
SG_ zeros : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ COUNTER : 48|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 640 b_2: 8 XXX
|
||||
SG_ sig0 : 0|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ sig1 : 15|16@0+ (1,0) [0|65535] "" XXX
|
||||
SG_ sig2 : 31|16@0+ (1,0) [0|255] "" XXX
|
||||
SG_ zeros : 47|12@0+ (1,0) [0|255] "" XXX
|
||||
SG_ COUNTER : 48|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 644 a_3: 8 XXX
|
||||
SG_ track_id : 7|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ REL_ACCEL : 3|12@0+ (1,0) [0|31] "" XXX
|
||||
SG_ status1 : 23|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ REL_SPEED : 19|12@0+ (1,0) [0|65535] "" XXX
|
||||
SG_ status2 : 39|6@0+ (1,0) [0|15] "" XXX
|
||||
SG_ sig2 : 33|10@0+ (1,0) [0|255] "" XXX
|
||||
SG_ zeros : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ COUNTER : 48|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 648 b_3: 8 XXX
|
||||
SG_ sig0 : 0|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ sig1 : 15|16@0+ (1,0) [0|65535] "" XXX
|
||||
SG_ sig2 : 31|16@0+ (1,0) [0|255] "" XXX
|
||||
SG_ zeros : 47|12@0+ (1,0) [0|255] "" XXX
|
||||
SG_ COUNTER : 48|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 652 a_4: 8 XXX
|
||||
SG_ track_id : 7|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ REL_ACCEL : 3|12@0+ (1,0) [0|31] "" XXX
|
||||
SG_ status1 : 23|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ REL_SPEED : 19|12@0+ (1,0) [0|65535] "" XXX
|
||||
SG_ status2 : 39|6@0+ (1,0) [0|15] "" XXX
|
||||
SG_ sig2 : 33|10@0+ (1,0) [0|255] "" XXX
|
||||
SG_ zeros : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ COUNTER : 48|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 656 b_4: 8 XXX
|
||||
SG_ sig0 : 0|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ sig1 : 15|16@0+ (1,0) [0|65535] "" XXX
|
||||
SG_ sig2 : 31|16@0+ (1,0) [0|255] "" XXX
|
||||
SG_ zeros : 47|12@0+ (1,0) [0|255] "" XXX
|
||||
SG_ COUNTER : 48|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 512 unknown_200: 8 XXX
|
||||
SG_ COUNTER : 48|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ increasing : 31|16@0+ (1,0) [0|255] "" XXX
|
||||
SG_ zeros_0 : 3|12@0+ (1,0) [0|63] "" XXX
|
||||
SG_ zeros_1 : 47|12@0+ (1,0) [0|63] "" XXX
|
||||
SG_ status0 : 7|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ unknown_0 : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 514 unknown_202: 8 XXX
|
||||
SG_ COUNTER : 43|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ sig3 : 31|8@0+ (1,0) [0|65535] "" XXX
|
||||
SG_ increasing : 39|12@0+ (1,0) [0|15] "" XXX
|
||||
|
||||
BO_ 706 c_1: 8 XXX
|
||||
SG_ LAT_DIST : 18|11@0+ (0.005,-1000) [0|2047] "m" XXX
|
||||
SG_ COUNTER : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ LONG_DIST : 34|11@0+ (0.073,0) [0|255] "m" XXX
|
||||
|
||||
BO_ 708 c_2: 8 XXX
|
||||
SG_ LAT_DIST : 18|11@0+ (0.005,-1000) [0|2047] "m" XXX
|
||||
SG_ LONG_DIST : 34|11@0+ (0.073,0) [0|255] "m" XXX
|
||||
SG_ COUNTER : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 710 c_3: 8 XXX
|
||||
SG_ LAT_DIST : 18|11@0+ (0.005,-1000) [0|2047] "m" XXX
|
||||
SG_ LONG_DIST : 34|11@0+ (0.073,0) [0|255] "m" XXX
|
||||
SG_ COUNTER : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 712 c_4: 8 XXX
|
||||
SG_ LAT_DIST : 18|11@0+ (0.005,-1000) [0|2047] "m" XXX
|
||||
SG_ LONG_DIST : 34|11@0+ (0.073,0) [0|255] "m" XXX
|
||||
SG_ COUNTER : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 714 c_5: 8 XXX
|
||||
SG_ LAT_DIST : 18|11@0+ (0.005,-1000) [0|2047] "m" XXX
|
||||
SG_ LONG_DIST : 34|11@0+ (0.073,0) [0|255] "m" XXX
|
||||
SG_ COUNTER : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 716 c_6: 8 XXX
|
||||
SG_ LAT_DIST : 18|11@0+ (0.005,-1000) [0|2047] "m" XXX
|
||||
SG_ LONG_DIST : 34|11@0+ (0.073,0) [0|255] "m" XXX
|
||||
SG_ COUNTER : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 718 c_7: 8 XXX
|
||||
SG_ LAT_DIST : 18|11@0+ (0.005,-1000) [0|2047] "m" XXX
|
||||
SG_ LONG_DIST : 34|11@0+ (0.073,0) [0|255] "m" XXX
|
||||
SG_ COUNTER : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 720 c_8: 8 XXX
|
||||
SG_ LAT_DIST : 18|11@0+ (0.005,-1000) [0|2047] "m" XXX
|
||||
SG_ LONG_DIST : 34|11@0+ (0.073,0) [0|255] "m" XXX
|
||||
SG_ COUNTER : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 722 c_9: 8 XXX
|
||||
SG_ LAT_DIST : 18|11@0+ (0.005,-1000) [0|2047] "m" XXX
|
||||
SG_ LONG_DIST : 34|11@0+ (0.073,0) [0|255] "m" XXX
|
||||
SG_ COUNTER : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 724 c_10: 8 XXX
|
||||
SG_ LAT_DIST : 18|11@0+ (0.005,-1000) [0|2047] "m" XXX
|
||||
SG_ LONG_DIST : 34|11@0+ (0.073,0) [0|255] "m" XXX
|
||||
SG_ COUNTER : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 674 d_1: 8 XXX
|
||||
SG_ REL_SPEED : 17|10@0+ (0.2857,-146.278) [0|1023] "m/s" XXX
|
||||
|
||||
BO_ 676 d_2: 8 XXX
|
||||
SG_ REL_SPEED : 17|10@0+ (0.2857,-146.278) [0|1023] "m/s" XXX
|
||||
|
||||
BO_ 678 d_3: 8 XXX
|
||||
SG_ REL_SPEED : 17|10@0+ (0.2857,-146.278) [0|1023] "m/s" XXX
|
||||
|
||||
BO_ 680 d_4: 8 XXX
|
||||
SG_ REL_SPEED : 17|10@0+ (0.2857,-146.278) [0|1023] "m/s" XXX
|
||||
|
||||
BO_ 682 d_5: 8 XXX
|
||||
SG_ REL_SPEED : 17|10@0+ (0.2857,-146.278) [0|1023] "m/s" XXX
|
||||
|
||||
BO_ 684 d_6: 8 XXX
|
||||
SG_ REL_SPEED : 17|10@0+ (0.2857,-146.278) [0|1023] "m/s" XXX
|
||||
|
||||
BO_ 686 d_7: 8 XXX
|
||||
SG_ REL_SPEED : 17|10@0+ (0.2857,-146.278) [0|1023] "m/s" XXX
|
||||
|
||||
BO_ 688 d_8: 8 XXX
|
||||
SG_ REL_SPEED : 17|10@0+ (0.2857,-146.278) [0|1023] "m/s" XXX
|
||||
|
||||
BO_ 690 d_9: 8 XXX
|
||||
SG_ REL_SPEED : 17|10@0+ (0.2857,-146.278) [0|1023] "m/s" XXX
|
||||
|
||||
BO_ 692 d_10: 8 XXX
|
||||
SG_ REL_SPEED : 17|10@0+ (0.2857,-146.278) [0|1023] "m/s" XXX
|
||||
|
||||
BO_ 672 NEW_MSG_5: 8 XXX
|
||||
SG_ NEW_SIGNAL_1 : 9|10@0+ (1,0) [0|1023] "" XXX
|
||||
SG_ NEW_SIGNAL_2 : 45|10@0+ (1,0) [0|1023] "" XXX
|
||||
|
||||
|
||||
|
||||
|
||||
CM_ SG_ 544 track_id "for message a_1 track_id is always 1, similar for other messages and track_id";
|
||||
CM_ SG_ 544 REL_ACCEL "perhaps REL_ACCEL because it responds faster and before REL_SPEED";
|
||||
CM_ SG_ 544 sig2 "perhaps distance to object. LONG_DIST or REL_ACCEL or REL_SPEED";
|
||||
CM_ SG_ 576 zeros "not always zero, sometimes has value when another car changes lanes";
|
||||
CM_ SG_ 706 LAT_DIST "positive is to the right, negative is to the left";
|
||||
@@ -76,6 +76,7 @@ BO_ 146 Accel_Data: 8 XXX
|
||||
SG_ VehLat_A_Actl : 4|13@0+ (0.01,-40.0) [0|0] "m/s^2" XXX
|
||||
|
||||
BO_ 357 Cruise_Status: 8 XXX
|
||||
SG_ Brake_Drv_Appl : 5|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ Cruise_State : 11|4@0+ (1,0) [0|0] "" XXX
|
||||
SG_ Set_Speed : 23|8@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
@@ -99,6 +100,15 @@ BO_ 534 WheelData: 8 XXX
|
||||
SG_ WhlRotatFl_No_Cnt : 15|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ WHEEL_ROLLING_TIMESTAMP : 47|8@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 947 Doors: 8 XXX
|
||||
SG_ Door_FL_Open : 61|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ Door_FR_Open : 60|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ Door_RL_Open : 48|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ Door_RR_Open : 49|1@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 963 BCM_to_HS_Body: 8 XXX
|
||||
SG_ Brake_Lights : 8|1@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 970 Lane_Keep_Assist_Control: 8 XXX
|
||||
SG_ Lkas_Action : 7|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ Lkas_Alert : 3|4@0+ (1,0) [0|15] "" XXX
|
||||
@@ -119,7 +129,8 @@ BO_ 984 Lane_Keep_Assist_Ui: 8 XXX
|
||||
SG_ Set_Me_X30 : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
VAL_ 357 Cruise_State 4 "active" 3 "standby" 0 "off" ;
|
||||
VAL_ 970 Lkas_Action 15 "off" 9 "active" ;
|
||||
VAL_ 970 Lkas_Action 15 "off" 9 "abrupt" 8 "abrupt2" 5 "smooth" 4 "smooth2" ;
|
||||
VAL_ 970 Lkas_Alert 15 "no_alert" 3 "high_intensity" 2 "mid_intensity" 1 "low_intensity" ;
|
||||
VAL_ 972 LaActAvail_D_Actl 3 "available" 2 "tbd" 1 "not_available" 0 "fault" ;
|
||||
VAL_ 984 Lines_Hud 15 "none" 11 "grey_yellow" 8 "green_red" 7 "yellow_grey" 6 "grey_grey" 4 "red_green" 3 "green_green" ;
|
||||
CM_ SG_ 970 Lkas_Action "only vals 4, 5, 8, 9 seem to work. 4 and 5 are a bit smoother" ;
|
||||
|
||||
@@ -4,34 +4,46 @@ import re
|
||||
|
||||
cur_path = os.path.dirname(os.path.realpath(__file__))
|
||||
generator_path = os.path.join(cur_path, '../')
|
||||
include_pattern = re.compile(r'CM_ "IMPORT (.*?)"')
|
||||
|
||||
for dir_name, _, _ in os.walk(cur_path):
|
||||
|
||||
def read_dbc(dir_name, filename):
|
||||
with open(os.path.join(dir_name, filename)) as file_in:
|
||||
return file_in.read()
|
||||
|
||||
|
||||
def create_dbc(dir_name, filename):
|
||||
dbc_file_in = read_dbc(dir_name, filename)
|
||||
|
||||
includes = include_pattern.findall(dbc_file_in)
|
||||
|
||||
output_filename = filename.replace('.dbc', '_generated.dbc')
|
||||
output_file_location = os.path.join(generator_path, output_filename)
|
||||
|
||||
with open(output_file_location, 'w') as dbc_file_out:
|
||||
dbc_file_out.write('CM_ "AUTOGENERATED FILE, DO NOT EDIT"\n')
|
||||
|
||||
for include_filename in reversed(includes):
|
||||
include_file_header = '\n\nCM_ "Imported file %s starts here"\n' % include_filename
|
||||
dbc_file_out.write(include_file_header)
|
||||
|
||||
include_file = read_dbc(dir_name, include_filename)
|
||||
dbc_file_out.write(include_file)
|
||||
|
||||
dbc_file_out.write('\nCM_ "%s starts here"\n' % filename)
|
||||
|
||||
core_dbc = include_pattern.sub('', dbc_file_in)
|
||||
dbc_file_out.write(core_dbc)
|
||||
|
||||
|
||||
for dir_name, _, filenames in os.walk(cur_path):
|
||||
if dir_name == cur_path:
|
||||
continue
|
||||
|
||||
print dir_name
|
||||
|
||||
for filename in os.listdir(dir_name):
|
||||
for filename in filenames:
|
||||
if filename.startswith('_'):
|
||||
continue
|
||||
|
||||
print filename
|
||||
dbc_file = open(os.path.join(dir_name, filename)).read()
|
||||
dbc_file = '\nCM_ "%s starts here"\n' % filename + dbc_file
|
||||
|
||||
includes = re.finditer(r'CM_ "IMPORT (.*?)"', dbc_file)
|
||||
for include in includes:
|
||||
dbc_file = dbc_file.replace(include.group(0), '')
|
||||
include_path = os.path.join(dir_name, include.group(1))
|
||||
|
||||
# Load included file
|
||||
include_file = open(include_path).read()
|
||||
include_file = '\n\nCM_ "Imported file %s starts here"\n' % include.group(1) + include_file
|
||||
dbc_file = include_file + dbc_file
|
||||
|
||||
dbc_file = 'CM_ "AUTOGENERATED FILE, DO NOT EDIT"\n' + dbc_file
|
||||
|
||||
output_filename = filename.replace('.dbc', '_generated.dbc')
|
||||
output_dbc_file = open(os.path.join(generator_path, output_filename), 'w')
|
||||
output_dbc_file.write(dbc_file)
|
||||
output_dbc_file.close()
|
||||
create_dbc(dir_name, filename)
|
||||
|
||||
@@ -100,13 +100,6 @@ BO_ 420 VSA_STATUS: 8 VSA
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EON
|
||||
|
||||
BO_ 432 STANDSTILL: 7 VSA
|
||||
SG_ WHEELS_MOVING : 12|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ BRAKE_ERROR_1 : 11|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ BRAKE_ERROR_2 : 9|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ COUNTER : 53|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 51|4@0+ (1,0) [0|15] "" EON
|
||||
|
||||
BO_ 450 EPB_STATUS: 8 EPB
|
||||
SG_ EPB_ACTIVE : 3|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ EPB_STATE : 29|2@0+ (1,0) [0|3] "" EON
|
||||
|
||||
@@ -77,13 +77,13 @@ BO_ 490 VEHICLE_DYNAMICS: 8 VSA
|
||||
BO_ 506 BRAKE_COMMAND: 8 ADAS
|
||||
SG_ COMPUTER_BRAKE : 7|10@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ ZEROS_BOH : 13|5@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ COMPUTER_BRAKE_REQUEST : 8|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ BRAKE_PUMP_REQUEST : 8|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_BOH2 : 23|3@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_OVERRIDE : 20|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_BOH3 : 19|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_FAULT_CMD : 18|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_CANCEL_CMD : 17|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ COMPUTER_BRAKE_REQUEST_2 : 16|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ COMPUTER_BRAKE_REQUEST : 16|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ SET_ME_0X80 : 31|8@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ BRAKE_LIGHTS : 39|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_STATES : 38|7@0+ (1,0) [0|1] "" EBCM
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
CM_ "IMPORT _honda_2017.dbc"
|
||||
CM_ "IMPORT _comma.dbc"
|
||||
|
||||
BO_ 342 STEERING_SENSORS: 6 EPS
|
||||
SG_ STEER_ANGLE : 7|16@0- (-0.1,0) [-500|500] "deg" EON
|
||||
|
||||
@@ -6,6 +6,12 @@ BO_ 419 GEARBOX: 8 PCM
|
||||
SG_ GEAR_SHIFTER : 29|6@0+ (1,0) [0|63] "" EON
|
||||
SG_ GEAR : 7|8@0+ (1,0) [0|255] "" EON
|
||||
|
||||
BO_ 432 STANDSTILL: 7 VSA
|
||||
SG_ BRAKE_ERROR_1 : 11|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ BRAKE_ERROR_2 : 9|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ COUNTER : 53|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 51|4@0+ (1,0) [0|15] "" EON
|
||||
|
||||
BO_ 446 BRAKE_MODULE: 3 VSA
|
||||
SG_ BRAKE_PRESSED : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ COUNTER : 21|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
@@ -9,6 +9,13 @@ BO_ 401 GEARBOX: 8 PCM
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EON
|
||||
|
||||
BO_ 432 STANDSTILL: 7 VSA
|
||||
SG_ WHEELS_MOVING : 12|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ BRAKE_ERROR_1 : 11|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ BRAKE_ERROR_2 : 9|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ COUNTER : 53|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 51|4@0+ (1,0) [0|15] "" EON
|
||||
|
||||
BO_ 892 CRUISE_PARAMS: 8 PCM
|
||||
SG_ CRUISE_SPEED_OFFSET : 31|8@0- (0.1,0) [-128|127] "kph" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
@@ -9,6 +9,13 @@ BO_ 401 GEARBOX: 8 PCM
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EON
|
||||
|
||||
BO_ 432 STANDSTILL: 7 VSA
|
||||
SG_ WHEELS_MOVING : 12|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ BRAKE_ERROR_1 : 11|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ BRAKE_ERROR_2 : 9|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ COUNTER : 53|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 51|4@0+ (1,0) [0|15] "" EON
|
||||
|
||||
BO_ 446 BRAKE_MODULE: 3 VSA
|
||||
SG_ BRAKE_PRESSED : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ COUNTER : 21|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
CM_ "IMPORT _honda_2017.dbc"
|
||||
CM_ "IMPORT _comma.dbc"
|
||||
|
||||
BO_ 342 STEERING_SENSORS: 6 EPS
|
||||
SG_ STEER_ANGLE : 7|16@0- (-0.1,0) [-500|500] "deg" EON
|
||||
@@ -71,4 +72,4 @@ VAL_ 422 LIGHTS_SETTING 3 "high_beam" 2 "low_beam" 1 "position" 0 "no_lights" ;
|
||||
VAL_ 422 CRUISE_SETTING 3 "distance_adj" 2 "tbd" 1 "lkas_button" 0 "none" ;
|
||||
VAL_ 891 WIPERS 4 "High" 2 "Low" 0 "Off" ;
|
||||
|
||||
CM_ "CHFFR_METRIC 342 STEER_ANGLE STEER_ANGLE 0.36 180; CHFFR_METRIC 380 ENGINE_RPM ENGINE_RPM 1 0; CHFFR_METRIC 804 ENGINE_TEMPERATURE ENGINE_TEMPERATURE 1 0";
|
||||
CM_ "CHFFR_METRIC 342 STEER_ANGLE STEER_ANGLE 0.36 180; CHFFR_METRIC 380 ENGINE_RPM ENGINE_RPM 1 0; CHFFR_METRIC 804 ENGINE_TEMPERATURE ENGINE_TEMPERATURE 1 0";
|
||||
|
||||
97
opendbc/generator/honda/honda_fit_ex_2018_can.dbc
Normal file
97
opendbc/generator/honda/honda_fit_ex_2018_can.dbc
Normal file
@@ -0,0 +1,97 @@
|
||||
CM_ "IMPORT _honda_2017.dbc"
|
||||
CM_ "IMPORT _comma.dbc"
|
||||
|
||||
BO_ 145 KINEMATICS: 8 XXX
|
||||
SG_ LAT_ACCEL : 7|10@0+ (0.02,-512) [-20|20] "m/s2" EON
|
||||
|
||||
BO_ 228 STEERING_CONTROL: 5 ADAS
|
||||
SG_ STEER_TORQUE : 7|16@0- (1,0) [-3840|3840] "" EPS
|
||||
SG_ STEER_TORQUE_REQUEST : 23|1@0+ (1,0) [0|1] "" EPS
|
||||
SG_ SET_ME_X00 : 22|7@0+ (1,0) [0|127] "" EPS
|
||||
SG_ SET_ME_X00_2 : 31|8@0+ (1,0) [0|0] "" EPS
|
||||
SG_ COUNTER : 37|2@0+ (1,0) [0|3] "" EPS
|
||||
SG_ CHECKSUM : 35|4@0+ (1,0) [0|15] "" EPS
|
||||
|
||||
BO_ 304 GAS_PEDAL_2: 8 PCM
|
||||
SG_ ENGINE_TORQUE_ESTIMATE : 7|16@0- (1,0) [-1000|1000] "Nm" EON
|
||||
SG_ ENGINE_TORQUE_REQUEST : 23|16@0- (1,0) [-1000|1000] "Nm" EON
|
||||
SG_ CAR_GAS : 39|8@0+ (1,0) [0|255] "" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
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_ COUNTER : 45|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 43|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 399 STEER_STATUS: 7 EPS
|
||||
SG_ STEER_TORQUE_SENSOR : 7|16@0- (1,0) [-31000|31000] "tbd" EON
|
||||
SG_ STEER_TORQUE_MOTOR : 23|16@0- (1,0) [-31000|31000] "tbd" EON
|
||||
SG_ STEER_STATUS : 39|4@0+ (1,0) [0|15] "" EON
|
||||
SG_ STEER_CONTROL_ACTIVE : 35|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ COUNTER : 53|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 51|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 401 GEARBOX: 8 PCM
|
||||
SG_ GEAR_SHIFTER : 5|6@0+ (1,0) [0|63] "" EON
|
||||
SG_ GEAR : 43|4@0+ (1,0) [0|15] "" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 420 VSA_STATUS: 8 VSA
|
||||
SG_ USER_BRAKE : 7|16@0+ (0.015625,-1.609375) [0|1000] "" EON
|
||||
SG_ ESP_DISABLED : 28|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ BRAKE_HOLD_ACTIVE : 46|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ BRAKE_HOLD_ENABLED : 45|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 422 SCM_BUTTONS: 8 SCM
|
||||
SG_ CRUISE_BUTTONS : 7|3@0+ (1,0) [0|7] "" EON
|
||||
SG_ LIGHTS_SETTING : 1|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ MAIN_ON : 47|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ CRUISE_SETTING : 43|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 487 BRAKE_PRESSURE: 4 VSA
|
||||
SG_ BRAKE_PRESSURE1 : 7|10@0+ (0.015625,-103) [0|1000] "" EON
|
||||
SG_ BRAKE_PRESSURE2 : 9|10@0+ (0.015625,-103) [0|1000] "" EON
|
||||
SG_ CHECKSUM : 27|4@0+ (1,0) [0|3] "" EON
|
||||
SG_ COUNTER : 29|2@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 660 SCM_FEEDBACK: 8 SCM
|
||||
SG_ RIGHT_BLINKER : 6|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ LEFT_BLINKER : 5|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ WIPERS_SPEED : 4|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EON
|
||||
|
||||
BO_ 862 HIGHBEAM_CONTROL: 8 ADAS
|
||||
SG_ ZEROS_BOH : 7|50@0+ (1,0) [0|127] "" BDY
|
||||
SG_ ZEROS_BOH_2 : 48|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ HIGHBEAMS_ON : 52|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ AUTO_HIGHBEAMS_ACTIVE : 53|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" XXX
|
||||
|
||||
BO_ 884 STALK_STATUS: 8 XXX
|
||||
SG_ AUTO_HEADLIGHTS : 46|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ HIGH_BEAM_HOLD : 47|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ HIGH_BEAM_FLASH : 45|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ HEADLIGHTS_ON : 54|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
|
||||
CM_ SG_ 401 GEAR "10 = reverse, 11 = transition";
|
||||
CM_ SG_ 420 BRAKE_HOLD_RELATED "On when Brake Hold engaged";
|
||||
|
||||
VAL_ 399 STEER_STATUS 5 "fault" 4 "no_torque_alert_2" 2 "no_torque_alert_1" 0 "normal" ;
|
||||
VAL_ 401 GEAR_SHIFTER 32 "L" 16 "S" 8 "D" 4 "N" 2 "R" 1 "P" ;
|
||||
VAL_ 401 GEAR 7 "L" 10 "S" 4 "D" 3 "N" 2 "R" 1 "P" ;
|
||||
VAL_ 422 CRUISE_BUTTONS 7 "tbd" 6 "tbd" 5 "tbd" 4 "accel_res" 3 "decel_set" 2 "cancel" 1 "main" 0 "none" ;
|
||||
VAL_ 422 LIGHTS_SETTING 3 "high_beam" 2 "low_beam" 1 "position" 0 "no_lights" ;
|
||||
VAL_ 422 CRUISE_SETTING 3 "distance_adj" 2 "tbd" 1 "lkas_button" 0 "none" ;
|
||||
|
||||
CM_ "CHFFR_METRIC 342 STEER_ANGLE STEER_ANGLE 0.36 180; CHFFR_METRIC 380 ENGINE_RPM ENGINE_RPM 1 0; CHFFR_METRIC 804 ENGINE_TEMPERATURE ENGINE_TEMPERATURE 1 0";
|
||||
@@ -1,4 +1,5 @@
|
||||
CM_ "IMPORT _honda_2017.dbc"
|
||||
CM_ "IMPORT _comma.dbc"
|
||||
|
||||
BO_ 228 STEERING_CONTROL: 5 ADAS
|
||||
SG_ STEER_TORQUE : 7|16@0- (1,0) [-3840|3840] "" EPS
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
CM_ "IMPORT _honda_2017.dbc"
|
||||
CM_ "IMPORT _comma.dbc"
|
||||
|
||||
BO_ 145 KINEMATICS: 8 XXX
|
||||
SG_ LAT_ACCEL : 7|10@0+ (0.02,-512) [-20|20] "m/s2" EON
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
CM_ "IMPORT _honda_2017.dbc"
|
||||
CM_ "IMPORT _comma.dbc"
|
||||
|
||||
BO_ 145 KINEMATICS: 8 XXX
|
||||
SG_ LAT_ACCEL : 7|10@0+ (0.02,-512) [-20|20] "m/s2" EON
|
||||
|
||||
11
opendbc/generator/toyota/_comma.dbc
Normal file
11
opendbc/generator/toyota/_comma.dbc
Normal file
@@ -0,0 +1,11 @@
|
||||
BO_ 359 STEERING_IPAS_COMMA: 8 IPAS
|
||||
SG_ STATE : 7|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ ANGLE : 3|12@0- (1.5,0) [-510|510] "deg" XXX
|
||||
SG_ SET_ME_X10 : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ DIRECTION_CMD : 38|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X40 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
CM BO_ STEERING_IPAS_COMMA "Copy of msg 614 so we can do angle control while the Park Assist ECU is connected (Panda spoofs 614 with 359 on connector J70). Note that addresses 0x266 and 0x167 are checksum-invariant";
|
||||
33
opendbc/generator/toyota/toyota_avalon_2017_pt.dbc
Normal file
33
opendbc/generator/toyota/toyota_avalon_2017_pt.dbc
Normal file
@@ -0,0 +1,33 @@
|
||||
CM_ "IMPORT _toyota_2017.dbc"
|
||||
CM_ "IMPORT _comma.dbc"
|
||||
|
||||
BO_ 550 BRAKE_MODULE: 8 XXX
|
||||
SG_ BRAKE_PRESSURE : 0|9@0+ (1,0) [0|255] "" XXX
|
||||
SG_ BRAKE_POSITION : 16|9@0+ (1,0) [0|65535] "" XXX
|
||||
SG_ BRAKE_PRESSED : 37|1@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 705 GAS_PEDAL: 8 XXX
|
||||
SG_ GAS_RELEASED : 3|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ GAS_PEDAL : 55|8@0+ (0.005,0) [0|1] "" XXX
|
||||
|
||||
BO_ 608 STEER_TORQUE_SENSOR: 8 XXX
|
||||
SG_ STEER_TORQUE_EPS : 47|16@0- (0.73,0) [-20000|20000] "" XXX
|
||||
SG_ STEER_TORQUE_DRIVER : 15|16@0- (1,0) [-32768|32767] "" XXX
|
||||
SG_ STEER_OVERRIDE : 0|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 610 EPS_STATUS: 5 EPS
|
||||
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ LKA_STATE : 31|7@0+ (1,0) [0|127] "" XXX
|
||||
SG_ TYPE : 24|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 956 GEAR_PACKET: 8 XXX
|
||||
SG_ GEAR : 13|6@0+ (1,0) [0|63] "" 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";
|
||||
CM_ SG_ 610 TYPE "seems 1 on Corolla, 0 on all others";
|
||||
VAL_ 956 GEAR 0 "D" 1 "S" 8 "N" 16 "R" 32 "P";
|
||||
VAL_ 610 IPAS_STATE 5 "override" 3 "enabled" 1 "disabled";
|
||||
VAL_ 610 LKA_STATE 25 "temporary_fault" 9 "temporary_fault2" 5 "active" 1 "standby";
|
||||
36
opendbc/generator/toyota/toyota_chr_hybrid_2018_pt.dbc
Normal file
36
opendbc/generator/toyota/toyota_chr_hybrid_2018_pt.dbc
Normal file
@@ -0,0 +1,36 @@
|
||||
CM_ "IMPORT _toyota_2017.dbc"
|
||||
CM_ "IMPORT _comma.dbc"
|
||||
|
||||
BO_ 295 GEAR_PACKET: 8 XXX
|
||||
SG_ CAR_MOVEMENT : 39|8@0- (1,0) [0|255] "" XXX
|
||||
SG_ COUNTER : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ GEAR : 47|4@0+ (1,0) [0|15] "" XXX
|
||||
|
||||
BO_ 550 BRAKE_MODULE: 8 XXX
|
||||
SG_ BRAKE_PRESSURE : 0|9@0+ (1,0) [0|511] "" XXX
|
||||
SG_ BRAKE_POSITION : 16|9@0+ (1,0) [0|511] "" XXX
|
||||
SG_ BRAKE_PRESSED : 37|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 581 GAS_PEDAL: 8 XXX
|
||||
SG_ GAS_PEDAL : 23|8@0+ (0.005,0) [0|1] "" XXX
|
||||
|
||||
BO_ 608 STEER_TORQUE_SENSOR: 8 XXX
|
||||
SG_ STEER_TORQUE_EPS : 47|16@0- (0.73,0) [-20000|20000] "" XXX
|
||||
SG_ STEER_TORQUE_DRIVER : 15|16@0- (1,0) [-32768|32767] "" XXX
|
||||
SG_ STEER_OVERRIDE : 0|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 610 EPS_STATUS: 8 EPS
|
||||
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ LKA_STATE : 31|7@0+ (1,0) [0|127] "" XXX
|
||||
SG_ TYPE : 24|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" 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";
|
||||
CM_ SG_ 610 TYPE "seems 1 on Corolla, 0 on all others";
|
||||
CM_ SG_ 581 GAS_PEDAL "it seems slightly filtered";
|
||||
VAL_ 295 GEAR 0 "P" 1 "R" 2 "N" 3 "D" 4 "B";
|
||||
VAL_ 610 IPAS_STATE 5 "override" 3 "enabled" 1 "disabled";
|
||||
VAL_ 610 LKA_STATE 25 "temporary_fault" 9 "temporary_fault2" 5 "active" 1 "standby";
|
||||
33
opendbc/generator/toyota/toyota_highlander_2017_pt.dbc
Normal file
33
opendbc/generator/toyota/toyota_highlander_2017_pt.dbc
Normal file
@@ -0,0 +1,33 @@
|
||||
CM_ "IMPORT _toyota_2017.dbc"
|
||||
CM_ "IMPORT _comma.dbc"
|
||||
|
||||
BO_ 550 BRAKE_MODULE: 8 XXX
|
||||
SG_ BRAKE_PRESSURE : 0|9@0+ (1,0) [0|255] "" XXX
|
||||
SG_ BRAKE_POSITION : 16|9@0+ (1,0) [0|65535] "" XXX
|
||||
SG_ BRAKE_PRESSED : 37|1@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 705 GAS_PEDAL: 8 XXX
|
||||
SG_ GAS_RELEASED : 3|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ GAS_PEDAL : 55|8@0+ (0.005,0) [0|1] "" XXX
|
||||
|
||||
BO_ 608 STEER_TORQUE_SENSOR: 8 XXX
|
||||
SG_ STEER_TORQUE_EPS : 47|16@0- (0.73,0) [-20000|20000] "" XXX
|
||||
SG_ STEER_TORQUE_DRIVER : 15|16@0- (1,0) [-32768|32767] "" XXX
|
||||
SG_ STEER_OVERRIDE : 0|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 610 EPS_STATUS: 5 EPS
|
||||
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ LKA_STATE : 31|7@0+ (1,0) [0|127] "" XXX
|
||||
SG_ TYPE : 24|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 956 GEAR_PACKET: 8 XXX
|
||||
SG_ GEAR : 13|6@0+ (1,0) [0|63] "" 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";
|
||||
CM_ SG_ 610 TYPE "seems 1 on Corolla, 0 on all others";
|
||||
VAL_ 956 GEAR 0 "D" 1 "S" 8 "N" 16 "R" 32 "P";
|
||||
VAL_ 610 IPAS_STATE 5 "override" 3 "enabled" 1 "disabled";
|
||||
VAL_ 610 LKA_STATE 25 "temporary_fault" 9 "temporary_fault2" 5 "active" 1 "standby";
|
||||
@@ -52,7 +52,7 @@ BO_ 789 EBCMFrictionBrakeCmd: 5 K17_EBCM
|
||||
SG_ RollingCounter : 33|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ FrictionBrakeMode : 7|4@0+ (1,0) [0|0] "" NEO
|
||||
SG_ FrictionBrakeChecksum : 23|16@0+ (1,0) [0|0] "" NEO
|
||||
SG_ FirctionBrakeCmd : 3|12@0- (1,0) [0|0] "" NEO
|
||||
SG_ FrictionBrakeCmd : 3|12@0- (1,0) [0|0] "" NEO
|
||||
|
||||
BO_TX_BU_ 823 : K43_PSCM,NEO;
|
||||
BO_TX_BU_ 789 : NEO,K17_EBCM;
|
||||
|
||||
@@ -33,7 +33,7 @@ NS_ :
|
||||
|
||||
BS_:
|
||||
|
||||
BU_: K16_BECM K73_TCIC K9_BCM K43_PSCM K17_EBCM K20_ECM K114B_HPCM NEO K124_ASCM
|
||||
BU_: K16_BECM K73_TCIC K9_BCM K43_PSCM K17_EBCM K20_ECM K114B_HPCM NEO K124_ASCM EPB
|
||||
VAL_TABLE_ TurnSignals 2 "Right Turn" 1 "Left Turn" 0 "None" ;
|
||||
VAL_TABLE_ ACCLeadCar 1 "Present" 0 "Not Present" ;
|
||||
VAL_TABLE_ ACCCmdActive 1 "Active" 0 "Inactive" ;
|
||||
@@ -53,36 +53,23 @@ VAL_TABLE_ HandsOffSWDetectionStatus 1 "Hands On" 0 "Hands Off" ;
|
||||
VAL_TABLE_ HandsOffSWDetectionMode 2 "Failed" 1 "Enabled" 0 "Disabled" ;
|
||||
|
||||
|
||||
BO_ 320 BCMTurnSignals: 3 K9_BCM
|
||||
SG_ TurnSignals : 19|2@0+ (1,0) [0|0] "" NEO
|
||||
BO_ 189 EBCMRegenPaddle: 7 K17_EBCM
|
||||
SG_ RegenPaddle : 7|4@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 1217 ECMEngineCoolantTemp: 8 K20_ECM
|
||||
SG_ EngineCoolantTemp : 23|8@0+ (1,-40) [0|0] "°C" NEO
|
||||
BO_ 190 ECMAcceleratorPos: 6 K20_ECM
|
||||
SG_ BrakePedalPos : 15|8@0+ (1,0) [0|0] "sticky" NEO
|
||||
SG_ GasPedalAndAcc : 23|8@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 1249 VIN_Part2: 8 K20_ECM
|
||||
SG_ VINPart2 : 7|64@0+ (1,0) [0|0] "" NEO
|
||||
BO_ 201 ECMEngineStatus: 8 K20_ECM
|
||||
SG_ EngineTPS : 39|8@0+ (0.392156863,0) [0|100.000000065] "%" NEO
|
||||
SG_ EngineRPM : 15|16@0+ (0.25,0) [0|0] "RPM" NEO
|
||||
SG_ CruiseMainOn : 29|1@0+ (1,0) [0|1] "" NEO
|
||||
|
||||
BO_ 1300 VIN_Part1: 8 K20_ECM
|
||||
SG_ VINPart1 : 7|64@0+ (1,0) [0|0] "" NEO
|
||||
BO_ 209 EBCMBrakePedalTorque: 7 K17_EBCM
|
||||
SG_ BrakePedalTorque : 3|12@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 481 ASCMSteeringButton: 7 K124_ASCM
|
||||
SG_ DistanceButton : 22|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ LKAButton : 23|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ ACCButtons : 46|3@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 1912 PSCM_778: 8 K43_PSCM
|
||||
|
||||
BO_ 328 PSCM_148: 1 K43_PSCM
|
||||
|
||||
BO_ 309 ECMPRDNL: 8 K20_ECM
|
||||
SG_ PRNDL : 2|3@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 810 TCICOnStarGPSPosition: 8 K73_TCIC
|
||||
SG_ GPSLongitude : 39|32@0+ (1,0) [0|0] "milliarcsecond" NEO
|
||||
SG_ GPSLatitude : 7|32@0+ (1,0) [0|0] "milliarcsecond" NEO
|
||||
|
||||
BO_ 1001 ECMVehicleSpeed: 8 K20_ECM
|
||||
SG_ VehicleSpeed : 7|16@0+ (0.01,0) [0|0] "mph" NEO
|
||||
BO_ 241 EBCMBrakePedalPosition: 6 K17_EBCM
|
||||
SG_ BrakePedalPosition : 15|8@0+ (1,0) [0|255] "" NEO
|
||||
|
||||
BO_ 298 BCMDoorBeltStatus: 8 K9_BCM
|
||||
SG_ RearLeftDoor : 8|1@0+ (1,0) [0|0] "" NEO
|
||||
@@ -92,22 +79,89 @@ BO_ 298 BCMDoorBeltStatus: 8 K9_BCM
|
||||
SG_ LeftSeatBelt : 12|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ RightSeatBelt : 53|1@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 381 MSG_17D: 6 K20_ECM
|
||||
BO_ 309 ECMPRDNL: 8 K20_ECM
|
||||
SG_ PRNDL : 2|3@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 320 BCMTurnSignals: 3 K9_BCM
|
||||
SG_ TurnSignals : 19|2@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 328 PSCM_148: 1 K43_PSCM
|
||||
|
||||
BO_ 381 ESPStatus: 6 K20_ECM
|
||||
SG_ TractionControlOn : 5|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ MSG17D_AccPower : 35|12@0- (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 201 ECMEngineStatus: 8 K20_ECM
|
||||
SG_ EngineTPS : 39|8@0+ (0.392156863,0) [0|100.000000065] "%" NEO
|
||||
SG_ EngineRPM : 15|16@0+ (0.25,0) [0|0] "RPM" NEO
|
||||
|
||||
BO_ 209 EBCMBrakePedalTorque: 7 K17_EBCM
|
||||
SG_ BrakePedalTorque : 3|12@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 384 ASCMLKASteeringCmd: 4 NEO
|
||||
SG_ RollingCounter : 5|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ LKASteeringCmdChecksum : 19|12@0+ (1,0) [0|0] "" NEO
|
||||
SG_ LKASteeringCmdActive : 3|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ LKASteeringCmd : 2|11@0- (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 388 PSCMStatus: 8 K43_PSCM
|
||||
SG_ HandsOffSWDetectionMode : 20|2@0+ (1,0) [0|3] "" NEO
|
||||
SG_ HandsOffSWlDetectionStatus : 21|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ LKATorqueDeliveredStatus : 5|3@0+ (1,0) [0|7] "" NEO
|
||||
SG_ LKADriverAppldTrq : 50|11@0- (0.01,0) [-10.24|10.23] "Nm" NEO
|
||||
SG_ LKATotalTorqueDelivered : 2|11@0- (0.01,0) [-10.24|10.23] "Nm" NEO
|
||||
|
||||
BO_ 417 AcceleratorPedal: 8 XXX
|
||||
SG_ AcceleratorPedal : 55|8@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 451 GasAndAcc: 8 XXX
|
||||
SG_ GasPedalAndAcc2 : 55|8@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 452 AcceleratorPedal2: 8 XXX
|
||||
SG_ CruiseState : 15|3@0+ (1,0) [0|7] "" NEO
|
||||
SG_ AcceleratorPedal2 : 47|8@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 481 ASCMSteeringButton: 7 K124_ASCM
|
||||
SG_ DistanceButton : 22|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ LKAButton : 23|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ ACCButtons : 46|3@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 485 PSCMSteeringAngle: 8 K43_PSCM
|
||||
SG_ SteeringWheelAngle : 15|16@0- (0.0625,0) [-540|540] "deg" NEO
|
||||
SG_ SteeringWheelRate : 27|12@0- (0.5,0) [-100|100] "deg/s" NEO
|
||||
|
||||
BO_ 489 EBCMVehicleDynamic: 8 K17_EBCM
|
||||
SG_ YawRate : 51|12@0- (0.0625,0) [-2047|2047] "grad/s" NEO
|
||||
SG_ LateralAcceleration : 3|12@0- (0.0161,0) [-2047|2047] "m/s2" NEO
|
||||
SG_ BrakePedalPressed : 6|1@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 560 EPBStatus: 8 EPB
|
||||
SG_ EPBClosed : 12|1@0+ (1,0) [0|1] "" NEO
|
||||
|
||||
BO_ 711 BECMBatteryVoltageCurrent: 6 K17_EBCM
|
||||
SG_ HVBatteryVoltage : 31|12@0+ (0.125,0) [0|511.875] "V" NEO
|
||||
SG_ HVBatteryCurrent : 12|13@0- (0.15,0) [-614.4|614.25] "A" NEO
|
||||
|
||||
BO_ 715 ASCMGasRegenCmd: 8 K124_ASCM
|
||||
SG_ GasRegenAlwaysOne2 : 9|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ GasRegenAlwaysOne : 14|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ GasRegenChecksum : 47|24@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GasRegenCmdActiveInv : 32|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GasRegenFullStopActive : 13|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GasRegenCmdActive : 0|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ RollingCounter : 7|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GasRegenAlwaysOne3 : 23|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ GasRegenCmd : 22|12@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 717 ASCM_2CD: 5 K124_ASCM
|
||||
|
||||
BO_ 810 TCICOnStarGPSPosition: 8 K73_TCIC
|
||||
SG_ GPSLongitude : 39|32@0+ (1,0) [0|0] "milliarcsecond" NEO
|
||||
SG_ GPSLatitude : 7|32@0+ (1,0) [0|0] "milliarcsecond" NEO
|
||||
|
||||
BO_ 840 EBCMWheelSpdFront: 4 K17_EBCM
|
||||
SG_ FLWheelSpd : 7|16@0+ (0.0311,0) [0|255] "km/h" NEO
|
||||
SG_ FRWheelSpd : 23|16@0+ (0.0311,0) [0|255] "km/h" NEO
|
||||
|
||||
BO_ 842 EBCMWheelSpdRear: 4 K17_EBCM
|
||||
SG_ RLWheelSpd : 7|16@0+ (0.0311,0) [0|255] "km/h" NEO
|
||||
SG_ RRWheelSpd : 23|16@0+ (0.0311,0) [0|255] "km/h" NEO
|
||||
|
||||
BO_ 869 ASCM_365: 4 K124_ASCM
|
||||
|
||||
BO_ 880 ASCMActiveCruiseControlStatus: 6 K124_ASCM
|
||||
SG_ ACCLeadCar : 44|1@0+ (1,0) [0|0] "" Vector__XXX
|
||||
SG_ ACCAlwaysOne2 : 32|1@0+ (1,0) [0|0] "" Vector__XXX
|
||||
@@ -117,76 +171,28 @@ BO_ 880 ASCMActiveCruiseControlStatus: 6 K124_ASCM
|
||||
SG_ ACCResumeButton : 1|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ ACCCmdActive : 23|1@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 1930 ASCM_78A: 7 K124_ASCM
|
||||
|
||||
BO_ 1296 ASCM_510: 4 K124_ASCM
|
||||
|
||||
BO_ 1034 ASCM_40A: 7 K124_ASCM
|
||||
|
||||
BO_ 869 ASCM_365: 4 K124_ASCM
|
||||
|
||||
BO_ 717 ASCM_2CD: 5 K124_ASCM
|
||||
BO_ 1001 ECMVehicleSpeed: 8 K20_ECM
|
||||
SG_ VehicleSpeed : 7|16@0+ (0.01,0) [0|0] "mph" NEO
|
||||
|
||||
BO_ 1033 ASCMKeepAlive: 7 NEO
|
||||
SG_ ASCMKeepAliveAllZero : 7|56@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 485 PSCMSteeringAngle: 8 K43_PSCM
|
||||
SG_ SteeringWheelAngle : 15|16@0- (0.0625,0) [-540|540] "deg" NEO
|
||||
SG_ SteeringWheelRate : 27|12@0- (0.5,0) [-100|100] "deg/s" NEO
|
||||
BO_ 1034 ASCM_40A: 7 K124_ASCM
|
||||
|
||||
BO_ 388 PSCMStatus: 8 K43_PSCM
|
||||
SG_ HandsOffSWDetectionMode : 20|2@0+ (1,0) [0|3] "" NEO
|
||||
SG_ HandsOffSWlDetectionStatus : 21|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ LKATorqueDeliveredStatus : 5|3@0+ (1,0) [0|7] "" NEO
|
||||
SG_ LKADriverAppldTrq : 50|11@0- (0.01,0) [-10.24|10.23] "Nm" NEO
|
||||
SG_ LKATotalTorqueDelivered : 2|11@0- (0.01,0) [-10.24|10.23] "Nm" NEO
|
||||
BO_ 1217 ECMEngineCoolantTemp: 8 K20_ECM
|
||||
SG_ EngineCoolantTemp : 23|8@0+ (1,-40) [0|0] "°C" NEO
|
||||
|
||||
BO_ 489 EBCMVehicleDynamic: 8 K17_EBCM
|
||||
SG_ YawRate : 51|12@0- (0.0625,0) [-2047|2047] "grad/s" NEO
|
||||
SG_ LateralAcceleration : 3|12@0- (0.0161,0) [-2047|2047] "m/s2" NEO
|
||||
SG_ BrakePedalPressed : 6|1@0+ (1,0) [0|0] "" NEO
|
||||
BO_ 1249 VIN_Part2: 8 K20_ECM
|
||||
SG_ VINPart2 : 7|64@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 189 EBCMRegenPaddle: 7 K17_EBCM
|
||||
SG_ RegenPaddle : 7|4@0+ (1,0) [0|0] "" NEO
|
||||
BO_ 1296 ASCM_510: 4 K124_ASCM
|
||||
|
||||
BO_ 190 ECMAcceleratorPos: 6 K20_ECM
|
||||
SG_ BrakePedalPos : 15|8@0+ (1,0) [0|0] "sticky" NEO
|
||||
SG_ GasPedalAndAcc : 23|8@0+ (1,0) [0|0] "" NEO
|
||||
BO_ 1300 VIN_Part1: 8 K20_ECM
|
||||
SG_ VINPart1 : 7|64@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 715 ASCMGasRegenCmd: 8 K124_ASCM
|
||||
SG_ GasRegenAlwaysOne2 : 9|1@0+ (1,1) [1|1] "" NEO
|
||||
SG_ GasRegenAlwaysOne : 14|1@0+ (1,1) [1|1] "" NEO
|
||||
SG_ GasRegenChecksum : 47|24@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GasRegenCmdActiveInv : 32|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GasRegenFullStopActive : 13|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GasRegenCmdActive : 0|1@0+ (1,0) [0|0] "" NEO
|
||||
SG_ RollingCounter : 7|2@0+ (1,0) [0|0] "" NEO
|
||||
SG_ GasRegenAlwaysOne3 : 23|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ GasRegenCmd : 22|12@0+ (1,0) [0|0] "" NEO
|
||||
BO_ 1912 PSCM_778: 8 K43_PSCM
|
||||
|
||||
BO_ 840 EBCMWheelSpdFront: 4 K17_EBCM
|
||||
SG_ FLWheelSpd : 7|16@0+ (0.0311,0) [0|255] "km/h" NEO
|
||||
SG_ FRWheelSpd : 23|16@0+ (0.0311,0) [0|255] "km/h" NEO
|
||||
|
||||
BO_ 842 EBCMWheelSpdRear: 4 K17_EBCM
|
||||
SG_ RLWheelSpd : 7|16@0+ (0.0311,0) [0|255] "km/h" NEO
|
||||
SG_ RRWheelSpd : 23|16@0+ (0.0311,0) [0|255] "km/h" NEO
|
||||
|
||||
BO_ 241 EBCMBrakePedalPosition: 6 K17_EBCM
|
||||
SG_ BrakePedalPosition : 15|8@0+ (1,0) [0|255] "" NEO
|
||||
|
||||
BO_ 711 BECMBatteryVoltageCurrent: 6 K17_EBCM
|
||||
SG_ HVBatteryVoltage : 31|12@0+ (0.125,0) [0|511.875] "V" NEO
|
||||
SG_ HVBatteryCurrent : 12|13@0- (0.15,0) [-614.4|614.25] "A" NEO
|
||||
|
||||
BO_ 417 AcceleratorPedal: 8 XXX
|
||||
SG_ AcceleratorPedal : 55|8@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 451 GasAndAcc: 8 XXX
|
||||
SG_ GasPedalAndAcc2 : 55|8@0+ (1,0) [0|0] "" NEO
|
||||
|
||||
BO_ 452 AcceleratorPedal2: 8 XXX
|
||||
SG_ AcceleratorPedal2 : 47|8@0+ (1,0) [0|0] "" NEO
|
||||
BO_ 1930 ASCM_78A: 7 K124_ASCM
|
||||
|
||||
BO_TX_BU_ 384 : K124_ASCM,NEO;
|
||||
BO_TX_BU_ 880 : NEO,K124_ASCM;
|
||||
@@ -218,6 +224,7 @@ BA_ "UseGMParameterIDs" 0;
|
||||
VAL_ 481 DistanceButton 1 "Active" 0 "Inactive" ;
|
||||
VAL_ 481 LKAButton 1 "Active" 0 "Inactive" ;
|
||||
VAL_ 481 ACCButtons 6 "Cancel" 5 "Main" 3 "Set" 2 "Resume" 1 "None" ;
|
||||
VAL_ 452 CruiseState 4 "Standstill" 3 "Faulted" 1 "Active" 0 "Off" ;
|
||||
VAL_ 309 PRNDL 3 "Reverse" 2 "Drive" 1 "Neutral" 0 "Park" ;
|
||||
VAL_ 384 LKASteeringCmdActive 1 "Active" 0 "Inactive" ;
|
||||
VAL_ 880 ACCLeadCar 1 "Present" 0 "Not Present" ;
|
||||
|
||||
@@ -104,13 +104,6 @@ BO_ 420 VSA_STATUS: 8 VSA
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EON
|
||||
|
||||
BO_ 432 STANDSTILL: 7 VSA
|
||||
SG_ WHEELS_MOVING : 12|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ BRAKE_ERROR_1 : 11|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ BRAKE_ERROR_2 : 9|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ COUNTER : 53|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 51|4@0+ (1,0) [0|15] "" EON
|
||||
|
||||
BO_ 450 EPB_STATUS: 8 EPB
|
||||
SG_ EPB_ACTIVE : 3|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ EPB_STATE : 29|2@0+ (1,0) [0|3] "" EON
|
||||
@@ -280,6 +273,12 @@ BO_ 419 GEARBOX: 8 PCM
|
||||
SG_ GEAR_SHIFTER : 29|6@0+ (1,0) [0|63] "" EON
|
||||
SG_ GEAR : 7|8@0+ (1,0) [0|255] "" EON
|
||||
|
||||
BO_ 432 STANDSTILL: 7 VSA
|
||||
SG_ BRAKE_ERROR_1 : 11|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ BRAKE_ERROR_2 : 9|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ COUNTER : 53|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 51|4@0+ (1,0) [0|15] "" EON
|
||||
|
||||
BO_ 446 BRAKE_MODULE: 3 VSA
|
||||
SG_ BRAKE_PRESSED : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ COUNTER : 21|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
@@ -104,13 +104,6 @@ BO_ 420 VSA_STATUS: 8 VSA
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EON
|
||||
|
||||
BO_ 432 STANDSTILL: 7 VSA
|
||||
SG_ WHEELS_MOVING : 12|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ BRAKE_ERROR_1 : 11|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ BRAKE_ERROR_2 : 9|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ COUNTER : 53|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 51|4@0+ (1,0) [0|15] "" EON
|
||||
|
||||
BO_ 450 EPB_STATUS: 8 EPB
|
||||
SG_ EPB_ACTIVE : 3|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ EPB_STATE : 29|2@0+ (1,0) [0|3] "" EON
|
||||
@@ -283,6 +276,13 @@ BO_ 401 GEARBOX: 8 PCM
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EON
|
||||
|
||||
BO_ 432 STANDSTILL: 7 VSA
|
||||
SG_ WHEELS_MOVING : 12|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ BRAKE_ERROR_1 : 11|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ BRAKE_ERROR_2 : 9|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ COUNTER : 53|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 51|4@0+ (1,0) [0|15] "" EON
|
||||
|
||||
BO_ 892 CRUISE_PARAMS: 8 PCM
|
||||
SG_ CRUISE_SPEED_OFFSET : 31|8@0- (0.1,0) [-128|127] "kph" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
@@ -99,13 +99,13 @@ BO_ 490 VEHICLE_DYNAMICS: 8 VSA
|
||||
BO_ 506 BRAKE_COMMAND: 8 ADAS
|
||||
SG_ COMPUTER_BRAKE : 7|10@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ ZEROS_BOH : 13|5@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ COMPUTER_BRAKE_REQUEST : 8|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ BRAKE_PUMP_REQUEST : 8|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_BOH2 : 23|3@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_OVERRIDE : 20|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_BOH3 : 19|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_FAULT_CMD : 18|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_CANCEL_CMD : 17|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ COMPUTER_BRAKE_REQUEST_2 : 16|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ COMPUTER_BRAKE_REQUEST : 16|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ SET_ME_0X80 : 31|8@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ BRAKE_LIGHTS : 39|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_STATES : 38|7@0+ (1,0) [0|1] "" EBCM
|
||||
|
||||
@@ -104,13 +104,6 @@ BO_ 420 VSA_STATUS: 8 VSA
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EON
|
||||
|
||||
BO_ 432 STANDSTILL: 7 VSA
|
||||
SG_ WHEELS_MOVING : 12|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ BRAKE_ERROR_1 : 11|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ BRAKE_ERROR_2 : 9|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ COUNTER : 53|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 51|4@0+ (1,0) [0|15] "" EON
|
||||
|
||||
BO_ 450 EPB_STATUS: 8 EPB
|
||||
SG_ EPB_ACTIVE : 3|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ EPB_STATE : 29|2@0+ (1,0) [0|3] "" EON
|
||||
@@ -283,6 +276,13 @@ BO_ 401 GEARBOX: 8 PCM
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EON
|
||||
|
||||
BO_ 432 STANDSTILL: 7 VSA
|
||||
SG_ WHEELS_MOVING : 12|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ BRAKE_ERROR_1 : 11|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ BRAKE_ERROR_2 : 9|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ COUNTER : 53|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 51|4@0+ (1,0) [0|15] "" EON
|
||||
|
||||
BO_ 446 BRAKE_MODULE: 3 VSA
|
||||
SG_ BRAKE_PRESSED : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ COUNTER : 21|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
@@ -1,6 +1,24 @@
|
||||
CM_ "AUTOGENERATED FILE, DO NOT EDIT"
|
||||
|
||||
|
||||
CM_ "Imported file _comma.dbc starts here"
|
||||
BO_ 512 GAS_COMMAND: 6 EON
|
||||
SG_ GAS_COMMAND : 7|16@0+ (0.253984064,-83.3) [0|1] "" INTERCEPTOR
|
||||
SG_ GAS_COMMAND2 : 23|16@0+ (0.126992032,-83.3) [0|1] "" INTERCEPTOR
|
||||
SG_ ENABLE : 39|1@0+ (1,0) [0|1] "" INTERCEPTOR
|
||||
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" INTERCEPTOR
|
||||
SG_ CHECKSUM : 43|4@0+ (1,0) [0|3] "" INTERCEPTOR
|
||||
|
||||
BO_ 513 GAS_SENSOR: 6 INTERCEPTOR
|
||||
SG_ INTERCEPTOR_GAS : 7|16@0+ (0.253984064,-83.3) [0|1] "" EON
|
||||
SG_ INTERCEPTOR_GAS2 : 23|16@0+ (0.126992032,-83.3) [0|1] "" EON
|
||||
SG_ STATE : 39|8@0+ (1,0) [0|255] "" EON
|
||||
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 43|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
VAL_ 513 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND" 1 "FAULT_BAD_CHECKSUM" 0 "NO_FAULT" ;
|
||||
|
||||
|
||||
CM_ "Imported file _honda_2017.dbc starts here"
|
||||
VERSION ""
|
||||
|
||||
@@ -81,13 +99,13 @@ BO_ 490 VEHICLE_DYNAMICS: 8 VSA
|
||||
BO_ 506 BRAKE_COMMAND: 8 ADAS
|
||||
SG_ COMPUTER_BRAKE : 7|10@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ ZEROS_BOH : 13|5@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ COMPUTER_BRAKE_REQUEST : 8|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ BRAKE_PUMP_REQUEST : 8|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_BOH2 : 23|3@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_OVERRIDE : 20|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_BOH3 : 19|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_FAULT_CMD : 18|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_CANCEL_CMD : 17|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ COMPUTER_BRAKE_REQUEST_2 : 16|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ COMPUTER_BRAKE_REQUEST : 16|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ SET_ME_0X80 : 31|8@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ BRAKE_LIGHTS : 39|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_STATES : 38|7@0+ (1,0) [0|1] "" EBCM
|
||||
@@ -211,6 +229,7 @@ VAL_ 829 BEEP 3 "single_beep" 2 "triple_beep" 1 "repeated_beep" 0 "no_beep" ;
|
||||
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
|
||||
@@ -282,4 +301,4 @@ VAL_ 422 LIGHTS_SETTING 3 "high_beam" 2 "low_beam" 1 "position" 0 "no_lights" ;
|
||||
VAL_ 422 CRUISE_SETTING 3 "distance_adj" 2 "tbd" 1 "lkas_button" 0 "none" ;
|
||||
VAL_ 891 WIPERS 4 "High" 2 "Low" 0 "Off" ;
|
||||
|
||||
CM_ "CHFFR_METRIC 342 STEER_ANGLE STEER_ANGLE 0.36 180; CHFFR_METRIC 380 ENGINE_RPM ENGINE_RPM 1 0; CHFFR_METRIC 804 ENGINE_TEMPERATURE ENGINE_TEMPERATURE 1 0";
|
||||
CM_ "CHFFR_METRIC 342 STEER_ANGLE STEER_ANGLE 0.36 180; CHFFR_METRIC 380 ENGINE_RPM ENGINE_RPM 1 0; CHFFR_METRIC 804 ENGINE_TEMPERATURE ENGINE_TEMPERATURE 1 0";
|
||||
|
||||
326
opendbc/honda_fit_ex_2018_can_generated.dbc
Normal file
326
opendbc/honda_fit_ex_2018_can_generated.dbc
Normal file
@@ -0,0 +1,326 @@
|
||||
CM_ "AUTOGENERATED FILE, DO NOT EDIT"
|
||||
|
||||
|
||||
CM_ "Imported file _comma.dbc starts here"
|
||||
BO_ 512 GAS_COMMAND: 6 EON
|
||||
SG_ GAS_COMMAND : 7|16@0+ (0.253984064,-83.3) [0|1] "" INTERCEPTOR
|
||||
SG_ GAS_COMMAND2 : 23|16@0+ (0.126992032,-83.3) [0|1] "" INTERCEPTOR
|
||||
SG_ ENABLE : 39|1@0+ (1,0) [0|1] "" INTERCEPTOR
|
||||
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" INTERCEPTOR
|
||||
SG_ CHECKSUM : 43|4@0+ (1,0) [0|3] "" INTERCEPTOR
|
||||
|
||||
BO_ 513 GAS_SENSOR: 6 INTERCEPTOR
|
||||
SG_ INTERCEPTOR_GAS : 7|16@0+ (0.253984064,-83.3) [0|1] "" EON
|
||||
SG_ INTERCEPTOR_GAS2 : 23|16@0+ (0.126992032,-83.3) [0|1] "" EON
|
||||
SG_ STATE : 39|8@0+ (1,0) [0|255] "" EON
|
||||
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 43|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
VAL_ 513 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND" 1 "FAULT_BAD_CHECKSUM" 0 "NO_FAULT" ;
|
||||
|
||||
|
||||
CM_ "Imported file _honda_2017.dbc starts here"
|
||||
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_
|
||||
|
||||
BU_: EBCM ADAS PCM EPS VSA SCM BDY XXX EPB EON
|
||||
|
||||
BO_ 344 ENGINE_DATA: 8 PCM
|
||||
SG_ XMISSION_SPEED : 7|16@0+ (0.01,0) [0|250] "kph" EON
|
||||
SG_ ENGINE_RPM : 23|16@0+ (1,0) [0|15000] "rpm" EON
|
||||
SG_ XMISSION_SPEED2 : 39|16@0+ (0.01,0) [0|250] "kph" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EON
|
||||
SG_ ODOMETER : 55|8@0+ (0.010588,0) [0|255] "km" XXX
|
||||
|
||||
BO_ 380 POWERTRAIN_DATA: 8 PCM
|
||||
SG_ PEDAL_GAS : 7|8@0+ (1,0) [0|255] "" EON
|
||||
SG_ ENGINE_RPM : 23|16@0+ (1,0) [0|15000] "rpm" EON
|
||||
SG_ GAS_PRESSED : 39|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ ACC_STATUS : 38|1@0+ (1,0) [0|1] "rpm" EON
|
||||
SG_ BOH_17C : 37|5@0+ (1,0) [0|1] "rpm" EON
|
||||
SG_ BRAKE_SWITCH : 32|1@0+ (1,0) [0|1] "rpm" EON
|
||||
SG_ BOH2_17C : 47|10@0+ (1,0) [0|1] "rpm" EON
|
||||
SG_ BRAKE_PRESSED : 53|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ BOH3_17C : 52|5@0+ (1,0) [0|1] "rpm" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 432 STANDSTILL: 7 VSA
|
||||
SG_ CONTROLLED_STANDSTILL : 0|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ WHEELS_MOVING : 12|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ BRAKE_ERROR_1 : 11|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ BRAKE_ERROR_2 : 9|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ COUNTER : 53|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 51|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 464 WHEEL_SPEEDS: 8 VSA
|
||||
SG_ WHEEL_SPEED_FL : 7|15@0+ (0.01,0) [0|250] "kph" EON
|
||||
SG_ WHEEL_SPEED_FR : 8|15@0+ (0.01,0) [0|250] "kph" EON
|
||||
SG_ WHEEL_SPEED_RL : 25|15@0+ (0.01,0) [0|250] "kph" EON
|
||||
SG_ WHEEL_SPEED_RR : 42|15@0+ (0.01,0) [0|250] "kph" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 490 VEHICLE_DYNAMICS: 8 VSA
|
||||
SG_ LONG_ACCEL : 23|16@0- (0.0015384,0) [-20|20] "m/s2" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 506 BRAKE_COMMAND: 8 ADAS
|
||||
SG_ COMPUTER_BRAKE : 7|10@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ ZEROS_BOH : 13|5@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ BRAKE_PUMP_REQUEST : 8|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_BOH2 : 23|3@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_OVERRIDE : 20|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_BOH3 : 19|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_FAULT_CMD : 18|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_CANCEL_CMD : 17|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ COMPUTER_BRAKE_REQUEST : 16|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ SET_ME_0X80 : 31|8@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ BRAKE_LIGHTS : 39|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_STATES : 38|7@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CHIME : 47|3@0+ (1,0) [0|7] "" EBCM
|
||||
SG_ ZEROS_BOH6 : 44|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ FCW : 43|2@0+ (1,0) [0|3] "" EBCM
|
||||
SG_ ZEROS_BOH4 : 55|8@0+ (1,0) [0|0] "" EBCM
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EBCM
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EBCM
|
||||
|
||||
BO_ 597 ROUGH_WHEEL_SPEED: 8 VSA
|
||||
SG_ WHEEL_SPEED_FL : 7|8@0+ (1,0) [0|255] "mph" EON
|
||||
SG_ WHEEL_SPEED_FR : 15|8@0+ (1,0) [0|255] "mph" EON
|
||||
SG_ WHEEL_SPEED_RL : 23|8@0+ (1,0) [0|255] "mph" EON
|
||||
SG_ WHEEL_SPEED_RR : 31|8@0+ (1,0) [0|255] "mph" EON
|
||||
SG_ SET_TO_X55 : 39|8@0+ (1,0) [0|255] "" EON
|
||||
SG_ SET_TO_X55_2 : 47|8@0+ (1,0) [0|255] "" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EON
|
||||
|
||||
BO_ 773 SEATBELT_STATUS: 7 BDY
|
||||
SG_ SEATBELT_DRIVER_LAMP : 7|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ SEATBELT_PASS_UNLATCHED : 10|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ SEATBELT_PASS_LATCHED : 11|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ SEATBELT_DRIVER_UNLATCHED : 12|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ SEATBELT_DRIVER_LATCHED : 13|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ PASS_AIRBAG_OFF : 14|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ PASS_AIRBAG_ON : 15|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ COUNTER : 53|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 51|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 777 LOCK_STATUS: 8 XXX
|
||||
SG_ DOORS_UNLOCKED : 54|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ DOORS_LOCKED : 55|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 780 ACC_HUD: 8 ADAS
|
||||
SG_ PCM_SPEED : 7|16@0+ (0.01,0) [0|250] "kph" BDY
|
||||
SG_ PCM_GAS : 23|8@0+ (1,0) [0|127] "" BDY
|
||||
SG_ CRUISE_SPEED : 31|8@0+ (1,0) [0|255] "" BDY
|
||||
SG_ DTC_MODE : 39|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BOH : 38|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ ACC_PROBLEM : 37|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ FCM_OFF : 36|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ BOH_2 : 35|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ FCM_PROBLEM : 34|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ RADAR_OBSTRUCTED : 33|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ ENABLE_MINI_CAR : 32|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X03 : 47|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_LEAD : 45|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_3 : 43|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_4 : 42|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_5 : 41|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CRUISE_CONTROL_LABEL : 40|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_DISTANCE_3 : 52|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X03_2 : 55|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ SET_ME_X01 : 48|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|3] "" BDY
|
||||
|
||||
BO_ 804 CRUISE: 8 PCM
|
||||
SG_ HUD_SPEED_KPH : 7|8@0+ (1,0) [0|255] "kph" EON
|
||||
SG_ HUD_SPEED_MPH : 15|8@0+ (1,0) [0|255] "mph" EON
|
||||
SG_ TRIP_FUEL_CONSUMED : 23|16@0+ (1,0) [0|255] "" EON
|
||||
SG_ CRUISE_SPEED_PCM : 39|8@0+ (1,0) [0|255] "" EON
|
||||
SG_ BOH2 : 47|8@0- (1,0) [0|255] "" EON
|
||||
SG_ BOH3 : 55|8@0+ (1,0) [0|255] "" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 829 LKAS_HUD: 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_ 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_ SET_ME_X48 : 31|8@0+ (1,0) [0|255] "" BDY
|
||||
SG_ COUNTER : 37|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CHECKSUM : 35|4@0+ (1,0) [0|15] "" BDY
|
||||
|
||||
BO_ 892 CRUISE_PARAMS: 8 PCM
|
||||
SG_ CRUISE_SPEED_OFFSET : 31|8@0- (0.1,0) [-128|127] "kph" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 1029 DOORS_STATUS: 8 BDY
|
||||
SG_ DOOR_OPEN_FL : 37|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ DOOR_OPEN_FR : 38|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ DOOR_OPEN_RL : 39|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ DOOR_OPEN_RR : 40|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ TRUNK_OPEN : 41|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
CM_ SG_ 490 LONG_ACCEL "wheel speed derivative, noisy and zero snapping";
|
||||
CM_ SG_ 773 PASS_AIRBAG_ON "Might just be indicator light";
|
||||
CM_ SG_ 773 PASS_AIRBAG_OFF "Might just be indicator light";
|
||||
CM_ SG_ 780 CRUISE_SPEED "255 = no speed";
|
||||
CM_ SG_ 804 CRUISE_SPEED_PCM "255 = no speed";
|
||||
CM_ SG_ 829 BEEP "beeps are pleasant, chimes are for warnngs etc...";
|
||||
|
||||
|
||||
VAL_ 506 FCW 3 "fcw" 2 "fcw" 1 "fcw" 0 "no_fcw" ;
|
||||
VAL_ 506 CHIME 4 "double_chime" 3 "single_chime" 2 "continuous_chime" 1 "repeating_chime" 0 "no_chime" ;
|
||||
VAL_ 780 CRUISE_SPEED 255 "no_speed" 252 "stopped" ;
|
||||
VAL_ 780 HUD_LEAD 3 "acc_off" 2 "solid_car" 1 "dashed_car" 0 "no_car" ;
|
||||
VAL_ 829 BEEP 3 "single_beep" 2 "triple_beep" 1 "repeated_beep" 0 "no_beep" ;
|
||||
|
||||
CM_ "honda_fit_ex_2018_can.dbc starts here"
|
||||
|
||||
|
||||
|
||||
BO_ 145 KINEMATICS: 8 XXX
|
||||
SG_ LAT_ACCEL : 7|10@0+ (0.02,-512) [-20|20] "m/s2" EON
|
||||
|
||||
BO_ 228 STEERING_CONTROL: 5 ADAS
|
||||
SG_ STEER_TORQUE : 7|16@0- (1,0) [-3840|3840] "" EPS
|
||||
SG_ STEER_TORQUE_REQUEST : 23|1@0+ (1,0) [0|1] "" EPS
|
||||
SG_ SET_ME_X00 : 22|7@0+ (1,0) [0|127] "" EPS
|
||||
SG_ SET_ME_X00_2 : 31|8@0+ (1,0) [0|0] "" EPS
|
||||
SG_ COUNTER : 37|2@0+ (1,0) [0|3] "" EPS
|
||||
SG_ CHECKSUM : 35|4@0+ (1,0) [0|15] "" EPS
|
||||
|
||||
BO_ 304 GAS_PEDAL_2: 8 PCM
|
||||
SG_ ENGINE_TORQUE_ESTIMATE : 7|16@0- (1,0) [-1000|1000] "Nm" EON
|
||||
SG_ ENGINE_TORQUE_REQUEST : 23|16@0- (1,0) [-1000|1000] "Nm" EON
|
||||
SG_ CAR_GAS : 39|8@0+ (1,0) [0|255] "" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
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_ COUNTER : 45|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 43|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 399 STEER_STATUS: 7 EPS
|
||||
SG_ STEER_TORQUE_SENSOR : 7|16@0- (1,0) [-31000|31000] "tbd" EON
|
||||
SG_ STEER_TORQUE_MOTOR : 23|16@0- (1,0) [-31000|31000] "tbd" EON
|
||||
SG_ STEER_STATUS : 39|4@0+ (1,0) [0|15] "" EON
|
||||
SG_ STEER_CONTROL_ACTIVE : 35|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ COUNTER : 53|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 51|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 401 GEARBOX: 8 PCM
|
||||
SG_ GEAR_SHIFTER : 5|6@0+ (1,0) [0|63] "" EON
|
||||
SG_ GEAR : 43|4@0+ (1,0) [0|15] "" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 420 VSA_STATUS: 8 VSA
|
||||
SG_ USER_BRAKE : 7|16@0+ (0.015625,-1.609375) [0|1000] "" EON
|
||||
SG_ ESP_DISABLED : 28|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ BRAKE_HOLD_ACTIVE : 46|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ BRAKE_HOLD_ENABLED : 45|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 422 SCM_BUTTONS: 8 SCM
|
||||
SG_ CRUISE_BUTTONS : 7|3@0+ (1,0) [0|7] "" EON
|
||||
SG_ LIGHTS_SETTING : 1|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ MAIN_ON : 47|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ CRUISE_SETTING : 43|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 487 BRAKE_PRESSURE: 4 VSA
|
||||
SG_ BRAKE_PRESSURE1 : 7|10@0+ (0.015625,-103) [0|1000] "" EON
|
||||
SG_ BRAKE_PRESSURE2 : 9|10@0+ (0.015625,-103) [0|1000] "" EON
|
||||
SG_ CHECKSUM : 27|4@0+ (1,0) [0|3] "" EON
|
||||
SG_ COUNTER : 29|2@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 660 SCM_FEEDBACK: 8 SCM
|
||||
SG_ RIGHT_BLINKER : 6|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ LEFT_BLINKER : 5|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ WIPERS_SPEED : 4|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EON
|
||||
|
||||
BO_ 862 HIGHBEAM_CONTROL: 8 ADAS
|
||||
SG_ ZEROS_BOH : 7|50@0+ (1,0) [0|127] "" BDY
|
||||
SG_ ZEROS_BOH_2 : 48|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ HIGHBEAMS_ON : 52|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ AUTO_HIGHBEAMS_ACTIVE : 53|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" XXX
|
||||
|
||||
BO_ 884 STALK_STATUS: 8 XXX
|
||||
SG_ AUTO_HEADLIGHTS : 46|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ HIGH_BEAM_HOLD : 47|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ HIGH_BEAM_FLASH : 45|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ HEADLIGHTS_ON : 54|1@0+ (1,0) [0|1] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
|
||||
CM_ SG_ 401 GEAR "10 = reverse, 11 = transition";
|
||||
CM_ SG_ 420 BRAKE_HOLD_RELATED "On when Brake Hold engaged";
|
||||
|
||||
VAL_ 399 STEER_STATUS 5 "fault" 4 "no_torque_alert_2" 2 "no_torque_alert_1" 0 "normal" ;
|
||||
VAL_ 401 GEAR_SHIFTER 32 "L" 16 "S" 8 "D" 4 "N" 2 "R" 1 "P" ;
|
||||
VAL_ 401 GEAR 7 "L" 10 "S" 4 "D" 3 "N" 2 "R" 1 "P" ;
|
||||
VAL_ 422 CRUISE_BUTTONS 7 "tbd" 6 "tbd" 5 "tbd" 4 "accel_res" 3 "decel_set" 2 "cancel" 1 "main" 0 "none" ;
|
||||
VAL_ 422 LIGHTS_SETTING 3 "high_beam" 2 "low_beam" 1 "position" 0 "no_lights" ;
|
||||
VAL_ 422 CRUISE_SETTING 3 "distance_adj" 2 "tbd" 1 "lkas_button" 0 "none" ;
|
||||
|
||||
CM_ "CHFFR_METRIC 342 STEER_ANGLE STEER_ANGLE 0.36 180; CHFFR_METRIC 380 ENGINE_RPM ENGINE_RPM 1 0; CHFFR_METRIC 804 ENGINE_TEMPERATURE ENGINE_TEMPERATURE 1 0";
|
||||
@@ -1,6 +1,24 @@
|
||||
CM_ "AUTOGENERATED FILE, DO NOT EDIT"
|
||||
|
||||
|
||||
CM_ "Imported file _comma.dbc starts here"
|
||||
BO_ 512 GAS_COMMAND: 6 EON
|
||||
SG_ GAS_COMMAND : 7|16@0+ (0.253984064,-83.3) [0|1] "" INTERCEPTOR
|
||||
SG_ GAS_COMMAND2 : 23|16@0+ (0.126992032,-83.3) [0|1] "" INTERCEPTOR
|
||||
SG_ ENABLE : 39|1@0+ (1,0) [0|1] "" INTERCEPTOR
|
||||
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" INTERCEPTOR
|
||||
SG_ CHECKSUM : 43|4@0+ (1,0) [0|3] "" INTERCEPTOR
|
||||
|
||||
BO_ 513 GAS_SENSOR: 6 INTERCEPTOR
|
||||
SG_ INTERCEPTOR_GAS : 7|16@0+ (0.253984064,-83.3) [0|1] "" EON
|
||||
SG_ INTERCEPTOR_GAS2 : 23|16@0+ (0.126992032,-83.3) [0|1] "" EON
|
||||
SG_ STATE : 39|8@0+ (1,0) [0|255] "" EON
|
||||
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 43|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
VAL_ 513 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND" 1 "FAULT_BAD_CHECKSUM" 0 "NO_FAULT" ;
|
||||
|
||||
|
||||
CM_ "Imported file _honda_2017.dbc starts here"
|
||||
VERSION ""
|
||||
|
||||
@@ -81,13 +99,13 @@ BO_ 490 VEHICLE_DYNAMICS: 8 VSA
|
||||
BO_ 506 BRAKE_COMMAND: 8 ADAS
|
||||
SG_ COMPUTER_BRAKE : 7|10@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ ZEROS_BOH : 13|5@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ COMPUTER_BRAKE_REQUEST : 8|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ BRAKE_PUMP_REQUEST : 8|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_BOH2 : 23|3@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_OVERRIDE : 20|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_BOH3 : 19|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_FAULT_CMD : 18|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_CANCEL_CMD : 17|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ COMPUTER_BRAKE_REQUEST_2 : 16|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ COMPUTER_BRAKE_REQUEST : 16|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ SET_ME_0X80 : 31|8@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ BRAKE_LIGHTS : 39|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_STATES : 38|7@0+ (1,0) [0|1] "" EBCM
|
||||
@@ -211,6 +229,7 @@ VAL_ 829 BEEP 3 "single_beep" 2 "triple_beep" 1 "repeated_beep" 0 "no_beep" ;
|
||||
CM_ "honda_odyssey_exl_2018.dbc starts here"
|
||||
|
||||
|
||||
|
||||
BO_ 228 STEERING_CONTROL: 5 ADAS
|
||||
SG_ STEER_TORQUE : 7|16@0- (1,0) [-3840|3840] "" EPS
|
||||
SG_ STEER_TORQUE_REQUEST : 23|1@0+ (1,0) [0|1] "" EPS
|
||||
|
||||
@@ -1,6 +1,24 @@
|
||||
CM_ "AUTOGENERATED FILE, DO NOT EDIT"
|
||||
|
||||
|
||||
CM_ "Imported file _comma.dbc starts here"
|
||||
BO_ 512 GAS_COMMAND: 6 EON
|
||||
SG_ GAS_COMMAND : 7|16@0+ (0.253984064,-83.3) [0|1] "" INTERCEPTOR
|
||||
SG_ GAS_COMMAND2 : 23|16@0+ (0.126992032,-83.3) [0|1] "" INTERCEPTOR
|
||||
SG_ ENABLE : 39|1@0+ (1,0) [0|1] "" INTERCEPTOR
|
||||
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" INTERCEPTOR
|
||||
SG_ CHECKSUM : 43|4@0+ (1,0) [0|3] "" INTERCEPTOR
|
||||
|
||||
BO_ 513 GAS_SENSOR: 6 INTERCEPTOR
|
||||
SG_ INTERCEPTOR_GAS : 7|16@0+ (0.253984064,-83.3) [0|1] "" EON
|
||||
SG_ INTERCEPTOR_GAS2 : 23|16@0+ (0.126992032,-83.3) [0|1] "" EON
|
||||
SG_ STATE : 39|8@0+ (1,0) [0|255] "" EON
|
||||
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 43|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
VAL_ 513 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND" 1 "FAULT_BAD_CHECKSUM" 0 "NO_FAULT" ;
|
||||
|
||||
|
||||
CM_ "Imported file _honda_2017.dbc starts here"
|
||||
VERSION ""
|
||||
|
||||
@@ -81,13 +99,13 @@ BO_ 490 VEHICLE_DYNAMICS: 8 VSA
|
||||
BO_ 506 BRAKE_COMMAND: 8 ADAS
|
||||
SG_ COMPUTER_BRAKE : 7|10@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ ZEROS_BOH : 13|5@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ COMPUTER_BRAKE_REQUEST : 8|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ BRAKE_PUMP_REQUEST : 8|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_BOH2 : 23|3@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_OVERRIDE : 20|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_BOH3 : 19|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_FAULT_CMD : 18|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_CANCEL_CMD : 17|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ COMPUTER_BRAKE_REQUEST_2 : 16|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ COMPUTER_BRAKE_REQUEST : 16|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ SET_ME_0X80 : 31|8@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ BRAKE_LIGHTS : 39|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_STATES : 38|7@0+ (1,0) [0|1] "" EBCM
|
||||
@@ -211,6 +229,7 @@ VAL_ 829 BEEP 3 "single_beep" 2 "triple_beep" 1 "repeated_beep" 0 "no_beep" ;
|
||||
CM_ "honda_pilot_touring_2017_can.dbc starts here"
|
||||
|
||||
|
||||
|
||||
BO_ 145 KINEMATICS: 8 XXX
|
||||
SG_ LAT_ACCEL : 7|10@0+ (0.02,-512) [-20|20] "m/s2" EON
|
||||
|
||||
|
||||
@@ -1,6 +1,24 @@
|
||||
CM_ "AUTOGENERATED FILE, DO NOT EDIT"
|
||||
|
||||
|
||||
CM_ "Imported file _comma.dbc starts here"
|
||||
BO_ 512 GAS_COMMAND: 6 EON
|
||||
SG_ GAS_COMMAND : 7|16@0+ (0.253984064,-83.3) [0|1] "" INTERCEPTOR
|
||||
SG_ GAS_COMMAND2 : 23|16@0+ (0.126992032,-83.3) [0|1] "" INTERCEPTOR
|
||||
SG_ ENABLE : 39|1@0+ (1,0) [0|1] "" INTERCEPTOR
|
||||
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" INTERCEPTOR
|
||||
SG_ CHECKSUM : 43|4@0+ (1,0) [0|3] "" INTERCEPTOR
|
||||
|
||||
BO_ 513 GAS_SENSOR: 6 INTERCEPTOR
|
||||
SG_ INTERCEPTOR_GAS : 7|16@0+ (0.253984064,-83.3) [0|1] "" EON
|
||||
SG_ INTERCEPTOR_GAS2 : 23|16@0+ (0.126992032,-83.3) [0|1] "" EON
|
||||
SG_ STATE : 39|8@0+ (1,0) [0|255] "" EON
|
||||
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 43|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
VAL_ 513 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND" 1 "FAULT_BAD_CHECKSUM" 0 "NO_FAULT" ;
|
||||
|
||||
|
||||
CM_ "Imported file _honda_2017.dbc starts here"
|
||||
VERSION ""
|
||||
|
||||
@@ -81,13 +99,13 @@ BO_ 490 VEHICLE_DYNAMICS: 8 VSA
|
||||
BO_ 506 BRAKE_COMMAND: 8 ADAS
|
||||
SG_ COMPUTER_BRAKE : 7|10@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ ZEROS_BOH : 13|5@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ COMPUTER_BRAKE_REQUEST : 8|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ BRAKE_PUMP_REQUEST : 8|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_BOH2 : 23|3@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_OVERRIDE : 20|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_BOH3 : 19|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_FAULT_CMD : 18|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_CANCEL_CMD : 17|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ COMPUTER_BRAKE_REQUEST_2 : 16|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ COMPUTER_BRAKE_REQUEST : 16|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ SET_ME_0X80 : 31|8@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ BRAKE_LIGHTS : 39|1@0+ (1,0) [0|1] "" EBCM
|
||||
SG_ CRUISE_STATES : 38|7@0+ (1,0) [0|1] "" EBCM
|
||||
@@ -211,6 +229,7 @@ VAL_ 829 BEEP 3 "single_beep" 2 "triple_beep" 1 "repeated_beep" 0 "no_beep" ;
|
||||
CM_ "honda_ridgeline_black_edition_2017_can.dbc starts here"
|
||||
|
||||
|
||||
|
||||
BO_ 145 KINEMATICS: 8 XXX
|
||||
SG_ LAT_ACCEL : 7|10@0+ (0.02,-512) [-20|20] "m/s2" EON
|
||||
|
||||
|
||||
1391
opendbc/kia_sorento_2018.dbc
Normal file
1391
opendbc/kia_sorento_2018.dbc
Normal file
File diff suppressed because it is too large
Load Diff
244
opendbc/toyota_avalon_2017_pt_generated.dbc
Normal file
244
opendbc/toyota_avalon_2017_pt_generated.dbc
Normal file
@@ -0,0 +1,244 @@
|
||||
CM_ "AUTOGENERATED FILE, DO NOT EDIT"
|
||||
|
||||
|
||||
CM_ "Imported file _comma.dbc starts here"
|
||||
BO_ 359 STEERING_IPAS_COMMA: 8 IPAS
|
||||
SG_ STATE : 7|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ ANGLE : 3|12@0- (1.5,0) [-510|510] "deg" XXX
|
||||
SG_ SET_ME_X10 : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ DIRECTION_CMD : 38|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X40 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
CM BO_ STEERING_IPAS_COMMA "Copy of msg 614 so we can do angle control while the Park Assist ECU is connected (Panda spoofs 614 with 359 on connector J70). Note that addresses 0x266 and 0x167 are checksum-invariant";
|
||||
|
||||
|
||||
CM_ "Imported file _toyota_2017.dbc starts here"
|
||||
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_: XXX DSU HCU EPS IPAS
|
||||
|
||||
BO_ 36 KINEMATICS: 8 XXX
|
||||
SG_ ACCEL_Y : 33|10@0+ (1,-512) [0|65535] "" XXX
|
||||
SG_ YAW_RATE : 1|10@0+ (1,-512) [0|65535] "" XXX
|
||||
SG_ STEERING_TORQUE : 17|10@0+ (1,-512) [0|65535] "" XXX
|
||||
|
||||
BO_ 166 BRAKE: 8 XXX
|
||||
SG_ BRAKE_AMOUNT : 7|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ BRAKE_PEDAL : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 170 WHEEL_SPEEDS: 8 XXX
|
||||
SG_ WHEEL_SPEED_FR : 7|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
SG_ WHEEL_SPEED_FL : 23|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
SG_ WHEEL_SPEED_RR : 39|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
SG_ WHEEL_SPEED_RL : 55|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
|
||||
BO_ 180 SPEED: 8 XXX
|
||||
SG_ ENCODER : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SPEED : 47|16@0+ (0.01,0) [0|250] "kph" XXX
|
||||
|
||||
BO_ 466 PCM_CRUISE: 8 XXX
|
||||
SG_ GAS_RELEASED : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ STANDSTILL_ON : 12|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ ACCEL_NET : 23|16@0- (0.001,0) [-20|20] "m/s2" XXX
|
||||
SG_ CRUISE_STATE : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 552 ACCELEROMETER: 8 XXX
|
||||
SG_ ACCEL_Z : 22|15@0- (1,0) [0|32767] "" XXX
|
||||
SG_ ACCEL_X : 6|15@0- (0.001,0) [-20|20] "m/s2" XXX
|
||||
|
||||
BO_ 560 BRAKE_MODULE2: 7 XXX
|
||||
SG_ BRAKE_PRESSED : 26|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 614 STEERING_IPAS: 8 IPAS
|
||||
SG_ STATE : 7|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ ANGLE : 3|12@0- (1.5,0) [-510|510] "deg" XXX
|
||||
SG_ SET_ME_X10 : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ DIRECTION_CMD : 38|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X40 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 643 PRE_COLLISION: 8 XXX
|
||||
|
||||
BO_ 740 STEERING_LKA: 5 XXX
|
||||
SG_ LKA_STATE : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ STEER_REQUEST : 0|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ COUNTER : 6|6@0+ (1,0) [0|63] "" XXX
|
||||
SG_ SET_ME_1 : 7|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ STEER_TORQUE_CMD : 15|16@0- (1,0) [0|65535] "" XXX
|
||||
SG_ CHECKSUM : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 742 LEAD_INFO: 8 DSU
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" HCU
|
||||
SG_ LEAD_REL_SPEED : 23|12@0- (0.025,0) [-100|100] "m/s" HCU
|
||||
SG_ LEAD_LONG_DIST : 7|13@0+ (0.05,0) [0|300] "m" HCU
|
||||
|
||||
BO_ 835 ACC_CONTROL: 8 DSU
|
||||
SG_ ACCEL_CMD : 7|16@0- (0.001,0) [-20|20] "m/s2" HCU
|
||||
SG_ SET_ME_X63 : 23|8@0+ (1,0) [0|255] "" HCU
|
||||
SG_ SET_ME_1 : 30|1@0+ (1,0) [0|1] "" HCU
|
||||
SG_ RELEASE_STANDSTILL : 31|1@0+ (1,0) [0|1] "" HCU
|
||||
SG_ CANCEL_REQ : 24|1@0+ (1,0) [0|1] "" HCU
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 1556 STEERING_LEVERS: 8 XXX
|
||||
SG_ TURN_SIGNALS : 29|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
|
||||
SG_ STEER_ANGLE : 3|12@0- (1.5,0) [-500|500] "deg" XXX
|
||||
SG_ STEER_FRACTION : 39|4@0- (0.1,0) [-0.7|0.7] "deg" XXX
|
||||
SG_ STEER_RATE : 35|12@0- (1,0) [-2000|2000] "deg/s" XXX
|
||||
|
||||
BO_ 467 PCM_CRUISE_2: 8 XXX
|
||||
SG_ MAIN_ON : 15|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ LOW_SPEED_LOCKOUT : 14|2@0+ (1,0) [0|3] "kph" XXX
|
||||
SG_ SET_SPEED : 23|8@0+ (1,0) [0|255] "kph" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 921 PCM_CRUISE_SM: 8 XXX
|
||||
SG_ MAIN_ON : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CRUISE_CONTROL_STATE : 11|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ UI_SET_SPEED : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 951 ESP_CONTROL: 8 ESP
|
||||
SG_ TC_DISABLED : 13|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" 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
|
||||
SG_ SET_ME_X10 : 39|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X80 : 55|8@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1042 LKAS_HUD: 8 XXX
|
||||
SG_ BARRIERS : 1|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ RIGHT_LINE : 3|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ LEFT_LINE : 5|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X01 : 7|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X01_2 : 11|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ LDA_ALERT : 9|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ TWO_BEEPS : 12|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ ADJUSTING_CAMERA : 13|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ LDA_MALFUNCTION : 15|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REPEATED_BEEPS : 32|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X0C : 23|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X2C : 47|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X38 : 55|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X02 : 63|8@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1553 UI_SEETING: 8 XXX
|
||||
SG_ UNITS : 26|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 1568 SEATS_DOORS: 8 XXX
|
||||
SG_ SEATBELT_DRIVER_UNLATCHED : 62|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_FL : 45|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_RL : 42|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_RR : 43|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_FR : 44|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1570 LIGHT_STALK: 8 SCM
|
||||
SG_ AUTO_HIGH_BEAM : 37|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";
|
||||
CM_ SG_ 466 ACCEL_NET "net acceleration produced by the system, given ACCEL_CMD, road grade and other factors";
|
||||
CM_ SG_ 560 BRAKE_PRESSED "another brake pressed?";
|
||||
CM_ SG_ 951 BRAKE_LIGHTS_ACC "brake lights when ACC commands decel";
|
||||
CM_ SG_ 608 STEER_TORQUE_DRIVER "driver torque";
|
||||
CM_ SG_ 608 STEER_OVERRIDE "set when driver torque exceeds a certain value";
|
||||
CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active";
|
||||
CM_ SG_ 37 STEER_FRACTION "1/15th of the signal STEER_ANGLE, which is 1.5 deg; note that 0x8 is never set";
|
||||
CM_ SG_ 37 STEER_RATE "factor is tbd";
|
||||
CM_ SG_ 467 SET_SPEED "43 kph are shown as 28mph, so conversion isnt perfect";
|
||||
CM_ SG_ 467 LOW_SPEED_LOCKOUT "in low speed lockout, system would always disengage below 28mph";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in UI with user set unit";
|
||||
CM_ SG_ 1042 SET_ME_1 "unclear what this is, but it's always 1 in drive traces";
|
||||
CM_ SG_ 1042 REPEATED_BEEPS "recommended for fcw and other important alerts";
|
||||
VAL_ 466 CRUISE_STATE 8 "active" 7 "standstill" 1 "off" ;
|
||||
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_ 1553 UNITS 1 "km" 2 "miles";
|
||||
VAL_ 1556 TURN_SIGNALS 3 "none" 2 "right" 1 "left" ;
|
||||
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 "double" 1 "solid" 0 "none";
|
||||
VAL_ 1042 LEFT_LINE 3 "orange" 2 "double" 1 "solid" 0 "none";
|
||||
VAL_ 921 CRUISE_CONTROL_STATE 2 "disabled" 11 "hold" 10 "hold_waiting_user_cmd" 6 "enabled" 5 "faulted";
|
||||
|
||||
CM_ "CHFFR_METRIC 37 STEER_ANGLE STEER_ANGLE 0.36 180";
|
||||
|
||||
CM_ "toyota_avalon_2017_pt.dbc starts here"
|
||||
|
||||
|
||||
|
||||
BO_ 550 BRAKE_MODULE: 8 XXX
|
||||
SG_ BRAKE_PRESSURE : 0|9@0+ (1,0) [0|255] "" XXX
|
||||
SG_ BRAKE_POSITION : 16|9@0+ (1,0) [0|65535] "" XXX
|
||||
SG_ BRAKE_PRESSED : 37|1@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 705 GAS_PEDAL: 8 XXX
|
||||
SG_ GAS_RELEASED : 3|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ GAS_PEDAL : 55|8@0+ (0.005,0) [0|1] "" XXX
|
||||
|
||||
BO_ 608 STEER_TORQUE_SENSOR: 8 XXX
|
||||
SG_ STEER_TORQUE_EPS : 47|16@0- (0.73,0) [-20000|20000] "" XXX
|
||||
SG_ STEER_TORQUE_DRIVER : 15|16@0- (1,0) [-32768|32767] "" XXX
|
||||
SG_ STEER_OVERRIDE : 0|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 610 EPS_STATUS: 5 EPS
|
||||
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ LKA_STATE : 31|7@0+ (1,0) [0|127] "" XXX
|
||||
SG_ TYPE : 24|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 956 GEAR_PACKET: 8 XXX
|
||||
SG_ GEAR : 13|6@0+ (1,0) [0|63] "" 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";
|
||||
CM_ SG_ 610 TYPE "seems 1 on Corolla, 0 on all others";
|
||||
VAL_ 956 GEAR 0 "D" 1 "S" 8 "N" 16 "R" 32 "P";
|
||||
VAL_ 610 IPAS_STATE 5 "override" 3 "enabled" 1 "disabled";
|
||||
VAL_ 610 LKA_STATE 25 "temporary_fault" 9 "temporary_fault2" 5 "active" 1 "standby";
|
||||
247
opendbc/toyota_chr_hybrid_2018_pt_generated.dbc
Normal file
247
opendbc/toyota_chr_hybrid_2018_pt_generated.dbc
Normal file
@@ -0,0 +1,247 @@
|
||||
CM_ "AUTOGENERATED FILE, DO NOT EDIT"
|
||||
|
||||
|
||||
CM_ "Imported file _comma.dbc starts here"
|
||||
BO_ 359 STEERING_IPAS_COMMA: 8 IPAS
|
||||
SG_ STATE : 7|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ ANGLE : 3|12@0- (1.5,0) [-510|510] "deg" XXX
|
||||
SG_ SET_ME_X10 : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ DIRECTION_CMD : 38|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X40 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
CM BO_ STEERING_IPAS_COMMA "Copy of msg 614 so we can do angle control while the Park Assist ECU is connected (Panda spoofs 614 with 359 on connector J70). Note that addresses 0x266 and 0x167 are checksum-invariant";
|
||||
|
||||
|
||||
CM_ "Imported file _toyota_2017.dbc starts here"
|
||||
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_: XXX DSU HCU EPS IPAS
|
||||
|
||||
BO_ 36 KINEMATICS: 8 XXX
|
||||
SG_ ACCEL_Y : 33|10@0+ (1,-512) [0|65535] "" XXX
|
||||
SG_ YAW_RATE : 1|10@0+ (1,-512) [0|65535] "" XXX
|
||||
SG_ STEERING_TORQUE : 17|10@0+ (1,-512) [0|65535] "" XXX
|
||||
|
||||
BO_ 166 BRAKE: 8 XXX
|
||||
SG_ BRAKE_AMOUNT : 7|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ BRAKE_PEDAL : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 170 WHEEL_SPEEDS: 8 XXX
|
||||
SG_ WHEEL_SPEED_FR : 7|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
SG_ WHEEL_SPEED_FL : 23|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
SG_ WHEEL_SPEED_RR : 39|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
SG_ WHEEL_SPEED_RL : 55|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
|
||||
BO_ 180 SPEED: 8 XXX
|
||||
SG_ ENCODER : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SPEED : 47|16@0+ (0.01,0) [0|250] "kph" XXX
|
||||
|
||||
BO_ 466 PCM_CRUISE: 8 XXX
|
||||
SG_ GAS_RELEASED : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ STANDSTILL_ON : 12|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ ACCEL_NET : 23|16@0- (0.001,0) [-20|20] "m/s2" XXX
|
||||
SG_ CRUISE_STATE : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 552 ACCELEROMETER: 8 XXX
|
||||
SG_ ACCEL_Z : 22|15@0- (1,0) [0|32767] "" XXX
|
||||
SG_ ACCEL_X : 6|15@0- (0.001,0) [-20|20] "m/s2" XXX
|
||||
|
||||
BO_ 560 BRAKE_MODULE2: 7 XXX
|
||||
SG_ BRAKE_PRESSED : 26|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 614 STEERING_IPAS: 8 IPAS
|
||||
SG_ STATE : 7|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ ANGLE : 3|12@0- (1.5,0) [-510|510] "deg" XXX
|
||||
SG_ SET_ME_X10 : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ DIRECTION_CMD : 38|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X40 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 643 PRE_COLLISION: 8 XXX
|
||||
|
||||
BO_ 740 STEERING_LKA: 5 XXX
|
||||
SG_ LKA_STATE : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ STEER_REQUEST : 0|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ COUNTER : 6|6@0+ (1,0) [0|63] "" XXX
|
||||
SG_ SET_ME_1 : 7|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ STEER_TORQUE_CMD : 15|16@0- (1,0) [0|65535] "" XXX
|
||||
SG_ CHECKSUM : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 742 LEAD_INFO: 8 DSU
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" HCU
|
||||
SG_ LEAD_REL_SPEED : 23|12@0- (0.025,0) [-100|100] "m/s" HCU
|
||||
SG_ LEAD_LONG_DIST : 7|13@0+ (0.05,0) [0|300] "m" HCU
|
||||
|
||||
BO_ 835 ACC_CONTROL: 8 DSU
|
||||
SG_ ACCEL_CMD : 7|16@0- (0.001,0) [-20|20] "m/s2" HCU
|
||||
SG_ SET_ME_X63 : 23|8@0+ (1,0) [0|255] "" HCU
|
||||
SG_ SET_ME_1 : 30|1@0+ (1,0) [0|1] "" HCU
|
||||
SG_ RELEASE_STANDSTILL : 31|1@0+ (1,0) [0|1] "" HCU
|
||||
SG_ CANCEL_REQ : 24|1@0+ (1,0) [0|1] "" HCU
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 1556 STEERING_LEVERS: 8 XXX
|
||||
SG_ TURN_SIGNALS : 29|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
|
||||
SG_ STEER_ANGLE : 3|12@0- (1.5,0) [-500|500] "deg" XXX
|
||||
SG_ STEER_FRACTION : 39|4@0- (0.1,0) [-0.7|0.7] "deg" XXX
|
||||
SG_ STEER_RATE : 35|12@0- (1,0) [-2000|2000] "deg/s" XXX
|
||||
|
||||
BO_ 467 PCM_CRUISE_2: 8 XXX
|
||||
SG_ MAIN_ON : 15|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ LOW_SPEED_LOCKOUT : 14|2@0+ (1,0) [0|3] "kph" XXX
|
||||
SG_ SET_SPEED : 23|8@0+ (1,0) [0|255] "kph" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 921 PCM_CRUISE_SM: 8 XXX
|
||||
SG_ MAIN_ON : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CRUISE_CONTROL_STATE : 11|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ UI_SET_SPEED : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 951 ESP_CONTROL: 8 ESP
|
||||
SG_ TC_DISABLED : 13|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" 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
|
||||
SG_ SET_ME_X10 : 39|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X80 : 55|8@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1042 LKAS_HUD: 8 XXX
|
||||
SG_ BARRIERS : 1|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ RIGHT_LINE : 3|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ LEFT_LINE : 5|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X01 : 7|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X01_2 : 11|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ LDA_ALERT : 9|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ TWO_BEEPS : 12|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ ADJUSTING_CAMERA : 13|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ LDA_MALFUNCTION : 15|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REPEATED_BEEPS : 32|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X0C : 23|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X2C : 47|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X38 : 55|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X02 : 63|8@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1553 UI_SEETING: 8 XXX
|
||||
SG_ UNITS : 26|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 1568 SEATS_DOORS: 8 XXX
|
||||
SG_ SEATBELT_DRIVER_UNLATCHED : 62|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_FL : 45|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_RL : 42|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_RR : 43|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_FR : 44|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1570 LIGHT_STALK: 8 SCM
|
||||
SG_ AUTO_HIGH_BEAM : 37|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";
|
||||
CM_ SG_ 466 ACCEL_NET "net acceleration produced by the system, given ACCEL_CMD, road grade and other factors";
|
||||
CM_ SG_ 560 BRAKE_PRESSED "another brake pressed?";
|
||||
CM_ SG_ 951 BRAKE_LIGHTS_ACC "brake lights when ACC commands decel";
|
||||
CM_ SG_ 608 STEER_TORQUE_DRIVER "driver torque";
|
||||
CM_ SG_ 608 STEER_OVERRIDE "set when driver torque exceeds a certain value";
|
||||
CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active";
|
||||
CM_ SG_ 37 STEER_FRACTION "1/15th of the signal STEER_ANGLE, which is 1.5 deg; note that 0x8 is never set";
|
||||
CM_ SG_ 37 STEER_RATE "factor is tbd";
|
||||
CM_ SG_ 467 SET_SPEED "43 kph are shown as 28mph, so conversion isnt perfect";
|
||||
CM_ SG_ 467 LOW_SPEED_LOCKOUT "in low speed lockout, system would always disengage below 28mph";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in UI with user set unit";
|
||||
CM_ SG_ 1042 SET_ME_1 "unclear what this is, but it's always 1 in drive traces";
|
||||
CM_ SG_ 1042 REPEATED_BEEPS "recommended for fcw and other important alerts";
|
||||
VAL_ 466 CRUISE_STATE 8 "active" 7 "standstill" 1 "off" ;
|
||||
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_ 1553 UNITS 1 "km" 2 "miles";
|
||||
VAL_ 1556 TURN_SIGNALS 3 "none" 2 "right" 1 "left" ;
|
||||
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 "double" 1 "solid" 0 "none";
|
||||
VAL_ 1042 LEFT_LINE 3 "orange" 2 "double" 1 "solid" 0 "none";
|
||||
VAL_ 921 CRUISE_CONTROL_STATE 2 "disabled" 11 "hold" 10 "hold_waiting_user_cmd" 6 "enabled" 5 "faulted";
|
||||
|
||||
CM_ "CHFFR_METRIC 37 STEER_ANGLE STEER_ANGLE 0.36 180";
|
||||
|
||||
CM_ "toyota_chr_hybrid_2018_pt.dbc starts here"
|
||||
|
||||
|
||||
|
||||
BO_ 295 GEAR_PACKET: 8 XXX
|
||||
SG_ CAR_MOVEMENT : 39|8@0- (1,0) [0|255] "" XXX
|
||||
SG_ COUNTER : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ GEAR : 47|4@0+ (1,0) [0|15] "" XXX
|
||||
|
||||
BO_ 550 BRAKE_MODULE: 8 XXX
|
||||
SG_ BRAKE_PRESSURE : 0|9@0+ (1,0) [0|511] "" XXX
|
||||
SG_ BRAKE_POSITION : 16|9@0+ (1,0) [0|511] "" XXX
|
||||
SG_ BRAKE_PRESSED : 37|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 581 GAS_PEDAL: 8 XXX
|
||||
SG_ GAS_PEDAL : 23|8@0+ (0.005,0) [0|1] "" XXX
|
||||
|
||||
BO_ 608 STEER_TORQUE_SENSOR: 8 XXX
|
||||
SG_ STEER_TORQUE_EPS : 47|16@0- (0.73,0) [-20000|20000] "" XXX
|
||||
SG_ STEER_TORQUE_DRIVER : 15|16@0- (1,0) [-32768|32767] "" XXX
|
||||
SG_ STEER_OVERRIDE : 0|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 610 EPS_STATUS: 8 EPS
|
||||
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ LKA_STATE : 31|7@0+ (1,0) [0|127] "" XXX
|
||||
SG_ TYPE : 24|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" 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";
|
||||
CM_ SG_ 610 TYPE "seems 1 on Corolla, 0 on all others";
|
||||
CM_ SG_ 581 GAS_PEDAL "it seems slightly filtered";
|
||||
VAL_ 295 GEAR 0 "P" 1 "R" 2 "N" 3 "D" 4 "B";
|
||||
VAL_ 610 IPAS_STATE 5 "override" 3 "enabled" 1 "disabled";
|
||||
VAL_ 610 LKA_STATE 25 "temporary_fault" 9 "temporary_fault2" 5 "active" 1 "standby";
|
||||
244
opendbc/toyota_highlander_2017_pt_generated.dbc
Normal file
244
opendbc/toyota_highlander_2017_pt_generated.dbc
Normal file
@@ -0,0 +1,244 @@
|
||||
CM_ "AUTOGENERATED FILE, DO NOT EDIT"
|
||||
|
||||
|
||||
CM_ "Imported file _comma.dbc starts here"
|
||||
BO_ 359 STEERING_IPAS_COMMA: 8 IPAS
|
||||
SG_ STATE : 7|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ ANGLE : 3|12@0- (1.5,0) [-510|510] "deg" XXX
|
||||
SG_ SET_ME_X10 : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ DIRECTION_CMD : 38|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X40 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
CM BO_ STEERING_IPAS_COMMA "Copy of msg 614 so we can do angle control while the Park Assist ECU is connected (Panda spoofs 614 with 359 on connector J70). Note that addresses 0x266 and 0x167 are checksum-invariant";
|
||||
|
||||
|
||||
CM_ "Imported file _toyota_2017.dbc starts here"
|
||||
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_: XXX DSU HCU EPS IPAS
|
||||
|
||||
BO_ 36 KINEMATICS: 8 XXX
|
||||
SG_ ACCEL_Y : 33|10@0+ (1,-512) [0|65535] "" XXX
|
||||
SG_ YAW_RATE : 1|10@0+ (1,-512) [0|65535] "" XXX
|
||||
SG_ STEERING_TORQUE : 17|10@0+ (1,-512) [0|65535] "" XXX
|
||||
|
||||
BO_ 166 BRAKE: 8 XXX
|
||||
SG_ BRAKE_AMOUNT : 7|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ BRAKE_PEDAL : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 170 WHEEL_SPEEDS: 8 XXX
|
||||
SG_ WHEEL_SPEED_FR : 7|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
SG_ WHEEL_SPEED_FL : 23|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
SG_ WHEEL_SPEED_RR : 39|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
SG_ WHEEL_SPEED_RL : 55|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
|
||||
BO_ 180 SPEED: 8 XXX
|
||||
SG_ ENCODER : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SPEED : 47|16@0+ (0.01,0) [0|250] "kph" XXX
|
||||
|
||||
BO_ 466 PCM_CRUISE: 8 XXX
|
||||
SG_ GAS_RELEASED : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ STANDSTILL_ON : 12|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ ACCEL_NET : 23|16@0- (0.001,0) [-20|20] "m/s2" XXX
|
||||
SG_ CRUISE_STATE : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 552 ACCELEROMETER: 8 XXX
|
||||
SG_ ACCEL_Z : 22|15@0- (1,0) [0|32767] "" XXX
|
||||
SG_ ACCEL_X : 6|15@0- (0.001,0) [-20|20] "m/s2" XXX
|
||||
|
||||
BO_ 560 BRAKE_MODULE2: 7 XXX
|
||||
SG_ BRAKE_PRESSED : 26|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 614 STEERING_IPAS: 8 IPAS
|
||||
SG_ STATE : 7|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ ANGLE : 3|12@0- (1.5,0) [-510|510] "deg" XXX
|
||||
SG_ SET_ME_X10 : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ DIRECTION_CMD : 38|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X40 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 643 PRE_COLLISION: 8 XXX
|
||||
|
||||
BO_ 740 STEERING_LKA: 5 XXX
|
||||
SG_ LKA_STATE : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ STEER_REQUEST : 0|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ COUNTER : 6|6@0+ (1,0) [0|63] "" XXX
|
||||
SG_ SET_ME_1 : 7|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ STEER_TORQUE_CMD : 15|16@0- (1,0) [0|65535] "" XXX
|
||||
SG_ CHECKSUM : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 742 LEAD_INFO: 8 DSU
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" HCU
|
||||
SG_ LEAD_REL_SPEED : 23|12@0- (0.025,0) [-100|100] "m/s" HCU
|
||||
SG_ LEAD_LONG_DIST : 7|13@0+ (0.05,0) [0|300] "m" HCU
|
||||
|
||||
BO_ 835 ACC_CONTROL: 8 DSU
|
||||
SG_ ACCEL_CMD : 7|16@0- (0.001,0) [-20|20] "m/s2" HCU
|
||||
SG_ SET_ME_X63 : 23|8@0+ (1,0) [0|255] "" HCU
|
||||
SG_ SET_ME_1 : 30|1@0+ (1,0) [0|1] "" HCU
|
||||
SG_ RELEASE_STANDSTILL : 31|1@0+ (1,0) [0|1] "" HCU
|
||||
SG_ CANCEL_REQ : 24|1@0+ (1,0) [0|1] "" HCU
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 1556 STEERING_LEVERS: 8 XXX
|
||||
SG_ TURN_SIGNALS : 29|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
|
||||
SG_ STEER_ANGLE : 3|12@0- (1.5,0) [-500|500] "deg" XXX
|
||||
SG_ STEER_FRACTION : 39|4@0- (0.1,0) [-0.7|0.7] "deg" XXX
|
||||
SG_ STEER_RATE : 35|12@0- (1,0) [-2000|2000] "deg/s" XXX
|
||||
|
||||
BO_ 467 PCM_CRUISE_2: 8 XXX
|
||||
SG_ MAIN_ON : 15|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ LOW_SPEED_LOCKOUT : 14|2@0+ (1,0) [0|3] "kph" XXX
|
||||
SG_ SET_SPEED : 23|8@0+ (1,0) [0|255] "kph" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 921 PCM_CRUISE_SM: 8 XXX
|
||||
SG_ MAIN_ON : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CRUISE_CONTROL_STATE : 11|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ UI_SET_SPEED : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 951 ESP_CONTROL: 8 ESP
|
||||
SG_ TC_DISABLED : 13|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" 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
|
||||
SG_ SET_ME_X10 : 39|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X80 : 55|8@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1042 LKAS_HUD: 8 XXX
|
||||
SG_ BARRIERS : 1|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ RIGHT_LINE : 3|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ LEFT_LINE : 5|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X01 : 7|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X01_2 : 11|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ LDA_ALERT : 9|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ TWO_BEEPS : 12|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ ADJUSTING_CAMERA : 13|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ LDA_MALFUNCTION : 15|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REPEATED_BEEPS : 32|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X0C : 23|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X2C : 47|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X38 : 55|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X02 : 63|8@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1553 UI_SEETING: 8 XXX
|
||||
SG_ UNITS : 26|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 1568 SEATS_DOORS: 8 XXX
|
||||
SG_ SEATBELT_DRIVER_UNLATCHED : 62|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_FL : 45|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_RL : 42|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_RR : 43|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_FR : 44|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1570 LIGHT_STALK: 8 SCM
|
||||
SG_ AUTO_HIGH_BEAM : 37|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";
|
||||
CM_ SG_ 466 ACCEL_NET "net acceleration produced by the system, given ACCEL_CMD, road grade and other factors";
|
||||
CM_ SG_ 560 BRAKE_PRESSED "another brake pressed?";
|
||||
CM_ SG_ 951 BRAKE_LIGHTS_ACC "brake lights when ACC commands decel";
|
||||
CM_ SG_ 608 STEER_TORQUE_DRIVER "driver torque";
|
||||
CM_ SG_ 608 STEER_OVERRIDE "set when driver torque exceeds a certain value";
|
||||
CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active";
|
||||
CM_ SG_ 37 STEER_FRACTION "1/15th of the signal STEER_ANGLE, which is 1.5 deg; note that 0x8 is never set";
|
||||
CM_ SG_ 37 STEER_RATE "factor is tbd";
|
||||
CM_ SG_ 467 SET_SPEED "43 kph are shown as 28mph, so conversion isnt perfect";
|
||||
CM_ SG_ 467 LOW_SPEED_LOCKOUT "in low speed lockout, system would always disengage below 28mph";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in UI with user set unit";
|
||||
CM_ SG_ 1042 SET_ME_1 "unclear what this is, but it's always 1 in drive traces";
|
||||
CM_ SG_ 1042 REPEATED_BEEPS "recommended for fcw and other important alerts";
|
||||
VAL_ 466 CRUISE_STATE 8 "active" 7 "standstill" 1 "off" ;
|
||||
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_ 1553 UNITS 1 "km" 2 "miles";
|
||||
VAL_ 1556 TURN_SIGNALS 3 "none" 2 "right" 1 "left" ;
|
||||
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 "double" 1 "solid" 0 "none";
|
||||
VAL_ 1042 LEFT_LINE 3 "orange" 2 "double" 1 "solid" 0 "none";
|
||||
VAL_ 921 CRUISE_CONTROL_STATE 2 "disabled" 11 "hold" 10 "hold_waiting_user_cmd" 6 "enabled" 5 "faulted";
|
||||
|
||||
CM_ "CHFFR_METRIC 37 STEER_ANGLE STEER_ANGLE 0.36 180";
|
||||
|
||||
CM_ "toyota_highlander_2017_pt.dbc starts here"
|
||||
|
||||
|
||||
|
||||
BO_ 550 BRAKE_MODULE: 8 XXX
|
||||
SG_ BRAKE_PRESSURE : 0|9@0+ (1,0) [0|255] "" XXX
|
||||
SG_ BRAKE_POSITION : 16|9@0+ (1,0) [0|65535] "" XXX
|
||||
SG_ BRAKE_PRESSED : 37|1@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 705 GAS_PEDAL: 8 XXX
|
||||
SG_ GAS_RELEASED : 3|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ GAS_PEDAL : 55|8@0+ (0.005,0) [0|1] "" XXX
|
||||
|
||||
BO_ 608 STEER_TORQUE_SENSOR: 8 XXX
|
||||
SG_ STEER_TORQUE_EPS : 47|16@0- (0.73,0) [-20000|20000] "" XXX
|
||||
SG_ STEER_TORQUE_DRIVER : 15|16@0- (1,0) [-32768|32767] "" XXX
|
||||
SG_ STEER_OVERRIDE : 0|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 610 EPS_STATUS: 5 EPS
|
||||
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ LKA_STATE : 31|7@0+ (1,0) [0|127] "" XXX
|
||||
SG_ TYPE : 24|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 956 GEAR_PACKET: 8 XXX
|
||||
SG_ GEAR : 13|6@0+ (1,0) [0|63] "" 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";
|
||||
CM_ SG_ 610 TYPE "seems 1 on Corolla, 0 on all others";
|
||||
VAL_ 956 GEAR 0 "D" 1 "S" 8 "N" 16 "R" 32 "P";
|
||||
VAL_ 610 IPAS_STATE 5 "override" 3 "enabled" 1 "disabled";
|
||||
VAL_ 610 LKA_STATE 25 "temporary_fault" 9 "temporary_fault2" 5 "active" 1 "standby";
|
||||
@@ -3,7 +3,7 @@ Welcome to panda
|
||||
|
||||
[panda](http://github.com/commaai/panda) is the nicest universal car interface ever.
|
||||
|
||||
<a href="https://panda.comma.ai"><img src="https://github.com/commaai/panda/blob/master/panda.png">
|
||||
<a href="https://www.amazon.com/chffr-panda-OBD-II-Interface/dp/B07D6Y3GN2/"><img src="https://github.com/commaai/panda/blob/master/panda.png">
|
||||
|
||||
<img src="https://github.com/commaai/panda/blob/master/buy.png"></a>
|
||||
|
||||
@@ -15,7 +15,7 @@ It is 2nd gen hardware, reusing code and parts from the [NEO](https://github.com
|
||||
|
||||
[](https://circleci.com/gh/commaai/panda)
|
||||
|
||||
Usage
|
||||
Usage (Python)
|
||||
------
|
||||
|
||||
To install the library:
|
||||
@@ -37,15 +37,21 @@ And to send one on bus 0:
|
||||
```
|
||||
Find user made scripts on the [wiki](https://community.comma.ai/wiki/index.php/Panda_scripts)
|
||||
|
||||
Usage (JavaScript)
|
||||
-------
|
||||
|
||||
See [PandaJS](https://github.com/commaai/pandajs)
|
||||
|
||||
|
||||
Software interface support
|
||||
------
|
||||
|
||||
As a universal car interface, it should support every reasonable software interface.
|
||||
|
||||
- User space ([done](https://github.com/commaai/panda/tree/master/python))
|
||||
- socketcan in kernel ([alpha](https://github.com/commaai/panda/tree/master/drivers/linux))
|
||||
- ELM327 ([done](https://github.com/commaai/panda/blob/master/boardesp/elm327.c))
|
||||
- Windows J2534 ([done](https://github.com/commaai/panda/tree/master/drivers/windows))
|
||||
- [User space](https://github.com/commaai/panda/tree/master/python)
|
||||
- [socketcan in kernel](https://github.com/commaai/panda/tree/master/drivers/linux) (alpha)
|
||||
- [ELM327](https://github.com/commaai/panda/blob/master/boardesp/elm327.c)
|
||||
- [Windows J2534](https://github.com/commaai/panda/tree/master/drivers/windows)
|
||||
|
||||
Directory structure
|
||||
------
|
||||
|
||||
@@ -1 +1 @@
|
||||
v1.1.1
|
||||
v1.1.3
|
||||
@@ -415,6 +415,9 @@ void can_rx(uint8_t can_number) {
|
||||
to_push.RDLR = CAN->sFIFOMailBox[0].RDLR;
|
||||
to_push.RDHR = CAN->sFIFOMailBox[0].RDHR;
|
||||
|
||||
// modify RDTR for our API
|
||||
to_push.RDTR = (to_push.RDTR & 0xFFFF000F) | (bus_number << 4);
|
||||
|
||||
// forwarding (panda only)
|
||||
#ifdef PANDA
|
||||
int bus_fwd_num = can_forwarding[bus_number] != -1 ? can_forwarding[bus_number] : safety_fwd_hook(bus_number, &to_push);
|
||||
@@ -428,8 +431,6 @@ void can_rx(uint8_t can_number) {
|
||||
}
|
||||
#endif
|
||||
|
||||
// modify RDTR for our API
|
||||
to_push.RDTR = (to_push.RDTR & 0xFFFF000F) | (bus_number << 4);
|
||||
safety_rx_hook(&to_push);
|
||||
|
||||
#ifdef PANDA
|
||||
@@ -460,14 +461,21 @@ void CAN3_SCE_IRQHandler() { can_sce(CAN3); }
|
||||
|
||||
#endif
|
||||
|
||||
#include "canbitbang.h"
|
||||
|
||||
void can_send(CAN_FIFOMailBox_TypeDef *to_push, uint8_t bus_number) {
|
||||
if (safety_tx_hook(to_push) && !can_autobaud_enabled[bus_number]) {
|
||||
if (bus_number < BUS_MAX) {
|
||||
// add CAN packet to send queue
|
||||
// bus number isn't passed through
|
||||
to_push->RDTR &= 0xF;
|
||||
can_push(can_queues[bus_number], to_push);
|
||||
process_can(CAN_NUM_FROM_BUS_NUM(bus_number));
|
||||
if (bus_number == 3 && can_num_lookup[3] == 0xFF) {
|
||||
// TODO: why uint8 bro? only int8?
|
||||
bitbang_gmlan(to_push);
|
||||
} else {
|
||||
can_push(can_queues[bus_number], to_push);
|
||||
process_can(CAN_NUM_FROM_BUS_NUM(bus_number));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
203
panda/board/drivers/canbitbang.h
Normal file
203
panda/board/drivers/canbitbang.h
Normal file
@@ -0,0 +1,203 @@
|
||||
#define MAX_BITS_CAN_PACKET (200)
|
||||
|
||||
// returns out_len
|
||||
int do_bitstuff(char *out, char *in, int in_len) {
|
||||
int last_bit = -1;
|
||||
int bit_cnt = 0;
|
||||
int j = 0;
|
||||
for (int i = 0; i < in_len; i++) {
|
||||
char bit = in[i];
|
||||
out[j++] = bit;
|
||||
|
||||
// do the stuffing
|
||||
if (bit == last_bit) {
|
||||
bit_cnt++;
|
||||
if (bit_cnt == 5) {
|
||||
// 5 in a row the same, do stuff
|
||||
last_bit = !bit;
|
||||
out[j++] = last_bit;
|
||||
bit_cnt = 1;
|
||||
}
|
||||
} else {
|
||||
// this is a new bit
|
||||
last_bit = bit;
|
||||
bit_cnt = 1;
|
||||
}
|
||||
}
|
||||
return j;
|
||||
}
|
||||
|
||||
int append_crc(char *in, int in_len) {
|
||||
int crc = 0;
|
||||
for (int i = 0; i < in_len; i++) {
|
||||
crc <<= 1;
|
||||
if (in[i] ^ ((crc>>15)&1)) {
|
||||
crc = crc ^ 0x4599;
|
||||
}
|
||||
crc &= 0x7fff;
|
||||
}
|
||||
for (int i = 14; i >= 0; i--) {
|
||||
in[in_len++] = (crc>>i)&1;
|
||||
}
|
||||
return in_len;
|
||||
}
|
||||
|
||||
int append_bits(char *in, int in_len, char *app, int app_len) {
|
||||
for (int i = 0; i < app_len; i++) {
|
||||
in[in_len++] = app[i];
|
||||
}
|
||||
return in_len;
|
||||
}
|
||||
|
||||
int append_int(char *in, int in_len, int val, int val_len) {
|
||||
for (int i = val_len-1; i >= 0; i--) {
|
||||
in[in_len++] = (val&(1<<i)) != 0;
|
||||
}
|
||||
return in_len;
|
||||
}
|
||||
|
||||
int get_bit_message(char *out, CAN_FIFOMailBox_TypeDef *to_bang) {
|
||||
char pkt[MAX_BITS_CAN_PACKET];
|
||||
char footer[] = {
|
||||
1, // CRC delimiter
|
||||
1, // ACK
|
||||
1, // ACK delimiter
|
||||
1,1,1,1,1,1,1, // EOF
|
||||
1,1,1, // IFS
|
||||
};
|
||||
|
||||
int len = 0;
|
||||
|
||||
// test packet
|
||||
int dlc_len = to_bang->RDTR & 0xF;
|
||||
len = append_int(pkt, len, 0, 1); // Start-of-frame
|
||||
|
||||
if (to_bang->RIR & 4) {
|
||||
// extended identifier
|
||||
len = append_int(pkt, len, to_bang->RIR >> 21, 11); // Identifier
|
||||
len = append_int(pkt, len, 3, 2); // SRR+IDE
|
||||
len = append_int(pkt, len, (to_bang->RIR >> 3) & ((1<<18)-1), 18); // Identifier
|
||||
len = append_int(pkt, len, 0, 3); // RTR+r1+r0
|
||||
} else {
|
||||
// standard identifier
|
||||
len = append_int(pkt, len, to_bang->RIR >> 21, 11); // Identifier
|
||||
len = append_int(pkt, len, 0, 3); // RTR+IDE+reserved
|
||||
}
|
||||
|
||||
len = append_int(pkt, len, dlc_len, 4); // Data length code
|
||||
|
||||
// append data
|
||||
for (int i = 0; i < dlc_len; i++) {
|
||||
unsigned char dat = ((unsigned char *)(&(to_bang->RDLR)))[i];
|
||||
len = append_int(pkt, len, dat, 8);
|
||||
}
|
||||
|
||||
// append crc
|
||||
len = append_crc(pkt, len);
|
||||
|
||||
// do bitstuffing
|
||||
len = do_bitstuff(out, pkt, len);
|
||||
|
||||
// append footer
|
||||
len = append_bits(out, len, footer, sizeof(footer));
|
||||
return len;
|
||||
}
|
||||
|
||||
// hardware stuff below this line
|
||||
|
||||
#ifdef PANDA
|
||||
|
||||
void set_bitbanged_gmlan(int val) {
|
||||
if (val) {
|
||||
GPIOB->ODR |= (1 << 13);
|
||||
} else {
|
||||
GPIOB->ODR &= ~(1 << 13);
|
||||
}
|
||||
}
|
||||
|
||||
char pkt_stuffed[MAX_BITS_CAN_PACKET];
|
||||
int gmlan_sending = -1;
|
||||
int gmlan_sendmax = -1;
|
||||
|
||||
int gmlan_silent_count = 0;
|
||||
int gmlan_fail_count = 0;
|
||||
#define REQUIRED_SILENT_TIME 10
|
||||
#define MAX_FAIL_COUNT 10
|
||||
|
||||
void TIM4_IRQHandler(void) {
|
||||
if (TIM4->SR & TIM_SR_UIF && gmlan_sendmax != -1) {
|
||||
int read = get_gpio_input(GPIOB, 12);
|
||||
if (gmlan_silent_count < REQUIRED_SILENT_TIME) {
|
||||
if (read == 0) {
|
||||
gmlan_silent_count = 0;
|
||||
} else {
|
||||
gmlan_silent_count++;
|
||||
}
|
||||
} else if (gmlan_silent_count == REQUIRED_SILENT_TIME) {
|
||||
int retry = 0;
|
||||
// in send loop
|
||||
if (gmlan_sending > 0 && // not first bit
|
||||
(read == 0 && pkt_stuffed[gmlan_sending-1] == 1) && // bus wrongly dominant
|
||||
gmlan_sending != (gmlan_sendmax-11)) { //not ack bit
|
||||
puts("GMLAN ERR: bus driven at ");
|
||||
puth(gmlan_sending);
|
||||
puts("\n");
|
||||
retry = 1;
|
||||
} else if (read == 1 && gmlan_sending == (gmlan_sendmax-11)) { // recessive during ACK
|
||||
puts("GMLAN ERR: didn't recv ACK\n");
|
||||
retry = 1;
|
||||
}
|
||||
if (retry) {
|
||||
// reset sender (retry after 7 silent)
|
||||
set_bitbanged_gmlan(1); // recessive
|
||||
gmlan_silent_count = 0;
|
||||
gmlan_sending = 0;
|
||||
gmlan_fail_count++;
|
||||
if (gmlan_fail_count == MAX_FAIL_COUNT) {
|
||||
puts("GMLAN ERR: giving up send\n");
|
||||
}
|
||||
} else {
|
||||
set_bitbanged_gmlan(pkt_stuffed[gmlan_sending]);
|
||||
gmlan_sending++;
|
||||
}
|
||||
}
|
||||
if (gmlan_sending == gmlan_sendmax || gmlan_fail_count == MAX_FAIL_COUNT) {
|
||||
set_bitbanged_gmlan(1); // recessive
|
||||
set_gpio_mode(GPIOB, 13, MODE_INPUT);
|
||||
TIM4->DIER = 0; // no update interrupt
|
||||
TIM4->CR1 = 0; // disable timer
|
||||
gmlan_sendmax = -1; // exit
|
||||
}
|
||||
}
|
||||
TIM4->SR = 0;
|
||||
}
|
||||
|
||||
void bitbang_gmlan(CAN_FIFOMailBox_TypeDef *to_bang) {
|
||||
// TODO: make failure less silent
|
||||
if (gmlan_sendmax != -1) return;
|
||||
|
||||
int len = get_bit_message(pkt_stuffed, to_bang);
|
||||
gmlan_fail_count = 0;
|
||||
gmlan_silent_count = 0;
|
||||
gmlan_sending = 0;
|
||||
gmlan_sendmax = len;
|
||||
|
||||
// setup for bitbang loop
|
||||
set_bitbanged_gmlan(1); // recessive
|
||||
set_gpio_mode(GPIOB, 13, MODE_OUTPUT);
|
||||
|
||||
// setup
|
||||
TIM4->PSC = 48-1; // tick on 1 us
|
||||
TIM4->CR1 = TIM_CR1_CEN; // enable
|
||||
TIM4->ARR = 30-1; // 33.3 kbps
|
||||
|
||||
// in case it's disabled
|
||||
NVIC_EnableIRQ(TIM4_IRQn);
|
||||
|
||||
// run the interrupt
|
||||
TIM4->DIER = TIM_DIER_UIE; // update interrupt
|
||||
TIM4->SR = 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -119,7 +119,7 @@ void periph_init() {
|
||||
RCC->APB1ENR |= RCC_APB1ENR_DACEN;
|
||||
RCC->APB1ENR |= RCC_APB1ENR_TIM2EN;
|
||||
RCC->APB1ENR |= RCC_APB1ENR_TIM3EN;
|
||||
//RCC->APB1ENR |= RCC_APB1ENR_TIM4EN;
|
||||
RCC->APB1ENR |= RCC_APB1ENR_TIM4EN;
|
||||
RCC->APB2ENR |= RCC_APB2ENR_USART1EN;
|
||||
RCC->AHB2ENR |= RCC_AHB2ENR_OTGFSEN;
|
||||
RCC->APB2ENR |= RCC_APB2ENR_TIM1EN;
|
||||
|
||||
@@ -1,7 +1,24 @@
|
||||
// sample struct that keeps 3 samples in memory
|
||||
struct sample_t {
|
||||
int values[6];
|
||||
int min;
|
||||
int max;
|
||||
} sample_t_default = {{0}, 0, 0};
|
||||
|
||||
void safety_rx_hook(CAN_FIFOMailBox_TypeDef *to_push);
|
||||
int safety_tx_hook(CAN_FIFOMailBox_TypeDef *to_send);
|
||||
int safety_tx_lin_hook(int lin_num, uint8_t *data, int len);
|
||||
int safety_ignition_hook();
|
||||
uint32_t get_ts_elapsed(uint32_t ts, uint32_t ts_last);
|
||||
int to_signed(int d, int bits);
|
||||
void update_sample(struct sample_t *sample, int sample_new);
|
||||
int max_limit_check(int val, const int MAX, const int MIN);
|
||||
int dist_to_meas_check(int val, int val_last, struct sample_t *val_meas,
|
||||
const int MAX_RATE_UP, const int MAX_RATE_DOWN, const int MAX_ERROR);
|
||||
int driver_limit_check(int val, int val_last, struct sample_t *val_driver,
|
||||
const int MAX, const int MAX_RATE_UP, const int MAX_RATE_DOWN,
|
||||
const int MAX_ALLOWANCE, const int DRIVER_FACTOR);
|
||||
int rt_rate_limit_check(int val, int val_last, const int MAX_RT_DELTA);
|
||||
|
||||
typedef void (*safety_hook_init)(int16_t param);
|
||||
typedef void (*rx_hook)(CAN_FIFOMailBox_TypeDef *to_push);
|
||||
@@ -30,6 +47,8 @@ int controls_allowed = 0;
|
||||
#include "safety/safety_toyota_ipas.h"
|
||||
#endif
|
||||
#include "safety/safety_gm.h"
|
||||
#include "safety/safety_ford.h"
|
||||
#include "safety/safety_cadillac.h"
|
||||
#include "safety/safety_elm327.h"
|
||||
|
||||
const safety_hooks *current_hooks = &nooutput_hooks;
|
||||
@@ -64,10 +83,12 @@ typedef struct {
|
||||
#define SAFETY_NOOUTPUT 0
|
||||
#define SAFETY_HONDA 1
|
||||
#define SAFETY_TOYOTA 2
|
||||
#define SAFETY_TOYOTA_IPAS 0x1335
|
||||
#define SAFETY_TOYOTA_NOLIMITS 0x1336
|
||||
#define SAFETY_GM 3
|
||||
#define SAFETY_HONDA_BOSCH 4
|
||||
#define SAFETY_FORD 5
|
||||
#define SAFETY_CADILLAC 6
|
||||
#define SAFETY_TOYOTA_IPAS 0x1335
|
||||
#define SAFETY_TOYOTA_NOLIMITS 0x1336
|
||||
#define SAFETY_ALLOUTPUT 0x1337
|
||||
#define SAFETY_ELM327 0xE327
|
||||
|
||||
@@ -76,11 +97,13 @@ const safety_hook_config safety_hook_registry[] = {
|
||||
{SAFETY_HONDA, &honda_hooks},
|
||||
{SAFETY_HONDA_BOSCH, &honda_bosch_hooks},
|
||||
{SAFETY_TOYOTA, &toyota_hooks},
|
||||
{SAFETY_GM, &gm_hooks},
|
||||
{SAFETY_FORD, &ford_hooks},
|
||||
{SAFETY_CADILLAC, &cadillac_hooks},
|
||||
{SAFETY_TOYOTA_NOLIMITS, &toyota_nolimits_hooks},
|
||||
#ifdef PANDA
|
||||
{SAFETY_TOYOTA_IPAS, &toyota_ipas_hooks},
|
||||
#endif
|
||||
{SAFETY_GM, &gm_hooks},
|
||||
{SAFETY_ALLOUTPUT, &alloutput_hooks},
|
||||
{SAFETY_ELM327, &elm327_hooks},
|
||||
};
|
||||
@@ -98,3 +121,83 @@ int safety_set_mode(uint16_t mode, int16_t param) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
// compute the time elapsed (in microseconds) from 2 counter samples
|
||||
uint32_t get_ts_elapsed(uint32_t ts, uint32_t ts_last) {
|
||||
return ts > ts_last ? ts - ts_last : (0xFFFFFFFF - ts_last) + 1 + ts;
|
||||
}
|
||||
|
||||
// convert a trimmed integer to signed 32 bit int
|
||||
int to_signed(int d, int bits) {
|
||||
if (d >= (1 << (bits - 1))) {
|
||||
d -= (1 << bits);
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
// given a new sample, update the smaple_t struct
|
||||
void update_sample(struct sample_t *sample, int sample_new) {
|
||||
for (int i = sizeof(sample->values)/sizeof(sample->values[0]) - 1; i > 0; i--) {
|
||||
sample->values[i] = sample->values[i-1];
|
||||
}
|
||||
sample->values[0] = sample_new;
|
||||
|
||||
// get the minimum and maximum measured samples
|
||||
sample->min = sample->max = sample->values[0];
|
||||
for (int i = 1; i < sizeof(sample->values)/sizeof(sample->values[0]); i++) {
|
||||
if (sample->values[i] < sample->min) sample->min = sample->values[i];
|
||||
if (sample->values[i] > sample->max) sample->max = sample->values[i];
|
||||
}
|
||||
}
|
||||
|
||||
int max_limit_check(int val, const int MAX, const int MIN) {
|
||||
return (val > MAX) || (val < MIN);
|
||||
}
|
||||
|
||||
// check that commanded value isn't too far from measured
|
||||
int dist_to_meas_check(int val, int val_last, struct sample_t *val_meas,
|
||||
const int MAX_RATE_UP, const int MAX_RATE_DOWN, const int MAX_ERROR) {
|
||||
|
||||
// *** val rate limit check ***
|
||||
int highest_allowed_val = max(val_last, 0) + MAX_RATE_UP;
|
||||
int lowest_allowed_val = min(val_last, 0) - MAX_RATE_UP;
|
||||
|
||||
// if we've exceeded the meas val, we must start moving toward 0
|
||||
highest_allowed_val = min(highest_allowed_val, max(val_last - MAX_RATE_DOWN, max(val_meas->max, 0) + MAX_ERROR));
|
||||
lowest_allowed_val = max(lowest_allowed_val, min(val_last + MAX_RATE_DOWN, min(val_meas->min, 0) - MAX_ERROR));
|
||||
|
||||
// check for violation
|
||||
return (val < lowest_allowed_val) || (val > highest_allowed_val);
|
||||
}
|
||||
|
||||
// check that commanded value isn't fighting against driver
|
||||
int driver_limit_check(int val, int val_last, struct sample_t *val_driver,
|
||||
const int MAX, const int MAX_RATE_UP, const int MAX_RATE_DOWN,
|
||||
const int MAX_ALLOWANCE, const int DRIVER_FACTOR) {
|
||||
|
||||
int highest_allowed = max(val_last, 0) + MAX_RATE_UP;
|
||||
int lowest_allowed = min(val_last, 0) - MAX_RATE_UP;
|
||||
|
||||
int driver_max_limit = MAX + (MAX_ALLOWANCE + val_driver->max) * DRIVER_FACTOR;
|
||||
int driver_min_limit = -MAX + (-MAX_ALLOWANCE + val_driver->min) * DRIVER_FACTOR;
|
||||
|
||||
// if we've exceeded the applied torque, we must start moving toward 0
|
||||
highest_allowed = min(highest_allowed, max(val_last - MAX_RATE_DOWN,
|
||||
max(driver_max_limit, 0)));
|
||||
lowest_allowed = max(lowest_allowed, min(val_last + MAX_RATE_DOWN,
|
||||
min(driver_min_limit, 0)));
|
||||
|
||||
// check for violation
|
||||
return (val < lowest_allowed) || (val > highest_allowed);
|
||||
}
|
||||
|
||||
|
||||
// real time check, mainly used for steer torque rate limiter
|
||||
int rt_rate_limit_check(int val, int val_last, const int MAX_RT_DELTA) {
|
||||
|
||||
// *** torque real time rate limit check ***
|
||||
int highest_val = max(val_last, 0) + MAX_RT_DELTA;
|
||||
int lowest_val = min(val_last, 0) - MAX_RT_DELTA;
|
||||
|
||||
// check for violation
|
||||
return (val < lowest_val) || (val > highest_val);
|
||||
}
|
||||
|
||||
131
panda/board/safety/safety_cadillac.h
Normal file
131
panda/board/safety/safety_cadillac.h
Normal file
@@ -0,0 +1,131 @@
|
||||
const int CADILLAC_MAX_STEER = 150; // 1s
|
||||
// real time torque limit to prevent controls spamming
|
||||
// the real time limit is 1500/sec
|
||||
const int CADILLAC_MAX_RT_DELTA = 75; // max delta torque allowed for real time checks
|
||||
const int32_t CADILLAC_RT_INTERVAL = 250000; // 250ms between real time checks
|
||||
const int CADILLAC_MAX_RATE_UP = 2;
|
||||
const int CADILLAC_MAX_RATE_DOWN = 5;
|
||||
const int CADILLAC_DRIVER_TORQUE_ALLOWANCE = 50;
|
||||
const int CADILLAC_DRIVER_TORQUE_FACTOR = 4;
|
||||
|
||||
int cadillac_ign = 0;
|
||||
int cadillac_cruise_engaged_last = 0;
|
||||
int cadillac_rt_torque_last = 0;
|
||||
int cadillac_desired_torque_last[4] = {0}; // 4 torque messages
|
||||
uint32_t cadillac_ts_last = 0;
|
||||
int cadillac_supercruise_on = 0;
|
||||
struct sample_t cadillac_torque_driver; // last few driver torques measured
|
||||
|
||||
int cadillac_get_torque_idx(uint32_t addr) {
|
||||
if (addr==0x151) return 0;
|
||||
else if (addr==0x152) return 1;
|
||||
else if (addr==0x153) return 2;
|
||||
else return 3;
|
||||
}
|
||||
|
||||
static void cadillac_rx_hook(CAN_FIFOMailBox_TypeDef *to_push) {
|
||||
int bus_number = (to_push->RDTR >> 4) & 0xFF;
|
||||
uint32_t addr = to_push->RIR >> 21;
|
||||
|
||||
if (addr == 356) {
|
||||
int torque_driver_new = ((to_push->RDLR & 0x7) << 8) | ((to_push->RDLR >> 8) & 0xFF);
|
||||
torque_driver_new = to_signed(torque_driver_new, 11);
|
||||
// update array of samples
|
||||
update_sample(&cadillac_torque_driver, torque_driver_new);
|
||||
}
|
||||
|
||||
// this message isn't all zeros when ignition is on
|
||||
if (addr == 0x160 && bus_number == 0) {
|
||||
cadillac_ign = to_push->RDLR > 0;
|
||||
}
|
||||
|
||||
// enter controls on rising edge of ACC, exit controls on ACC off
|
||||
if ((addr == 0x370) && (bus_number == 0)) {
|
||||
int cruise_engaged = to_push->RDLR & 0x800000; // bit 23
|
||||
if (cruise_engaged && !cadillac_cruise_engaged_last) {
|
||||
controls_allowed = 1;
|
||||
} else if (!cruise_engaged) {
|
||||
controls_allowed = 0;
|
||||
}
|
||||
cadillac_cruise_engaged_last = cruise_engaged;
|
||||
}
|
||||
|
||||
// know supercruise mode and block openpilot msgs if on
|
||||
if ((addr == 0x152) || (addr == 0x154)) {
|
||||
cadillac_supercruise_on = (to_push->RDHR>>4) & 0x1;
|
||||
}
|
||||
}
|
||||
|
||||
static int cadillac_tx_hook(CAN_FIFOMailBox_TypeDef *to_send) {
|
||||
uint32_t addr = to_send->RIR >> 21;
|
||||
|
||||
// steer cmd checks
|
||||
if (addr == 0x151 || addr == 0x152 || addr == 0x153 || addr == 0x154) {
|
||||
int desired_torque = ((to_send->RDLR & 0x3f) << 8) + ((to_send->RDLR & 0xff00) >> 8);
|
||||
int violation = 0;
|
||||
uint32_t ts = TIM2->CNT;
|
||||
int idx = cadillac_get_torque_idx(addr);
|
||||
desired_torque = to_signed(desired_torque, 14);
|
||||
|
||||
if (controls_allowed) {
|
||||
|
||||
// *** global torque limit check ***
|
||||
violation |= max_limit_check(desired_torque, CADILLAC_MAX_STEER, -CADILLAC_MAX_STEER);
|
||||
|
||||
// *** torque rate limit check ***
|
||||
int desired_torque_last = cadillac_desired_torque_last[idx];
|
||||
violation |= driver_limit_check(desired_torque, desired_torque_last, &cadillac_torque_driver,
|
||||
CADILLAC_MAX_STEER, CADILLAC_MAX_RATE_UP, CADILLAC_MAX_RATE_DOWN,
|
||||
CADILLAC_DRIVER_TORQUE_ALLOWANCE, CADILLAC_DRIVER_TORQUE_FACTOR);
|
||||
|
||||
// used next time
|
||||
cadillac_desired_torque_last[idx] = desired_torque;
|
||||
|
||||
// *** torque real time rate limit check ***
|
||||
violation |= rt_rate_limit_check(desired_torque, cadillac_rt_torque_last, CADILLAC_MAX_RT_DELTA);
|
||||
|
||||
// every RT_INTERVAL set the new limits
|
||||
uint32_t ts_elapsed = get_ts_elapsed(ts, cadillac_ts_last);
|
||||
if (ts_elapsed > CADILLAC_RT_INTERVAL) {
|
||||
cadillac_rt_torque_last = desired_torque;
|
||||
cadillac_ts_last = ts;
|
||||
}
|
||||
}
|
||||
|
||||
// no torque if controls is not allowed
|
||||
if (!controls_allowed && (desired_torque != 0)) {
|
||||
violation = 1;
|
||||
}
|
||||
|
||||
// reset to 0 if either controls is not allowed or there's a violation
|
||||
if (violation || !controls_allowed) {
|
||||
cadillac_desired_torque_last[idx] = 0;
|
||||
cadillac_rt_torque_last = 0;
|
||||
cadillac_ts_last = ts;
|
||||
}
|
||||
|
||||
if (violation || cadillac_supercruise_on) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static void cadillac_init(int16_t param) {
|
||||
controls_allowed = 0;
|
||||
cadillac_ign = 0;
|
||||
}
|
||||
|
||||
static int cadillac_ign_hook() {
|
||||
return cadillac_ign;
|
||||
}
|
||||
|
||||
const safety_hooks cadillac_hooks = {
|
||||
.init = cadillac_init,
|
||||
.rx = cadillac_rx_hook,
|
||||
.tx = cadillac_tx_hook,
|
||||
.tx_lin = alloutput_tx_lin_hook,
|
||||
.ignition = cadillac_ign_hook,
|
||||
.fwd = alloutput_fwd_hook,
|
||||
};
|
||||
@@ -1,5 +1,9 @@
|
||||
void default_rx_hook(CAN_FIFOMailBox_TypeDef *to_push) {}
|
||||
|
||||
int default_ign_hook() {
|
||||
return -1; // use GPIO to determine ignition
|
||||
}
|
||||
|
||||
// *** no output safety mode ***
|
||||
|
||||
static void nooutput_init(int16_t param) {
|
||||
@@ -14,9 +18,6 @@ static int nooutput_tx_lin_hook(int lin_num, uint8_t *data, int len) {
|
||||
return false;
|
||||
}
|
||||
|
||||
static int nooutput_ign_hook() {
|
||||
return -1;
|
||||
}
|
||||
static int nooutput_fwd_hook(int bus_num, CAN_FIFOMailBox_TypeDef *to_fwd) {
|
||||
return -1;
|
||||
}
|
||||
@@ -26,7 +27,7 @@ const safety_hooks nooutput_hooks = {
|
||||
.rx = default_rx_hook,
|
||||
.tx = nooutput_tx_hook,
|
||||
.tx_lin = nooutput_tx_lin_hook,
|
||||
.ignition = nooutput_ign_hook,
|
||||
.ignition = default_ign_hook,
|
||||
.fwd = nooutput_fwd_hook,
|
||||
};
|
||||
|
||||
@@ -44,10 +45,6 @@ static int alloutput_tx_lin_hook(int lin_num, uint8_t *data, int len) {
|
||||
return true;
|
||||
}
|
||||
|
||||
static int alloutput_ign_hook() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int alloutput_fwd_hook(int bus_num, CAN_FIFOMailBox_TypeDef *to_fwd) {
|
||||
return -1;
|
||||
}
|
||||
@@ -57,7 +54,7 @@ const safety_hooks alloutput_hooks = {
|
||||
.rx = default_rx_hook,
|
||||
.tx = alloutput_tx_hook,
|
||||
.tx_lin = alloutput_tx_lin_hook,
|
||||
.ignition = alloutput_ign_hook,
|
||||
.ignition = default_ign_hook,
|
||||
.fwd = alloutput_fwd_hook,
|
||||
};
|
||||
|
||||
|
||||
@@ -31,10 +31,6 @@ static void elm327_init(int16_t param) {
|
||||
controls_allowed = 1;
|
||||
}
|
||||
|
||||
static int elm327_ign_hook() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int elm327_fwd_hook(int bus_num, CAN_FIFOMailBox_TypeDef *to_fwd) {
|
||||
return -1;
|
||||
}
|
||||
@@ -44,6 +40,6 @@ const safety_hooks elm327_hooks = {
|
||||
.rx = elm327_rx_hook,
|
||||
.tx = elm327_tx_hook,
|
||||
.tx_lin = elm327_tx_lin_hook,
|
||||
.ignition = elm327_ign_hook,
|
||||
.ignition = default_ign_hook,
|
||||
.fwd = elm327_fwd_hook,
|
||||
};
|
||||
|
||||
106
panda/board/safety/safety_ford.h
Normal file
106
panda/board/safety/safety_ford.h
Normal file
@@ -0,0 +1,106 @@
|
||||
// board enforces
|
||||
// in-state
|
||||
// accel set/resume
|
||||
// out-state
|
||||
// cancel button
|
||||
// accel rising edge
|
||||
// brake rising edge
|
||||
// brake > 0mph
|
||||
|
||||
int ford_brake_prev = 0;
|
||||
int ford_gas_prev = 0;
|
||||
int ford_is_moving = 0;
|
||||
|
||||
static void ford_rx_hook(CAN_FIFOMailBox_TypeDef *to_push) {
|
||||
|
||||
if ((to_push->RIR>>21) == 0x217) {
|
||||
// wheel speeds are 14 bits every 16
|
||||
ford_is_moving = 0xFCFF & (to_push->RDLR | (to_push->RDLR >> 16) |
|
||||
to_push->RDHR | (to_push->RDHR >> 16));
|
||||
}
|
||||
|
||||
// state machine to enter and exit controls
|
||||
if ((to_push->RIR>>21) == 0x83) {
|
||||
int cancel = ((to_push->RDLR >> 8) & 0x1);
|
||||
int set_or_resume = (to_push->RDLR >> 28) & 0x3;
|
||||
if (cancel) {
|
||||
controls_allowed = 0;
|
||||
} else if (set_or_resume) {
|
||||
controls_allowed = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// exit controls on rising edge of brake press or on brake press when
|
||||
// speed > 0
|
||||
if ((to_push->RIR>>21) == 0x165) {
|
||||
int brake = to_push->RDLR & 0x20;
|
||||
if (brake && (!(ford_brake_prev) || ford_is_moving)) {
|
||||
controls_allowed = 0;
|
||||
}
|
||||
ford_brake_prev = brake;
|
||||
}
|
||||
|
||||
// exit controls on rising edge of gas press
|
||||
if ((to_push->RIR>>21) == 0x204) {
|
||||
int gas = to_push->RDLR & 0xFF03;
|
||||
if (gas && !(ford_gas_prev)) {
|
||||
controls_allowed = 0;
|
||||
}
|
||||
ford_gas_prev = gas;
|
||||
}
|
||||
}
|
||||
|
||||
// all commands: just steering
|
||||
// if controls_allowed and no pedals pressed
|
||||
// allow all commands up to limit
|
||||
// else
|
||||
// block all commands that produce actuation
|
||||
|
||||
static int ford_tx_hook(CAN_FIFOMailBox_TypeDef *to_send) {
|
||||
|
||||
// disallow actuator commands if gas or brake (with vehicle moving) are pressed
|
||||
// and the the latching controls_allowed flag is True
|
||||
int pedal_pressed = ford_gas_prev || (ford_brake_prev && ford_is_moving);
|
||||
int current_controls_allowed = controls_allowed && !(pedal_pressed);
|
||||
|
||||
// STEER: safety check
|
||||
if ((to_send->RIR>>21) == 0x3CA) {
|
||||
if (current_controls_allowed) {
|
||||
// all messages are fine here
|
||||
} else {
|
||||
// bits 7-4 need to be 0xF to disallow lkas commands
|
||||
if (((to_send->RDLR >> 4) & 0xF) != 0xF) return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// FORCE CANCEL: safety check only relevant when spamming the cancel button
|
||||
// ensuring that set and resume aren't sent
|
||||
if ((to_send->RIR>>21) == 0x83) {
|
||||
if ((to_send->RDLR >> 28) & 0x3) return 0;
|
||||
}
|
||||
|
||||
// 1 allows the message through
|
||||
return true;
|
||||
}
|
||||
|
||||
static int ford_tx_lin_hook(int lin_num, uint8_t *data, int len) {
|
||||
// TODO: add safety if using LIN
|
||||
return true;
|
||||
}
|
||||
|
||||
static void ford_init(int16_t param) {
|
||||
controls_allowed = 0;
|
||||
}
|
||||
|
||||
static int ford_fwd_hook(int bus_num, CAN_FIFOMailBox_TypeDef *to_fwd) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
const safety_hooks ford_hooks = {
|
||||
.init = ford_init,
|
||||
.rx = ford_rx_hook,
|
||||
.tx = ford_tx_hook,
|
||||
.tx_lin = ford_tx_lin_hook,
|
||||
.ignition = default_ign_hook,
|
||||
.fwd = ford_fwd_hook,
|
||||
};
|
||||
@@ -8,15 +8,27 @@
|
||||
// brake rising edge
|
||||
// brake > 0mph
|
||||
|
||||
// gm_: poor man's namespacing
|
||||
const int GM_MAX_STEER = 255;
|
||||
const int GM_MAX_RT_DELTA = 128; // max delta torque allowed for real time checks
|
||||
const int32_t GM_RT_INTERVAL = 250000; // 250ms between real time checks
|
||||
const int GM_MAX_RATE_UP = 7;
|
||||
const int GM_MAX_RATE_DOWN = 17;
|
||||
const int GM_DRIVER_TORQUE_ALLOWANCE = 50;
|
||||
const int GM_DRIVER_TORQUE_FACTOR = 4;
|
||||
const int GM_MAX_GAS = 3072;
|
||||
const int GM_MAX_REGEN = 1404;
|
||||
const int GM_MAX_BRAKE = 350;
|
||||
|
||||
int gm_brake_prev = 0;
|
||||
int gm_gas_prev = 0;
|
||||
int gm_speed = 0;
|
||||
|
||||
// silence everything if stock ECUs are still online
|
||||
int gm_ascm_detected = 0;
|
||||
|
||||
int gm_ignition_started = 0;
|
||||
int gm_rt_torque_last = 0;
|
||||
int gm_desired_torque_last = 0;
|
||||
uint32_t gm_ts_last = 0;
|
||||
struct sample_t gm_torque_driver; // last few driver torques measured
|
||||
|
||||
static void gm_rx_hook(CAN_FIFOMailBox_TypeDef *to_push) {
|
||||
int bus_number = (to_push->RDTR >> 4) & 0xFF;
|
||||
@@ -31,10 +43,18 @@ static void gm_rx_hook(CAN_FIFOMailBox_TypeDef *to_push) {
|
||||
addr = to_push->RIR >> 21;
|
||||
}
|
||||
|
||||
if (addr == 0x135 && bus_number == 0) {
|
||||
//Gear selector (used for determining ignition)
|
||||
int gear = to_push->RDLR & 0x7;
|
||||
gm_ignition_started = gear > 0; //Park = 0. If out of park, we're "on."
|
||||
if (addr == 388) {
|
||||
int torque_driver_new = (((to_push->RDHR >> 16) & 0x7) << 8) | ((to_push->RDHR >> 24) & 0xFF);
|
||||
torque_driver_new = to_signed(torque_driver_new, 11);
|
||||
// update array of samples
|
||||
update_sample(&gm_torque_driver, torque_driver_new);
|
||||
}
|
||||
|
||||
if (addr == 0x1f1 && bus_number == 0) {
|
||||
//Bit 5 should be ignition "on"
|
||||
//Backup plan is Bit 2 (accessory power)
|
||||
uint32_t ign = (to_push->RDLR) & 0x20;
|
||||
gm_ignition_started = ign > 0;
|
||||
}
|
||||
|
||||
// sample speed, really only care if car is moving or not
|
||||
@@ -126,7 +146,7 @@ static int gm_tx_hook(CAN_FIFOMailBox_TypeDef *to_send) {
|
||||
int brake = ((rdlr & 0xF) << 8) + ((rdlr & 0xFF00) >> 8);
|
||||
brake = (0x1000 - brake) & 0xFFF;
|
||||
if (current_controls_allowed) {
|
||||
if (brake > 255) return 0;
|
||||
if (brake > GM_MAX_BRAKE) return 0;
|
||||
} else {
|
||||
if (brake != 0) return 0;
|
||||
}
|
||||
@@ -135,17 +155,49 @@ static int gm_tx_hook(CAN_FIFOMailBox_TypeDef *to_send) {
|
||||
// LKA STEER: safety check
|
||||
if (addr == 384) {
|
||||
int rdlr = to_send->RDLR;
|
||||
int steer = ((rdlr & 0x7) << 8) + ((rdlr & 0xFF00) >> 8);
|
||||
int max_steer = 255;
|
||||
int desired_torque = ((rdlr & 0x7) << 8) + ((rdlr & 0xFF00) >> 8);
|
||||
uint32_t ts = TIM2->CNT;
|
||||
int violation = 0;
|
||||
desired_torque = to_signed(desired_torque, 11);
|
||||
|
||||
if (current_controls_allowed) {
|
||||
// Signed arithmetic
|
||||
if (steer & 0x400) {
|
||||
if (steer < (0x800 - max_steer)) return 0;
|
||||
} else {
|
||||
if (steer > max_steer) return 0;
|
||||
|
||||
// *** global torque limit check ***
|
||||
violation |= max_limit_check(desired_torque, GM_MAX_STEER, -GM_MAX_STEER);
|
||||
|
||||
// *** torque rate limit check ***
|
||||
violation |= driver_limit_check(desired_torque, gm_desired_torque_last, &gm_torque_driver,
|
||||
GM_MAX_STEER, GM_MAX_RATE_UP, GM_MAX_RATE_DOWN,
|
||||
GM_DRIVER_TORQUE_ALLOWANCE, GM_DRIVER_TORQUE_FACTOR);
|
||||
|
||||
// used next time
|
||||
gm_desired_torque_last = desired_torque;
|
||||
|
||||
// *** torque real time rate limit check ***
|
||||
violation |= rt_rate_limit_check(desired_torque, gm_rt_torque_last, GM_MAX_RT_DELTA);
|
||||
|
||||
// every RT_INTERVAL set the new limits
|
||||
uint32_t ts_elapsed = get_ts_elapsed(ts, gm_ts_last);
|
||||
if (ts_elapsed > GM_RT_INTERVAL) {
|
||||
gm_rt_torque_last = desired_torque;
|
||||
gm_ts_last = ts;
|
||||
}
|
||||
} else {
|
||||
if (steer != 0) return 0;
|
||||
}
|
||||
|
||||
// no torque if controls is not allowed
|
||||
if (!current_controls_allowed && (desired_torque != 0)) {
|
||||
violation = 1;
|
||||
}
|
||||
|
||||
// reset to 0 if either controls is not allowed or there's a violation
|
||||
if (violation || !current_controls_allowed) {
|
||||
gm_desired_torque_last = 0;
|
||||
gm_rt_torque_last = 0;
|
||||
gm_ts_last = ts;
|
||||
}
|
||||
|
||||
if (violation) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,11 +210,11 @@ static int gm_tx_hook(CAN_FIFOMailBox_TypeDef *to_send) {
|
||||
int gas_regen = ((rdlr & 0x7F0000) >> 11) + ((rdlr & 0xF8000000) >> 27);
|
||||
int apply = rdlr & 1;
|
||||
if (current_controls_allowed) {
|
||||
if (gas_regen > 3072) return 0;
|
||||
if (gas_regen > GM_MAX_GAS) return 0;
|
||||
} else {
|
||||
// Disabled message is !engaed with gas
|
||||
// value that corresponds to max regen.
|
||||
if (apply || gas_regen != 1404) return 0;
|
||||
if (apply || gas_regen != GM_MAX_REGEN) return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ int gas_interceptor_prev = 0;
|
||||
int ego_speed = 0;
|
||||
// TODO: auto-detect bosch hardware based on CAN messages?
|
||||
bool bosch_hardware = false;
|
||||
bool honda_alt_brake_msg = false;
|
||||
|
||||
static void honda_rx_hook(CAN_FIFOMailBox_TypeDef *to_push) {
|
||||
|
||||
@@ -36,11 +37,14 @@ static void honda_rx_hook(CAN_FIFOMailBox_TypeDef *to_push) {
|
||||
}
|
||||
}
|
||||
|
||||
// user brake signal is different for nidec vs bosch hardware
|
||||
// nidec hardware: 0x17C bit 53
|
||||
// bosch hardware: 0x1BE bit 4
|
||||
#define IS_USER_BRAKE_MSG(to_push) (!bosch_hardware ? to_push->RIR>>21 == 0x17C : to_push->RIR>>21 == 0x1BE)
|
||||
#define USER_BRAKE_VALUE(to_push) (!bosch_hardware ? to_push->RDHR & 0x200000 : to_push->RDLR & 0x10)
|
||||
// user brake signal on 0x17C reports applied brake from computer brake on accord
|
||||
// and crv, which prevents the usual brake safety from working correctly. these
|
||||
// cars have a signal on 0x1BE which only detects user's brake being applied so
|
||||
// in these cases, this is used instead.
|
||||
// most hondas: 0x17C bit 53
|
||||
// accord, crv: 0x1BE bit 4
|
||||
#define IS_USER_BRAKE_MSG(to_push) (!honda_alt_brake_msg ? to_push->RIR>>21 == 0x17C : to_push->RIR>>21 == 0x1BE)
|
||||
#define USER_BRAKE_VALUE(to_push) (!honda_alt_brake_msg ? to_push->RDHR & 0x200000 : to_push->RDLR & 0x10)
|
||||
// exit controls on rising edge of brake press or on brake press when
|
||||
// speed > 0
|
||||
if (IS_USER_BRAKE_MSG(to_push)) {
|
||||
@@ -115,6 +119,14 @@ static int honda_tx_hook(CAN_FIFOMailBox_TypeDef *to_send) {
|
||||
if ((to_send->RDLR & 0xFFFF0000) != to_send->RDLR) return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// FORCE CANCEL: safety check only relevant when spamming the cancel button in Bosch HW
|
||||
// ensuring that only the cancel button press is sent (VAL 2) when controls are off.
|
||||
// This avoids unintended engagements while still allowing resume spam
|
||||
if (((to_send->RIR>>21) == 0x296) && bosch_hardware &&
|
||||
!current_controls_allowed && ((to_send->RDTR >> 4) & 0xFF) == 0) {
|
||||
if (((to_send->RDLR >> 5) & 0x7) != 2) return 0;
|
||||
}
|
||||
|
||||
// 1 allows the message through
|
||||
return true;
|
||||
@@ -128,28 +140,27 @@ static int honda_tx_lin_hook(int lin_num, uint8_t *data, int len) {
|
||||
static void honda_init(int16_t param) {
|
||||
controls_allowed = 0;
|
||||
bosch_hardware = false;
|
||||
honda_alt_brake_msg = false;
|
||||
}
|
||||
|
||||
static int honda_fwd_hook(int bus_num, CAN_FIFOMailBox_TypeDef *to_fwd) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int honda_ign_hook() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
const safety_hooks honda_hooks = {
|
||||
.init = honda_init,
|
||||
.rx = honda_rx_hook,
|
||||
.tx = honda_tx_hook,
|
||||
.tx_lin = honda_tx_lin_hook,
|
||||
.ignition = honda_ign_hook,
|
||||
.ignition = default_ign_hook,
|
||||
.fwd = honda_fwd_hook,
|
||||
};
|
||||
|
||||
static void honda_bosch_init(int16_t param) {
|
||||
controls_allowed = 0;
|
||||
bosch_hardware = true;
|
||||
// Checking for alternate brake override from safety parameter
|
||||
honda_alt_brake_msg = param == 1 ? true : false;
|
||||
}
|
||||
|
||||
static int honda_bosch_fwd_hook(int bus_num, CAN_FIFOMailBox_TypeDef *to_fwd) {
|
||||
@@ -165,6 +176,6 @@ const safety_hooks honda_bosch_hooks = {
|
||||
.rx = honda_rx_hook,
|
||||
.tx = honda_tx_hook,
|
||||
.tx_lin = honda_tx_lin_hook,
|
||||
.ignition = honda_ign_hook,
|
||||
.ignition = default_ign_hook,
|
||||
.fwd = honda_bosch_fwd_hook,
|
||||
};
|
||||
|
||||
@@ -1,80 +1,75 @@
|
||||
// track the torque measured for limiting
|
||||
struct sample_t {
|
||||
int values[3];
|
||||
int min;
|
||||
int max;
|
||||
} sample_t_default = {{0, 0, 0}, 0, 0};
|
||||
struct sample_t torque_meas; // last 3 motor torques produced by the eps
|
||||
int toyota_no_dsu_car = 0; // ch-r and camry don't have the DSU
|
||||
int toyota_giraffe_switch_1 = 0; // is giraffe switch 1 high?
|
||||
|
||||
// global torque limit
|
||||
const int32_t MAX_TORQUE = 1500; // max torque cmd allowed ever
|
||||
const int TOYOTA_MAX_TORQUE = 1500; // max torque cmd allowed ever
|
||||
|
||||
// rate based torque limit + stay within actually applied
|
||||
// packet is sent at 100hz, so this limit is 1000/sec
|
||||
const int32_t MAX_RATE_UP = 10; // ramp up slow
|
||||
const int32_t MAX_RATE_DOWN = 25; // ramp down fast
|
||||
const int32_t MAX_TORQUE_ERROR = 350; // max torque cmd in excess of torque motor
|
||||
const int TOYOTA_MAX_RATE_UP = 10; // ramp up slow
|
||||
const int TOYOTA_MAX_RATE_DOWN = 25; // ramp down fast
|
||||
const int TOYOTA_MAX_TORQUE_ERROR = 350; // max torque cmd in excess of torque motor
|
||||
|
||||
// real time torque limit to prevent controls spamming
|
||||
// the real time limit is 1500/sec
|
||||
const int32_t MAX_RT_DELTA = 375; // max delta torque allowed for real time checks
|
||||
const int32_t RT_INTERVAL = 250000; // 250ms between real time checks
|
||||
const int TOYOTA_MAX_RT_DELTA = 375; // max delta torque allowed for real time checks
|
||||
const int TOYOTA_RT_INTERVAL = 250000; // 250ms between real time checks
|
||||
|
||||
// longitudinal limits
|
||||
const int16_t MAX_ACCEL = 1500; // 1.5 m/s2
|
||||
const int16_t MIN_ACCEL = -3000; // 3.0 m/s2
|
||||
const int TOYOTA_MAX_ACCEL = 1500; // 1.5 m/s2
|
||||
const int TOYOTA_MIN_ACCEL = -3000; // 3.0 m/s2
|
||||
|
||||
// global actuation limit state
|
||||
int actuation_limits = 1; // by default steer limits are imposed
|
||||
int16_t dbc_eps_torque_factor = 100; // conversion factor for STEER_TORQUE_EPS in %: see dbc file
|
||||
int toyota_actuation_limits = 1; // by default steer limits are imposed
|
||||
int toyota_dbc_eps_torque_factor = 100; // conversion factor for STEER_TORQUE_EPS in %: see dbc file
|
||||
|
||||
// state of torque limits
|
||||
int16_t desired_torque_last = 0; // last desired steer torque
|
||||
int16_t rt_torque_last = 0; // last desired torque for real time check
|
||||
uint32_t ts_last = 0;
|
||||
int cruise_engaged_last = 0; // cruise state
|
||||
int toyota_desired_torque_last = 0; // last desired steer torque
|
||||
int toyota_rt_torque_last = 0; // last desired torque for real time check
|
||||
uint32_t toyota_ts_last = 0;
|
||||
int toyota_cruise_engaged_last = 0; // cruise state
|
||||
struct sample_t toyota_torque_meas; // last 3 motor torques produced by the eps
|
||||
|
||||
uint32_t get_ts_elapsed(uint32_t ts, uint32_t ts_last) {
|
||||
return ts > ts_last ? ts - ts_last : (0xFFFFFFFF - ts_last) + 1 + ts;
|
||||
}
|
||||
|
||||
void update_sample(struct sample_t *sample, int sample_new) {
|
||||
for (int i = sizeof(sample->values)/sizeof(sample->values[0]) - 1; i > 0; i--) {
|
||||
sample->values[i] = sample->values[i-1];
|
||||
}
|
||||
sample->values[0] = sample_new;
|
||||
|
||||
// get the minimum and maximum measured torque over the last 3 frames
|
||||
sample->min = sample->max = sample->values[0];
|
||||
for (int i = 1; i < sizeof(sample->values)/sizeof(sample->values[0]); i++) {
|
||||
if (sample->values[i] < sample->min) sample->min = sample->values[i];
|
||||
if (sample->values[i] > sample->max) sample->max = sample->values[i];
|
||||
}
|
||||
}
|
||||
|
||||
static void toyota_rx_hook(CAN_FIFOMailBox_TypeDef *to_push) {
|
||||
// get eps motor torque (0.66 factor in dbc)
|
||||
if ((to_push->RIR>>21) == 0x260) {
|
||||
int16_t torque_meas_new_16 = (((to_push->RDHR) & 0xFF00) | ((to_push->RDHR >> 16) & 0xFF));
|
||||
int torque_meas_new = (((to_push->RDHR) & 0xFF00) | ((to_push->RDHR >> 16) & 0xFF));
|
||||
torque_meas_new = to_signed(torque_meas_new, 16);
|
||||
|
||||
// scale by dbc_factor
|
||||
torque_meas_new = (torque_meas_new * toyota_dbc_eps_torque_factor) / 100;
|
||||
|
||||
// increase torque_meas by 1 to be conservative on rounding
|
||||
int torque_meas_new = ((int)(torque_meas_new_16) * dbc_eps_torque_factor / 100) + (torque_meas_new_16 > 0 ? 1 : -1);
|
||||
torque_meas_new += (torque_meas_new > 0 ? 1 : -1);
|
||||
|
||||
// update array of sample
|
||||
update_sample(&torque_meas, torque_meas_new);
|
||||
update_sample(&toyota_torque_meas, torque_meas_new);
|
||||
}
|
||||
|
||||
// enter controls on rising edge of ACC, exit controls on ACC off
|
||||
if ((to_push->RIR>>21) == 0x1D2) {
|
||||
// 4 bits: 55-52
|
||||
int cruise_engaged = to_push->RDHR & 0xF00000;
|
||||
if (cruise_engaged && !cruise_engaged_last) {
|
||||
if (cruise_engaged && !toyota_cruise_engaged_last) {
|
||||
controls_allowed = 1;
|
||||
} else if (!cruise_engaged) {
|
||||
controls_allowed = 0;
|
||||
}
|
||||
cruise_engaged_last = cruise_engaged;
|
||||
toyota_cruise_engaged_last = cruise_engaged;
|
||||
}
|
||||
|
||||
int bus = (to_push->RDTR >> 4) & 0xF;
|
||||
// 0x680 is a radar msg only found in dsu-less cars
|
||||
if ((to_push->RIR>>21) == 0x680 && (bus == 1)) {
|
||||
toyota_no_dsu_car = 1;
|
||||
}
|
||||
|
||||
// 0x2E4 is lkas cmd. If it is on bus 0, then giraffe switch 1 is high
|
||||
if ((to_push->RIR>>21) == 0x2E4 && (bus == 0)) {
|
||||
toyota_giraffe_switch_1 = 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static int toyota_tx_hook(CAN_FIFOMailBox_TypeDef *to_send) {
|
||||
@@ -87,11 +82,11 @@ static int toyota_tx_hook(CAN_FIFOMailBox_TypeDef *to_send) {
|
||||
|
||||
// ACCEL: safety check on byte 1-2
|
||||
if ((to_send->RIR>>21) == 0x343) {
|
||||
int16_t desired_accel = ((to_send->RDLR & 0xFF) << 8) | ((to_send->RDLR >> 8) & 0xFF);
|
||||
if (controls_allowed && actuation_limits) {
|
||||
if ((desired_accel > MAX_ACCEL) || (desired_accel < MIN_ACCEL)) {
|
||||
return 0;
|
||||
}
|
||||
int desired_accel = ((to_send->RDLR & 0xFF) << 8) | ((to_send->RDLR >> 8) & 0xFF);
|
||||
desired_accel = to_signed(desired_accel, 16);
|
||||
if (controls_allowed && toyota_actuation_limits) {
|
||||
int violation = max_limit_check(desired_accel, TOYOTA_MAX_ACCEL, TOYOTA_MIN_ACCEL);
|
||||
if (violation) return 0;
|
||||
} else if (!controls_allowed && (desired_accel != 0)) {
|
||||
return 0;
|
||||
}
|
||||
@@ -99,50 +94,33 @@ static int toyota_tx_hook(CAN_FIFOMailBox_TypeDef *to_send) {
|
||||
|
||||
// STEER: safety check on bytes 2-3
|
||||
if ((to_send->RIR>>21) == 0x2E4) {
|
||||
int16_t desired_torque = (to_send->RDLR & 0xFF00) | ((to_send->RDLR >> 16) & 0xFF);
|
||||
int16_t violation = 0;
|
||||
int desired_torque = (to_send->RDLR & 0xFF00) | ((to_send->RDLR >> 16) & 0xFF);
|
||||
desired_torque = to_signed(desired_torque, 16);
|
||||
int violation = 0;
|
||||
|
||||
uint32_t ts = TIM2->CNT;
|
||||
|
||||
// only check if controls are allowed and actuation_limits are imposed
|
||||
if (controls_allowed && actuation_limits) {
|
||||
if (controls_allowed && toyota_actuation_limits) {
|
||||
|
||||
// *** global torque limit check ***
|
||||
if (desired_torque < -MAX_TORQUE) violation = 1;
|
||||
if (desired_torque > MAX_TORQUE) violation = 1;
|
||||
|
||||
violation |= max_limit_check(desired_torque, TOYOTA_MAX_TORQUE, -TOYOTA_MAX_TORQUE);
|
||||
|
||||
// *** torque rate limit check ***
|
||||
int16_t highest_allowed_torque = max(desired_torque_last, 0) + MAX_RATE_UP;
|
||||
int16_t lowest_allowed_torque = min(desired_torque_last, 0) - MAX_RATE_UP;
|
||||
|
||||
// if we've exceeded the applied torque, we must start moving toward 0
|
||||
highest_allowed_torque = min(highest_allowed_torque, max(desired_torque_last - MAX_RATE_DOWN, max(torque_meas.max, 0) + MAX_TORQUE_ERROR));
|
||||
lowest_allowed_torque = max(lowest_allowed_torque, min(desired_torque_last + MAX_RATE_DOWN, min(torque_meas.min, 0) - MAX_TORQUE_ERROR));
|
||||
|
||||
// check for violation
|
||||
if ((desired_torque < lowest_allowed_torque) || (desired_torque > highest_allowed_torque)) {
|
||||
violation = 1;
|
||||
}
|
||||
violation |= dist_to_meas_check(desired_torque, toyota_desired_torque_last,
|
||||
&toyota_torque_meas, TOYOTA_MAX_RATE_UP, TOYOTA_MAX_RATE_DOWN, TOYOTA_MAX_TORQUE_ERROR);
|
||||
|
||||
// used next time
|
||||
desired_torque_last = desired_torque;
|
||||
|
||||
toyota_desired_torque_last = desired_torque;
|
||||
|
||||
// *** torque real time rate limit check ***
|
||||
int16_t highest_rt_torque = max(rt_torque_last, 0) + MAX_RT_DELTA;
|
||||
int16_t lowest_rt_torque = min(rt_torque_last, 0) - MAX_RT_DELTA;
|
||||
|
||||
// check for violation
|
||||
if ((desired_torque < lowest_rt_torque) || (desired_torque > highest_rt_torque)) {
|
||||
violation = 1;
|
||||
}
|
||||
violation |= rt_rate_limit_check(desired_torque, toyota_rt_torque_last, TOYOTA_MAX_RT_DELTA);
|
||||
|
||||
// every RT_INTERVAL set the new limits
|
||||
uint32_t ts_elapsed = get_ts_elapsed(ts, ts_last);
|
||||
if (ts_elapsed > RT_INTERVAL) {
|
||||
rt_torque_last = desired_torque;
|
||||
ts_last = ts;
|
||||
uint32_t ts_elapsed = get_ts_elapsed(ts, toyota_ts_last);
|
||||
if (ts_elapsed > TOYOTA_RT_INTERVAL) {
|
||||
toyota_rt_torque_last = desired_torque;
|
||||
toyota_ts_last = ts;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,9 +131,9 @@ static int toyota_tx_hook(CAN_FIFOMailBox_TypeDef *to_send) {
|
||||
|
||||
// reset to 0 if either controls is not allowed or there's a violation
|
||||
if (violation || !controls_allowed) {
|
||||
desired_torque_last = 0;
|
||||
rt_torque_last = 0;
|
||||
ts_last = ts;
|
||||
toyota_desired_torque_last = 0;
|
||||
toyota_rt_torque_last = 0;
|
||||
toyota_ts_last = ts;
|
||||
}
|
||||
|
||||
if (violation) {
|
||||
@@ -175,15 +153,19 @@ static int toyota_tx_lin_hook(int lin_num, uint8_t *data, int len) {
|
||||
|
||||
static void toyota_init(int16_t param) {
|
||||
controls_allowed = 0;
|
||||
actuation_limits = 1;
|
||||
dbc_eps_torque_factor = param;
|
||||
}
|
||||
|
||||
static int toyota_ign_hook() {
|
||||
return -1;
|
||||
toyota_actuation_limits = 1;
|
||||
toyota_giraffe_switch_1 = 0;
|
||||
toyota_dbc_eps_torque_factor = param;
|
||||
}
|
||||
|
||||
static int toyota_fwd_hook(int bus_num, CAN_FIFOMailBox_TypeDef *to_fwd) {
|
||||
|
||||
// forward cam to radar and viceversa if car is dsu-less, except lkas cmd and hud
|
||||
if ((bus_num == 0 || bus_num == 2) && toyota_no_dsu_car && !toyota_giraffe_switch_1) {
|
||||
int addr = to_fwd->RIR>>21;
|
||||
bool is_lkas_msg = (addr == 0x2E4 || addr == 0x412) && bus_num == 2;
|
||||
return is_lkas_msg? -1 : (uint8_t)(~bus_num & 0x2);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -192,14 +174,15 @@ const safety_hooks toyota_hooks = {
|
||||
.rx = toyota_rx_hook,
|
||||
.tx = toyota_tx_hook,
|
||||
.tx_lin = toyota_tx_lin_hook,
|
||||
.ignition = toyota_ign_hook,
|
||||
.ignition = default_ign_hook,
|
||||
.fwd = toyota_fwd_hook,
|
||||
};
|
||||
|
||||
static void toyota_nolimits_init(int16_t param) {
|
||||
controls_allowed = 0;
|
||||
actuation_limits = 0;
|
||||
dbc_eps_torque_factor = param;
|
||||
toyota_actuation_limits = 0;
|
||||
toyota_giraffe_switch_1 = 0;
|
||||
toyota_dbc_eps_torque_factor = param;
|
||||
}
|
||||
|
||||
const safety_hooks toyota_nolimits_hooks = {
|
||||
@@ -207,6 +190,6 @@ const safety_hooks toyota_nolimits_hooks = {
|
||||
.rx = toyota_rx_hook,
|
||||
.tx = toyota_tx_hook,
|
||||
.tx_lin = toyota_tx_lin_hook,
|
||||
.ignition = toyota_ign_hook,
|
||||
.ignition = default_ign_hook,
|
||||
.fwd = toyota_fwd_hook,
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// TODO: refactor to repeat less code
|
||||
|
||||
// IPAS override
|
||||
const int32_t IPAS_OVERRIDE_THRESHOLD = 200; // disallow controls when user torque exceeds this value
|
||||
const int32_t TOYOTA_IPAS_OVERRIDE_THRESHOLD = 200; // disallow controls when user torque exceeds this value
|
||||
|
||||
struct lookup_t {
|
||||
float x[3];
|
||||
@@ -35,13 +35,6 @@ uint32_t ts_angle_last = 0;
|
||||
|
||||
int controls_allowed_last = 0;
|
||||
|
||||
int to_signed(int d, int bits) {
|
||||
if (d >= (1 << (bits - 1))) {
|
||||
d -= (1 << bits);
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
// interp function that holds extreme values
|
||||
float interpolate(struct lookup_t xy, float x) {
|
||||
int size = sizeof(xy.x) / sizeof(xy.x[0]);
|
||||
@@ -99,7 +92,7 @@ static void toyota_ipas_rx_hook(CAN_FIFOMailBox_TypeDef *to_push) {
|
||||
|
||||
// every RT_INTERVAL or when controls are turned on, set the new limits
|
||||
uint32_t ts_elapsed = get_ts_elapsed(ts, ts_angle_last);
|
||||
if ((ts_elapsed > RT_INTERVAL) || (controls_allowed && !controls_allowed_last)) {
|
||||
if ((ts_elapsed > TOYOTA_RT_INTERVAL) || (controls_allowed && !controls_allowed_last)) {
|
||||
rt_angle_last = angle_meas_new;
|
||||
ts_angle_last = ts;
|
||||
}
|
||||
@@ -125,8 +118,8 @@ static void toyota_ipas_rx_hook(CAN_FIFOMailBox_TypeDef *to_push) {
|
||||
}
|
||||
|
||||
// exit controls on high steering override
|
||||
if (angle_control && ((torque_driver.min > IPAS_OVERRIDE_THRESHOLD) ||
|
||||
(torque_driver.max < -IPAS_OVERRIDE_THRESHOLD) ||
|
||||
if (angle_control && ((torque_driver.min > TOYOTA_IPAS_OVERRIDE_THRESHOLD) ||
|
||||
(torque_driver.max < -TOYOTA_IPAS_OVERRIDE_THRESHOLD) ||
|
||||
(ipas_state==5))) {
|
||||
controls_allowed = 0;
|
||||
}
|
||||
@@ -187,7 +180,7 @@ const safety_hooks toyota_ipas_hooks = {
|
||||
.rx = toyota_ipas_rx_hook,
|
||||
.tx = toyota_ipas_tx_hook,
|
||||
.tx_lin = toyota_tx_lin_hook,
|
||||
.ignition = toyota_ign_hook,
|
||||
.ignition = default_ign_hook,
|
||||
.fwd = toyota_fwd_hook,
|
||||
};
|
||||
|
||||
|
||||
BIN
panda/buy.png
BIN
panda/buy.png
Binary file not shown.
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 12 KiB |
@@ -18,6 +18,35 @@ ______/\\\\\\\\\\\____/\\\\\\\\\_______/\\\\\\\\\\\\\\\______/\\\\\\\\\\________
|
||||
```
|
||||
|
||||
|
||||
# Installing J2534 driver:
|
||||
|
||||
[Download](https://github.com/commaai/panda/files/1742802/panda.J2534.driver.install.zip)
|
||||
|
||||
Depending on what version of windows you are on, you may need to separately install the WinUSB driver (see next section).
|
||||
|
||||
# Installing WinUSB driver:
|
||||
|
||||
Installation automatically happens for Windows 8 and Windows 10 because the panda
|
||||
firmware contains the USB descriptors necessary to auto-install the WinUSB driver.
|
||||
|
||||
Windows 7 will not auto-install the WinUSB driver. You can use Zadig to install
|
||||
the WinUSB driver. This software is not tested on anything before 7.
|
||||
|
||||
More details here:
|
||||
[WinUSB (Winusb.sys) Installation](https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/winusb-installation)
|
||||
[WCID Devices](https://github.com/pbatard/libwdi/wiki/WCID-Devices)
|
||||
[Zadig for installing libusb compatible driver](https://github.com/pbatard/libwdi/wiki/Zadig)
|
||||
|
||||
# Using J2534:
|
||||
|
||||
After installing the J2534 drivers for the panda, you can do... nothing.
|
||||
You first need to get a J2534 client that can load the drivers and talk to
|
||||
the panda for you.
|
||||
|
||||
A simple tool for testing J2534 drivers is DrewTech's 'J2534-1 Bus Analysis
|
||||
Tool' available in the 'Other Support Applications' section of their
|
||||
[Download Page](http://www.drewtech.com/downloads/).
|
||||
|
||||
# What is J2534?
|
||||
|
||||
J2534 is an API that tries to provide a consistent way to send/receive
|
||||
@@ -78,41 +107,6 @@ vscruntimeinfo.nsh and follow the instructions to bundle in the Visual Studio C
|
||||
Runtime required by your version of Visual Studio. Without this runtime, the panda
|
||||
code will not work, so without this file, the installer will refuse to build.
|
||||
|
||||
# Installing:
|
||||
|
||||
Either build the software yourself by following the steps in the
|
||||
'Developing' section, or get the panda_installer.exe file and run
|
||||
it. The wizard should correctly set up the drivers.
|
||||
|
||||
Since this driver is still in development, there are some issues
|
||||
that may occur. If after you install the driver and then plug in your
|
||||
panda (unplug it first if it was already plugged in), Windows says
|
||||
the driver is missing, refer to the section below 'Dealing with self
|
||||
signed drivers.'
|
||||
|
||||
# Using J2534:
|
||||
|
||||
After installing the J2534 drivers for the panda, you can do... nothing.
|
||||
You first need to get a J2534 client that can load the drivers and talk to
|
||||
the panda for you.
|
||||
|
||||
A simple tool for testing J2534 drivers is DrewTech's 'J2534-1 Bus Analysis
|
||||
Tool' available in the 'Other Support Applications' section of their
|
||||
[Download Page](http://www.drewtech.com/downloads/).
|
||||
|
||||
# Installing WinUSB driver:
|
||||
|
||||
Installation automatically happens for Windows 8 and Windows 10 because the panda
|
||||
firmware contains the USB descriptors necessary to auto-install the WinUSB driver.
|
||||
|
||||
Windows 7 will not auto-install the WinUSB driver. You can use Zadig to install
|
||||
the WinUSB driver. This software is not tested on anything before 7.
|
||||
|
||||
More details here:
|
||||
[WinUSB (Winusb.sys) Installation](https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/winusb-installation)
|
||||
[WCID Devices](https://github.com/pbatard/libwdi/wiki/WCID-Devices)
|
||||
[Zadig for installing libusb compatible driver](https://github.com/pbatard/libwdi/wiki/Zadig)
|
||||
|
||||
# Developing:
|
||||
|
||||
- Edit and merge pandaJ2534DLL\J2534register_x64.reg to register your development J2534 DLL.
|
||||
|
||||
@@ -29,11 +29,11 @@ def tesla_tester():
|
||||
|
||||
# BDY 0x248 is the MCU_commands message, which includes folding mirrors, opening the trunk, frunk, setting the cars lock state and more. For our test, we will edit the 3rd byte, which is MCU_lockRequest. 0x01 will lock, 0x02 will unlock:
|
||||
print("Unlocking Tesla...")
|
||||
p.can_send(0x248, "\x00\x00\x02\x00\x00\x00\x00\x00", bus_num)
|
||||
p.can_send(0x248, "\x00\x00\x02\x00\x00\x00\x00\x00", body_bus_num)
|
||||
|
||||
#Or, we can set the first byte, MCU_frontHoodCommand + MCU_liftgateSwitch, to 0x01 to pop the frunk, or 0x04 to open/close the trunk (0x05 should open both)
|
||||
print("Opening Frunk...")
|
||||
p.can_send(0x248, "\x01\x00\x00\x00\x00\x00\x00\x00", bus_num)
|
||||
p.can_send(0x248, "\x01\x00\x00\x00\x00\x00\x00\x00", body_bus_num)
|
||||
|
||||
#Back to safety...
|
||||
print("Disabling output on Panda...")
|
||||
@@ -41,7 +41,6 @@ def tesla_tester():
|
||||
|
||||
print("Reading VIN from 0x568. This is painfully slow and can take up to 3 minutes (1 minute per message; 3 messages needed for full VIN)...")
|
||||
|
||||
cnt = 0
|
||||
vin = {}
|
||||
while True:
|
||||
#Read the VIN
|
||||
@@ -53,11 +52,10 @@ def tesla_tester():
|
||||
vin_string = binascii.hexlify(dat)[2:] #rest of the string is the actual VIN data
|
||||
vin[vin_index] = vin_string.decode("hex")
|
||||
print("Got VIN index " + str(vin_index) + " data " + vin[vin_index])
|
||||
cnt += 1
|
||||
#if we have all 3 parts of the VIN, print it and break out of our while loop
|
||||
if cnt == 3:
|
||||
if 0 in vin and 1 in vin and 2 in vin:
|
||||
print("VIN: " + vin[0] + vin[1] + vin[2][:3])
|
||||
break
|
||||
|
||||
if __name__ == "__main__":
|
||||
tesla_tester()
|
||||
tesla_tester()
|
||||
|
||||
BIN
panda/panda.png
BIN
panda/panda.png
Binary file not shown.
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
@@ -15,7 +15,7 @@ from update import ensure_st_up_to_date
|
||||
from serial import PandaSerial
|
||||
from isotp import isotp_send, isotp_recv
|
||||
|
||||
__version__ = '0.0.7'
|
||||
__version__ = '0.0.8'
|
||||
|
||||
BASEDIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "../")
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ def isotp_recv_subaddr(panda, addr, bus, sendaddr, subaddr):
|
||||
idx = 1
|
||||
for mm in recv(panda, (tlen-len(dat) + 5)/6, addr, bus):
|
||||
assert ord(mm[0]) == subaddr
|
||||
assert ord(mm[1]) == (0x20 | idx)
|
||||
assert ord(mm[1]) == (0x20 | (idx&0xF))
|
||||
dat += mm[2:]
|
||||
idx += 1
|
||||
elif ord(msg[1])&0xf0 == 0x00:
|
||||
@@ -117,7 +117,7 @@ def isotp_recv(panda, addr, bus=0, sendaddr=None, subaddr=None):
|
||||
|
||||
idx = 1
|
||||
for mm in recv(panda, (tlen-len(dat) + 6)/7, addr, bus):
|
||||
assert ord(mm[0]) == (0x20 | idx)
|
||||
assert ord(mm[0]) == (0x20 | (idx&0xF))
|
||||
dat += mm[1:]
|
||||
idx += 1
|
||||
elif ord(msg[0])&0xf0 == 0x00:
|
||||
|
||||
17
panda/tests/gmbitbang/recv.py
Executable file
17
panda/tests/gmbitbang/recv.py
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python
|
||||
import time
|
||||
from panda import Panda
|
||||
|
||||
p = Panda()
|
||||
p.set_safety_mode(Panda.SAFETY_ALLOUTPUT)
|
||||
p.set_gmlan(bus=2)
|
||||
#p.can_send(0xaaa, "\x00\x00", bus=3)
|
||||
last_add = None
|
||||
while 1:
|
||||
ret = p.can_recv()
|
||||
if len(ret) > 0:
|
||||
add = ret[0][0]
|
||||
if last_add is not None and add != last_add+1:
|
||||
print "MISS %d %d" % (last_add, add)
|
||||
last_add = add
|
||||
print ret
|
||||
35
panda/tests/gmbitbang/rigol.py
Executable file
35
panda/tests/gmbitbang/rigol.py
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env python
|
||||
import numpy as np
|
||||
import visa
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
resources = visa.ResourceManager()
|
||||
print resources.list_resources()
|
||||
|
||||
scope = resources.open_resource('USB0::0x1AB1::0x04CE::DS1ZA184652242::INSTR', timeout=2000, chunk_size=1024000)
|
||||
print(scope.query('*IDN?').strip())
|
||||
|
||||
#voltscale = scope.ask_for_values(':CHAN1:SCAL?')[0]
|
||||
#voltoffset = scope.ask_for_values(":CHAN1:OFFS?")[0]
|
||||
|
||||
#scope.write(":STOP")
|
||||
scope.write(":WAV:POIN:MODE RAW")
|
||||
scope.write(":WAV:DATA? CHAN1")[10:]
|
||||
rawdata = scope.read_raw()
|
||||
data = np.frombuffer(rawdata, 'B')
|
||||
print data.shape
|
||||
|
||||
s1 = data[0:650]
|
||||
s2 = data[650:]
|
||||
s1i = np.argmax(s1 > 100)
|
||||
s2i = np.argmax(s2 > 100)
|
||||
s1 = s1[s1i:]
|
||||
s2 = s2[s2i:]
|
||||
|
||||
plt.plot(s1)
|
||||
plt.plot(s2)
|
||||
plt.show()
|
||||
#data = (data - 130.0 - voltoffset/voltscale*25) / 25 * voltscale
|
||||
|
||||
print data
|
||||
|
||||
33
panda/tests/gmbitbang/test.py
Executable file
33
panda/tests/gmbitbang/test.py
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env python
|
||||
import time
|
||||
from panda import Panda
|
||||
|
||||
p1 = Panda('380016000551363338383037')
|
||||
p2 = Panda('430026000951363338383037')
|
||||
|
||||
# this is a test, no safety
|
||||
p1.set_safety_mode(Panda.SAFETY_ALLOUTPUT)
|
||||
p2.set_safety_mode(Panda.SAFETY_ALLOUTPUT)
|
||||
|
||||
# get versions
|
||||
print(p1.get_version())
|
||||
print(p2.get_version())
|
||||
|
||||
# this sets bus 2 to actually be GMLAN
|
||||
p2.set_gmlan(bus=2)
|
||||
|
||||
# send w bitbang then without
|
||||
#iden = 123
|
||||
iden = 18000
|
||||
#dat = "\x01\x02"
|
||||
dat = "\x01\x02\x03\x04\x05\x06\x07\x08"
|
||||
while 1:
|
||||
iden += 1
|
||||
p1.set_gmlan(bus=None)
|
||||
p1.can_send(iden, dat, bus=3)
|
||||
#p1.set_gmlan(bus=2)
|
||||
#p1.can_send(iden, dat, bus=3)
|
||||
time.sleep(0.01)
|
||||
print p2.can_recv()
|
||||
#exit(0)
|
||||
|
||||
23
panda/tests/gmbitbang/test_one.py
Executable file
23
panda/tests/gmbitbang/test_one.py
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env python
|
||||
import time
|
||||
from panda import Panda
|
||||
|
||||
p = Panda()
|
||||
p.set_safety_mode(Panda.SAFETY_ALLOUTPUT)
|
||||
|
||||
# ack any crap on bus
|
||||
p.set_gmlan(bus=2)
|
||||
time.sleep(0.1)
|
||||
while len(p.can_recv()) > 0:
|
||||
print "clearing"
|
||||
time.sleep(0.1)
|
||||
print "cleared"
|
||||
p.set_gmlan(bus=None)
|
||||
|
||||
iden = 18000
|
||||
dat = "\x01\x02\x03\x04\x05\x06\x07\x08"
|
||||
while 1:
|
||||
iden += 1
|
||||
p.can_send(iden, dat, bus=3)
|
||||
time.sleep(0.01)
|
||||
|
||||
32
panda/tests/gmbitbang/test_packer.c
Normal file
32
panda/tests/gmbitbang/test_packer.c
Normal file
@@ -0,0 +1,32 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct {
|
||||
uint32_t RIR; /*!< CAN receive FIFO mailbox identifier register */
|
||||
uint32_t RDTR; /*!< CAN receive FIFO mailbox data length control and time stamp register */
|
||||
uint32_t RDLR; /*!< CAN receive FIFO mailbox data low register */
|
||||
uint32_t RDHR; /*!< CAN receive FIFO mailbox data high register */
|
||||
} CAN_FIFOMailBox_TypeDef;
|
||||
|
||||
#include "../../board/drivers/canbitbang.h"
|
||||
|
||||
int main() {
|
||||
char out[300];
|
||||
CAN_FIFOMailBox_TypeDef to_bang = {0};
|
||||
to_bang.RIR = 20 << 21;
|
||||
to_bang.RDTR = 1;
|
||||
to_bang.RDLR = 1;
|
||||
|
||||
int len = get_bit_message(out, &to_bang);
|
||||
printf("T:");
|
||||
for (int i = 0; i < len; i++) {
|
||||
printf("%d", out[i]);
|
||||
}
|
||||
printf("\n");
|
||||
printf("R:0000010010100000100010000010011110111010100111111111111111");
|
||||
printf("\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -38,11 +38,13 @@ void reset_angle_control(void);
|
||||
int get_controls_allowed(void);
|
||||
void init_tests_toyota(void);
|
||||
void set_timer(int t);
|
||||
void set_torque_meas(int min, int max);
|
||||
void set_rt_torque_last(int t);
|
||||
void set_desired_torque_last(int t);
|
||||
int get_torque_meas_min(void);
|
||||
int get_torque_meas_max(void);
|
||||
void set_toyota_torque_meas(int min, int max);
|
||||
void set_cadillac_torque_driver(int min, int max);
|
||||
void set_gm_torque_driver(int min, int max);
|
||||
void set_toyota_rt_torque_last(int t);
|
||||
void set_toyota_desired_torque_last(int t);
|
||||
int get_toyota_torque_meas_min(void);
|
||||
int get_toyota_torque_meas_max(void);
|
||||
|
||||
void init_tests_honda(void);
|
||||
int get_ego_speed(void);
|
||||
@@ -51,6 +53,22 @@ void honda_rx_hook(CAN_FIFOMailBox_TypeDef *to_push);
|
||||
int honda_tx_hook(CAN_FIFOMailBox_TypeDef *to_send);
|
||||
int get_brake_prev(void);
|
||||
int get_gas_prev(void);
|
||||
void set_honda_alt_brake_msg(bool);
|
||||
void set_bosch_hardware(bool);
|
||||
|
||||
void init_tests_cadillac(void);
|
||||
void cadillac_init(int16_t param);
|
||||
void cadillac_rx_hook(CAN_FIFOMailBox_TypeDef *to_push);
|
||||
int cadillac_tx_hook(CAN_FIFOMailBox_TypeDef *to_send);
|
||||
void set_cadillac_desired_torque_last(int t);
|
||||
void set_cadillac_rt_torque_last(int t);
|
||||
|
||||
void init_tests_gm(void);
|
||||
void gm_init(int16_t param);
|
||||
void gm_rx_hook(CAN_FIFOMailBox_TypeDef *to_push);
|
||||
int gm_tx_hook(CAN_FIFOMailBox_TypeDef *to_send);
|
||||
void set_gm_desired_torque_last(int t);
|
||||
void set_gm_rt_torque_last(int t);
|
||||
|
||||
void toyota_ipas_rx_hook(CAN_FIFOMailBox_TypeDef *to_push);
|
||||
int toyota_ipas_tx_hook(CAN_FIFOMailBox_TypeDef *to_send);
|
||||
|
||||
@@ -22,7 +22,9 @@ typedef struct
|
||||
uint32_t CNT;
|
||||
} TIM_TypeDef;
|
||||
|
||||
struct sample_t torque_meas;
|
||||
struct sample_t toyota_torque_meas;
|
||||
struct sample_t cadillac_torque_driver;
|
||||
struct sample_t gm_torque_driver;
|
||||
|
||||
TIM_TypeDef timer;
|
||||
TIM_TypeDef *TIM2 = &timer;
|
||||
@@ -58,27 +60,54 @@ void set_timer(int t){
|
||||
timer.CNT = t;
|
||||
}
|
||||
|
||||
void set_torque_meas(int min, int max){
|
||||
torque_meas.min = min;
|
||||
torque_meas.max = max;
|
||||
void set_toyota_torque_meas(int min, int max){
|
||||
toyota_torque_meas.min = min;
|
||||
toyota_torque_meas.max = max;
|
||||
}
|
||||
|
||||
int get_torque_meas_min(void){
|
||||
return torque_meas.min;
|
||||
void set_cadillac_torque_driver(int min, int max){
|
||||
cadillac_torque_driver.min = min;
|
||||
cadillac_torque_driver.max = max;
|
||||
}
|
||||
|
||||
int get_torque_meas_max(void){
|
||||
return torque_meas.max;
|
||||
void set_gm_torque_driver(int min, int max){
|
||||
gm_torque_driver.min = min;
|
||||
gm_torque_driver.max = max;
|
||||
}
|
||||
|
||||
void set_rt_torque_last(int t){
|
||||
rt_torque_last = t;
|
||||
int get_toyota_torque_meas_min(void){
|
||||
return toyota_torque_meas.min;
|
||||
}
|
||||
|
||||
void set_desired_torque_last(int t){
|
||||
desired_torque_last = t;
|
||||
int get_toyota_torque_meas_max(void){
|
||||
return toyota_torque_meas.max;
|
||||
}
|
||||
|
||||
void set_toyota_rt_torque_last(int t){
|
||||
toyota_rt_torque_last = t;
|
||||
}
|
||||
|
||||
void set_cadillac_rt_torque_last(int t){
|
||||
cadillac_rt_torque_last = t;
|
||||
}
|
||||
|
||||
void set_gm_rt_torque_last(int t){
|
||||
gm_rt_torque_last = t;
|
||||
}
|
||||
|
||||
void set_toyota_desired_torque_last(int t){
|
||||
toyota_desired_torque_last = t;
|
||||
}
|
||||
|
||||
void set_cadillac_desired_torque_last(int t){
|
||||
for (int i = 0; i < 4; i++) cadillac_desired_torque_last[i] = t;
|
||||
}
|
||||
|
||||
void set_gm_desired_torque_last(int t){
|
||||
gm_desired_torque_last = t;
|
||||
}
|
||||
|
||||
|
||||
int get_ego_speed(void){
|
||||
return ego_speed;
|
||||
}
|
||||
@@ -91,12 +120,38 @@ int get_gas_prev(void){
|
||||
return gas_prev;
|
||||
}
|
||||
|
||||
void set_honda_alt_brake_msg(bool c){
|
||||
honda_alt_brake_msg = c;
|
||||
}
|
||||
|
||||
void set_bosch_hardware(bool c){
|
||||
bosch_hardware = c;
|
||||
}
|
||||
|
||||
void init_tests_toyota(void){
|
||||
torque_meas.min = 0;
|
||||
torque_meas.max = 0;
|
||||
desired_torque_last = 0;
|
||||
rt_torque_last = 0;
|
||||
ts_last = 0;
|
||||
toyota_torque_meas.min = 0;
|
||||
toyota_torque_meas.max = 0;
|
||||
toyota_desired_torque_last = 0;
|
||||
toyota_rt_torque_last = 0;
|
||||
toyota_ts_last = 0;
|
||||
set_timer(0);
|
||||
}
|
||||
|
||||
void init_tests_cadillac(void){
|
||||
cadillac_torque_driver.min = 0;
|
||||
cadillac_torque_driver.max = 0;
|
||||
for (int i = 0; i < 4; i++) cadillac_desired_torque_last[i] = 0;
|
||||
cadillac_rt_torque_last = 0;
|
||||
cadillac_ts_last = 0;
|
||||
set_timer(0);
|
||||
}
|
||||
|
||||
void init_tests_gm(void){
|
||||
gm_torque_driver.min = 0;
|
||||
gm_torque_driver.max = 0;
|
||||
gm_desired_torque_last = 0;
|
||||
gm_rt_torque_last = 0;
|
||||
gm_ts_last = 0;
|
||||
set_timer(0);
|
||||
}
|
||||
|
||||
|
||||
182
panda/tests/safety/test_cadillac.py
Normal file
182
panda/tests/safety/test_cadillac.py
Normal file
@@ -0,0 +1,182 @@
|
||||
#!/usr/bin/env python2
|
||||
import unittest
|
||||
import numpy as np
|
||||
import libpandasafety_py
|
||||
|
||||
MAX_RATE_UP = 2
|
||||
MAX_RATE_DOWN = 5
|
||||
MAX_TORQUE = 150
|
||||
|
||||
MAX_RT_DELTA = 75
|
||||
RT_INTERVAL = 250000
|
||||
|
||||
DRIVER_TORQUE_ALLOWANCE = 50;
|
||||
DRIVER_TORQUE_FACTOR = 4;
|
||||
|
||||
IPAS_OVERRIDE_THRESHOLD = 200
|
||||
|
||||
def twos_comp(val, bits):
|
||||
if val >= 0:
|
||||
return val
|
||||
else:
|
||||
return (2**bits) + val
|
||||
|
||||
def sign(a):
|
||||
if a > 0:
|
||||
return 1
|
||||
else:
|
||||
return -1
|
||||
|
||||
class TestCadillacSafety(unittest.TestCase):
|
||||
@classmethod
|
||||
def setUp(cls):
|
||||
cls.safety = libpandasafety_py.libpandasafety
|
||||
cls.safety.cadillac_init(0)
|
||||
cls.safety.init_tests_cadillac()
|
||||
|
||||
def _set_prev_torque(self, t):
|
||||
self.safety.set_cadillac_desired_torque_last(t)
|
||||
self.safety.set_cadillac_rt_torque_last(t)
|
||||
|
||||
def _torque_driver_msg(self, torque):
|
||||
to_send = libpandasafety_py.ffi.new('CAN_FIFOMailBox_TypeDef *')
|
||||
to_send[0].RIR = 0x164 << 21
|
||||
|
||||
t = twos_comp(torque, 11)
|
||||
to_send[0].RDLR = ((t >> 8) & 0x7) | ((t & 0xFF) << 8)
|
||||
return to_send
|
||||
|
||||
def _torque_driver_msg_array(self, torque):
|
||||
for i in range(3):
|
||||
self.safety.cadillac_ipas_rx_hook(self._torque_driver_msg(torque))
|
||||
|
||||
def _torque_msg(self, torque):
|
||||
to_send = libpandasafety_py.ffi.new('CAN_FIFOMailBox_TypeDef *')
|
||||
to_send[0].RIR = 0x151 << 21
|
||||
|
||||
t = twos_comp(torque, 14)
|
||||
to_send[0].RDLR = ((t >> 8) & 0x3F) | ((t & 0xFF) << 8)
|
||||
return to_send
|
||||
|
||||
def test_default_controls_not_allowed(self):
|
||||
self.assertFalse(self.safety.get_controls_allowed())
|
||||
|
||||
def test_manually_enable_controls_allowed(self):
|
||||
self.safety.set_controls_allowed(1)
|
||||
self.assertTrue(self.safety.get_controls_allowed())
|
||||
self.safety.set_controls_allowed(0)
|
||||
|
||||
def test_enable_control_allowed_from_cruise(self):
|
||||
to_push = libpandasafety_py.ffi.new('CAN_FIFOMailBox_TypeDef *')
|
||||
to_push[0].RIR = 0x370 << 21
|
||||
to_push[0].RDLR = 0x800000
|
||||
to_push[0].RDTR = 0
|
||||
|
||||
self.safety.cadillac_rx_hook(to_push)
|
||||
self.assertTrue(self.safety.get_controls_allowed())
|
||||
|
||||
def test_disable_control_allowed_from_cruise(self):
|
||||
to_push = libpandasafety_py.ffi.new('CAN_FIFOMailBox_TypeDef *')
|
||||
to_push[0].RIR = 0x370 << 21
|
||||
to_push[0].RDLR = 0
|
||||
to_push[0].RDTR = 0
|
||||
|
||||
self.safety.set_controls_allowed(1)
|
||||
self.safety.cadillac_rx_hook(to_push)
|
||||
self.assertFalse(self.safety.get_controls_allowed())
|
||||
|
||||
def test_torque_absolute_limits(self):
|
||||
for controls_allowed in [True, False]:
|
||||
for torque in np.arange(-MAX_TORQUE - 1000, MAX_TORQUE + 1000, MAX_RATE_UP):
|
||||
self.safety.set_controls_allowed(controls_allowed)
|
||||
self.safety.set_cadillac_rt_torque_last(torque)
|
||||
self.safety.set_cadillac_torque_driver(0, 0)
|
||||
self.safety.set_cadillac_desired_torque_last(torque - MAX_RATE_UP)
|
||||
|
||||
if controls_allowed:
|
||||
send = (-MAX_TORQUE <= torque <= MAX_TORQUE)
|
||||
else:
|
||||
send = torque == 0
|
||||
|
||||
self.assertEqual(send, self.safety.cadillac_tx_hook(self._torque_msg(torque)))
|
||||
|
||||
def test_non_realtime_limit_up(self):
|
||||
self.safety.set_cadillac_torque_driver(0, 0)
|
||||
self.safety.set_controls_allowed(True)
|
||||
|
||||
self._set_prev_torque(0)
|
||||
self.assertTrue(self.safety.cadillac_tx_hook(self._torque_msg(MAX_RATE_UP)))
|
||||
self._set_prev_torque(0)
|
||||
self.assertTrue(self.safety.cadillac_tx_hook(self._torque_msg(-MAX_RATE_UP)))
|
||||
|
||||
self._set_prev_torque(0)
|
||||
self.assertFalse(self.safety.cadillac_tx_hook(self._torque_msg(MAX_RATE_UP + 1)))
|
||||
self.safety.set_controls_allowed(True)
|
||||
self._set_prev_torque(0)
|
||||
self.assertFalse(self.safety.cadillac_tx_hook(self._torque_msg(-MAX_RATE_UP - 1)))
|
||||
|
||||
def test_non_realtime_limit_down(self):
|
||||
self.safety.set_cadillac_torque_driver(0, 0)
|
||||
self.safety.set_controls_allowed(True)
|
||||
|
||||
def test_exceed_torque_sensor(self):
|
||||
self.safety.set_controls_allowed(True)
|
||||
|
||||
for sign in [-1, 1]:
|
||||
for t in np.arange(0, DRIVER_TORQUE_ALLOWANCE + 1, 1):
|
||||
t *= -sign
|
||||
self.safety.set_cadillac_torque_driver(t, t)
|
||||
self._set_prev_torque(MAX_TORQUE * sign)
|
||||
self.assertTrue(self.safety.cadillac_tx_hook(self._torque_msg(MAX_TORQUE * sign)))
|
||||
|
||||
self.safety.set_cadillac_torque_driver(DRIVER_TORQUE_ALLOWANCE + 1, DRIVER_TORQUE_ALLOWANCE + 1)
|
||||
self.assertFalse(self.safety.cadillac_tx_hook(self._torque_msg(-MAX_TORQUE)))
|
||||
|
||||
# spot check some individual cases
|
||||
for sign in [-1, 1]:
|
||||
driver_torque = (DRIVER_TORQUE_ALLOWANCE + 10) * sign
|
||||
torque_desired = (MAX_TORQUE - 10 * DRIVER_TORQUE_FACTOR) * sign
|
||||
delta = 1 * sign
|
||||
self._set_prev_torque(torque_desired)
|
||||
self.safety.set_cadillac_torque_driver(-driver_torque, -driver_torque)
|
||||
self.assertTrue(self.safety.cadillac_tx_hook(self._torque_msg(torque_desired)))
|
||||
self._set_prev_torque(torque_desired + delta)
|
||||
self.safety.set_cadillac_torque_driver(-driver_torque, -driver_torque)
|
||||
self.assertFalse(self.safety.cadillac_tx_hook(self._torque_msg(torque_desired + delta)))
|
||||
|
||||
self._set_prev_torque(MAX_TORQUE * sign)
|
||||
self.safety.set_cadillac_torque_driver(-MAX_TORQUE * sign, -MAX_TORQUE * sign)
|
||||
self.assertTrue(self.safety.cadillac_tx_hook(self._torque_msg((MAX_TORQUE - MAX_RATE_DOWN) * sign)))
|
||||
self._set_prev_torque(MAX_TORQUE * sign)
|
||||
self.safety.set_cadillac_torque_driver(-MAX_TORQUE * sign, -MAX_TORQUE * sign)
|
||||
self.assertTrue(self.safety.cadillac_tx_hook(self._torque_msg(0)))
|
||||
self._set_prev_torque(MAX_TORQUE * sign)
|
||||
self.safety.set_cadillac_torque_driver(-MAX_TORQUE * sign, -MAX_TORQUE * sign)
|
||||
self.assertFalse(self.safety.cadillac_tx_hook(self._torque_msg((MAX_TORQUE - MAX_RATE_DOWN + 1) * sign)))
|
||||
|
||||
|
||||
def test_realtime_limits(self):
|
||||
self.safety.set_controls_allowed(True)
|
||||
|
||||
for sign in [-1, 1]:
|
||||
self.safety.init_tests_cadillac()
|
||||
self._set_prev_torque(0)
|
||||
self.safety.set_cadillac_torque_driver(0, 0)
|
||||
for t in np.arange(0, MAX_RT_DELTA, 1):
|
||||
t *= sign
|
||||
self.assertTrue(self.safety.cadillac_tx_hook(self._torque_msg(t)))
|
||||
self.assertFalse(self.safety.cadillac_tx_hook(self._torque_msg(sign * (MAX_RT_DELTA + 1))))
|
||||
|
||||
self._set_prev_torque(0)
|
||||
for t in np.arange(0, MAX_RT_DELTA, 1):
|
||||
t *= sign
|
||||
self.assertTrue(self.safety.cadillac_tx_hook(self._torque_msg(t)))
|
||||
|
||||
# Increase timer to update rt_torque_last
|
||||
self.safety.set_timer(RT_INTERVAL + 1)
|
||||
self.assertTrue(self.safety.cadillac_tx_hook(self._torque_msg(sign * (MAX_RT_DELTA - 1))))
|
||||
self.assertTrue(self.safety.cadillac_tx_hook(self._torque_msg(sign * (MAX_RT_DELTA + 1))))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
270
panda/tests/safety/test_gm.py
Normal file
270
panda/tests/safety/test_gm.py
Normal file
@@ -0,0 +1,270 @@
|
||||
#!/usr/bin/env python2
|
||||
import unittest
|
||||
import numpy as np
|
||||
import libpandasafety_py
|
||||
|
||||
MAX_RATE_UP = 7
|
||||
MAX_RATE_DOWN = 17
|
||||
MAX_STEER = 255
|
||||
MAX_BRAKE = 350
|
||||
MAX_GAS = 3072
|
||||
MAX_REGEN = 1404
|
||||
|
||||
MAX_RT_DELTA = 128
|
||||
RT_INTERVAL = 250000
|
||||
|
||||
DRIVER_TORQUE_ALLOWANCE = 50;
|
||||
DRIVER_TORQUE_FACTOR = 4;
|
||||
|
||||
def twos_comp(val, bits):
|
||||
if val >= 0:
|
||||
return val
|
||||
else:
|
||||
return (2**bits) + val
|
||||
|
||||
def sign(a):
|
||||
if a > 0:
|
||||
return 1
|
||||
else:
|
||||
return -1
|
||||
|
||||
class TestGmSafety(unittest.TestCase):
|
||||
@classmethod
|
||||
def setUp(cls):
|
||||
cls.safety = libpandasafety_py.libpandasafety
|
||||
cls.safety.gm_init(0)
|
||||
cls.safety.init_tests_gm()
|
||||
|
||||
def _speed_msg(self, speed):
|
||||
to_send = libpandasafety_py.ffi.new('CAN_FIFOMailBox_TypeDef *')
|
||||
to_send[0].RIR = 842 << 21
|
||||
to_send[0].RDLR = speed
|
||||
return to_send
|
||||
|
||||
def _button_msg(self, buttons):
|
||||
to_send = libpandasafety_py.ffi.new('CAN_FIFOMailBox_TypeDef *')
|
||||
to_send[0].RIR = 481 << 21
|
||||
to_send[0].RDHR = buttons << 12
|
||||
return to_send
|
||||
|
||||
def _brake_msg(self, brake):
|
||||
to_send = libpandasafety_py.ffi.new('CAN_FIFOMailBox_TypeDef *')
|
||||
to_send[0].RIR = 241 << 21
|
||||
to_send[0].RDLR = 0xa00 if brake else 0x900
|
||||
return to_send
|
||||
|
||||
def _gas_msg(self, gas):
|
||||
to_send = libpandasafety_py.ffi.new('CAN_FIFOMailBox_TypeDef *')
|
||||
to_send[0].RIR = 417 << 21
|
||||
to_send[0].RDHR = (1 << 16) if gas else 0
|
||||
return to_send
|
||||
|
||||
def _send_brake_msg(self, brake):
|
||||
to_send = libpandasafety_py.ffi.new('CAN_FIFOMailBox_TypeDef *')
|
||||
to_send[0].RIR = 789 << 21
|
||||
brake = (-brake) & 0xfff
|
||||
to_send[0].RDLR = (brake >> 8) | ((brake &0xff) << 8)
|
||||
return to_send
|
||||
|
||||
def _send_gas_msg(self, gas):
|
||||
to_send = libpandasafety_py.ffi.new('CAN_FIFOMailBox_TypeDef *')
|
||||
to_send[0].RIR = 715 << 21
|
||||
to_send[0].RDLR = ((gas & 0x1f) << 27) | ((gas & 0xfe0) << 11)
|
||||
return to_send
|
||||
|
||||
def _set_prev_torque(self, t):
|
||||
self.safety.set_gm_desired_torque_last(t)
|
||||
self.safety.set_gm_rt_torque_last(t)
|
||||
|
||||
def _torque_driver_msg(self, torque):
|
||||
to_send = libpandasafety_py.ffi.new('CAN_FIFOMailBox_TypeDef *')
|
||||
to_send[0].RIR = 388 << 21
|
||||
|
||||
t = twos_comp(torque, 11)
|
||||
to_send[0].RDHR = (((t >> 8) & 0x7) << 16) | ((t & 0xFF) << 24)
|
||||
return to_send
|
||||
|
||||
def _torque_driver_msg_array(self, torque):
|
||||
for i in range(3):
|
||||
self.safety.gm_ipas_rx_hook(self._torque_driver_msg(torque))
|
||||
|
||||
def _torque_msg(self, torque):
|
||||
to_send = libpandasafety_py.ffi.new('CAN_FIFOMailBox_TypeDef *')
|
||||
to_send[0].RIR = 384 << 21
|
||||
|
||||
t = twos_comp(torque, 11)
|
||||
to_send[0].RDLR = ((t >> 8) & 0x7) | ((t & 0xFF) << 8)
|
||||
return to_send
|
||||
|
||||
def test_default_controls_not_allowed(self):
|
||||
self.assertFalse(self.safety.get_controls_allowed())
|
||||
|
||||
def test_resume_button(self):
|
||||
RESUME_BTN = 2
|
||||
self.safety.set_controls_allowed(0)
|
||||
self.safety.gm_rx_hook(self._button_msg(RESUME_BTN))
|
||||
self.assertTrue(self.safety.get_controls_allowed())
|
||||
|
||||
def test_set_button(self):
|
||||
SET_BTN = 3
|
||||
self.safety.set_controls_allowed(0)
|
||||
self.safety.gm_rx_hook(self._button_msg(SET_BTN))
|
||||
self.assertTrue(self.safety.get_controls_allowed())
|
||||
|
||||
def test_cancel_button(self):
|
||||
CANCEL_BTN = 6
|
||||
self.safety.set_controls_allowed(1)
|
||||
self.safety.gm_rx_hook(self._button_msg(CANCEL_BTN))
|
||||
self.assertFalse(self.safety.get_controls_allowed())
|
||||
|
||||
def test_disengage_on_brake(self):
|
||||
self.safety.set_controls_allowed(1)
|
||||
self.safety.gm_rx_hook(self._brake_msg(True))
|
||||
self.assertFalse(self.safety.get_controls_allowed())
|
||||
|
||||
def test_allow_brake_at_zero_speed(self):
|
||||
# Brake was already pressed
|
||||
self.safety.gm_rx_hook(self._brake_msg(True))
|
||||
self.safety.set_controls_allowed(1)
|
||||
|
||||
self.safety.gm_rx_hook(self._brake_msg(True))
|
||||
self.assertTrue(self.safety.get_controls_allowed())
|
||||
self.safety.gm_rx_hook(self._brake_msg(False))
|
||||
|
||||
def test_not_allow_brake_when_moving(self):
|
||||
# Brake was already pressed
|
||||
self.safety.gm_rx_hook(self._brake_msg(True))
|
||||
self.safety.gm_rx_hook(self._speed_msg(100))
|
||||
self.safety.set_controls_allowed(1)
|
||||
|
||||
self.safety.gm_rx_hook(self._brake_msg(True))
|
||||
self.assertFalse(self.safety.get_controls_allowed())
|
||||
self.safety.gm_rx_hook(self._brake_msg(False))
|
||||
|
||||
def test_disengage_on_gas(self):
|
||||
self.safety.set_controls_allowed(1)
|
||||
self.safety.gm_rx_hook(self._gas_msg(True))
|
||||
self.assertFalse(self.safety.get_controls_allowed())
|
||||
self.safety.gm_rx_hook(self._gas_msg(False))
|
||||
|
||||
def test_allow_engage_with_gas_pressed(self):
|
||||
self.safety.gm_rx_hook(self._gas_msg(True))
|
||||
self.safety.set_controls_allowed(1)
|
||||
self.safety.gm_rx_hook(self._gas_msg(True))
|
||||
self.assertTrue(self.safety.get_controls_allowed())
|
||||
self.safety.gm_rx_hook(self._gas_msg(False))
|
||||
|
||||
def test_brake_safety_check(self):
|
||||
for enabled in [0, 1]:
|
||||
for b in range(0, 500):
|
||||
self.safety.set_controls_allowed(enabled)
|
||||
if abs(b) > MAX_BRAKE or (not enabled and b != 0):
|
||||
self.assertFalse(self.safety.gm_tx_hook(self._send_brake_msg(b)))
|
||||
else:
|
||||
self.assertTrue(self.safety.gm_tx_hook(self._send_brake_msg(b)))
|
||||
|
||||
def test_gas_safety_check(self):
|
||||
for enabled in [0, 1]:
|
||||
for g in range(0, 2**12-1):
|
||||
self.safety.set_controls_allowed(enabled)
|
||||
if abs(g) > MAX_GAS or (not enabled and g != MAX_REGEN):
|
||||
self.assertFalse(self.safety.gm_tx_hook(self._send_gas_msg(g)))
|
||||
else:
|
||||
self.assertTrue(self.safety.gm_tx_hook(self._send_gas_msg(g)))
|
||||
|
||||
def test_steer_safety_check(self):
|
||||
for enabled in [0, 1]:
|
||||
for t in range(-0x200, 0x200):
|
||||
self.safety.set_controls_allowed(enabled)
|
||||
self._set_prev_torque(t)
|
||||
if abs(t) > MAX_STEER or (not enabled and abs(t) > 0):
|
||||
self.assertFalse(self.safety.gm_tx_hook(self._torque_msg(t)))
|
||||
else:
|
||||
self.assertTrue(self.safety.gm_tx_hook(self._torque_msg(t)))
|
||||
|
||||
def test_manually_enable_controls_allowed(self):
|
||||
self.safety.set_controls_allowed(1)
|
||||
self.assertTrue(self.safety.get_controls_allowed())
|
||||
self.safety.set_controls_allowed(0)
|
||||
self.assertFalse(self.safety.get_controls_allowed())
|
||||
|
||||
def test_non_realtime_limit_up(self):
|
||||
self.safety.set_gm_torque_driver(0, 0)
|
||||
self.safety.set_controls_allowed(True)
|
||||
|
||||
self._set_prev_torque(0)
|
||||
self.assertTrue(self.safety.gm_tx_hook(self._torque_msg(MAX_RATE_UP)))
|
||||
self._set_prev_torque(0)
|
||||
self.assertTrue(self.safety.gm_tx_hook(self._torque_msg(-MAX_RATE_UP)))
|
||||
|
||||
self._set_prev_torque(0)
|
||||
self.assertFalse(self.safety.gm_tx_hook(self._torque_msg(MAX_RATE_UP + 1)))
|
||||
self.safety.set_controls_allowed(True)
|
||||
self._set_prev_torque(0)
|
||||
self.assertFalse(self.safety.gm_tx_hook(self._torque_msg(-MAX_RATE_UP - 1)))
|
||||
|
||||
def test_non_realtime_limit_down(self):
|
||||
self.safety.set_gm_torque_driver(0, 0)
|
||||
self.safety.set_controls_allowed(True)
|
||||
|
||||
def test_against_torque_driver(self):
|
||||
self.safety.set_controls_allowed(True)
|
||||
|
||||
for sign in [-1, 1]:
|
||||
for t in np.arange(0, DRIVER_TORQUE_ALLOWANCE + 1, 1):
|
||||
t *= -sign
|
||||
self.safety.set_gm_torque_driver(t, t)
|
||||
self._set_prev_torque(MAX_STEER * sign)
|
||||
self.assertTrue(self.safety.gm_tx_hook(self._torque_msg(MAX_STEER * sign)))
|
||||
|
||||
self.safety.set_gm_torque_driver(DRIVER_TORQUE_ALLOWANCE + 1, DRIVER_TORQUE_ALLOWANCE + 1)
|
||||
self.assertFalse(self.safety.gm_tx_hook(self._torque_msg(-MAX_STEER)))
|
||||
|
||||
# spot check some individual cases
|
||||
for sign in [-1, 1]:
|
||||
driver_torque = (DRIVER_TORQUE_ALLOWANCE + 10) * sign
|
||||
torque_desired = (MAX_STEER - 10 * DRIVER_TORQUE_FACTOR) * sign
|
||||
delta = 1 * sign
|
||||
self._set_prev_torque(torque_desired)
|
||||
self.safety.set_gm_torque_driver(-driver_torque, -driver_torque)
|
||||
self.assertTrue(self.safety.gm_tx_hook(self._torque_msg(torque_desired)))
|
||||
self._set_prev_torque(torque_desired + delta)
|
||||
self.safety.set_gm_torque_driver(-driver_torque, -driver_torque)
|
||||
self.assertFalse(self.safety.gm_tx_hook(self._torque_msg(torque_desired + delta)))
|
||||
|
||||
self._set_prev_torque(MAX_STEER * sign)
|
||||
self.safety.set_gm_torque_driver(-MAX_STEER * sign, -MAX_STEER * sign)
|
||||
self.assertTrue(self.safety.gm_tx_hook(self._torque_msg((MAX_STEER - MAX_RATE_DOWN) * sign)))
|
||||
self._set_prev_torque(MAX_STEER * sign)
|
||||
self.safety.set_gm_torque_driver(-MAX_STEER * sign, -MAX_STEER * sign)
|
||||
self.assertTrue(self.safety.gm_tx_hook(self._torque_msg(0)))
|
||||
self._set_prev_torque(MAX_STEER * sign)
|
||||
self.safety.set_gm_torque_driver(-MAX_STEER * sign, -MAX_STEER * sign)
|
||||
self.assertFalse(self.safety.gm_tx_hook(self._torque_msg((MAX_STEER - MAX_RATE_DOWN + 1) * sign)))
|
||||
|
||||
|
||||
def test_realtime_limits(self):
|
||||
self.safety.set_controls_allowed(True)
|
||||
|
||||
for sign in [-1, 1]:
|
||||
self.safety.init_tests_gm()
|
||||
self._set_prev_torque(0)
|
||||
self.safety.set_gm_torque_driver(0, 0)
|
||||
for t in np.arange(0, MAX_RT_DELTA, 1):
|
||||
t *= sign
|
||||
self.assertTrue(self.safety.gm_tx_hook(self._torque_msg(t)))
|
||||
self.assertFalse(self.safety.gm_tx_hook(self._torque_msg(sign * (MAX_RT_DELTA + 1))))
|
||||
|
||||
self._set_prev_torque(0)
|
||||
for t in np.arange(0, MAX_RT_DELTA, 1):
|
||||
t *= sign
|
||||
self.assertTrue(self.safety.gm_tx_hook(self._torque_msg(t)))
|
||||
|
||||
# Increase timer to update rt_torque_last
|
||||
self.safety.set_timer(RT_INTERVAL + 1)
|
||||
self.assertTrue(self.safety.gm_tx_hook(self._torque_msg(sign * (MAX_RT_DELTA - 1))))
|
||||
self.assertTrue(self.safety.gm_tx_hook(self._torque_msg(sign * (MAX_RT_DELTA + 1))))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -18,9 +18,9 @@ class TestHondaSafety(unittest.TestCase):
|
||||
|
||||
return to_send
|
||||
|
||||
def _button_msg(self, buttons):
|
||||
def _button_msg(self, buttons, msg):
|
||||
to_send = libpandasafety_py.ffi.new('CAN_FIFOMailBox_TypeDef *')
|
||||
to_send[0].RIR = 0x1A6 << 21
|
||||
to_send[0].RIR = msg << 21
|
||||
to_send[0].RDLR = buttons << 5
|
||||
|
||||
return to_send
|
||||
@@ -32,6 +32,13 @@ class TestHondaSafety(unittest.TestCase):
|
||||
|
||||
return to_send
|
||||
|
||||
def _alt_brake_msg(self, brake):
|
||||
to_send = libpandasafety_py.ffi.new('CAN_FIFOMailBox_TypeDef *')
|
||||
to_send[0].RIR = 0x1BE << 21
|
||||
to_send[0].RDLR = 0x10 if brake else 0
|
||||
|
||||
return to_send
|
||||
|
||||
def _gas_msg(self, gas):
|
||||
to_send = libpandasafety_py.ffi.new('CAN_FIFOMailBox_TypeDef *')
|
||||
to_send[0].RIR = 0x17C << 21
|
||||
@@ -65,18 +72,20 @@ class TestHondaSafety(unittest.TestCase):
|
||||
|
||||
def test_resume_button(self):
|
||||
RESUME_BTN = 4
|
||||
self.safety.honda_rx_hook(self._button_msg(RESUME_BTN))
|
||||
self.safety.set_controls_allowed(0)
|
||||
self.safety.honda_rx_hook(self._button_msg(RESUME_BTN, 0x1A6))
|
||||
self.assertTrue(self.safety.get_controls_allowed())
|
||||
|
||||
def test_set_button(self):
|
||||
SET_BTN = 3
|
||||
self.safety.honda_rx_hook(self._button_msg(SET_BTN))
|
||||
self.safety.set_controls_allowed(0)
|
||||
self.safety.honda_rx_hook(self._button_msg(SET_BTN, 0x1A6))
|
||||
self.assertTrue(self.safety.get_controls_allowed())
|
||||
|
||||
def test_cancel_button(self):
|
||||
CANCEL_BTN = 2
|
||||
self.safety.set_controls_allowed(1)
|
||||
self.safety.honda_rx_hook(self._button_msg(CANCEL_BTN))
|
||||
self.safety.honda_rx_hook(self._button_msg(CANCEL_BTN, 0x1A6))
|
||||
self.assertFalse(self.safety.get_controls_allowed())
|
||||
|
||||
def test_sample_speed(self):
|
||||
@@ -94,6 +103,17 @@ class TestHondaSafety(unittest.TestCase):
|
||||
self.safety.honda_rx_hook(self._brake_msg(1))
|
||||
self.assertFalse(self.safety.get_controls_allowed())
|
||||
|
||||
def test_alt_disengage_on_brake(self):
|
||||
self.safety.set_honda_alt_brake_msg(1)
|
||||
self.safety.set_controls_allowed(1)
|
||||
self.safety.honda_rx_hook(self._alt_brake_msg(1))
|
||||
self.assertFalse(self.safety.get_controls_allowed())
|
||||
|
||||
self.safety.set_honda_alt_brake_msg(0)
|
||||
self.safety.set_controls_allowed(1)
|
||||
self.safety.honda_rx_hook(self._alt_brake_msg(1))
|
||||
self.assertTrue(self.safety.get_controls_allowed())
|
||||
|
||||
def test_allow_brake_at_zero_speed(self):
|
||||
# Brake was already pressed
|
||||
self.safety.honda_rx_hook(self._brake_msg(True))
|
||||
@@ -101,6 +121,7 @@ class TestHondaSafety(unittest.TestCase):
|
||||
|
||||
self.safety.honda_rx_hook(self._brake_msg(True))
|
||||
self.assertTrue(self.safety.get_controls_allowed())
|
||||
self.safety.honda_rx_hook(self._brake_msg(False)) # reset no brakes
|
||||
|
||||
def test_not_allow_brake_when_moving(self):
|
||||
# Brake was already pressed
|
||||
@@ -136,13 +157,29 @@ class TestHondaSafety(unittest.TestCase):
|
||||
self.assertFalse(self.safety.honda_tx_hook(self._send_brake_msg(0x00F0)))
|
||||
|
||||
def test_gas_safety_check(self):
|
||||
self.assertTrue(self.safety.honda_tx_hook(self._send_brake_msg(0x0000)))
|
||||
self.assertFalse(self.safety.honda_tx_hook(self._send_brake_msg(0x1000)))
|
||||
self.safety.set_controls_allowed(0)
|
||||
self.assertTrue(self.safety.honda_tx_hook(self._send_gas_msg(0x0000)))
|
||||
self.assertFalse(self.safety.honda_tx_hook(self._send_gas_msg(0x1000)))
|
||||
|
||||
def test_steer_safety_check(self):
|
||||
self.safety.set_controls_allowed(0)
|
||||
self.assertTrue(self.safety.honda_tx_hook(self._send_steer_msg(0x0000)))
|
||||
self.assertFalse(self.safety.honda_tx_hook(self._send_steer_msg(0x1000)))
|
||||
|
||||
def test_spam_cancel_safety_check(self):
|
||||
RESUME_BTN = 4
|
||||
SET_BTN = 3
|
||||
CANCEL_BTN = 2
|
||||
BUTTON_MSG = 0x296
|
||||
self.safety.set_bosch_hardware(1)
|
||||
self.safety.set_controls_allowed(0)
|
||||
self.assertTrue(self.safety.honda_tx_hook(self._button_msg(CANCEL_BTN, BUTTON_MSG)))
|
||||
self.assertFalse(self.safety.honda_tx_hook(self._button_msg(RESUME_BTN, BUTTON_MSG)))
|
||||
self.assertFalse(self.safety.honda_tx_hook(self._button_msg(SET_BTN, BUTTON_MSG)))
|
||||
# do not block resume if we are engaged already
|
||||
self.safety.set_controls_allowed(1)
|
||||
self.assertTrue(self.safety.honda_tx_hook(self._button_msg(RESUME_BTN, BUTTON_MSG)))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
@@ -41,9 +41,9 @@ class TestToyotaSafety(unittest.TestCase):
|
||||
cls.safety.init_tests_toyota()
|
||||
|
||||
def _set_prev_torque(self, t):
|
||||
self.safety.set_desired_torque_last(t)
|
||||
self.safety.set_rt_torque_last(t)
|
||||
self.safety.set_torque_meas(t, t)
|
||||
self.safety.set_toyota_desired_torque_last(t)
|
||||
self.safety.set_toyota_rt_torque_last(t)
|
||||
self.safety.set_toyota_torque_meas(t, t)
|
||||
|
||||
def _torque_meas_msg(self, torque):
|
||||
to_send = libpandasafety_py.ffi.new('CAN_FIFOMailBox_TypeDef *')
|
||||
@@ -62,7 +62,7 @@ class TestToyotaSafety(unittest.TestCase):
|
||||
return to_send
|
||||
|
||||
def _torque_driver_msg_array(self, torque):
|
||||
for i in range(3):
|
||||
for i in range(6):
|
||||
self.safety.toyota_ipas_rx_hook(self._torque_driver_msg(torque))
|
||||
|
||||
def _angle_meas_msg(self, angle):
|
||||
@@ -74,7 +74,7 @@ class TestToyotaSafety(unittest.TestCase):
|
||||
return to_send
|
||||
|
||||
def _angle_meas_msg_array(self, angle):
|
||||
for i in range(3):
|
||||
for i in range(6):
|
||||
self.safety.toyota_ipas_rx_hook(self._angle_meas_msg(angle))
|
||||
|
||||
def _torque_msg(self, torque):
|
||||
@@ -158,9 +158,9 @@ class TestToyotaSafety(unittest.TestCase):
|
||||
for controls_allowed in [True, False]:
|
||||
for torque in np.arange(-MAX_TORQUE - 1000, MAX_TORQUE + 1000, MAX_RATE_UP):
|
||||
self.safety.set_controls_allowed(controls_allowed)
|
||||
self.safety.set_rt_torque_last(torque)
|
||||
self.safety.set_torque_meas(torque, torque)
|
||||
self.safety.set_desired_torque_last(torque - MAX_RATE_UP)
|
||||
self.safety.set_toyota_rt_torque_last(torque)
|
||||
self.safety.set_toyota_torque_meas(torque, torque)
|
||||
self.safety.set_toyota_desired_torque_last(torque - MAX_RATE_UP)
|
||||
|
||||
if controls_allowed:
|
||||
send = (-MAX_TORQUE <= torque <= MAX_TORQUE)
|
||||
@@ -181,14 +181,14 @@ class TestToyotaSafety(unittest.TestCase):
|
||||
def test_non_realtime_limit_down(self):
|
||||
self.safety.set_controls_allowed(True)
|
||||
|
||||
self.safety.set_rt_torque_last(1000)
|
||||
self.safety.set_torque_meas(500, 500)
|
||||
self.safety.set_desired_torque_last(1000)
|
||||
self.safety.set_toyota_rt_torque_last(1000)
|
||||
self.safety.set_toyota_torque_meas(500, 500)
|
||||
self.safety.set_toyota_desired_torque_last(1000)
|
||||
self.assertTrue(self.safety.toyota_tx_hook(self._torque_msg(1000 - MAX_RATE_DOWN)))
|
||||
|
||||
self.safety.set_rt_torque_last(1000)
|
||||
self.safety.set_torque_meas(500, 500)
|
||||
self.safety.set_desired_torque_last(1000)
|
||||
self.safety.set_toyota_rt_torque_last(1000)
|
||||
self.safety.set_toyota_torque_meas(500, 500)
|
||||
self.safety.set_toyota_desired_torque_last(1000)
|
||||
self.assertFalse(self.safety.toyota_tx_hook(self._torque_msg(1000 - MAX_RATE_DOWN + 1)))
|
||||
|
||||
def test_exceed_torque_sensor(self):
|
||||
@@ -210,14 +210,14 @@ class TestToyotaSafety(unittest.TestCase):
|
||||
self._set_prev_torque(0)
|
||||
for t in np.arange(0, 380, 10):
|
||||
t *= sign
|
||||
self.safety.set_torque_meas(t, t)
|
||||
self.safety.set_toyota_torque_meas(t, t)
|
||||
self.assertTrue(self.safety.toyota_tx_hook(self._torque_msg(t)))
|
||||
self.assertFalse(self.safety.toyota_tx_hook(self._torque_msg(sign * 380)))
|
||||
|
||||
self._set_prev_torque(0)
|
||||
for t in np.arange(0, 370, 10):
|
||||
t *= sign
|
||||
self.safety.set_torque_meas(t, t)
|
||||
self.safety.set_toyota_torque_meas(t, t)
|
||||
self.assertTrue(self.safety.toyota_tx_hook(self._torque_msg(t)))
|
||||
|
||||
# Increase timer to update rt_torque_last
|
||||
@@ -229,17 +229,20 @@ class TestToyotaSafety(unittest.TestCase):
|
||||
self.safety.toyota_rx_hook(self._torque_meas_msg(50))
|
||||
self.safety.toyota_rx_hook(self._torque_meas_msg(-50))
|
||||
self.safety.toyota_rx_hook(self._torque_meas_msg(0))
|
||||
self.safety.toyota_rx_hook(self._torque_meas_msg(0))
|
||||
self.safety.toyota_rx_hook(self._torque_meas_msg(0))
|
||||
self.safety.toyota_rx_hook(self._torque_meas_msg(0))
|
||||
|
||||
self.assertEqual(-51, self.safety.get_torque_meas_min())
|
||||
self.assertEqual(51, self.safety.get_torque_meas_max())
|
||||
self.assertEqual(-51, self.safety.get_toyota_torque_meas_min())
|
||||
self.assertEqual(51, self.safety.get_toyota_torque_meas_max())
|
||||
|
||||
self.safety.toyota_rx_hook(self._torque_meas_msg(0))
|
||||
self.assertEqual(-1, self.safety.get_torque_meas_max())
|
||||
self.assertEqual(-51, self.safety.get_torque_meas_min())
|
||||
self.assertEqual(-1, self.safety.get_toyota_torque_meas_max())
|
||||
self.assertEqual(-51, self.safety.get_toyota_torque_meas_min())
|
||||
|
||||
self.safety.toyota_rx_hook(self._torque_meas_msg(0))
|
||||
self.assertEqual(-1, self.safety.get_torque_meas_max())
|
||||
self.assertEqual(-1, self.safety.get_torque_meas_min())
|
||||
self.assertEqual(-1, self.safety.get_toyota_torque_meas_max())
|
||||
self.assertEqual(-1, self.safety.get_toyota_torque_meas_min())
|
||||
|
||||
def test_ipas_override(self):
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user