Compare commits

...

104 Commits

Author SHA1 Message Date
dragonpilot
86e7c5d5b6 Merge branch 'devel-en' into 0.6.5-en 2019-11-06 12:02:26 +10:00
dragonpilot
9062391a9c Merge branch 'devel-unsupported-cars' into devel-en 2019-11-05 13:44:57 +10:00
dragonpilot
6f7bf752cd add 2017 Lexus GS450H 2019-11-05 12:08:24 +10:00
dragonpilot
450e6001a7 add aegis speed camera app 2019-11-04 16:43:40 +10:00
dragonpilot
92c4111bdd update APK 2019-11-01 13:39:11 +10:00
dragonpilot
2c11113671 remove miui fonts to reduce package size 2019-11-01 13:34:28 +10:00
dragonpilot
5e341385cb update offroad to multilangual version 2019-11-01 11:10:54 +10:00
dragonpilot
4adf4d138e Merge branch 'devel-unsupported-cars' into devel-en 2019-10-31 11:24:09 +10:00
dragonpilot
995af1de45 fix merge conflict 2019-10-31 11:23:50 +10:00
dragonpilot
399cdf4e4a Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-31 11:22:02 +10:00
dragonpilot
e8c7da8f4e Merge branch 'devel-en' into 0.6.5-en 2019-10-31 11:16:10 +10:00
Riccardo
fe0ed57f45 Update README with now supported Subaru Harness 2019-10-30 15:15:05 -07:00
Ted Slesinski
affe1c3d2c Adds 2019 Lexus ES (non hybrid) (#866)
* Adds 2019 Lexus ES (non hybrid)

* Updated test route
2019-10-30 10:38:10 -07:00
dragonpilot
8a816ea8e1 update carcontroller.py for honda 2019-10-30 11:56:17 +10:00
dragonpilot
b2c0070a7b update safety_honda 2019-10-30 10:37:32 +10:00
dragonpilot
a2d6b0241f fix allow_gas for honda and slightly adjust lead car moving alert value 2019-10-30 09:31:51 +10:00
xBJx
98d2907a35 Added fingerprint from Sienna XLE AWD (#848)
* Added fingerprint from Sienna XLE AWD

* Update driver_monitor.py

* Update driver_monitor.py

* Update driver_monitor.py
2019-10-28 19:26:50 -07:00
dragonpilot
70e315f14a add SnG Mod support 2019-10-29 10:02:46 +10:00
dekerr
2a77b02bd8 remove unnecessary comprehensions (#863) 2019-10-28 15:16:37 -07:00
dragonpilot
dc8d7e3939 Adjust dragon_allow_gas logic 2019-10-28 14:12:50 +10:00
dragonpilot
53f3688e4a Merge branch 'devel-unsupported-cars' into devel-en 2019-10-28 12:33:51 +10:00
dragonpilot
9ec47b48bd remove fp 2019-10-28 12:33:27 +10:00
dragonpilot
d44e8b5d3b Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-28 12:33:16 +10:00
dragonpilot
48edf7f7d7 do not send canError if dragon_toyota_stock_dsu is on 2019-10-28 12:30:04 +10:00
dragonpilot
cf0e7d4a92 rename variable 2019-10-28 11:13:27 +10:00
dragonpilot
70df20f749 Revert "remove gas/brake value modification when allow_gas is enabled"
This reverts commit 56742acbd4.
2019-10-27 09:50:24 +10:00
u8511049
d2a92fcbe3 Add supported car for 2019 Toyota Altis Hybrid (#859)
* add supported car for 2019 Toyota Altis Hybird / Corolla hybrid 2020 (US market)
2019-10-25 10:28:06 -07:00
dragonpilot
9e1db5ee4a update lead car alert logic 2019-10-25 09:17:54 +10:00
dragonpilot
c9a3e8f8bc remove canbus freq checking 2019-10-24 13:44:03 +10:00
dragonpilot
45399cc201 remove chmod bs 2019-10-22 16:53:36 +10:00
dragonpilot
12df763d61 disable force internet connectivity 2019-10-22 14:51:45 +10:00
dragonpilot
c065bc1a01 slightly adjust es_tss2 port 2019-10-22 11:22:02 +10:00
dragonpilot
df40837f48 ES_TSS2 should be stop_and_go = True 2019-10-21 19:56:32 +10:00
dragonpilot
8db3fa8caf completely remove params.put for connectivity check for performance purpose 2019-10-21 19:04:27 +10:00
dragonpilot
aba77b1163 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-21 16:20:46 +10:00
dragonpilot
4097231dcb add 2019 Lexus ES200 port from Shell 2019-10-21 16:20:04 +10:00
dragonpilot
56742acbd4 remove gas/brake value modification when allow_gas is enabled 2019-10-21 11:18:17 +10:00
dragonpilot
72ba044226 disable internet connection checking 2019-10-21 11:11:51 +10:00
Riccardo
7a2addf782 Remove unneded use of replace, causing json to fail loading the alert 2019-10-18 11:29:59 -07:00
dragonpilot
63cee44949 Add Lead Car Moving Alert 2019-10-18 17:58:12 +10:00
dragonpilot
b1e698ee82 Make sure always use unsigned panda firmware 2019-10-18 09:47:14 +10:00
dragonpilot
c6f324d407 adjust STEER_ANGLE to 0.0573 instead of 0.573 2019-10-18 09:41:09 +10:00
dragonpilot
23250ba37f Merge branch 'devel-unsupported-cars' into devel-en 2019-10-18 09:39:33 +10:00
dragonpilot
aa89df14b8 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-10-18 09:39:19 +10:00
dragonpilot
969c3c1e05 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-18 09:38:09 +10:00
Riccardo
23dfde1ce7 Update ref to process_replay regression test 2019-10-17 14:47:38 -07:00
Jason Young
d953b6a7aa Add core OP support for CRC validation, with extra support for Volkswagen MQB (#836)
* Generalized core OP CRC support plus extra bits for Volkswagen MQB.
2019-10-17 13:58:32 -07:00
Riccardo
26dd7e27c8 Revert to using the sum of the lane line probabilities instead of the the product 2019-10-17 13:31:28 -07:00
dragonpilot
1447a3b458 Add slow on curve toggle 2019-10-17 14:22:28 +10:00
dragonpilot
0dc120f4d8 fix unable to display release note issue 2019-10-17 13:35:10 +10:00
dragonpilot
8db70980fa update APK 2019-10-17 10:30:50 +10:00
dragonpilot
91bbd7c28f Fix STEER_ANGLE in STEER_TORQUE_SENSOR factor to 0.573 (was 0.056) 2019-10-17 10:21:00 +10:00
dragonpilot
df432c5e2e Merge branch 'devel-unsupported-cars' into devel-en 2019-10-17 10:19:50 +10:00
dragonpilot
02d6549fa7 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-17 10:19:13 +10:00
dragonpilot
0302835853 Fix charging_ctrl max/min value param reader 2019-10-17 09:59:13 +10:00
dragonpilot
5581835f79 Add DragonCarModel/DragonCarVIN params 2019-10-17 09:58:47 +10:00
dragonpilot
7030de2a82 delete bs (branch switcher) 2019-10-16 17:22:21 +10:00
dragonpilot
4065e9360c upgrade autonavi app to v4.3.0 2019-10-16 16:10:01 +10:00
dragonpilot
0d02fbe2ec Add no-cache header when download changelog 2019-10-16 11:57:49 +10:00
dragonpilot
33386b6365 Add reboot to flash panda script 2019-10-16 10:36:17 +10:00
dragonpilot
8fd9ff49f4 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-10-15 11:57:02 +10:00
dragonpilot
5a2bc4f616 Update APK 2019-10-14 17:12:13 +10:00
dragonpilot
50d8771c29 Update APK 2019-10-14 16:59:49 +10:00
dragonpilot
fd839b7614 fix reset_update.sh script again 2019-10-14 16:56:08 +10:00
dragonpilot
33393412f8 Fix update_panda_firmware.sh 2019-10-14 16:29:13 +10:00
dragonpilot
bfd61871d4 add a script for update panda firmware 2019-10-14 16:03:44 +10:00
dragonpilot
45bb3350e1 fix reset_update script 2019-10-14 16:03:31 +10:00
dragonpilot
8ab6b4313b update APK 2019-10-14 13:59:20 +10:00
dragonpilot
853c1c24fb Create a custom script for update feature 2019-10-14 13:44:06 +10:00
dragonpilot
7b4602907e update APK 2019-10-14 12:32:01 +10:00
dragonpilot
6291d6c31a fix charging ctrl toggle 2019-10-14 12:27:39 +10:00
rbiasini
70d17cd69b Force subaru to assume the stock camera is connected (#849) 2019-10-13 18:25:09 -07:00
dragonpilot
be9e6fa698 Display dp's changelog instead of dp's release notes 2019-10-14 11:02:12 +10:00
dragonpilot
d21b783199 remove deprecated dragon params 2019-10-13 10:58:03 +10:00
dragonpilot
e450d8a4fb re-enable updated 2019-10-13 10:36:21 +10:00
dragonpilot
07c8465c2b Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-10-13 10:17:34 +10:00
rbiasini
069e337bea Allow to lock safety mode to keep gm/tesla cars supported (#844) 2019-10-11 17:35:07 -07:00
illumiN8i
6b62dd2308 2019 Highlander Hybrid Limited Platinum (#843)
fingerprint from ogdragonzypher on Discord
2019-10-11 13:46:48 -07:00
dekerr
4ff7da61e0 simplify encode/decode in dbc (#840)
* simplify encode/decode
2019-10-11 13:22:16 -07:00
dekerr
686d4bbdc2 use list comprehension (#839)
* use list comprehension

* oops index range fix
2019-10-11 00:09:59 -07:00
eFini
08d86aa7d7 Increase LEXUS_IS safetyParam to 77 (#841) 2019-10-10 23:31:05 -07:00
dragonpilot
8b3aa6f561 Merge branch 'devel-unsupported-cars' into devel-en 2019-10-11 14:24:04 +10:00
dragonpilot
973bdc4318 Add Taiwan 2019 RAV4 FP from Max Duan / CloudJ 2019-10-11 14:23:43 +10:00
dragonpilot
1d38e040c9 Merge branch 'devel-unsupported-cars' into devel-en 2019-10-11 14:17:06 +10:00
dragonpilot
aa58f52db3 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-11 14:14:35 +10:00
dragonpilot
62fbb6302a Fix fp cache issue 2019-10-11 13:44:16 +10:00
dragonpilot
be1376ecd2 Fix FP cache 2019-10-11 12:16:18 +10:00
dragonpilot
38a9cf9489 Revert "Fixing up fp cache"
This reverts commit adf8e823b9.
2019-10-11 10:23:37 +10:00
dragonpilot
a7602eae5e Improve honda dp_allow_gas logic 2019-10-11 09:57:07 +10:00
dragonpilot
adf8e823b9 Fixing up fp cache 2019-10-11 09:47:26 +10:00
dragonpilot
9636661da4 Fix python3 params.get issue in appd 2019-10-10 22:07:05 +10:00
dragonpilot
071457dc9e Fix python3 params.get issue 2019-10-10 21:43:55 +10:00
dragonpilot
dc77d4a88e use dp spinner 2019-10-10 15:08:01 +10:00
dragonpilot
f1e26b346f Fix unavailable variable issue 2019-10-10 14:34:18 +10:00
dragonpilot
6c1fa5dc3a Fix unable to display ip address issue 2019-10-10 14:09:09 +10:00
dragonpilot
7b8bd9e3ff Update APK 2019-10-10 13:58:03 +10:00
dragonpilot
b8557616dd Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-10-10 10:44:43 +10:00
Vehicle Researcher
cf80f7a28b openpilot v0.6.5 release 2019-10-09 18:43:53 +00:00
Vehicle Researcher
3a04a69cbe Merge opendbc subtree 2019-10-09 18:31:57 +00:00
Vehicle Researcher
4f4a90117b Squashed 'opendbc/' changes from 684e28a7a..f3b573559
f3b573559 move generator to python3
9efff4086 2019+ New Prius Steer Angle (#189)
f3461d143 add units and a couple new signals for toyota (#188)
16033b3ff Remove non ascii characters
de162d8c2 Toyota no dsu: fix steer angle factor, it's 1% of a rad
2fb524554 Lexus CT200H seems to have the safetyParam 1 instead of 0.73
b2fde8b11 toyota time signal (#187)
6cfe0c432 Fixed brake signal unit in Bosch Honda

git-subtree-dir: opendbc
git-subtree-split: f3b573559f1619346f082554a72cebcc43da5275
2019-10-09 18:31:57 +00:00
Vehicle Researcher
f2de9784f8 Merge panda subtree 2019-10-09 18:31:56 +00:00
Vehicle Researcher
38faf7f8a4 Squashed 'panda/' changes from 9881e6118..30c7ca8a5
30c7ca8a5 bump version to 1.5.3
9403dbebe Need to fix wifi test before re-enabling.
0812362b5 GPS UART fix until boardd is refactored (#294)
ffbdb87a8 python2 -> 3 fixes to pedal flasher (#292)
78b75ef59 Added build type to release version strings
736c2cbf7 Fixed sending of bytes over PandaSerial
0894b28f1 Fixed USB power mode on black (#291)
4b3358c92 patch to be able to switch from EON to PC with a Panda that has EON b… (#290)
a95c44a71 Made setting of NOOUTPUT on no heartbeat more efficient (#287)
948683688 UART instability fix with high interrupt load (#283)
9a9e9d47b Fix usb_power_mode missing initialization (#289)
af0960ad3 DFU fix (#288)
70219d7bb match safety enum in cereal (#285)
a338d3932 Fix build for jenkins test
78ef4a6eb Stop charge (#284)
5266a4028 Fix typo (#286)
f4787ec5a Revert "turn on CDP when ignition switches on (#281)"
d37daee97 Revert "NONE and CLIENT should be the same thing in white/grey pandas"
e97b283e7 NONE and CLIENT should be the same thing in white/grey pandas
8c1df559f turn on CDP when ignition switches on (#281)
847a35d42 Fix bullet points
fac027716 Misra update (#280)
5a04df6b1 Added description of regression tests to README
c4aabae59 Fixed some python3 bugs in the test scripts and PandaSerial
9af0cb353 Bump version
c4ac3d63b Disable GPS load switching on black pandas
078ee588c This is the correct table, actually
578b95ee3 Misra table of coverage added
d383a2625 bump panda
b98ca010d fix sdk build in python3 env (#279)
63d3dc7d3 Set python3 env before runnign get_sdk, so we know if it fails
e951d79c0 legacy code we don't control can remain python2
11b715118 Merge pull request #276 from commaai/python3
9893a842a Merge pull request #277 from zorrobyte/patch-1
d3268690c Revert "revert back esptool to python2 and force to build esptools with python2"
875e76012 revert back esptool to python2 and force to build esptools with python2
9c40e6240 needed to install python3
ed2ac87cf Also moved safety tests to python3
6842b2d2c move esptool sdk installation before python3 env is set. Kind of a cheat
b5a2cabcd this hopefully fixes build test
628050955 Fixes safety replay
2c220b623 this fixes language regr test
fdbe789b8 use python 3 in Docker container
ee1ae4f86 Better hash print
0de9ef73c Revert "Final 2to3 on the whole repo"
c92fd3bc9 Final 2to3 on the whole repo
5f2bc4460 better
b2a30fdbd make works!
b74005d10 fix sign.py
fe727706b read file as byte and no tab before sleep
32a344ef6 Update README.md
2dc34096a 2to3 applied
ffa68ef71 undo unnecessary brackets for print
dbc248027 Fix all the prints with 2to3, some need to be undo
5a7aeba0f xrange is gone
982c4c928 one more python3 env
1e2412a29 env python -> env python3

git-subtree-dir: panda
git-subtree-split: 30c7ca8a53a3adb05d23d7cfe64fb716a656ef1a
2019-10-09 18:31:56 +00:00
Vehicle Researcher
d17745fb5e Merge cereal subtree 2019-10-09 18:31:55 +00:00
Vehicle Researcher
f66527d0b1 Squashed 'cereal/' changes from ea14abe4b..3d90c7877
3d90c7877 Fix wrong event enum
f4c92cf4e add none/invalid usb power mode
12bc18965 Add fields and states required for robust Volkswagen safety compliance (#8)
16b5850f1 let's spell wolkswagen
6243622e6 Safety cereal (#9)
5cf3c2c76 change order of UsbPowerMode to preserve panda lib behavior
18a291779 usbPowerMode is more useful to log and it comes from panda
152678429 add ldw to visual hud alerts (#5)
24f6fa78c merge https://github.com/commaai/cereal/pull/3 after fixing conflicts
4d5862c54 added event about internet connection
ca070f9fd Added usbPowerOn to health
e2eaa762b add HW type for UNO
e528a2041 Read RPM from fan connected to Panda
8472175d6 Added invalidGiraffeToyota event
71be97053 placeholders for mazda, nissan and vw safety models

git-subtree-dir: cereal
git-subtree-split: 3d90c7877f9ef9269735b074c0cb23f5eb6d2b47
2019-10-09 18:31:55 +00:00
407 changed files with 6277 additions and 3730 deletions

25
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,25 @@
---
name: Bug report
about: Create a report to help us improve openpilot
title: ''
labels: 'bug'
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**How to reproduce or log data**
Steps to reproduce the behavior, or a explorer/cabana link to the exact drive and timestamp of when the bug occurred.
**Expected behavior**
A clear and concise description of what you expected to happen.
** Device/Version information (please complete the following information):**
- Device: [e.g. EON/EON Gold]
- Version: [e.g. 0.6.4], or commit hash when on devel
- Car make/model [e.g. Toyota Prius 2016]
**Additional context**
Add any other context about the problem here.

21
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,21 @@
Choose one of the templates below:
# Fingerprint
This pull requests adds a fingerprint for <Make - Model - Year - Trim>.
This is an explorer link to a drive with the stock system enabled: ...
# Car support
This pull requests adds support for <Make - Model - Year - Trim>.
This is an explorer link to a drive with the stock system enabled: ...
This is an explorer link to a drive with openpilot system enabled: ...
# Feature
This pull requests adds feature X
## Description
Explain what the feature does
## Testing
Explain how the feature was tested. Either by the added unit tests, or what tests were performed while driving.

3
.gitignore vendored
View File

@@ -4,6 +4,7 @@ venv/
.ipynb_checkpoints
.idea
.sconsign.dblite
.vscode
model2.png
a.out
@@ -30,7 +31,7 @@ selfdrive/logcatd/logcatd
selfdrive/mapd/default_speeds_by_region.json
selfdrive/proclogd/proclogd
selfdrive/ui/ui
selfdrive/test/tests/plant/out
selfdrive/test/longitudinal_maneuvers/out
selfdrive/visiond/visiond
selfdrive/loggerd/loggerd
selfdrive/sensord/gpsd

View File

@@ -6,43 +6,66 @@ RUN apt-get update && apt-get install -y \
build-essential \
bzip2 \
clang \
cmake \
curl \
ffmpeg \
git \
libarchive-dev \
libavcodec-dev \
libavdevice-dev \
libavfilter-dev \
libavresample-dev \
libavutil-dev \
libbz2-dev \
libcurl4-openssl-dev \
libeigen3-dev \
libffi-dev \
libglew-dev \
libglib2.0-0 \
liblzma-dev \
libmysqlclient-dev \
libomp-dev \
libopencv-dev \
libssl-dev \
libswscale-dev \
libtool \
libusb-1.0-0 \
libzmq5-dev \
locales \
ocl-icd-libopencl1 \
ocl-icd-opencl-dev \
opencl-headers \
pkg-config \
python-dev \
python-pip \
screen \
sudo \
vim \
wget
COPY phonelibs/install_capnp.sh /tmp/install_capnp.sh
RUN /tmp/install_capnp.sh
RUN pip install --upgrade pip==18.0
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
ENV PATH="/root/.pyenv/bin:/root/.pyenv/shims:${PATH}"
RUN pyenv install 3.7.3
RUN pyenv global 3.7.3
RUN pyenv rehash
RUN pip install pipenv==2018.11.26
COPY Pipfile /tmp/
COPY Pipfile.lock /tmp/
RUN cd /tmp && pipenv install --deploy --system
ENV PYTHONPATH /tmp/openpilot:$PYTHONPATH
RUN python --version
RUN cd /tmp && pipenv install --system --deploy
RUN git clone --branch v0.6.2 https://github.com/commaai/openpilot-tools.git /tmp/openpilot/tools
RUN pip install -r /tmp/openpilot/tools/requirements.txt
RUN pip install fastcluster==1.1.20 scipy==0.19.1 dictdiffer==0.8.0 azure-batch==4.1.3 azure-common==1.1.16 azure-nspkg==3.0.0 azure-storage-blob==1.3.1 azure-storage-common==1.3.0 azure-storage-nspkg==3.0.0
# Install subset of dev dependencies needed for CI
RUN pip install matplotlib==3.1.1 dictdiffer==0.8.0 fastcluster==1.1.25 aenum==2.2.1 scipy==1.3.1 lru-dict==1.1.6 tenacity==5.1.1 azure-common==1.1.23 azure-nspkg==3.0.2 azure-storage-blob==2.1.0 azure-storage-common==2.1.0 azure-storage-nspkg==3.1.0 pycurl==7.43.0.3
COPY phonelibs/install_capnp.sh /tmp/install_capnp.sh
RUN /tmp/install_capnp.sh
RUN git clone --branch v0.6.5 https://github.com/commaai/openpilot-tools.git /tmp/openpilot/tools
ENV PYTHONPATH /tmp/openpilot:${PYTHONPATH}
COPY ./.pylintrc /tmp/openpilot/.pylintrc
COPY ./common /tmp/openpilot/common
COPY ./cereal /tmp/openpilot/cereal

59
Pipfile
View File

@@ -4,16 +4,16 @@ url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
ipython = "<6.0"
aenum = "*"
azure-batch = "==4.1.3"
azure-common = "==1.1.16"
azure-nspkg = "==3.0.1"
azure-storage-blob = "==1.3.1"
azure-storage-common = "==1.3.0"
azure-storage-nspkg = "==3.0.0"
opencv-python= "==3.4.2.17"
PyQt5 = "*"
ipython = "*"
azure-common = "*"
azure-nspkg = "*"
azure-storage-blob = "*"
azure-storage-common = "*"
azure-storage-nspkg = "*"
bincopy = "*"
bleach = "==1.5.0"
bleach = "*"
boto = "*"
"boto3" = "*"
celery = "*"
@@ -23,7 +23,6 @@ decorator = "*"
dlib = "*"
dominate = "*"
elasticsearch = "*"
entium = "==0.1.4"
fasteners = "*"
future = "*"
futures = "*"
@@ -32,32 +31,31 @@ pycocotools = {git = "https://github.com/cocodataset/cocoapi.git",subdirectory =
gunicorn = "*"
"h5py" = "*"
hexdump = "*"
"html5lib" = "==0.9999999"
"html5lib" = "*"
imageio = "*"
intervaltree = "*"
ipykernel = "<5.0"
ipykernel = "*"
joblib = "*"
json-logging-py = "*"
jupyter = "*"
libarchive = "*"
lru-dict = "*"
lxml = "*"
matplotlib = "==2.2.3"
"mpld3" = "*"
msgpack-python = "*"
nbstripout = "*"
nose-parameterized = "*"
numpy = "==1.14.5"
osmium = "==2.15.0"
pbr = "==5.1.3"
numpy = "*"
osmium = "*"
pbr = "*"
percache = "*"
pprofile = "*"
psutil = "*"
pycurl = "*"
git-pylint-commit-hook = "==2.5.1"
git-pylint-commit-hook = "*"
pymongo = "*"
"pynmea2" = "*"
pypolyline = "==0.1.17"
pypolyline = "*"
pysendfile = "*"
python-logstash = "*"
pyvcd = "*"
@@ -68,11 +66,9 @@ scikit-image = "*"
"subprocess32" = "*"
supervisor = "*"
tenacity = "*"
tensorflow-gpu = "==1.13.0rc0"
"transforms3d" = "*"
tensorflow-gpu = ""
utm = "*"
"v4l2" = "*"
visdom = "*"
PyJWT = "==1.4.1"
PyMySQL = "==0.9.2"
Theano = "*"
@@ -81,26 +77,28 @@ Werkzeug = "*"
Flask-Cors = "*"
Flask-SocketIO = "*"
"GeoAlchemy2" = "*"
Keras = ">=2.1.6"
keras-maskrcnn = "*"
keras-retinanet = "*"
Pygments = "*"
PyNaCl = "*"
"PySDL2" = "*"
reverse_geocoder = "*"
Shapely = "*"
SQLAlchemy = "==1.2.7"
SQLAlchemy = "*"
uWSGI = "*"
scipy = "*"
fastcluster = "==1.1.25"
fastcluster = "*"
backports-abc = "*"
pygame = "*"
simplejson = "*"
python-logstash-async = "*"
pandas = "*"
seaborn = "*"
tensorflow-estimator = "==1.10.12"
tensorflow-estimator = "*"
pyproj = "*"
mock = "*"
blinker = "*"
gast = "==0.2.2"
matplotlib = "*"
dictdiffer = "*"
aenum = "*"
[packages]
overpy = {git = "https://github.com/commaai/python-overpy.git",ref = "f86529af402d4642e1faeb146671c40284007323"}
@@ -126,7 +124,7 @@ tqdm = "*"
Cython = "*"
PyYAML = "*"
websocket_client = "*"
Logentries = {git = "https://github.com/commaai/le_python.git",ref = "5eef8f5be5929d33973e1b10e686fa0cdcd6792f"}
Logentries = {git = "https://github.com/commaai/le_python.git",ref = "feaeacb48f7f4bdb02c0a8fc092326d4e101b7f2"}
urllib3 = "*"
chardet = "*"
idna = "*"
@@ -140,6 +138,7 @@ nose = "*"
pyflakes = "*"
pylint = "*"
pycryptodome = "*"
pillow = "*"
[requires]
python_version = "2.7"
python_version = "3.7.3"

2033
Pipfile.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@
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 selected Honda, Toyota, Acura, Lexus, Chevrolet, Hyundai, Kia. 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).
[openpilot](http://github.com/commaai/openpilot) is an open source driver assistance system. Currently, it performs the functions of Adaptive Cruise Control (ACC) and Lane Keeping Assist System (LKAS) for selected Honda, Toyota, Acura, Lexus, Chevrolet, Hyundai, Kia. 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 to enable rapid prototyping. We look forward to your contributions - improving real vehicle automation has never been easier.
@@ -62,15 +62,15 @@ Supported Cars
| ---------------------| ---------------------------| ---------------------| --------| ---------------| -----------------| ---------------|-------------------|
| Acura | ILX 2016-18 | AcuraWatch Plus | Yes | Yes | 25mph<sup>1</sup>| 25mph | Nidec |
| Acura | RDX 2016-18 | AcuraWatch Plus | Yes | Yes | 25mph<sup>1</sup>| 12mph | Nidec |
| Buick<sup>3</sup> | Regal 2018 | Adaptive Cruise | Yes | Yes | 0mph | 7mph | Custom<sup>7</sup>|
| Chevrolet<sup>3</sup>| Malibu 2017 | Adaptive Cruise | Yes | Yes | 0mph | 7mph | Custom<sup>7</sup>|
| Chevrolet<sup>3</sup>| Volt 2017-18 | Adaptive Cruise | Yes | Yes | 0mph | 7mph | Custom<sup>7</sup>|
| Cadillac<sup>3</sup> | ATS 2018 | Adaptive Cruise | Yes | Yes | 0mph | 7mph | Custom<sup>7</sup>|
| Buick<sup>3</sup> | Regal 2018 | Adaptive Cruise | Yes | Yes | 0mph | 7mph | Custom<sup>6</sup>|
| Chevrolet<sup>3</sup>| Malibu 2017 | Adaptive Cruise | Yes | Yes | 0mph | 7mph | Custom<sup>6</sup>|
| Chevrolet<sup>3</sup>| Volt 2017-18 | Adaptive Cruise | Yes | Yes | 0mph | 7mph | Custom<sup>6</sup>|
| Cadillac<sup>3</sup> | ATS 2018 | Adaptive Cruise | Yes | Yes | 0mph | 7mph | Custom<sup>6</sup>|
| Chrysler | Pacifica 2017-18 | Adaptive Cruise | Yes | Stock | 0mph | 9mph | FCA |
| Chrysler | Pacifica Hybrid 2017-18 | Adaptive Cruise | Yes | Stock | 0mph | 9mph | FCA |
| Chrysler | Pacifica Hybrid 2019 | Adaptive Cruise | Yes | Stock | 0mph | 39mph | FCA |
| GMC<sup>3</sup> | Acadia Denali 2018 | Adaptive Cruise | Yes | Yes | 0mph | 7mph | Custom<sup>7</sup>|
| Holden<sup>3</sup> | Astra 2017 | Adaptive Cruise | Yes | Yes | 0mph | 7mph | Custom<sup>7</sup>|
| GMC<sup>3</sup> | Acadia Denali 2018 | Adaptive Cruise | Yes | Yes | 0mph | 7mph | Custom<sup>6</sup>|
| Holden<sup>3</sup> | Astra 2017 | Adaptive Cruise | Yes | Yes | 0mph | 7mph | Custom<sup>6</sup>|
| Honda | Accord 2018-19 | All | Yes | Stock | 0mph | 3mph | Bosch |
| Honda | Accord Hybrid 2018-19 | All | Yes | Stock | 0mph | 3mph | Bosch |
| Honda | Civic Sedan/Coupe 2016-18 | Honda Sensing | Yes | Yes | 0mph | 12mph | Nidec |
@@ -85,29 +85,32 @@ Supported Cars
| Honda | Pilot 2016-18 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 12mph | Nidec |
| Honda | Pilot 2019 | All | Yes | Yes | 25mph<sup>1</sup>| 12mph | Inverted Nidec |
| Honda | Ridgeline 2017-19 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 12mph | Nidec |
| Hyundai | Santa Fe 2019 | All | Yes | Stock | 0mph | 0mph | Custom<sup>6</sup>|
| Hyundai | Elantra 2017-19 | SCC + LKAS | Yes | Stock | 19mph | 34mph | Custom<sup>6</sup>|
| Hyundai | Genesis 2018 | All | Yes | Stock | 19mph | 34mph | Custom<sup>6</sup>|
| Hyundai | Santa Fe 2019 | All | Yes | Stock | 0mph | 0mph | Custom<sup>5</sup>|
| Hyundai | Elantra 2017-19 | SCC + LKAS | Yes | Stock | 19mph | 34mph | Custom<sup>5</sup>|
| Hyundai | Genesis 2018 | All | Yes | Stock | 19mph | 34mph | Custom<sup>5</sup>|
| Jeep | Grand Cherokee 2016-18 | Adaptive Cruise | Yes | Stock | 0mph | 9mph | FCA |
| Jeep | Grand Cherokee 2019 | Adaptive Cruise | Yes | Stock | 0mph | 39mph | FCA |
| Kia | Optima 2019 | SCC + LKAS | Yes | Stock | 0mph | 0mph | Custom<sup>6</sup>|
| Kia | Sorento 2018 | All | Yes | Stock | 0mph | 0mph | Custom<sup>6</sup>|
| Kia | Stinger 2018 | SCC + LKAS | Yes | Stock | 0mph | 0mph | Custom<sup>6</sup>|
| Kia | Optima 2019 | SCC + LKAS | Yes | Stock | 0mph | 0mph | Custom<sup>5</sup>|
| Kia | Sorento 2018 | All | Yes | Stock | 0mph | 0mph | Custom<sup>5</sup>|
| Kia | Stinger 2018 | SCC + LKAS | Yes | Stock | 0mph | 0mph | Custom<sup>5</sup>|
| Lexus | CT Hybrid 2017-18 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
| Lexus | ES 2019 | All | Yes | Yes | 0mph | 0mph | Toyota |
| Lexus | ES Hybrid 2019 | All | Yes | Yes | 0mph | 0mph | Toyota |
| Lexus | RX Hybrid 2016-19 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
| Lexus | IS 2017-2019 | All | Yes | Stock | 22mph | 0mph | Toyota |
| Lexus | IS Hybrid 2017 | All | Yes | Stock | 0mph | 0mph | Toyota |
| Subaru | Crosstrek 2018 | EyeSight | Yes | Stock | 0mph | 0mph | Custom<sup>4</sup>|
| Subaru | Impreza 2019 | EyeSight | Yes | Stock | 0mph | 0mph | Custom<sup>4</sup>|
| Subaru | Crosstrek 2018-19 | EyeSight | Yes | Stock | 0mph | 0mph | Subaru |
| Subaru | Impreza 2019-20 | EyeSight | Yes | Stock | 0mph | 0mph | Subaru |
| Toyota | Avalon 2016 | TSS-P | Yes | Yes<sup>2</sup>| 20mph<sup>1</sup>| 0mph | Toyota |
| Toyota | Avalon 2017-18 | All | Yes | Yes<sup>2</sup>| 20mph<sup>1</sup>| 0mph | Toyota |
| Toyota | Camry 2018-19 | All | Yes | Stock | 0mph<sup>5</sup> | 0mph | Toyota |
| Toyota | Camry Hybrid 2018-19 | All | Yes | Stock | 0mph<sup>5</sup> | 0mph | Toyota |
| Toyota | Camry 2018-19 | All | Yes | Stock | 0mph<sup>4</sup> | 0mph | Toyota |
| Toyota | Camry Hybrid 2018-19 | All | Yes | Stock | 0mph<sup>4</sup> | 0mph | Toyota |
| Toyota | C-HR 2017-19 | All | Yes | Stock | 0mph | 0mph | Toyota |
| Toyota | C-HR Hybrid 2017-19 | All | Yes | Stock | 0mph | 0mph | Toyota |
| Toyota | Corolla 2017-19 | All | Yes | Yes<sup>2</sup>| 20mph<sup>1</sup>| 0mph | Toyota |
| Toyota | Corolla 2020 | All | Yes | Yes | 0mph | 0mph | Toyota |
| Toyota | Corolla Hatchback 2019 | All | Yes | Yes | 0mph | 0mph | Toyota |
| Toyota | Corolla Hybrid 2019 | All | Yes | Yes | 0mph | 0mph | Toyota |
| Toyota | Highlander 2017-19 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
| Toyota | Highlander Hybrid 2017-19 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
| Toyota | Prius 2016 | TSS-P | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
@@ -123,20 +126,19 @@ Supported Cars
<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).*** <br />
<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). ***NOTE: disconnecting the DSU disables Automatic Emergency Braking (AEB).*** <br />
<sup>3</sup>[GM installation guide](https://zoneos.com/volt/). ***NOTE: disconnecting the ASCM disables Automatic Emergency Braking (AEB).*** <br />
<sup>4</sup>Subaru Giraffe is DIY. <br />
<sup>5</sup>28mph for Camry 4CYL L, 4CYL LE and 4CYL SE which don't have Full-Speed Range Dynamic Radar Cruise Control. <br />
<sup>6</sup>Open sourced [Hyundai Giraffe](https://github.com/commaai/neo/tree/master/giraffe/hyundai) is designed for the 2019 Sante Fe; pinout may differ for other Hyundais. <br />
<sup>7</sup>Community built Giraffe, find more information [here](https://zoneos.com/shop/). <br />
<sup>4</sup>28mph for Camry 4CYL L, 4CYL LE and 4CYL SE which don't have Full-Speed Range Dynamic Radar Cruise Control. <br />
<sup>5</sup>Open sourced [Hyundai Giraffe](https://github.com/commaai/neo/tree/master/giraffe/hyundai) is designed for the 2019 Sante Fe; pinout may differ for other Hyundais. <br />
<sup>6</sup>Community built Giraffe, find more information [here](https://zoneos.com/shop/). <br />
Community Maintained Cars
------
| Make | Model | Supported Package | Lateral | Longitudinal | No Accel Below | No Steer Below | Giraffe |
| ---------------------| -------------------------| ---------------------| --------| ---------------| -----------------| ---------------|-------------------|
| Tesla | Model S 2012-13 | All | Yes | Not yet | Not applicable | 0mph | Custom<sup>8</sup>|
| Tesla | Model S 2012-13 | All | Yes | Not yet | Not applicable | 0mph | Custom<sup>7</sup>|
[[Tesla Model S Pull Request]](https://github.com/commaai/openpilot/pull/246) <br />
<sup>8</sup>Community built Giraffe, find more information here [Community Tesla Giraffe](https://github.com/jeankalud/neo/tree/tesla_giraffe/giraffe/tesla) <br />
<sup>7</sup>Community built Giraffe, find more information here [Community Tesla Giraffe](https://github.com/jeankalud/neo/tree/tesla_giraffe/giraffe/tesla) <br />
Community Maintained Cars are not confirmed by comma.ai to meet our [safety model](https://github.com/commaai/openpilot/blob/devel/SAFETY.md). Be extra cautious using them.
@@ -144,7 +146,7 @@ In Progress Cars
------
- All TSS-P Toyota with Steering Assist and LSS-P Lexus with Steering Assist or Lane Keep Assist.
- All Hyundai with SmartSense.
- All Kia with SCC and LKAS.
- All Kia, Genesis with SCC and LKAS.
- All Chrysler, Jeep, Fiat with Adaptive Cruise Control and LaneSense.
- All Subaru with EyeSight.

View File

@@ -1,3 +1,17 @@
Version 0.6.5 (2019-10-07)
========================
* NEOS update: upgrade to Python3 and new installer!
* comma Harness support!
* New driving model: lateral control has lower reliance on lanelines
* New driver monitoring model: more accurate face and eye detection
* Redesign offroad screen to display updates and alerts
* Increase maximum allowed acceleration
* Prevent car 12V battery drain by cutting off EON charge after 3 days of no drive
* Lexus CT Hybrid support thanks to thomaspich!
* Louder chime for critical alerts
* Add toggle to switch to dashcam mode
* Fix "invalid vehicle params" error on DSU-less Toyota
Version 0.6.4 (2019-09-08)
========================
* Forward stock AEB for Honda Nidec

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
bs

Binary file not shown.

View File

@@ -82,8 +82,11 @@ struct CarEvent @0x9b1657f34caf3ad3 {
preLaneChangeLeft @57;
preLaneChangeRight @58;
laneChange @59;
manualSteeringRequired @60;
manualSteeringRequiredBlinkersOn @61;
invalidGiraffeToyota @60;
internetConnectivityNeeded @61;
manualSteeringRequired @62;
manualSteeringRequiredBlinkersOn @63;
leadCarMoving @64;
}
}
@@ -135,6 +138,9 @@ struct CarState {
seatbeltUnlatched @25 :Bool;
canValid @26 :Bool;
# clutch (manual transmission only)
clutchPressed @28 :Bool;
# which packets this state came from
canMonoTimes @12: List(UInt64);
@@ -163,6 +169,8 @@ struct CarState {
sport @5;
low @6;
brake @7;
eco @8;
manumatic @9;
}
@@ -181,6 +189,9 @@ struct CarState {
altButton1 @6;
altButton2 @7;
altButton3 @8;
setCruise @9;
resumeCruise @10;
gapAdjustCruise @11;
}
}
}
@@ -273,6 +284,7 @@ struct CarControl {
wrongGear @4;
seatbeltUnbuckled @5;
speedTooHigh @6;
ldw @7;
}
enum AudibleAlert {
@@ -350,6 +362,7 @@ struct CarParams {
carVin @38 :Text; # VIN number queried during fingerprinting
isPandaBlack @39: Bool;
dashcamOnly @41: Bool;
transmissionType @43 :TransmissionType;
struct LateralPIDTuning {
kpBP @0 :List(Float32);
@@ -390,9 +403,7 @@ struct CarParams {
l @7 :List(Float32); # Kalman gain
}
enum SafetyModel {
# does NOT match board setting
noOutput @0;
honda @1;
toyota @2;
@@ -406,10 +417,22 @@ struct CarParams {
tesla @10;
subaru @11;
gmPassive @12;
mazda @13;
nissan @14;
volkswagen @15;
toyotaIpas @16;
allOutput @17;
gmAscm @18;
}
enum SteerControlType {
torque @0;
angle @1;
}
enum TransmissionType {
unknown @0;
automatic @1;
manual @2;
}
}

View File

@@ -306,7 +306,9 @@ struct HealthData {
canSendErrs @7 :UInt32;
canFwdErrs @8 :UInt32;
gmlanSendErrs @9 :UInt32;
hwType @10: HwType;
hwType @10 :HwType;
fanSpeedRpm @11 :UInt16;
usbPowerMode @12 :UsbPowerMode;
enum HwType {
unknown @0;
@@ -314,6 +316,14 @@ struct HealthData {
greyPanda @2;
blackPanda @3;
pedal @4;
uno @5;
}
enum UsbPowerMode {
none @0;
client @1;
cdp @2;
dcp @3;
}
}

View File

@@ -4,7 +4,7 @@ from datetime import datetime, timedelta
from selfdrive.version import version
class Api(object):
class Api():
def __init__(self, dongle_id):
self.dongle_id = dongle_id
with open('/persist/comma/id_rsa') as f:
@@ -27,7 +27,7 @@ class Api(object):
'iat': now,
'exp': now + timedelta(hours=1)
}
return jwt.encode(payload, self.private_key, algorithm='RS256')
return jwt.encode(payload, self.private_key, algorithm='RS256').decode('utf8')
def api_get(endpoint, method='GET', timeout=None, access_token=None, **params):
backend = "https://api.commadotai.com/"

23
common/cython_hacks.py Normal file
View File

@@ -0,0 +1,23 @@
import os
import sysconfig
from Cython.Distutils import build_ext
def get_ext_filename_without_platform_suffix(filename):
name, ext = os.path.splitext(filename)
ext_suffix = sysconfig.get_config_var('EXT_SUFFIX')
if ext_suffix == ext:
return filename
ext_suffix = ext_suffix.replace(ext, '')
idx = name.find(ext_suffix)
if idx == -1:
return filename
else:
return name[:idx] + ext
class BuildExtWithoutPlatformSuffix(build_ext):
def get_ext_filename(self, ext_name):
filename = super().get_ext_filename(ext_name)
return get_ext_filename_without_platform_suffix(filename)

View File

@@ -17,10 +17,10 @@ DBCSignal = namedtuple(
"factor", "offset", "tmin", "tmax", "units"])
class dbc(object):
class dbc():
def __init__(self, fn):
self.name, _ = os.path.splitext(os.path.basename(fn))
with open(fn) as f:
with open(fn, encoding="ascii") as f:
self.txt = f.readlines()
self._warned_addresses = set()
@@ -41,7 +41,7 @@ class dbc(object):
self.def_vals = defaultdict(list)
# lookup to bit reverse each byte
self.bits_index = [(i & ~0b111) + ((-i-1) & 0b111) for i in xrange(64)]
self.bits_index = [(i & ~0b111) + ((-i-1) & 0b111) for i in range(64)]
for l in self.txt:
l = l.strip()
@@ -101,13 +101,8 @@ class dbc(object):
defvals = defvals.replace("?",r"\?") #escape sequence in C++
defvals = defvals.split('"')[:-1]
defs = defvals[1::2]
#cleanup, convert to UPPER_CASE_WITH_UNDERSCORES
for i,d in enumerate(defs):
d = defs[i].strip().upper()
defs[i] = d.replace(" ","_")
defvals[1::2] = defs
# convert strings to UPPER_CASE_WITH_UNDERSCORES
defvals[1::2] = [d.strip().upper().replace(" ","_") for d in defvals[1::2]]
defvals = '"'+"".join(str(i) for i in defvals)+'"'
self.def_vals[ids].append((sgname, defvals))
@@ -152,22 +147,20 @@ class dbc(object):
ival = dd.get(s.name)
if ival is not None:
b2 = s.size
if s.is_little_endian:
b1 = s.start_bit
else:
b1 = (s.start_bit // 8) * 8 + (-s.start_bit - 1) % 8
bo = 64 - (b1 + s.size)
ival = (ival / s.factor) - s.offset
ival = int(round(ival))
if s.is_signed and ival < 0:
ival = (1 << b2) + ival
ival = (1 << s.size) + ival
shift = b1 if s.is_little_endian else bo
mask = ((1 << b2) - 1) << shift
dat = (ival & ((1 << b2) - 1)) << shift
if s.is_little_endian:
shift = s.start_bit
else:
b1 = (s.start_bit // 8) * 8 + (-s.start_bit - 1) % 8
shift = 64 - (b1 + s.size)
mask = ((1 << s.size) - 1) << shift
dat = (ival & ((1 << s.size) - 1)) << shift
if s.is_little_endian:
mask = self.reverse_bytes(mask)
@@ -213,7 +206,7 @@ class dbc(object):
if debug:
print(name)
st = x[2].ljust(8, '\x00')
st = x[2].ljust(8, b'\x00')
le, be = None, None
for s in msg[1]:
@@ -227,30 +220,24 @@ class dbc(object):
factor = s[5]
offset = s[6]
b2 = signal_size
if little_endian:
b1 = start_bit
else:
b1 = (start_bit // 8) * 8 + (-start_bit - 1) % 8
bo = 64 - (b1 + signal_size)
if little_endian:
if le is None:
le = struct.unpack("<Q", st)[0]
shift_amount = b1
tmp = le
shift_amount = start_bit
else:
if be is None:
be = struct.unpack(">Q", st)[0]
shift_amount = bo
tmp = be
b1 = (start_bit // 8) * 8 + (-start_bit - 1) % 8
shift_amount = 64 - (b1 + signal_size)
if shift_amount < 0:
continue
tmp = (tmp >> shift_amount) & ((1 << b2) - 1)
if signed and (tmp >> (b2 - 1)):
tmp -= (1 << b2)
tmp = (tmp >> shift_amount) & ((1 << signal_size) - 1)
if signed and (tmp >> (signal_size - 1)):
tmp -= (1 << signal_size)
tmp = tmp * factor + offset

View File

@@ -9,7 +9,7 @@ def ffi_wrap(name, c_code, c_header, tmpdir="/tmp/ccache", cflags="", libraries=
if libraries is None:
libraries = []
cache = name + "_" + hashlib.sha1(c_code).hexdigest()
cache = name + "_" + hashlib.sha1(c_code.encode('utf-8')).hexdigest()
try:
os.mkdir(tmpdir)
except OSError:

View File

@@ -32,7 +32,7 @@ def get_tmpdir_on_same_filesystem(path):
return "/{}/runner/tmp".format(parts[1])
return "/tmp"
class AutoMoveTempdir(object):
class AutoMoveTempdir():
def __init__(self, target_path, temp_dir=None):
self._target_path = target_path
self._path = tempfile.mkdtemp(dir=temp_dir)
@@ -52,7 +52,7 @@ class AutoMoveTempdir(object):
else:
shutil.rmtree(self._path)
class NamedTemporaryDir(object):
class NamedTemporaryDir():
def __init__(self, temp_dir=None):
self._path = tempfile.mkdtemp(dir=temp_dir)

View File

@@ -1,7 +1,7 @@
all: simple_kalman_impl.so
simple_kalman_impl.so: simple_kalman_impl.pyx simple_kalman_impl.pxd simple_kalman_setup.py
python2 simple_kalman_setup.py build_ext --inplace
python3 simple_kalman_setup.py build_ext --inplace
rm -rf build
rm simple_kalman_impl.c

View File

@@ -5,6 +5,6 @@ import subprocess
kalman_dir = os.path.dirname(os.path.abspath(__file__))
subprocess.check_call(["make", "simple_kalman_impl.so"], cwd=kalman_dir)
from simple_kalman_impl import KF1D as KF1D
from .simple_kalman_impl import KF1D as KF1D
# Silence pyflakes
assert KF1D

View File

@@ -1,3 +1,4 @@
# cython: language_level=3
cdef class KF1D:
def __init__(self, x0, A, C, K):
@@ -32,4 +33,4 @@ cdef class KF1D:
@x.setter
def x(self, x):
self.x0_0 = x[0][0]
self.x1_0 = x[1][0]
self.x1_0 = x[1][0]

View File

@@ -1,5 +1,9 @@
from distutils.core import setup, Extension
from distutils.core import Extension, setup # pylint: disable=import-error,no-name-in-module
from Cython.Build import cythonize
from common.cython_hacks import BuildExtWithoutPlatformSuffix
setup(name='Simple Kalman Implementation',
ext_modules=cythonize(Extension("simple_kalman_impl", ["simple_kalman_impl.pyx"])))
cmdclass={'build_ext': BuildExtWithoutPlatformSuffix},
ext_modules=cythonize(Extension("simple_kalman_impl", ["simple_kalman_impl.pyx"])))

View File

@@ -12,7 +12,10 @@ def interp(x, xp, fp):
hi += 1
low = hi - 1
return fp[-1] if hi == N and xv > xp[low] else (
fp[0] if hi == 0 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)
def mean(x):
return sum(x) / len(x)

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""ROS has a parameter server, we have files.
The parameter store is a persistent key value store, implemented as a directory with a writer lock.
@@ -59,39 +59,45 @@ keys = {
"ControlsParams": [TxType.PERSISTENT],
"DoUninstall": [TxType.CLEAR_ON_MANAGER_START],
"DongleId": [TxType.PERSISTENT],
"GithubSshKeys": [TxType.PERSISTENT],
"GitBranch": [TxType.PERSISTENT],
"GitCommit": [TxType.PERSISTENT],
"GitRemote": [TxType.PERSISTENT],
"GithubSshKeys": [TxType.PERSISTENT],
"HasAcceptedTerms": [TxType.PERSISTENT],
"HasCompletedSetup": [TxType.PERSISTENT],
"IsGeofenceEnabled": [TxType.PERSISTENT],
"IsMetric": [TxType.PERSISTENT],
"IsRHD": [TxType.PERSISTENT],
"IsUpdateAvailable": [TxType.PERSISTENT],
"IsUploadRawEnabled": [TxType.PERSISTENT],
"IsUploadVideoOverCellularEnabled": [TxType.PERSISTENT],
"LastUpdateTime": [TxType.PERSISTENT],
"LimitSetSpeed": [TxType.PERSISTENT],
"LimitSetSpeedNeural": [TxType.PERSISTENT],
"LiveParameters": [TxType.PERSISTENT],
"LongitudinalControl": [TxType.PERSISTENT],
"OpenpilotEnabledToggle": [TxType.PERSISTENT],
"Passive": [TxType.PERSISTENT],
"RecordFront": [TxType.PERSISTENT],
"ReleaseNotes": [TxType.PERSISTENT],
"SafetyModelLock": [TxType.PERSISTENT],
"ShouldDoUpdate": [TxType.CLEAR_ON_MANAGER_START],
"SpeedLimitOffset": [TxType.PERSISTENT],
"SubscriberInfo": [TxType.PERSISTENT],
"TermsVersion": [TxType.PERSISTENT],
"TrainingVersion": [TxType.PERSISTENT],
"UpdateAvailable": [TxType.CLEAR_ON_MANAGER_START],
"Version": [TxType.PERSISTENT],
"Offroad_ChargeDisabled": [TxType.CLEAR_ON_MANAGER_START, TxType.CLEAR_ON_PANDA_DISCONNECT],
"Offroad_TemperatureTooHigh": [TxType.CLEAR_ON_MANAGER_START],
"Offroad_ConnectivityNeededPrompt": [TxType.CLEAR_ON_MANAGER_START],
"Offroad_ConnectivityNeeded": [TxType.CLEAR_ON_MANAGER_START],
#dragonpilot config
"DragonEnableDashcam": [TxType.PERSISTENT],
"DragonDisableDriverSafetyCheck": [TxType.PERSISTENT], # deprecated
"DragonEnableDriverSafetyCheck": [TxType.PERSISTENT],
"DragonAutoShutdownAt": [TxType.PERSISTENT],
"DragonTempDisableSteerOnSignal": [TxType.PERSISTENT], # deprecated
"DragonEnableSteeringOnSignal": [TxType.PERSISTENT],
"DragonDisableLogger": [TxType.PERSISTENT], # deprecated
"DragonEnableLogger": [TxType.PERSISTENT],
"DragonDisableUploader": [TxType.PERSISTENT], # deprecated
"DragonEnableUploader": [TxType.PERSISTENT],
"DragonNoctuaMode": [TxType.PERSISTENT],
"DragonCacheCar": [TxType.PERSISTENT],
@@ -99,7 +105,6 @@ keys = {
"DragonCachedFP": [TxType.PERSISTENT],
"DragonCachedVIN": [TxType.PERSISTENT],
"DragonAllowGas": [TxType.PERSISTENT],
"DragonBBUI": [TxType.PERSISTENT], # deprecated
"DragonToyotaStockDSU": [TxType.PERSISTENT],
"DragonLatCtrl": [TxType.PERSISTENT],
"DragonUISpeed": [TxType.PERSISTENT],
@@ -114,6 +119,9 @@ keys = {
"DragonEnableAutonavi": [TxType.PERSISTENT],
"DragonBootAutonavi": [TxType.PERSISTENT],
"DragonRunAutonavi": [TxType.PERSISTENT],
"DragonEnableAegis": [TxType.PERSISTENT],
"DragonBootAegis": [TxType.PERSISTENT],
"DragonRunAegis": [TxType.PERSISTENT],
"DragonEnableMixplorer": [TxType.PERSISTENT],
"DragonRunMixplorer": [TxType.PERSISTENT],
"DragonSteeringMonitorTimer": [TxType.PERSISTENT],
@@ -131,6 +139,11 @@ keys = {
"DragonUIPath": [TxType.PERSISTENT],
"DragonUIBlinker": [TxType.PERSISTENT],
"DragonEnableDriverMonitoring": [TxType.PERSISTENT],
"DragonCarModel": [TxType.PERSISTENT],
"DragonCarVIN": [TxType.PERSISTENT],
"DragonEnableSlowOnCurve": [TxType.PERSISTENT],
"DragonEnableLeadCarMovingAlert": [TxType.PERSISTENT],
"DragonToyotaSnGMod": [TxType.PERSISTENT],
}
@@ -142,7 +155,7 @@ def fsync_dir(path):
os.close(fd)
class FileLock(object):
class FileLock():
def __init__(self, path, create):
self._path = path
self._create = create
@@ -158,7 +171,7 @@ class FileLock(object):
self._fd = None
class DBAccessor(object):
class DBAccessor():
def __init__(self, path):
self._path = path
self._vals = None
@@ -328,6 +341,9 @@ def read_db(params_path, key):
return None
def write_db(params_path, key, value):
if isinstance(value, str):
value = value.encode('utf8')
prev_umask = os.umask(0)
lock = FileLock(params_path+"/.lock", True)
lock.acquire()
@@ -346,7 +362,7 @@ def write_db(params_path, key, value):
os.umask(prev_umask)
lock.release()
class Params(object):
class Params():
def __init__(self, db='/data/params'):
self.db = db
@@ -377,7 +393,7 @@ class Params(object):
with self.transaction(write=True) as txn:
txn.delete(key)
def get(self, key, block=False):
def get(self, key, block=False, encoding=None):
if key not in keys:
raise UnknownKeyName(key)
@@ -387,9 +403,21 @@ class Params(object):
break
# is polling really the best we can do?
time.sleep(0.05)
if ret is not None and encoding is not None:
ret = ret.decode(encoding)
return ret
def put(self, key, dat):
"""
Warning: This function blocks until the param is written to disk!
In very rare cases this can take over a second, and your code will hang.
Use the put_nonblocking helper function in time sensitive code, but
in general try to avoid writing params as much as possible.
"""
if key not in keys:
raise UnknownKeyName(key)

View File

@@ -1,6 +1,6 @@
import time
class Profiler(object):
class Profiler():
def __init__(self, enabled=False):
self.enabled = enabled
self.cp = {}

View File

@@ -19,6 +19,7 @@ assert sec_since_boot
DT_CTRL = 0.01 # controlsd
DT_PLAN = 0.05 # mpc
DT_MDL = 0.05 # model
DT_RDR = 0.05 # radar
DT_DMON = 0.1 # driver monitoring
DT_TRML = 0.5 # thermald and manager
@@ -43,7 +44,7 @@ def set_realtime_priority(level):
return subprocess.call(['chrt', '-f', '-p', str(level), str(tid)])
class Ratekeeper(object):
class Ratekeeper():
def __init__(self, rate, print_delay_threshold=0.):
"""Rate in Hz for ratekeeping. print_delay_threshold must be nonnegative."""
self._interval = 1. / rate

28
common/spinner.py Normal file
View File

@@ -0,0 +1,28 @@
import os
import subprocess
from common.basedir import BASEDIR
class Spinner():
def __enter__(self):
self.spinner_proc = subprocess.Popen(["./spinner"],
stdin=subprocess.PIPE,
cwd=os.path.join(BASEDIR, "selfdrive", "ui", "spinner"),
close_fds=True)
return self
def update(self, spinner_text):
self.spinner_proc.stdin.write(spinner_text.encode('utf8') + b"\n")
self.spinner_proc.stdin.flush()
def __exit__(self, type, value, traceback):
self.spinner_proc.stdin.close()
self.spinner_proc.terminate()
if __name__ == "__main__":
import time
with Spinner() as s:
s.update("Spinner text")
time.sleep(5.0)

View File

@@ -11,7 +11,7 @@ class RunningStat():
self.n = priors[2]
self.M_last = self.M
self.S_last = self.S
else:
self.reset()
@@ -70,4 +70,4 @@ class RunningStatFilter():
pass
# self.filtered_stat.push_data(self.filtered_stat.mean())
# class SequentialBayesian():
# class SequentialBayesian():

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import sympy as sp
import numpy as np

View File

@@ -125,7 +125,7 @@ def img_from_device(pt_device):
#TODO please use generic img transform below
def rotate_img(img, eulers, crop=None, intrinsics=eon_intrinsics):
import cv2
import cv2 # pylint: disable=no-name-in-module, import-error
size = img.shape[:2]
rot = orient.rot_from_euler(eulers)
@@ -138,8 +138,8 @@ def rotate_img(img, eulers, crop=None, intrinsics=eon_intrinsics):
warped_quadrangle = np.column_stack((warped_quadrangle_full[:,0]/warped_quadrangle_full[:,2],
warped_quadrangle_full[:,1]/warped_quadrangle_full[:,2])).astype(np.float32)
if crop:
W_border = (size[1] - crop[0])/2
H_border = (size[0] - crop[1])/2
W_border = (size[1] - crop[0])//2
H_border = (size[0] - crop[1])//2
outside_crop = (((warped_quadrangle[:,0] < W_border) |
(warped_quadrangle[:,0] >= size[1] - W_border)) &
((warped_quadrangle[:,1] < H_border) |
@@ -183,7 +183,8 @@ def transform_img(base_img,
alpha=1.0,
beta=0,
blur=0):
import cv2
import cv2 # pylint: disable=no-name-in-module, import-error
cv2.setNumThreads(1)
if yuv:
base_img = cv2.cvtColor(base_img, cv2.COLOR_YUV2RGB_I420)
@@ -240,7 +241,7 @@ def transform_img(base_img,
def yuv_crop(frame, output_size, center=None):
# output_size in camera coordinates so u,v
# center in array coordinates so row, column
import cv2
import cv2 # pylint: disable=no-name-in-module, import-error
rgb = cv2.cvtColor(frame, cv2.COLOR_YUV2RGB_I420)
if not center:
center = (rgb.shape[0]/2, rgb.shape[1]/2)

View File

@@ -65,7 +65,7 @@ def ecef2geodetic(ecef, radians=False):
geodetic = np.column_stack((lat, lon, h))
return geodetic.reshape(input_shape)
class LocalCoord(object):
class LocalCoord():
"""
Allows conversions to local frames. In this case NED.
That is: North East Down from the start position in

View File

@@ -29,7 +29,7 @@ def euler2quat(eulers):
np.sin(gamma / 2) * np.sin(theta / 2) * np.cos(psi / 2)
quats = array([q0, q1, q2, q3]).T
for i in xrange(len(quats)):
for i in range(len(quats)):
if quats[i,0] < 0:
quats[i] = -quats[i]
return quats.reshape(output_shape)
@@ -99,7 +99,7 @@ def rot2quat(rots):
K3[:, 3, 2] = K3[:, 2, 3]
K3[:, 3, 3] = (rots[:, 0, 0] + rots[:, 1, 1] + rots[:, 2, 2]) / 3.0
q = np.empty((len(rots), 4))
for i in xrange(len(rots)):
for i in range(len(rots)):
_, eigvecs = linalg.eigh(K3[i].T)
eigvecs = eigvecs[:,3:]
q[i, 0] = eigvecs[-1]

21
dragonpilot/LICENSE.md Normal file
View File

@@ -0,0 +1,21 @@
The MIT License
Copyright (c) 2019-, Rick Lan, dragonpilot community, and a number of other of contributors.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -0,0 +1,92 @@
This Font Software is licensed under the SIL Open Font License,
Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font
creation efforts of academic and linguistic communities, and to
provide a free and open framework in which fonts may be shared and
improved in partnership with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply to
any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software
components as distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to,
deleting, or substituting -- in part or in whole -- any of the
components of the Original Version, by changing formats or by porting
the Font Software to a new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed,
modify, redistribute, and sell modified and unmodified copies of the
Font Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components, in
Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the
corresponding Copyright Holder. This restriction only applies to the
primary font name as presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created using
the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@@ -334,12 +334,6 @@
<family>
<font weight="400" style="normal">NotoSansSymbols-Regular-Subsetted.ttf</font>
</family>
<family lang="zh-Hans">
<font weight="400" style="normal">NotoSansSC-Regular.otf</font>
</family>
<family lang="zh-Hant">
<font weight="400" style="normal">NotoSansTC-Regular.otf</font>
</family>
<family lang="ja">
<font weight="400" style="normal">NotoSansJP-Regular.otf</font>
</family>
@@ -352,8 +346,15 @@
<family>
<font weight="400" style="normal">NotoColorEmoji.ttf</font>
</family>
<family>
<font weight="400" style="normal">Miui-Regular.ttf</font>
<family lang="zh-Hans">
<font weight="400" style="normal">NotoSansCJKtc-Regular.otf</font>
<font weight="500" style="normal">NotoSansCJKtc-Medium.otf</font>
<font weight="700" style="normal">NotoSansCJKtc-Bold.otf</font>
</family>
<family lang="zh-Hant">
<font weight="400" style="normal">NotoSansCJKtc-Regular.otf</font>
<font weight="500" style="normal">NotoSansCJKtc-Medium.otf</font>
<font weight="700" style="normal">NotoSansCJKtc-Bold.otf</font>
</family>
<family lang="ja">
<font weight="400" style="normal">MTLmr3m.ttf</font>

View File

@@ -1,48 +1,67 @@
#!/usr/bin/bash
# Anndroid system locale, zh-TW = Traditional Chinese, zh-CN = Simplified Chinese
###############################################################################
# The MIT License
#
# Copyright (c) 2019-, Rick Lan, dragonpilot community, and a number of other of contributors.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
# Noto is a trademark of Google Inc. Noto fonts are open source.
# All Noto fonts are published under the SIL Open Font License,
# Version 1.1. Language data and some sample texts are from the Unicode CLDR project.
#
###############################################################################
# Android system locale, zh-TW = Traditional Chinese, zh-CN = Simplified Chinese
lang=en
update_font_reg=0
update_font_bold=0
update_font=0
remove_old_font=0
# check regular font
if [ ! -f "/system/fonts/Miui-Regular.ttf" ]; then
update_font_reg=1
if [ ! -f "/system/fonts/NotoSansCJKtc-Regular.otf" ]; then
update_font=1
fi
# check bold font
if [ ! -f "/system/fonts/Miui-Bold.ttf" ]; then
update_font_bold=1
fi
# check droidsans font
if ls /system/fonts/DroidSansFallback*.ttf 1> /dev/null 2>&1; then
# check miui font
if ls /system/fonts/Miui*.ttf 1> /dev/null 2>&1; then
remove_old_font=1
fi
if [ $update_font_reg -eq "1" ] || [ $update_font_bold -eq "1" ] || [ $remove_old_font -eq "1" ]; then
# sleep 3 secs in case, make sure the /system is remountable
if [ $update_font -eq "1" ] || [ $remove_old_font -eq "1" ]; then
# sleep 3 secs in case, make sure the /system is re-mountable
sleep 3
mount -o remount,rw /system
if [ $update_font_reg -eq "1" ] || [ $update_font_bold -eq "1" ]; then
# download regular font
if [ $update_font_reg -eq "1" ]; then
yes | cp -rf /data/openpilot/dragonpilot/chinese-fonts/Miui-Regular.ttf /system/fonts/Miui-Regular.ttf
fi
# download bold font
if [ $update_font_bold -eq "1" ]; then
yes | cp -rf /data/openpilot/dragonpilot/chinese-fonts/Miui-Bold.ttf /system/fonts/Miui-Bold.ttf
fi
# dont new font mapping
yes | cp -rf /data/openpilot/dragonpilot/chinese-fonts/fonts.xml /system/etc/fonts.xml
if [ $update_font -eq "1" ]; then
# install font
cp -rf /data/openpilot/dragonpilot/chinese-fonts/NotoSansCJKtc-* /system/fonts/
# install font mapping
cp -rf /data/openpilot/dragonpilot/chinese-fonts/fonts.xml /system/etc/fonts.xml
# change permissions
chmod 644 /system/etc/fonts.xml
chmod 644 /system/fonts/Miui-*
chmod 644 /system/fonts/NotoSansCJKtc-*
fi
# remove driodsans font
# remove miui font
if [ $remove_old_font -eq "1" ]; then
rm -fr /system/fonts/DroidSansFallback*.ttf
rm -fr /system/fonts/Miui*.ttf
fi
mount -o remount,r /system
# change system locale

View File

@@ -1,7 +1,7 @@
{
"ota_url": "https://commadist.azureedge.net/neosupdate/ota-signed-4db25072191d24e204a816d73ac9e8c727822a26ed3baf01ecae18167fa2eb11.zip",
"ota_hash": "4db25072191d24e204a816d73ac9e8c727822a26ed3baf01ecae18167fa2eb11",
"recovery_url": "https://commadist.azureedge.net/neosupdate/recovery-31ef14206d3102edf18fb7417ef32ba2d9f37dd2f4443e234c374a70d1bf4662.img",
"recovery_len": 15136044,
"recovery_hash": "31ef14206d3102edf18fb7417ef32ba2d9f37dd2f4443e234c374a70d1bf4662"
"ota_url": "https://commadist.azureedge.net/neosupdate/ota-signed-7a0117425bc4a6673958d265312994e124654a566228f3cec2f0f9bc8120a9ab.zip",
"ota_hash": "7a0117425bc4a6673958d265312994e124654a566228f3cec2f0f9bc8120a9ab",
"recovery_url": "https://commadist.azureedge.net/neosupdate/recovery-3dc234d868c29a3739f6ca3bd47b1c2d3c570d9f478b6849a4fada129ee4af76.img",
"recovery_len": 15848748,
"recovery_hash": "3dc234d868c29a3739f6ca3bd47b1c2d3c570d9f478b6849a4fada129ee4af76"
}

View File

@@ -24,6 +24,8 @@ function launch {
#
# exec "${BASH_SOURCE[0]}"
# fi
chmod 700 reset_update.sh
chmod 700 update_panda_firmware.sh
# no cpu rationing for now
echo 0-3 > /dev/cpuset/background/cpus
@@ -32,6 +34,24 @@ function launch {
echo 0-3 > /dev/cpuset/foreground/cpus
echo 0-3 > /dev/cpuset/android/cpus
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
# Remove old NEOS update file
if [ -d /data/neoupdate ]; then
rm -rf /data/neoupdate
fi
# Check for NEOS update
if [ $(< /VERSION) != "12" ]; then
if [ -f "$DIR/scripts/continue.sh" ]; then
cp "$DIR/scripts/continue.sh" "/data/data/com.termux/files/continue.sh"
fi
git clean -xdf
"$DIR/installer/updater/updater" "file://$DIR/installer/updater/update.json"
fi
# handle pythonpath
ln -s /data/openpilot /data/pythonpath
export PYTHONPATH="$PWD"

Binary file not shown.

Binary file not shown.

View File

@@ -189,7 +189,7 @@ 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
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
@@ -241,4 +241,3 @@ VAL_ 356 LKATorqueDeliveredStatus 7 "Override Fault" 6 "LKAS Fault but Responsiv
VAL_ 489 BrakePedalPressed 1 "Pressed" 0 "Depressed" ;
VAL_ 715 GasRegenCmdActiveInv 1 "Inactive" 0 "Active" ;
VAL_ 715 GasRegenCmdActive 1 "Active" 0 "Inactive" ;

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
import os
import re
@@ -40,10 +40,10 @@ for dir_name, _, filenames in os.walk(cur_path):
if dir_name == cur_path:
continue
print dir_name
print(dir_name)
for filename in filenames:
if filename.startswith('_'):
continue
print filename
print(filename)
create_dbc(dir_name, filename)

View File

@@ -123,7 +123,7 @@ BO_ 479 ACC_CONTROL: 8 EON
SG_ SET_TO_0 : 20|5@0+ (1,0) [0|1] "" XXX
SG_ CONTROL_ON : 23|3@0+ (1,0) [0|5] "" XXX
SG_ GAS_COMMAND : 7|16@0- (1,0) [0|0] "" XXX
SG_ ACCEL_COMMAND : 31|11@0- (1,0) [0|0] "" XXX
SG_ ACCEL_COMMAND : 31|11@0- (0.01,0) [0|0] "m/s2" XXX
SG_ BRAKE_LIGHTS : 62|1@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_REQUEST : 34|1@0+ (1,0) [0|1] "" XXX
SG_ STANDSTILL : 35|1@0+ (1,0) [0|1] "" XXX

View File

@@ -36,8 +36,8 @@ BS_:
BU_: XXX DSU HCU EPS IPAS CGW
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_ ACCEL_Y : 33|10@0+ (0.03589,-18.375) [0|65535] "m/s^2" XXX
SG_ YAW_RATE : 1|10@0+ (0.244,-125) [0|65535] "deg/sec" XXX
SG_ STEERING_TORQUE : 17|10@0+ (1,-512) [0|65535] "" XXX
BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
@@ -57,8 +57,8 @@ BO_ 170 WHEEL_SPEEDS: 8 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
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
BO_ 353 DSU_SPEED: 8 XXX
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX
@@ -150,6 +150,7 @@ BO_ 921 PCM_CRUISE_SM: 8 XXX
BO_ 951 ESP_CONTROL: 8 ESP
SG_ TC_DISABLED : 13|1@0+ (1,0) [0|1] "" XXX
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
BO_ 1041 ACC_HUD: 8 DSU
@@ -174,6 +175,17 @@ BO_ 1042 LKAS_HUD: 8 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_ 1043 TIME : 8 CGW
SG_ YEAR : 7|8@0+ (1,0) [0|0] "year" XXX
SG_ MONTH : 15|8@0+ (1,0) [0|0] "month" XXX
SG_ DAY : 23|8@0+ (1,0) [0|0] "day" XXX
SG_ HOUR : 31|8@0+ (1,0) [0|0] "hour" XXX
SG_ MINUTE : 39|8@0+ (1,0) [0|0] "minute" XXX
SG_ GMT_DIFF : 55|1@0+ (1,0) [0|0] "" XXX
SG_ GMTDIFF_HOURS : 54|4@0+ (1,0) [0|0] "hours" XXX
SG_ GMTDIFF_MINUTES : 50|6@0+ (1,0) [0|0] "minutes" XXX
SG_ SUMMER : 60|1@0+ (1,0) [0|0] "" XXX
BO_ 1408 VIN_PART_1: 8 CGW
SG_ VIN_1 : 7|8@0+ (1,0) [0|0] "" XXX
SG_ VIN_2 : 15|8@0+ (1,0) [0|0] "" XXX

View File

@@ -10,7 +10,7 @@ BO_ 581 GAS_PEDAL: 5 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_EPS : 47|16@0- (1,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
@@ -34,4 +34,4 @@ VAL_ 610 IPAS_STATE 5 "override" 3 "enabled" 1 "disabled";
VAL_ 610 LKA_STATE 25 "temporary_fault" 9 "temporary_fault2" 5 "active" 1 "standby";
VAL_ 956 GEAR 0 "D" 1 "S" 8 "N" 16 "R" 32 "P";
VAL_ 956 SPORT_ON 0 "off" 1 "on";
VAL_ 956 ECON_ON 0 "off" 1 "on";
VAL_ 956 ECON_ON 0 "off" 1 "on";

View File

@@ -11,7 +11,7 @@ BO_ 705 GAS_PEDAL: 8 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.66,0) [-20000|20000] "" XXX
SG_ STEER_TORQUE_EPS : 47|16@0- (0.77,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

View File

@@ -20,7 +20,7 @@ BO_ 608 STEER_TORQUE_SENSOR: 8 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
SG_ STEER_ANGLE : 31|16@0- (0.05527,0) [-500|500] "" XXX
SG_ STEER_ANGLE : 31|16@0- (0.0573,0) [-500|500] "" XXX
BO_ 610 EPS_STATUS: 8 EPS
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX

View File

@@ -20,7 +20,7 @@ BO_ 608 STEER_TORQUE_SENSOR: 8 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
SG_ STEER_ANGLE : 31|16@0- (0.056,0) [-500|500] "" XXX
SG_ STEER_ANGLE : 31|16@0- (0.0573,0) [-500|500] "" XXX
BO_ 610 EPS_STATUS: 8 EPS
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX

View File

@@ -8,7 +8,7 @@ BO_ 401 STEERING_LTA: 8 XXX
SG_ PERCENTAGE : 39|8@0+ (1,0) [0|255] "" XXX
SG_ SETME_X64 : 47|8@0+ (1,0) [0|255] "" XXX
SG_ ANGLE : 55|8@0- (0.5,0) [0|255] "" XXX
SG_ STEER_ANGLE_CMD : 15|16@0- (0.056,0) [-540|540] "" XXX
SG_ STEER_ANGLE_CMD : 15|16@0- (0.0573,0) [-540|540] "" XXX
SG_ STEER_REQUEST : 25|1@0+ (1,0) [0|1] "" XXX
SG_ BIT : 30|1@0+ (1,0) [0|1] "" XXX
@@ -26,7 +26,7 @@ BO_ 608 STEER_TORQUE_SENSOR: 8 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
SG_ STEER_ANGLE : 31|16@0- (0.056,0) [-500|500] "" XXX
SG_ STEER_ANGLE : 31|16@0- (0.0573,0) [-500|500] "" XXX
BO_ 610 EPS_STATUS: 8 EPS
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX

View File

@@ -20,6 +20,7 @@ BO_ 608 STEER_TORQUE_SENSOR: 8 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
SG_ STEER_ANGLE : 31|16@0- (0.0573,0) [-500|500] "" XXX
BO_ 610 EPS_STATUS: 8 EPS
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX

View File

@@ -195,7 +195,7 @@ BO_ 1033 ASCMKeepAlive: 7 NEO
BO_ 1034 ASCM_40A: 7 K124_ASCM
BO_ 1217 ECMEngineCoolantTemp: 8 K20_ECM
SG_ EngineCoolantTemp : 23|8@0+ (1,-40) [0|0] "°C" NEO
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

View File

@@ -127,7 +127,7 @@ BO_ 479 ACC_CONTROL: 8 EON
SG_ SET_TO_0 : 20|5@0+ (1,0) [0|1] "" XXX
SG_ CONTROL_ON : 23|3@0+ (1,0) [0|5] "" XXX
SG_ GAS_COMMAND : 7|16@0- (1,0) [0|0] "" XXX
SG_ ACCEL_COMMAND : 31|11@0- (1,0) [0|0] "" XXX
SG_ ACCEL_COMMAND : 31|11@0- (0.01,0) [0|0] "m/s2" XXX
SG_ BRAKE_LIGHTS : 62|1@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_REQUEST : 34|1@0+ (1,0) [0|1] "" XXX
SG_ STANDSTILL : 35|1@0+ (1,0) [0|1] "" XXX

View File

@@ -127,7 +127,7 @@ BO_ 479 ACC_CONTROL: 8 EON
SG_ SET_TO_0 : 20|5@0+ (1,0) [0|1] "" XXX
SG_ CONTROL_ON : 23|3@0+ (1,0) [0|5] "" XXX
SG_ GAS_COMMAND : 7|16@0- (1,0) [0|0] "" XXX
SG_ ACCEL_COMMAND : 31|11@0- (1,0) [0|0] "" XXX
SG_ ACCEL_COMMAND : 31|11@0- (0.01,0) [0|0] "m/s2" XXX
SG_ BRAKE_LIGHTS : 62|1@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_REQUEST : 34|1@0+ (1,0) [0|1] "" XXX
SG_ STANDSTILL : 35|1@0+ (1,0) [0|1] "" XXX

View File

@@ -177,14 +177,14 @@ BO_ 597 ROUGH_WHEEL_SPEED: 8 VSA
SG_ SET_TO_X55_2 : 47|8@0+ (1,0) [0|255] "" NEO
SG_ LONG_COUNTER : 55|8@0+ (1,0) [0|255] "" XXX
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" XXX
SG_ CHECKSUM : 59|4@1+ (1,0) [0|15] "" XXX
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" XXX
BO_ 660 SCM_COMMANDS: 8 SCM
SG_ RIGHT_BLINKER : 6|1@0+ (1,0) [0|1] "" NEO
SG_ LEFT_BLINKER : 5|1@0+ (1,0) [0|1] "" NEO
SG_ WIPERS_SPEED : 4|2@0+ (1,0) [0|3] "" NEO
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" XXX
SG_ CHECKSUM : 59|4@1+ (1,0) [0|15] "" XXX
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" XXX
BO_ 661 XXX_10: 4 XXX
SG_ COUNTER : 29|2@0+ (1,0) [0|3] "" XXX

View File

@@ -127,7 +127,7 @@ BO_ 479 ACC_CONTROL: 8 EON
SG_ SET_TO_0 : 20|5@0+ (1,0) [0|1] "" XXX
SG_ CONTROL_ON : 23|3@0+ (1,0) [0|5] "" XXX
SG_ GAS_COMMAND : 7|16@0- (1,0) [0|0] "" XXX
SG_ ACCEL_COMMAND : 31|11@0- (1,0) [0|0] "" XXX
SG_ ACCEL_COMMAND : 31|11@0- (0.01,0) [0|0] "m/s2" XXX
SG_ BRAKE_LIGHTS : 62|1@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_REQUEST : 34|1@0+ (1,0) [0|1] "" XXX
SG_ STANDSTILL : 35|1@0+ (1,0) [0|1] "" XXX

View File

@@ -127,7 +127,7 @@ BO_ 479 ACC_CONTROL: 8 EON
SG_ SET_TO_0 : 20|5@0+ (1,0) [0|1] "" XXX
SG_ CONTROL_ON : 23|3@0+ (1,0) [0|5] "" XXX
SG_ GAS_COMMAND : 7|16@0- (1,0) [0|0] "" XXX
SG_ ACCEL_COMMAND : 31|11@0- (1,0) [0|0] "" XXX
SG_ ACCEL_COMMAND : 31|11@0- (0.01,0) [0|0] "m/s2" XXX
SG_ BRAKE_LIGHTS : 62|1@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_REQUEST : 34|1@0+ (1,0) [0|1] "" XXX
SG_ STANDSTILL : 35|1@0+ (1,0) [0|1] "" XXX

View File

@@ -127,7 +127,7 @@ BO_ 479 ACC_CONTROL: 8 EON
SG_ SET_TO_0 : 20|5@0+ (1,0) [0|1] "" XXX
SG_ CONTROL_ON : 23|3@0+ (1,0) [0|5] "" XXX
SG_ GAS_COMMAND : 7|16@0- (1,0) [0|0] "" XXX
SG_ ACCEL_COMMAND : 31|11@0- (1,0) [0|0] "" XXX
SG_ ACCEL_COMMAND : 31|11@0- (0.01,0) [0|0] "m/s2" XXX
SG_ BRAKE_LIGHTS : 62|1@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_REQUEST : 34|1@0+ (1,0) [0|1] "" XXX
SG_ STANDSTILL : 35|1@0+ (1,0) [0|1] "" XXX

View File

@@ -127,7 +127,7 @@ BO_ 479 ACC_CONTROL: 8 EON
SG_ SET_TO_0 : 20|5@0+ (1,0) [0|1] "" XXX
SG_ CONTROL_ON : 23|3@0+ (1,0) [0|5] "" XXX
SG_ GAS_COMMAND : 7|16@0- (1,0) [0|0] "" XXX
SG_ ACCEL_COMMAND : 31|11@0- (1,0) [0|0] "" XXX
SG_ ACCEL_COMMAND : 31|11@0- (0.01,0) [0|0] "m/s2" XXX
SG_ BRAKE_LIGHTS : 62|1@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_REQUEST : 34|1@0+ (1,0) [0|1] "" XXX
SG_ STANDSTILL : 35|1@0+ (1,0) [0|1] "" XXX

View File

@@ -893,11 +893,11 @@ BO_ 67 DATC13: 8 DATC
BO_ 66 DATC12: 8 DATC
SG_ CR_Datc_DrTempDispC : 0|8@1+ (0.5,14.0) [15.0|32.0] "deg" CLU,IBOX
SG_ CR_Datc_DrTempDispF : 8|8@1+ (1.0,56.0) [58.0|90.0] "¢µ" CLU,IBOX
SG_ CR_Datc_DrTempDispF : 8|8@1+ (1.0,56.0) [58.0|90.0] "" CLU,IBOX
SG_ CR_Datc_PsTempDispC : 16|8@1+ (0.5,14.0) [15.0|32.0] "deg" CLU,IBOX
SG_ CR_Datc_PsTempDispF : 24|8@1+ (1.0,56.0) [58.0|90.0] "¢µ" CLU,IBOX
SG_ CR_Datc_PsTempDispF : 24|8@1+ (1.0,56.0) [58.0|90.0] "" CLU,IBOX
SG_ CR_Datc_RearDrTempDispC : 40|8@1+ (0.5,14.0) [15.0|32.0] "deg" CLU
SG_ CR_Datc_RearDrTempDispF : 48|8@1+ (1.0,58.0) [58.0|90.0] "¢µ" CLU
SG_ CR_Datc_RearDrTempDispF : 48|8@1+ (1.0,58.0) [58.0|90.0] "" CLU
SG_ CF_Datc_CO2_Warning : 56|8@1+ (1.0,0.0) [0.0|3.0] "" CLU
BO_ 1345 CGW1: 8 BCM

View File

@@ -70,8 +70,8 @@ BS_:
BU_: XXX DSU HCU EPS IPAS CGW
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_ ACCEL_Y : 33|10@0+ (0.03589,-18.375) [0|65535] "m/s^2" XXX
SG_ YAW_RATE : 1|10@0+ (0.244,-125) [0|65535] "deg/sec" XXX
SG_ STEERING_TORQUE : 17|10@0+ (1,-512) [0|65535] "" XXX
BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
@@ -91,8 +91,8 @@ BO_ 170 WHEEL_SPEEDS: 8 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
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
BO_ 353 DSU_SPEED: 8 XXX
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX
@@ -184,6 +184,7 @@ BO_ 921 PCM_CRUISE_SM: 8 XXX
BO_ 951 ESP_CONTROL: 8 ESP
SG_ TC_DISABLED : 13|1@0+ (1,0) [0|1] "" XXX
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
BO_ 1041 ACC_HUD: 8 DSU
@@ -208,6 +209,17 @@ BO_ 1042 LKAS_HUD: 8 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_ 1043 TIME : 8 CGW
SG_ YEAR : 7|8@0+ (1,0) [0|0] "year" XXX
SG_ MONTH : 15|8@0+ (1,0) [0|0] "month" XXX
SG_ DAY : 23|8@0+ (1,0) [0|0] "day" XXX
SG_ HOUR : 31|8@0+ (1,0) [0|0] "hour" XXX
SG_ MINUTE : 39|8@0+ (1,0) [0|0] "minute" XXX
SG_ GMT_DIFF : 55|1@0+ (1,0) [0|0] "" XXX
SG_ GMTDIFF_HOURS : 54|4@0+ (1,0) [0|0] "hours" XXX
SG_ GMTDIFF_MINUTES : 50|6@0+ (1,0) [0|0] "minutes" XXX
SG_ SUMMER : 60|1@0+ (1,0) [0|0] "" XXX
BO_ 1408 VIN_PART_1: 8 CGW
SG_ VIN_1 : 7|8@0+ (1,0) [0|0] "" XXX
SG_ VIN_2 : 15|8@0+ (1,0) [0|0] "" XXX
@@ -357,7 +369,7 @@ BO_ 581 GAS_PEDAL: 5 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_EPS : 47|16@0- (1,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
@@ -381,4 +393,4 @@ VAL_ 610 IPAS_STATE 5 "override" 3 "enabled" 1 "disabled";
VAL_ 610 LKA_STATE 25 "temporary_fault" 9 "temporary_fault2" 5 "active" 1 "standby";
VAL_ 956 GEAR 0 "D" 1 "S" 8 "N" 16 "R" 32 "P";
VAL_ 956 SPORT_ON 0 "off" 1 "on";
VAL_ 956 ECON_ON 0 "off" 1 "on";
VAL_ 956 ECON_ON 0 "off" 1 "on";

View File

@@ -70,8 +70,8 @@ BS_:
BU_: XXX DSU HCU EPS IPAS CGW
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_ ACCEL_Y : 33|10@0+ (0.03589,-18.375) [0|65535] "m/s^2" XXX
SG_ YAW_RATE : 1|10@0+ (0.244,-125) [0|65535] "deg/sec" XXX
SG_ STEERING_TORQUE : 17|10@0+ (1,-512) [0|65535] "" XXX
BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
@@ -91,8 +91,8 @@ BO_ 170 WHEEL_SPEEDS: 8 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
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
BO_ 353 DSU_SPEED: 8 XXX
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX
@@ -184,6 +184,7 @@ BO_ 921 PCM_CRUISE_SM: 8 XXX
BO_ 951 ESP_CONTROL: 8 ESP
SG_ TC_DISABLED : 13|1@0+ (1,0) [0|1] "" XXX
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
BO_ 1041 ACC_HUD: 8 DSU
@@ -208,6 +209,17 @@ BO_ 1042 LKAS_HUD: 8 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_ 1043 TIME : 8 CGW
SG_ YEAR : 7|8@0+ (1,0) [0|0] "year" XXX
SG_ MONTH : 15|8@0+ (1,0) [0|0] "month" XXX
SG_ DAY : 23|8@0+ (1,0) [0|0] "day" XXX
SG_ HOUR : 31|8@0+ (1,0) [0|0] "hour" XXX
SG_ MINUTE : 39|8@0+ (1,0) [0|0] "minute" XXX
SG_ GMT_DIFF : 55|1@0+ (1,0) [0|0] "" XXX
SG_ GMTDIFF_HOURS : 54|4@0+ (1,0) [0|0] "hours" XXX
SG_ GMTDIFF_MINUTES : 50|6@0+ (1,0) [0|0] "minutes" XXX
SG_ SUMMER : 60|1@0+ (1,0) [0|0] "" XXX
BO_ 1408 VIN_PART_1: 8 CGW
SG_ VIN_1 : 7|8@0+ (1,0) [0|0] "" XXX
SG_ VIN_2 : 15|8@0+ (1,0) [0|0] "" XXX

View File

@@ -70,8 +70,8 @@ BS_:
BU_: XXX DSU HCU EPS IPAS CGW
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_ ACCEL_Y : 33|10@0+ (0.03589,-18.375) [0|65535] "m/s^2" XXX
SG_ YAW_RATE : 1|10@0+ (0.244,-125) [0|65535] "deg/sec" XXX
SG_ STEERING_TORQUE : 17|10@0+ (1,-512) [0|65535] "" XXX
BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
@@ -91,8 +91,8 @@ BO_ 170 WHEEL_SPEEDS: 8 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
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
BO_ 353 DSU_SPEED: 8 XXX
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX
@@ -184,6 +184,7 @@ BO_ 921 PCM_CRUISE_SM: 8 XXX
BO_ 951 ESP_CONTROL: 8 ESP
SG_ TC_DISABLED : 13|1@0+ (1,0) [0|1] "" XXX
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
BO_ 1041 ACC_HUD: 8 DSU
@@ -208,6 +209,17 @@ BO_ 1042 LKAS_HUD: 8 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_ 1043 TIME : 8 CGW
SG_ YEAR : 7|8@0+ (1,0) [0|0] "year" XXX
SG_ MONTH : 15|8@0+ (1,0) [0|0] "month" XXX
SG_ DAY : 23|8@0+ (1,0) [0|0] "day" XXX
SG_ HOUR : 31|8@0+ (1,0) [0|0] "hour" XXX
SG_ MINUTE : 39|8@0+ (1,0) [0|0] "minute" XXX
SG_ GMT_DIFF : 55|1@0+ (1,0) [0|0] "" XXX
SG_ GMTDIFF_HOURS : 54|4@0+ (1,0) [0|0] "hours" XXX
SG_ GMTDIFF_MINUTES : 50|6@0+ (1,0) [0|0] "minutes" XXX
SG_ SUMMER : 60|1@0+ (1,0) [0|0] "" XXX
BO_ 1408 VIN_PART_1: 8 CGW
SG_ VIN_1 : 7|8@0+ (1,0) [0|0] "" XXX
SG_ VIN_2 : 15|8@0+ (1,0) [0|0] "" XXX
@@ -365,7 +377,7 @@ BO_ 608 STEER_TORQUE_SENSOR: 8 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
SG_ STEER_ANGLE : 31|16@0- (0.056,0) [-500|500] "" XXX
SG_ STEER_ANGLE : 31|16@0- (0.0573,0) [-500|500] "" XXX
BO_ 610 EPS_STATUS: 5 EPS
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX

View File

@@ -361,7 +361,7 @@ BO_ 608 STEER_TORQUE_SENSOR: 8 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
SG_ STEER_ANGLE : 31|16@0- (0.056,0) [-500|500] "" XXX
SG_ STEER_ANGLE : 31|16@0- (0.0573,0) [-500|500] "" XXX
BO_ 610 EPS_STATUS: 5 EPS
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX

View File

@@ -70,8 +70,8 @@ BS_:
BU_: XXX DSU HCU EPS IPAS CGW
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_ ACCEL_Y : 33|10@0+ (0.03589,-18.375) [0|65535] "m/s^2" XXX
SG_ YAW_RATE : 1|10@0+ (0.244,-125) [0|65535] "deg/sec" XXX
SG_ STEERING_TORQUE : 17|10@0+ (1,-512) [0|65535] "" XXX
BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
@@ -91,8 +91,8 @@ BO_ 170 WHEEL_SPEEDS: 8 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
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
BO_ 353 DSU_SPEED: 8 XXX
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX
@@ -184,6 +184,7 @@ BO_ 921 PCM_CRUISE_SM: 8 XXX
BO_ 951 ESP_CONTROL: 8 ESP
SG_ TC_DISABLED : 13|1@0+ (1,0) [0|1] "" XXX
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
BO_ 1041 ACC_HUD: 8 DSU
@@ -208,6 +209,17 @@ BO_ 1042 LKAS_HUD: 8 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_ 1043 TIME : 8 CGW
SG_ YEAR : 7|8@0+ (1,0) [0|0] "year" XXX
SG_ MONTH : 15|8@0+ (1,0) [0|0] "month" XXX
SG_ DAY : 23|8@0+ (1,0) [0|0] "day" XXX
SG_ HOUR : 31|8@0+ (1,0) [0|0] "hour" XXX
SG_ MINUTE : 39|8@0+ (1,0) [0|0] "minute" XXX
SG_ GMT_DIFF : 55|1@0+ (1,0) [0|0] "" XXX
SG_ GMTDIFF_HOURS : 54|4@0+ (1,0) [0|0] "hours" XXX
SG_ GMTDIFF_MINUTES : 50|6@0+ (1,0) [0|0] "minutes" XXX
SG_ SUMMER : 60|1@0+ (1,0) [0|0] "" XXX
BO_ 1408 VIN_PART_1: 8 CGW
SG_ VIN_1 : 7|8@0+ (1,0) [0|0] "" XXX
SG_ VIN_2 : 15|8@0+ (1,0) [0|0] "" XXX

View File

@@ -70,8 +70,8 @@ BS_:
BU_: XXX DSU HCU EPS IPAS CGW
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_ ACCEL_Y : 33|10@0+ (0.03589,-18.375) [0|65535] "m/s^2" XXX
SG_ YAW_RATE : 1|10@0+ (0.244,-125) [0|65535] "deg/sec" XXX
SG_ STEERING_TORQUE : 17|10@0+ (1,-512) [0|65535] "" XXX
BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
@@ -91,8 +91,8 @@ BO_ 170 WHEEL_SPEEDS: 8 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
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
BO_ 353 DSU_SPEED: 8 XXX
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX
@@ -184,6 +184,7 @@ BO_ 921 PCM_CRUISE_SM: 8 XXX
BO_ 951 ESP_CONTROL: 8 ESP
SG_ TC_DISABLED : 13|1@0+ (1,0) [0|1] "" XXX
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
BO_ 1041 ACC_HUD: 8 DSU
@@ -208,6 +209,17 @@ BO_ 1042 LKAS_HUD: 8 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_ 1043 TIME : 8 CGW
SG_ YEAR : 7|8@0+ (1,0) [0|0] "year" XXX
SG_ MONTH : 15|8@0+ (1,0) [0|0] "month" XXX
SG_ DAY : 23|8@0+ (1,0) [0|0] "day" XXX
SG_ HOUR : 31|8@0+ (1,0) [0|0] "hour" XXX
SG_ MINUTE : 39|8@0+ (1,0) [0|0] "minute" XXX
SG_ GMT_DIFF : 55|1@0+ (1,0) [0|0] "" XXX
SG_ GMTDIFF_HOURS : 54|4@0+ (1,0) [0|0] "hours" XXX
SG_ GMTDIFF_MINUTES : 50|6@0+ (1,0) [0|0] "minutes" XXX
SG_ SUMMER : 60|1@0+ (1,0) [0|0] "" XXX
BO_ 1408 VIN_PART_1: 8 CGW
SG_ VIN_1 : 7|8@0+ (1,0) [0|0] "" XXX
SG_ VIN_2 : 15|8@0+ (1,0) [0|0] "" XXX

View File

@@ -126,7 +126,7 @@ BO_ 896 ACN1S01: 8 CGW
SG_ GNRTIH : 27|1@0+ (1,0) [0|0] "" Vector__XXX
SG_ R_COL_TM : 26|1@0+ (1,0) [0|0] "" Vector__XXX
SG_ R_HET_TM : 24|1@0+ (1,0) [0|0] "" Vector__XXX
SG_ TAMOUT : 55|8@0- (0.625,0) [0|0] "Ž" Vector__XXX
SG_ TAMOUT : 55|8@0- (0.625,0) [0|0] "" Vector__XXX
BO_ 897 ACN1S04: 8 CGW
SG_ R_ACCALL : 7|1@0+ (1,0) [0|0] "" Vector__XXX
@@ -166,9 +166,9 @@ BO_ 897 ACN1S04: 8 CGW
BO_ 944 ACN1S07: 6 CGW
SG_ RDEF : 7|1@0+ (1,0) [0|0] "" Vector__XXX
SG_ MHTR : 6|1@0+ (1,0) [0|0] "" Vector__XXX
SG_ TR_TEMP : 15|8@0+ (0.25,-6.5) [0|0] "Ž" Vector__XXX
SG_ ACN_AMB : 31|8@0+ (1,0) [0|0] "Ž" CSR,DS1,FCM
SG_ AC_AMB05 : 44|1@0+ (1,0) [0|0] "Ž" Vector__XXX
SG_ TR_TEMP : 15|8@0+ (0.25,-6.5) [0|0] "" Vector__XXX
SG_ ACN_AMB : 31|8@0+ (1,0) [0|0] "" CSR,DS1,FCM
SG_ AC_AMB05 : 44|1@0+ (1,0) [0|0] "" Vector__XXX
SG_ AC_MODE : 43|2@0+ (1,0) [0|0] "" Vector__XXX
BO_ 1250 AFS1N01: 8 AFS
@@ -851,7 +851,7 @@ BO_ 956 ECT1S92: 8 CGW
SG_ B_R : 12|1@0+ (1,0) [0|0] "" AFS,BSR,CSR,DS1,FCM,MAV
SG_ B_N : 11|1@0+ (1,0) [0|0] "" AFS,CSR,MAV
SG_ B_ISPTM : 10|3@0+ (1,0) [0|0] "" Vector__XXX
SG_ BV_THOCL : 23|16@0+ (0.625,-50) [0|0] "Ž" Vector__XXX
SG_ BV_THOCL : 23|16@0+ (0.625,-50) [0|0] "" Vector__XXX
SG_ B_GEAR : 39|4@0+ (1,0) [0|0] "" Vector__XXX
SG_ B_SMDE : 32|1@0+ (1,0) [0|0] "" Vector__XXX
SG_ B_D : 47|1@0+ (1,0) [0|0] "" AFS,CSR,DS1,MAV
@@ -988,7 +988,7 @@ BO_ 1017 ENG1F03: 8 CGW
BO_ 452 ENG1F07: 8 CGW
SG_ NE1 : 7|16@0- (0.78125,0) [0|0] "rpm" SCS
SG_ THA1 : 23|8@0+ (2.5,-40) [0|0] "Ž" Vector__XXX
SG_ THA1 : 23|8@0+ (2.5,-40) [0|0] "" Vector__XXX
SG_ THWX : 31|1@0+ (1,0) [0|0] "" Vector__XXX
SG_ EGF : 30|1@0+ (1,0) [0|0] "" Vector__XXX
SG_ T2ERXF : 29|1@0+ (1,0) [0|0] "" Vector__XXX
@@ -1026,7 +1026,7 @@ BO_ 705 ENG1S01: 8 CGW
BO_ 961 ENG1S23: 3 CGW
SG_ EKLSM : 7|8@0+ (0.625,0) [0|0] "%" Vector__XXX
SG_ GATHW : 15|16@0- (0.625,0) [0|0] "Ž" Vector__XXX
SG_ GATHW : 15|16@0- (0.625,0) [0|0] "" Vector__XXX
BO_ 979 ENG1S28: 2 CGW
SG_ B_FC : 7|16@0+ (0.0005,0) [0|0] "ml" Vector__XXX
@@ -1067,7 +1067,7 @@ BO_ 955 ENG1S92: 8 CGW
SG_ B_WSTP : 11|1@0+ (1,0) [0|0] "" Vector__XXX
SG_ B_LOUT : 10|1@0+ (1,0) [0|0] "" Vector__XXX
SG_ B_OILPL : 9|2@0+ (1,0) [0|0] "" Vector__XXX
SG_ B_TMP : 23|8@0+ (0.5,0) [0|0] "Ž" Vector__XXX
SG_ B_TMP : 23|8@0+ (0.5,0) [0|0] "" Vector__XXX
SG_ OGENETCS : 30|1@0+ (1,0) [0|0] "" Vector__XXX
SG_ B_DPFW : 28|3@0+ (1,0) [0|0] "" Vector__XXX
SG_ BOSLAMP : 37|3@0+ (1,0) [0|0] "" Vector__XXX
@@ -1082,8 +1082,8 @@ BO_ 921 ENG1S95: 8 CGW
SG_ B_SPU2 : 4|1@0+ (1,0) [0|0] "" Vector__XXX
SG_ ACASID1 : 3|4@0+ (1,0) [0|0] "" Vector__XXX
SG_ ACASID2 : 15|8@0+ (1,0) [0|0] "" Vector__XXX
SG_ B_LSP2 : 31|8@0+ (1,0) [0|0] "km/hEmph" Vector__XXX
SG_ B_ASLSP2 : 39|8@0+ (1,0) [0|0] "km/hEmph" Vector__XXX
SG_ B_LSP2 : 31|8@0+ (1,0) [0|0] "km/h Emph" Vector__XXX
SG_ B_ASLSP2 : 39|8@0+ (1,0) [0|0] "km/h Emph" Vector__XXX
SG_ CACCTRN : 47|1@0+ (1,0) [0|0] "" Vector__XXX
SG_ CACCINF : 46|1@0+ (1,0) [0|0] "" Vector__XXX
SG_ CACCFR2 : 45|1@0+ (1,0) [0|0] "" Vector__XXX
@@ -1096,7 +1096,7 @@ BO_ 921 ENG1S95: 8 CGW
BO_ 238 ENG2F01: 4 CGW
SG_ STOFOK : 7|1@0+ (1,0) [0|0] "" Vector__XXX
SG_ GROWIND : 6|1@0+ (1,0) [0|0] "" Vector__XXX
SG_ B_TMP3 : 15|8@0+ (0.5,0) [0|0] "Ž" Vector__XXX
SG_ B_TMP3 : 15|8@0+ (0.5,0) [0|0] "" Vector__XXX
SG_ IMMINJST : 23|16@0+ (1,0) [0|0] "" Vector__XXX
BO_ 466 ENG2F04: 8 CGW
@@ -1113,7 +1113,7 @@ BO_ 466 ENG2F04: 8 CGW
SG_ PLOCKF : 8|1@0+ (1,0) [0|0] "" Vector__XXX
SG_ ACCREQ : 23|16@0- (0.0009765625,0) [0|0] "m/s^2" DS1
SG_ ACCAVL : 39|16@0- (2,0) [0|0] "N" Vector__XXX
SG_ SPDSTAT : 55|4@0+ (1,0) [0|0] "|" DS1
SG_ SPDSTAT : 55|4@0+ (1,0) [0|0] "" DS1
SG_ SSTOK : 51|1@0+ (1,0) [0|0] "" Vector__XXX
SG_ CANREQ : 49|1@0+ (1,0) [0|0] "" Vector__XXX
SG_ FCACT : 48|1@0+ (1,0) [0|0] "" Vector__XXX
@@ -1280,7 +1280,7 @@ BO_ 1076102682 MET1S05_24: 8 CGW
SG_ MET05_IF : 15|8@0+ (1,0) [0|0] "" Vector__XXX
SG_ TO_SP : 23|16@0+ (0.1,0) [0|0] "km/h,MPH" Vector__XXX
SG_ UNIT_5 : 39|2@0+ (1,0) [0|0] "" Vector__XXX
SG_ TO_FC : 47|16@0+ (0.1,0) [0|0] "MPGEkm/lEl/100kmEkm/gallon" Vector__XXX
SG_ TO_FC : 47|16@0+ (0.1,0) [0|0] "MPG Ekm/l El/100km Ekm/gallon" Vector__XXX
SG_ UNIT_6 : 63|3@0+ (1,0) [0|0] "" Vector__XXX
BO_ 1076299282 MET1S08_27: 8 CGW
@@ -1635,4 +1635,4 @@ BO_ 1073743494 YGW1S05_0: 8 CGW
SG_ YGW05_IF : 15|8@0+ (1,0) [0|0] "" Vector__XXX
SG_ YI_IMO_E : 23|1@0+ (1,0) [0|0] "" Vector__XXX
SG_ YI_UREQ : 16|1@0+ (1,0) [0|0] "" Vector__XXX
SG_ YI_RE : 47|16@0+ (1,0) [0|0] "" Vector__XXX
SG_ YI_RE : 47|16@0+ (1,0) [0|0] "" Vector__XXX

View File

@@ -70,8 +70,8 @@ BS_:
BU_: XXX DSU HCU EPS IPAS CGW
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_ ACCEL_Y : 33|10@0+ (0.03589,-18.375) [0|65535] "m/s^2" XXX
SG_ YAW_RATE : 1|10@0+ (0.244,-125) [0|65535] "deg/sec" XXX
SG_ STEERING_TORQUE : 17|10@0+ (1,-512) [0|65535] "" XXX
BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
@@ -91,8 +91,8 @@ BO_ 170 WHEEL_SPEEDS: 8 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
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
BO_ 353 DSU_SPEED: 8 XXX
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX
@@ -184,6 +184,7 @@ BO_ 921 PCM_CRUISE_SM: 8 XXX
BO_ 951 ESP_CONTROL: 8 ESP
SG_ TC_DISABLED : 13|1@0+ (1,0) [0|1] "" XXX
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
BO_ 1041 ACC_HUD: 8 DSU
@@ -208,6 +209,17 @@ BO_ 1042 LKAS_HUD: 8 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_ 1043 TIME : 8 CGW
SG_ YEAR : 7|8@0+ (1,0) [0|0] "year" XXX
SG_ MONTH : 15|8@0+ (1,0) [0|0] "month" XXX
SG_ DAY : 23|8@0+ (1,0) [0|0] "day" XXX
SG_ HOUR : 31|8@0+ (1,0) [0|0] "hour" XXX
SG_ MINUTE : 39|8@0+ (1,0) [0|0] "minute" XXX
SG_ GMT_DIFF : 55|1@0+ (1,0) [0|0] "" XXX
SG_ GMTDIFF_HOURS : 54|4@0+ (1,0) [0|0] "hours" XXX
SG_ GMTDIFF_MINUTES : 50|6@0+ (1,0) [0|0] "minutes" XXX
SG_ SUMMER : 60|1@0+ (1,0) [0|0] "" XXX
BO_ 1408 VIN_PART_1: 8 CGW
SG_ VIN_1 : 7|8@0+ (1,0) [0|0] "" XXX
SG_ VIN_2 : 15|8@0+ (1,0) [0|0] "" XXX

View File

@@ -70,8 +70,8 @@ BS_:
BU_: XXX DSU HCU EPS IPAS CGW
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_ ACCEL_Y : 33|10@0+ (0.03589,-18.375) [0|65535] "m/s^2" XXX
SG_ YAW_RATE : 1|10@0+ (0.244,-125) [0|65535] "deg/sec" XXX
SG_ STEERING_TORQUE : 17|10@0+ (1,-512) [0|65535] "" XXX
BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
@@ -91,8 +91,8 @@ BO_ 170 WHEEL_SPEEDS: 8 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
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
BO_ 353 DSU_SPEED: 8 XXX
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX
@@ -184,6 +184,7 @@ BO_ 921 PCM_CRUISE_SM: 8 XXX
BO_ 951 ESP_CONTROL: 8 ESP
SG_ TC_DISABLED : 13|1@0+ (1,0) [0|1] "" XXX
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
BO_ 1041 ACC_HUD: 8 DSU
@@ -208,6 +209,17 @@ BO_ 1042 LKAS_HUD: 8 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_ 1043 TIME : 8 CGW
SG_ YEAR : 7|8@0+ (1,0) [0|0] "year" XXX
SG_ MONTH : 15|8@0+ (1,0) [0|0] "month" XXX
SG_ DAY : 23|8@0+ (1,0) [0|0] "day" XXX
SG_ HOUR : 31|8@0+ (1,0) [0|0] "hour" XXX
SG_ MINUTE : 39|8@0+ (1,0) [0|0] "minute" XXX
SG_ GMT_DIFF : 55|1@0+ (1,0) [0|0] "" XXX
SG_ GMTDIFF_HOURS : 54|4@0+ (1,0) [0|0] "hours" XXX
SG_ GMTDIFF_MINUTES : 50|6@0+ (1,0) [0|0] "minutes" XXX
SG_ SUMMER : 60|1@0+ (1,0) [0|0] "" XXX
BO_ 1408 VIN_PART_1: 8 CGW
SG_ VIN_1 : 7|8@0+ (1,0) [0|0] "" XXX
SG_ VIN_2 : 15|8@0+ (1,0) [0|0] "" XXX
@@ -367,7 +379,7 @@ BO_ 608 STEER_TORQUE_SENSOR: 8 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
SG_ STEER_ANGLE : 31|16@0- (0.05527,0) [-500|500] "" XXX
SG_ STEER_ANGLE : 31|16@0- (0.0573,0) [-500|500] "" XXX
BO_ 610 EPS_STATUS: 8 EPS
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX

View File

@@ -70,8 +70,8 @@ BS_:
BU_: XXX DSU HCU EPS IPAS CGW
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_ ACCEL_Y : 33|10@0+ (0.03589,-18.375) [0|65535] "m/s^2" XXX
SG_ YAW_RATE : 1|10@0+ (0.244,-125) [0|65535] "deg/sec" XXX
SG_ STEERING_TORQUE : 17|10@0+ (1,-512) [0|65535] "" XXX
BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
@@ -91,8 +91,8 @@ BO_ 170 WHEEL_SPEEDS: 8 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
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
BO_ 353 DSU_SPEED: 8 XXX
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX
@@ -184,6 +184,7 @@ BO_ 921 PCM_CRUISE_SM: 8 XXX
BO_ 951 ESP_CONTROL: 8 ESP
SG_ TC_DISABLED : 13|1@0+ (1,0) [0|1] "" XXX
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
BO_ 1041 ACC_HUD: 8 DSU
@@ -208,6 +209,17 @@ BO_ 1042 LKAS_HUD: 8 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_ 1043 TIME : 8 CGW
SG_ YEAR : 7|8@0+ (1,0) [0|0] "year" XXX
SG_ MONTH : 15|8@0+ (1,0) [0|0] "month" XXX
SG_ DAY : 23|8@0+ (1,0) [0|0] "day" XXX
SG_ HOUR : 31|8@0+ (1,0) [0|0] "hour" XXX
SG_ MINUTE : 39|8@0+ (1,0) [0|0] "minute" XXX
SG_ GMT_DIFF : 55|1@0+ (1,0) [0|0] "" XXX
SG_ GMTDIFF_HOURS : 54|4@0+ (1,0) [0|0] "hours" XXX
SG_ GMTDIFF_MINUTES : 50|6@0+ (1,0) [0|0] "minutes" XXX
SG_ SUMMER : 60|1@0+ (1,0) [0|0] "" XXX
BO_ 1408 VIN_PART_1: 8 CGW
SG_ VIN_1 : 7|8@0+ (1,0) [0|0] "" XXX
SG_ VIN_2 : 15|8@0+ (1,0) [0|0] "" XXX

View File

@@ -70,8 +70,8 @@ BS_:
BU_: XXX DSU HCU EPS IPAS CGW
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_ ACCEL_Y : 33|10@0+ (0.03589,-18.375) [0|65535] "m/s^2" XXX
SG_ YAW_RATE : 1|10@0+ (0.244,-125) [0|65535] "deg/sec" XXX
SG_ STEERING_TORQUE : 17|10@0+ (1,-512) [0|65535] "" XXX
BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
@@ -91,8 +91,8 @@ BO_ 170 WHEEL_SPEEDS: 8 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
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
BO_ 353 DSU_SPEED: 8 XXX
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX
@@ -184,6 +184,7 @@ BO_ 921 PCM_CRUISE_SM: 8 XXX
BO_ 951 ESP_CONTROL: 8 ESP
SG_ TC_DISABLED : 13|1@0+ (1,0) [0|1] "" XXX
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
BO_ 1041 ACC_HUD: 8 DSU
@@ -208,6 +209,17 @@ BO_ 1042 LKAS_HUD: 8 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_ 1043 TIME : 8 CGW
SG_ YEAR : 7|8@0+ (1,0) [0|0] "year" XXX
SG_ MONTH : 15|8@0+ (1,0) [0|0] "month" XXX
SG_ DAY : 23|8@0+ (1,0) [0|0] "day" XXX
SG_ HOUR : 31|8@0+ (1,0) [0|0] "hour" XXX
SG_ MINUTE : 39|8@0+ (1,0) [0|0] "minute" XXX
SG_ GMT_DIFF : 55|1@0+ (1,0) [0|0] "" XXX
SG_ GMTDIFF_HOURS : 54|4@0+ (1,0) [0|0] "hours" XXX
SG_ GMTDIFF_MINUTES : 50|6@0+ (1,0) [0|0] "minutes" XXX
SG_ SUMMER : 60|1@0+ (1,0) [0|0] "" XXX
BO_ 1408 VIN_PART_1: 8 CGW
SG_ VIN_1 : 7|8@0+ (1,0) [0|0] "" XXX
SG_ VIN_2 : 15|8@0+ (1,0) [0|0] "" XXX

View File

@@ -70,8 +70,8 @@ BS_:
BU_: XXX DSU HCU EPS IPAS CGW
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_ ACCEL_Y : 33|10@0+ (0.03589,-18.375) [0|65535] "m/s^2" XXX
SG_ YAW_RATE : 1|10@0+ (0.244,-125) [0|65535] "deg/sec" XXX
SG_ STEERING_TORQUE : 17|10@0+ (1,-512) [0|65535] "" XXX
BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
@@ -91,8 +91,8 @@ BO_ 170 WHEEL_SPEEDS: 8 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
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
BO_ 353 DSU_SPEED: 8 XXX
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX
@@ -184,6 +184,7 @@ BO_ 921 PCM_CRUISE_SM: 8 XXX
BO_ 951 ESP_CONTROL: 8 ESP
SG_ TC_DISABLED : 13|1@0+ (1,0) [0|1] "" XXX
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
BO_ 1041 ACC_HUD: 8 DSU
@@ -208,6 +209,17 @@ BO_ 1042 LKAS_HUD: 8 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_ 1043 TIME : 8 CGW
SG_ YEAR : 7|8@0+ (1,0) [0|0] "year" XXX
SG_ MONTH : 15|8@0+ (1,0) [0|0] "month" XXX
SG_ DAY : 23|8@0+ (1,0) [0|0] "day" XXX
SG_ HOUR : 31|8@0+ (1,0) [0|0] "hour" XXX
SG_ MINUTE : 39|8@0+ (1,0) [0|0] "minute" XXX
SG_ GMT_DIFF : 55|1@0+ (1,0) [0|0] "" XXX
SG_ GMTDIFF_HOURS : 54|4@0+ (1,0) [0|0] "hours" XXX
SG_ GMTDIFF_MINUTES : 50|6@0+ (1,0) [0|0] "minutes" XXX
SG_ SUMMER : 60|1@0+ (1,0) [0|0] "" XXX
BO_ 1408 VIN_PART_1: 8 CGW
SG_ VIN_1 : 7|8@0+ (1,0) [0|0] "" XXX
SG_ VIN_2 : 15|8@0+ (1,0) [0|0] "" XXX

View File

@@ -70,8 +70,8 @@ BS_:
BU_: XXX DSU HCU EPS IPAS CGW
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_ ACCEL_Y : 33|10@0+ (0.03589,-18.375) [0|65535] "m/s^2" XXX
SG_ YAW_RATE : 1|10@0+ (0.244,-125) [0|65535] "deg/sec" XXX
SG_ STEERING_TORQUE : 17|10@0+ (1,-512) [0|65535] "" XXX
BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
@@ -91,8 +91,8 @@ BO_ 170 WHEEL_SPEEDS: 8 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
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
BO_ 353 DSU_SPEED: 8 XXX
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX
@@ -184,6 +184,7 @@ BO_ 921 PCM_CRUISE_SM: 8 XXX
BO_ 951 ESP_CONTROL: 8 ESP
SG_ TC_DISABLED : 13|1@0+ (1,0) [0|1] "" XXX
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
BO_ 1041 ACC_HUD: 8 DSU
@@ -208,6 +209,17 @@ BO_ 1042 LKAS_HUD: 8 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_ 1043 TIME : 8 CGW
SG_ YEAR : 7|8@0+ (1,0) [0|0] "year" XXX
SG_ MONTH : 15|8@0+ (1,0) [0|0] "month" XXX
SG_ DAY : 23|8@0+ (1,0) [0|0] "day" XXX
SG_ HOUR : 31|8@0+ (1,0) [0|0] "hour" XXX
SG_ MINUTE : 39|8@0+ (1,0) [0|0] "minute" XXX
SG_ GMT_DIFF : 55|1@0+ (1,0) [0|0] "" XXX
SG_ GMTDIFF_HOURS : 54|4@0+ (1,0) [0|0] "hours" XXX
SG_ GMTDIFF_MINUTES : 50|6@0+ (1,0) [0|0] "minutes" XXX
SG_ SUMMER : 60|1@0+ (1,0) [0|0] "" XXX
BO_ 1408 VIN_PART_1: 8 CGW
SG_ VIN_1 : 7|8@0+ (1,0) [0|0] "" XXX
SG_ VIN_2 : 15|8@0+ (1,0) [0|0] "" XXX
@@ -367,7 +379,7 @@ BO_ 608 STEER_TORQUE_SENSOR: 8 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
SG_ STEER_ANGLE : 31|16@0- (0.056,0) [-500|500] "" XXX
SG_ STEER_ANGLE : 31|16@0- (0.0573,0) [-500|500] "" XXX
BO_ 610 EPS_STATUS: 8 EPS
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX

View File

@@ -70,8 +70,8 @@ BS_:
BU_: XXX DSU HCU EPS IPAS CGW
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_ ACCEL_Y : 33|10@0+ (0.03589,-18.375) [0|65535] "m/s^2" XXX
SG_ YAW_RATE : 1|10@0+ (0.244,-125) [0|65535] "deg/sec" XXX
SG_ STEERING_TORQUE : 17|10@0+ (1,-512) [0|65535] "" XXX
BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
@@ -91,8 +91,8 @@ BO_ 170 WHEEL_SPEEDS: 8 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
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
BO_ 353 DSU_SPEED: 8 XXX
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX
@@ -184,6 +184,7 @@ BO_ 921 PCM_CRUISE_SM: 8 XXX
BO_ 951 ESP_CONTROL: 8 ESP
SG_ TC_DISABLED : 13|1@0+ (1,0) [0|1] "" XXX
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
BO_ 1041 ACC_HUD: 8 DSU
@@ -208,6 +209,17 @@ BO_ 1042 LKAS_HUD: 8 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_ 1043 TIME : 8 CGW
SG_ YEAR : 7|8@0+ (1,0) [0|0] "year" XXX
SG_ MONTH : 15|8@0+ (1,0) [0|0] "month" XXX
SG_ DAY : 23|8@0+ (1,0) [0|0] "day" XXX
SG_ HOUR : 31|8@0+ (1,0) [0|0] "hour" XXX
SG_ MINUTE : 39|8@0+ (1,0) [0|0] "minute" XXX
SG_ GMT_DIFF : 55|1@0+ (1,0) [0|0] "" XXX
SG_ GMTDIFF_HOURS : 54|4@0+ (1,0) [0|0] "hours" XXX
SG_ GMTDIFF_MINUTES : 50|6@0+ (1,0) [0|0] "minutes" XXX
SG_ SUMMER : 60|1@0+ (1,0) [0|0] "" XXX
BO_ 1408 VIN_PART_1: 8 CGW
SG_ VIN_1 : 7|8@0+ (1,0) [0|0] "" XXX
SG_ VIN_2 : 15|8@0+ (1,0) [0|0] "" XXX
@@ -355,7 +367,7 @@ BO_ 401 STEERING_LTA: 8 XXX
SG_ PERCENTAGE : 39|8@0+ (1,0) [0|255] "" XXX
SG_ SETME_X64 : 47|8@0+ (1,0) [0|255] "" XXX
SG_ ANGLE : 55|8@0- (0.5,0) [0|255] "" XXX
SG_ STEER_ANGLE_CMD : 15|16@0- (0.056,0) [-540|540] "" XXX
SG_ STEER_ANGLE_CMD : 15|16@0- (0.0573,0) [-540|540] "" XXX
SG_ STEER_REQUEST : 25|1@0+ (1,0) [0|1] "" XXX
SG_ BIT : 30|1@0+ (1,0) [0|1] "" XXX
@@ -373,7 +385,7 @@ BO_ 608 STEER_TORQUE_SENSOR: 8 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
SG_ STEER_ANGLE : 31|16@0- (0.056,0) [-500|500] "" XXX
SG_ STEER_ANGLE : 31|16@0- (0.0573,0) [-500|500] "" XXX
BO_ 610 EPS_STATUS: 8 EPS
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX

View File

@@ -70,8 +70,8 @@ BS_:
BU_: XXX DSU HCU EPS IPAS CGW
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_ ACCEL_Y : 33|10@0+ (0.03589,-18.375) [0|65535] "m/s^2" XXX
SG_ YAW_RATE : 1|10@0+ (0.244,-125) [0|65535] "deg/sec" XXX
SG_ STEERING_TORQUE : 17|10@0+ (1,-512) [0|65535] "" XXX
BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
@@ -91,8 +91,8 @@ BO_ 170 WHEEL_SPEEDS: 8 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
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
BO_ 353 DSU_SPEED: 8 XXX
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX
@@ -184,6 +184,7 @@ BO_ 921 PCM_CRUISE_SM: 8 XXX
BO_ 951 ESP_CONTROL: 8 ESP
SG_ TC_DISABLED : 13|1@0+ (1,0) [0|1] "" XXX
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
BO_ 1041 ACC_HUD: 8 DSU
@@ -208,6 +209,17 @@ BO_ 1042 LKAS_HUD: 8 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_ 1043 TIME : 8 CGW
SG_ YEAR : 7|8@0+ (1,0) [0|0] "year" XXX
SG_ MONTH : 15|8@0+ (1,0) [0|0] "month" XXX
SG_ DAY : 23|8@0+ (1,0) [0|0] "day" XXX
SG_ HOUR : 31|8@0+ (1,0) [0|0] "hour" XXX
SG_ MINUTE : 39|8@0+ (1,0) [0|0] "minute" XXX
SG_ GMT_DIFF : 55|1@0+ (1,0) [0|0] "" XXX
SG_ GMTDIFF_HOURS : 54|4@0+ (1,0) [0|0] "hours" XXX
SG_ GMTDIFF_MINUTES : 50|6@0+ (1,0) [0|0] "minutes" XXX
SG_ SUMMER : 60|1@0+ (1,0) [0|0] "" XXX
BO_ 1408 VIN_PART_1: 8 CGW
SG_ VIN_1 : 7|8@0+ (1,0) [0|0] "" XXX
SG_ VIN_2 : 15|8@0+ (1,0) [0|0] "" XXX
@@ -367,6 +379,7 @@ BO_ 608 STEER_TORQUE_SENSOR: 8 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
SG_ STEER_ANGLE : 31|16@0- (0.0573,0) [-500|500] "" XXX
BO_ 610 EPS_STATUS: 8 EPS
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX

View File

@@ -70,8 +70,8 @@ BS_:
BU_: XXX DSU HCU EPS IPAS CGW
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_ ACCEL_Y : 33|10@0+ (0.03589,-18.375) [0|65535] "m/s^2" XXX
SG_ YAW_RATE : 1|10@0+ (0.244,-125) [0|65535] "deg/sec" XXX
SG_ STEERING_TORQUE : 17|10@0+ (1,-512) [0|65535] "" XXX
BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
@@ -91,8 +91,8 @@ BO_ 170 WHEEL_SPEEDS: 8 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
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
BO_ 353 DSU_SPEED: 8 XXX
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX
@@ -184,6 +184,7 @@ BO_ 921 PCM_CRUISE_SM: 8 XXX
BO_ 951 ESP_CONTROL: 8 ESP
SG_ TC_DISABLED : 13|1@0+ (1,0) [0|1] "" XXX
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
BO_ 1041 ACC_HUD: 8 DSU
@@ -208,6 +209,17 @@ BO_ 1042 LKAS_HUD: 8 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_ 1043 TIME : 8 CGW
SG_ YEAR : 7|8@0+ (1,0) [0|0] "year" XXX
SG_ MONTH : 15|8@0+ (1,0) [0|0] "month" XXX
SG_ DAY : 23|8@0+ (1,0) [0|0] "day" XXX
SG_ HOUR : 31|8@0+ (1,0) [0|0] "hour" XXX
SG_ MINUTE : 39|8@0+ (1,0) [0|0] "minute" XXX
SG_ GMT_DIFF : 55|1@0+ (1,0) [0|0] "" XXX
SG_ GMTDIFF_HOURS : 54|4@0+ (1,0) [0|0] "hours" XXX
SG_ GMTDIFF_MINUTES : 50|6@0+ (1,0) [0|0] "minutes" XXX
SG_ SUMMER : 60|1@0+ (1,0) [0|0] "" XXX
BO_ 1408 VIN_PART_1: 8 CGW
SG_ VIN_1 : 7|8@0+ (1,0) [0|0] "" XXX
SG_ VIN_2 : 15|8@0+ (1,0) [0|0] "" XXX

View File

@@ -70,8 +70,8 @@ BS_:
BU_: XXX DSU HCU EPS IPAS CGW
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_ ACCEL_Y : 33|10@0+ (0.03589,-18.375) [0|65535] "m/s^2" XXX
SG_ YAW_RATE : 1|10@0+ (0.244,-125) [0|65535] "deg/sec" XXX
SG_ STEERING_TORQUE : 17|10@0+ (1,-512) [0|65535] "" XXX
BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
@@ -91,8 +91,8 @@ BO_ 170 WHEEL_SPEEDS: 8 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
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
BO_ 353 DSU_SPEED: 8 XXX
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX
@@ -184,6 +184,7 @@ BO_ 921 PCM_CRUISE_SM: 8 XXX
BO_ 951 ESP_CONTROL: 8 ESP
SG_ TC_DISABLED : 13|1@0+ (1,0) [0|1] "" XXX
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
BO_ 1041 ACC_HUD: 8 DSU
@@ -208,6 +209,17 @@ BO_ 1042 LKAS_HUD: 8 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_ 1043 TIME : 8 CGW
SG_ YEAR : 7|8@0+ (1,0) [0|0] "year" XXX
SG_ MONTH : 15|8@0+ (1,0) [0|0] "month" XXX
SG_ DAY : 23|8@0+ (1,0) [0|0] "day" XXX
SG_ HOUR : 31|8@0+ (1,0) [0|0] "hour" XXX
SG_ MINUTE : 39|8@0+ (1,0) [0|0] "minute" XXX
SG_ GMT_DIFF : 55|1@0+ (1,0) [0|0] "" XXX
SG_ GMTDIFF_HOURS : 54|4@0+ (1,0) [0|0] "hours" XXX
SG_ GMTDIFF_MINUTES : 50|6@0+ (1,0) [0|0] "minutes" XXX
SG_ SUMMER : 60|1@0+ (1,0) [0|0] "" XXX
BO_ 1408 VIN_PART_1: 8 CGW
SG_ VIN_1 : 7|8@0+ (1,0) [0|0] "" XXX
SG_ VIN_2 : 15|8@0+ (1,0) [0|0] "" XXX

View File

@@ -70,8 +70,8 @@ BS_:
BU_: XXX DSU HCU EPS IPAS CGW
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_ ACCEL_Y : 33|10@0+ (0.03589,-18.375) [0|65535] "m/s^2" XXX
SG_ YAW_RATE : 1|10@0+ (0.244,-125) [0|65535] "deg/sec" XXX
SG_ STEERING_TORQUE : 17|10@0+ (1,-512) [0|65535] "" XXX
BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
@@ -91,8 +91,8 @@ BO_ 170 WHEEL_SPEEDS: 8 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
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
BO_ 353 DSU_SPEED: 8 XXX
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX
@@ -184,6 +184,7 @@ BO_ 921 PCM_CRUISE_SM: 8 XXX
BO_ 951 ESP_CONTROL: 8 ESP
SG_ TC_DISABLED : 13|1@0+ (1,0) [0|1] "" XXX
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
BO_ 1041 ACC_HUD: 8 DSU
@@ -208,6 +209,17 @@ BO_ 1042 LKAS_HUD: 8 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_ 1043 TIME : 8 CGW
SG_ YEAR : 7|8@0+ (1,0) [0|0] "year" XXX
SG_ MONTH : 15|8@0+ (1,0) [0|0] "month" XXX
SG_ DAY : 23|8@0+ (1,0) [0|0] "day" XXX
SG_ HOUR : 31|8@0+ (1,0) [0|0] "hour" XXX
SG_ MINUTE : 39|8@0+ (1,0) [0|0] "minute" XXX
SG_ GMT_DIFF : 55|1@0+ (1,0) [0|0] "" XXX
SG_ GMTDIFF_HOURS : 54|4@0+ (1,0) [0|0] "hours" XXX
SG_ GMTDIFF_MINUTES : 50|6@0+ (1,0) [0|0] "minutes" XXX
SG_ SUMMER : 60|1@0+ (1,0) [0|0] "" XXX
BO_ 1408 VIN_PART_1: 8 CGW
SG_ VIN_1 : 7|8@0+ (1,0) [0|0] "" XXX
SG_ VIN_2 : 15|8@0+ (1,0) [0|0] "" XXX

View File

@@ -1,7 +1,7 @@
VERSION ""
NS_ :
NS_ :
NS_DESC_
CM_
BA_DEF_
@@ -187,10 +187,10 @@ BO_ 1298 PSG_2: 8 XXX
SG_ RAM_Inhalt_1 : 0|16@1+ (1,0) [0|0] "" XXX
BO_ 274 PSG_1: 8 XXX
SG_ Pumpentemperatur__2_1_ : 48|16@1+ (0.0625,0) [0|4096] "°K" XXX
SG_ Pumpentemperatur__2_1_ : 48|16@1+ (0.0625,0) [0|4096] "K" XXX
SG_ Pumpentemperatur__3_2_2_ : 44|12@1+ (1,0) [0|0] "" XXX
SG_ Zylinderzaehler__3_2_2_ : 43|3@1+ (1,0) [1|8] "Zähler" XXX
SG_ Ansteuerdauer__3_2_2_ : 32|11@1+ (0.0469,0) [0|96] "°NW" XXX
SG_ Zylinderzaehler__3_2_2_ : 43|3@1+ (1,0) [1|8] "Zaehler" XXX
SG_ Ansteuerdauer__3_2_2_ : 32|11@1+ (0.0469,0) [0|96] "NW" XXX
SG_ Nockenwellendrehzahl__3_2_2_ : 20|12@1+ (4,0) [0|16380] "upm" XXX
SG_ Pumpen_Statuswort__3_2_2_ : 0|20@1+ (1,0) [0|0] "" XXX
@@ -233,7 +233,7 @@ BO_ 1424 Niveau_1: 6 XXX
SG_ ESP_Beeinflussung : 14|1@1+ (1,0) [0|0] "" XXX
SG_ Warnlampe_Niveau_1 : 13|1@1+ (1,0) [0|0] "" XXX
SG_ Frei_Niveau_1_1 : 12|1@1+ (1,0) [0|0] "" XXX
SG_ Zaehler_Niveau_1 : 8|4@1+ (1,0) [0|15] "Zähler" XXX
SG_ Zaehler_Niveau_1 : 8|4@1+ (1,0) [0|15] "Zaehler" XXX
SG_ Checksumme_Niveau_1 : 0|8@1+ (1,0) [0|0] "" XXX
BO_ 1328 Navigation_1: 7 XXX
@@ -248,11 +248,11 @@ BO_ 1328 Navigation_1: 7 XXX
SG_ Laenderkennung : 16|8@1+ (1,0) [0|0] "" XXX
SG_ Vorzeichen_Gierrate______ : 15|1@1+ (1,0) [0|0] "" XXX
SG_ Gierratenfehler : 14|1@1+ (1,0) [0|0] "" XXX
SG_ Gierrate : 0|14@1+ (0.01,0) [0|100] "°/sek" XXX
SG_ Gierrate : 0|14@1+ (0.01,0) [0|100] "deg/sek" XXX
BO_ 1792 MSG_3: 3 XXX
SG_ MSG_Konfiguration : 16|8@1+ (1,0) [0|0] "" XXX
SG_ Lage_des_OT_Impuls : 0|16@1+ (0.01172,-384) [-384|384] "°KW" XXX
SG_ Lage_des_OT_Impuls : 0|16@1+ (0.01172,-384) [-384|384] "KW" XXX
BO_ 1280 MSG_2: 8 XXX
SG_ RAM_Adresse_4 : 48|16@1+ (1,0) [0|0] "" XXX
@@ -262,8 +262,8 @@ BO_ 1280 MSG_2: 8 XXX
BO_ 256 MSG_1: 8 XXX
SG_ Kurbelwellendrehzahl__3_2_2_ : 56|8@1+ (1,0) [0|0] "" XXX
SG_ Soll_Foerderbeginn_KW__3_2_2_ : 40|16@1+ (0.01172,-384) [-384|384] "°KW" XXX
SG_ Soll_Foerderbeginn_NW__3_2_2_ : 28|12@1+ (0.01172,0) [0|768] "°NW" XXX
SG_ Soll_Foerderbeginn_KW__3_2_2_ : 40|16@1+ (0.01172,-384) [-384|384] "KW" XXX
SG_ Soll_Foerderbeginn_NW__3_2_2_ : 28|12@1+ (0.01172,0) [0|768] "degNW" XXX
SG_ Soll_Voreinspritzung : 16|12@1+ (1,0) [0|0] "" XXX
SG_ Soll_Einspritzmenge : 0|16@1+ (0.03125,0) [0|2047] "mg/H" XXX
@@ -273,7 +273,7 @@ BO_ 1796 Motor_NOX: 8 XXX
SG_ Heizleistungsanforderung : 18|1@1+ (1,0) [0|0] "" XXX
SG_ Offsetkorrektur_moeglich : 17|1@1+ (1,0) [0|0] "" XXX
SG_ Betriebsbereich : 16|1@1+ (1,0) [0|0] "" XXX
SG_ Abgastemperatur_NOX : 8|8@1+ (5,-40) [-40|1230] "°C" XXX
SG_ Abgastemperatur_NOX : 8|8@1+ (5,-40) [-40|1230] "C" XXX
SG_ Abgasdruck_NOX : 0|8@1+ (5,600) [600|1870] "mbar" XXX
BO_ 900 Motor_Momente: 8 XXX
@@ -361,7 +361,7 @@ BO_ 896 Motor_3: 8 XXX
SG_ Vorzeichen_Rad_Wunschmoment : 36|1@1+ (1,0) [0|0] "" XXX
SG_ Rad_Wunschmoment : 24|12@1+ (0.39,0) [0|1597] "MDI" XXX
SG_ Fahrpedal_Rohsignal : 16|8@1+ (0.4,0) [0|101.6] "%" XXX
SG_ Ansauglufttemperatur : 8|8@1+ (0.75,-48) [-48|142.5] "°" XXX
SG_ Ansauglufttemperatur : 8|8@1+ (0.75,-48) [-48|142.5] "" XXX
SG_ Fehlerstatus_Ansauglufttemperat : 7|1@1+ (1,0) [0|0] "" XXX
SG_ Motorsteuerger_t_gesperrt : 6|1@1+ (1,0) [0|0] "" XXX
SG_ Drosselklappenwinkel_ungenau : 5|1@1+ (1,0) [0|0] "" XXX
@@ -384,7 +384,7 @@ BO_ 648 Motor_2: 8 XXX
SG_ Fehlerstatus_Kuhlmitteltempera : 18|1@1+ (1,0) [0|0] "" XXX
SG_ Bremstestschalter : 17|1@1+ (1,0) [0|0] "" XXX
SG_ Bremslichtschalter : 16|1@1+ (1,0) [0|0] "" XXX
SG_ Kuehlmitteltemperatur__Motor_2_ : 8|8@1+ (0.75,-48) [-48|142.5] "°" XXX
SG_ Kuehlmitteltemperatur__Motor_2_ : 8|8@1+ (0.75,-48) [-48|142.5] "" XXX
SG_ Multiplex_Code_Motor_2 M : 6|2@1+ (1,0) [0|0] "" XXX
SG_ Multiplex_Info_Motorcode__4_x_ m1 : 0|6@1+ (1,0) [0|0] "" XXX
SG_ Multiplex_Info_Getriebecode m2 : 0|6@1+ (1,0) [0|0] "" XXX
@@ -409,7 +409,7 @@ BO_ 640 Motor_1: 8 XXX
BO_ 262 Master_3: 8 XXX
SG_ Frei_Master_3_1 : 56|8@1+ (1,0) [0|0] "" XXX
SG_ Motortemperatur_linearisiert : 48|8@1+ (0.75,-48) [-48|143.25] "°" XXX
SG_ Motortemperatur_linearisiert : 48|8@1+ (0.75,-48) [-48|143.25] "" XXX
SG_ Indiziertes_Sollmoment_f_r_Vmax : 32|16@1+ (0.0015259,0) [0|100] "%" XXX
SG_ Relative_Momentenanforderung_de : 16|16@1+ (0.003052,0) [0|200] "%" XXX
SG_ Delta_Motormoment_aus_Verlustmo : 0|16@1+ (0.003052,-100) [-100|100] "%" XXX
@@ -448,7 +448,7 @@ BO_ 1986 Lenkwinkel_Init: 4 XXX
BO_ 192 Lenkwinkel_1__RB_: 2 XXX
SG_ Vorzeichen__RB_ : 15|1@1+ (1,0) [0|0] "" XXX
SG_ Lenkwinkel__RB_ : 5|10@1+ (2.5,-720) [-720|720] "°" XXX
SG_ Lenkwinkel__RB_ : 5|10@1+ (2.5,-720) [-720|720] "" XXX
SG_ LWS_OK__RB_ : 4|1@1+ (1,0) [0|0] "" XXX
SG_ LWS_Abgleich__RB_ : 3|1@1+ (1,0) [0|0] "" XXX
SG_ Frei_Lenkwinkel_1_1__RB_ : 2|1@1+ (1,0) [0|0] "" XXX
@@ -457,7 +457,7 @@ BO_ 192 Lenkwinkel_1__RB_: 2 XXX
BO_ 196 Lenkwinkel_1__ITT_: 2 XXX
SG_ Vorzeichen__ITT_ : 15|1@1+ (1,0) [0|0] "" XXX
SG_ Lenkwinkel__ITT_ : 5|10@1+ (1.5,-768) [-768|766.5] "°" XXX
SG_ Lenkwinkel__ITT_ : 5|10@1+ (1.5,-768) [-768|766.5] "" XXX
SG_ LWS_OK : 4|1@1+ (1,0) [0|0] "" XXX
SG_ LWS_Abgleich__ITT_ : 3|1@1+ (1,0) [0|0] "" XXX
SG_ LWS_Initialisierung__ITT_ : 2|1@1+ (1,0) [0|0] "" XXX
@@ -558,10 +558,10 @@ BO_ 1056 Kombi_2: 8 XXX
SG_ Klemme_58s__Kombi_2_ : 48|7@1+ (1,0) [0|100] "%" XXX
SG_ Fehlerstatus_Kl__58_d : 47|1@1+ (1,0) [0|0] "" XXX
SG_ Klemme_58d__Kombi_2_ : 40|7@1+ (1,0) [0|100] "%" XXX
SG_ Kuehlmitteltemp__4_1__Kombi_2_ : 32|8@1+ (0.75,-48) [-48|142.5] "°C" XXX
SG_ Oeltemperatur_4_1 : 24|8@1+ (1,-60) [-60|194] "°C" XXX
SG_ Aussentemp__ungefiltert_4_1__Ko : 16|8@1+ (0.5,-50) [-50|77] "°C" XXX
SG_ Aussentemperatur_gefiltert : 8|8@1+ (0.5,-50) [-50|77] "°C" XXX
SG_ Kuehlmitteltemp__4_1__Kombi_2_ : 32|8@1+ (0.75,-48) [-48|142.5] "C" XXX
SG_ Oeltemperatur_4_1 : 24|8@1+ (1,-60) [-60|194] "C" XXX
SG_ Aussentemp__ungefiltert_4_1__Ko : 16|8@1+ (0.5,-50) [-50|77] "C" XXX
SG_ Aussentemperatur_gefiltert : 8|8@1+ (0.5,-50) [-50|77] "C" XXX
SG_ Fehlerspeichereintrag__Kombi_ : 7|1@1+ (1,0) [0|0] "" XXX
SG_ Frei_Kombi_2_1 : 4|3@1+ (1,0) [0|0] "" XXX
SG_ Anhaenger_erkannt : 3|1@1+ (1,0) [0|0] "" XXX
@@ -596,7 +596,7 @@ BO_ 800 Kombi_1: 8 XXX
SG_ Fahrertuer_4_1 : 0|1@1+ (1,0) [0|0] "" XXX
BO_ 1504 Klima_1: 8 XXX
SG_ Aussentemp__ungef__Sto_f__4_1 : 56|8@1+ (0.5,-50) [-50|77] "°C" XXX
SG_ Aussentemp__ungef__Sto_f__4_1 : 56|8@1+ (0.5,-50) [-50|77] "C" XXX
SG_ Fehlerspeichereintrag__Klima_ : 55|1@1+ (1,0) [0|0] "" XXX
SG_ Frei_Klima_1_5 : 50|5@1+ (1,0) [0|0] "" XXX
SG_ AC_Schalter : 49|1@1+ (1,0) [0|0] "" XXX
@@ -605,7 +605,7 @@ BO_ 1504 Klima_1: 8 XXX
SG_ Geblaeselast_4_1 : 32|8@1+ (0.4,0) [0|101.6] "%" XXX
SG_ Kompressorlast : 24|8@1+ (0.25,0) [0|63.5] "Nm" XXX
SG_ Klimadrucksignal__Klima_1_ : 16|8@1+ (0.2,0) [0|50.8] "bar" XXX
SG_ Aussentemp__ungef__4_1__Klima_1 : 8|8@1+ (0.5,-50) [-50|77] "°C" XXX
SG_ Aussentemp__ungef__4_1__Klima_1 : 8|8@1+ (0.5,-50) [-50|77] "C" XXX
SG_ Kaeltemitteldruck_veraltet : 7|1@1+ (1,0) [0|0] "" XXX
SG_ Kompressormoment_veraltet_4_1 : 6|1@1+ (1,0) [0|0] "" XXX
SG_ Keine_Heizleistg_gewuenscht_4_1 : 5|1@1+ (1,0) [0|0] "" XXX
@@ -836,9 +836,9 @@ BO_ 1192 Bremse_5: 8 XXX
SG_ Checksumme_Bremse_5 : 56|8@1+ (1,0) [0|0] "" XXX
SG_ Zaehler_Bremse_5 : 52|4@1+ (1,0) [0|15] "" XXX
SG_ Bremslicht_ECD : 51|1@1+ (1,0) [0|0] "" XXX
SG_ Bremsentemperatur_vorn : 48|3@1+ (125,125) [125|1000] "°C" XXX
SG_ Bremsentemperatur_vorn : 48|3@1+ (125,125) [125|1000] "C" XXX
SG_ Frei_Bremse_5_5 : 40|8@1+ (1,0) [0|0] "" XXX
SG_ Offset_Gierrate : 32|8@1+ (0.05,-6.375) [-6.375|6.375] "°/s" XXX
SG_ Offset_Gierrate : 32|8@1+ (0.05,-6.375) [-6.375|6.375] "deg/s" XXX
SG_ Vorzeichen_Bremsdruck : 31|1@1+ (1,0) [0|0] "" XXX
SG_ Status_Bremsdruck_durch_ESP_Sys : 30|1@1+ (1,0) [0|0] "" XXX
SG_ Bremsdruck_ungueltig : 29|1@1+ (1,0) [0|0] "" XXX

View File

@@ -11,7 +11,7 @@ jobs:
- run:
name: Run safety test
command: |
docker run panda_safety /bin/bash -c "cd /panda/tests/safety; ./test.sh"
docker run panda_safety /bin/bash -c "cd /panda/tests/safety; PYTHONPATH=/ ./test.sh"
misra-c2012:
machine:

View File

@@ -17,11 +17,15 @@ RUN apt-get update && apt-get install -y \
gperf \
help2man \
iputils-ping \
libbz2-dev \
libexpat-dev \
libffi-dev \
libssl-dev \
libstdc++-arm-none-eabi-newlib \
libtool \
libtool-bin \
libusb-1.0-0 \
locales \
make \
ncurses-dev \
network-manager \
@@ -38,7 +42,21 @@ RUN apt-get update && apt-get install -y \
screen \
vim \
wget \
wireless-tools
wireless-tools \
zlib1g-dev
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
ENV PATH="/root/.pyenv/bin:/root/.pyenv/shims:${PATH}"
RUN pyenv install 3.7.3
RUN pyenv install 2.7.12
RUN pyenv global 3.7.3
RUN pyenv rehash
RUN pip install --upgrade pip==18.0
@@ -51,6 +69,7 @@ ENV HOME /home/batman
ENV PYTHONPATH /tmp:$PYTHONPATH
COPY ./boardesp/get_sdk_ci.sh /tmp/panda/boardesp/
COPY ./boardesp/python2_make.py /tmp/panda/boardesp/
RUN useradd --system -s /sbin/nologin pandauser
RUN mkdir -p /tmp/panda/boardesp/esp-open-sdk

13
panda/Jenkinsfile vendored
View File

@@ -46,19 +46,6 @@ pipeline {
}
}
}
stage('Test Dev Build (WIFI)') {
steps {
lock(resource: "Pandas", inversePrecedence: true, quantity: 1){
timeout(time: 60, unit: 'MINUTES') {
script {
sh "docker run --name ${env.DOCKER_NAME} --privileged --volume /dev/bus/usb:/dev/bus/usb --volume /var/run/dbus:/var/run/dbus --net host ${env.DOCKER_IMAGE_TAG} bash -c 'cd /tmp/panda; ./run_automated_tests.sh'"
sh "docker cp ${env.DOCKER_NAME}:/tmp/panda/nosetests.xml test_results_dev.xml"
sh "docker rm ${env.DOCKER_NAME}"
}
}
}
}
}
}
post {
failure {

View File

@@ -37,6 +37,13 @@ And to send one on bus 0:
```
Find user made scripts on the [wiki](https://community.comma.ai/wiki/index.php/Panda_scripts)
Note that you may have to setup [udev rules](https://community.comma.ai/wiki/index.php/Panda#Linux_udev_rules) for Linux, such as
```
sudo -i
echo 'SUBSYSTEMS=="usb", ATTR{idVendor}=="bbaa", ATTR{idProduct}=="ddcc", MODE:="0666"' > /etc/udev/rules.d/11-panda.rules
exit
```
Usage (JavaScript)
-------
@@ -80,9 +87,26 @@ To print out the serial console from the ESP8266, run PORT=1 tests/debug_console
Safety Model
------
When a panda powers up, by default it's in "SAFETY_NOOUTPUT" mode. While in no output mode, the buses are also forced to be silent. In order to send messages, you have to select a safety mode. Currently, setting safety modes is only supported over USB.
When a panda powers up, by default it's in `SAFETY_NOOUTPUT` mode. While in no output mode, the buses are also forced to be silent. In order to send messages, you have to select a safety mode. Currently, setting safety modes is only supported over USB.
Safety modes can also optionally support "controls_allowed", which allows or blocks a subset of messages based on a piece of state in the board.
Safety modes optionally supports `controls_allowed`, which allows or blocks a subset of messages based on a customizable state in the board.
Code Rigor
------
When compiled from an [EON Dev Kit](https://comma.ai/shop/products/eon-gold-dashcam-devkit), the panda FW is configured and optimized (at compile time) for its use in
conjuction with [openpilot](https://github.com/commaai/openpilot). The panda FW, through its safety model, provides and enforces the
[openpilot Safety](https://github.com/commaai/openpilot/blob/devel/SAFETY.md). Due to its critical function, it's important that the application code rigor within the `board` folder is held to high standards.
These are the [CI regression tests](https://circleci.com/gh/commaai/panda) we have in place:
* A generic static code analysis is performed by [Cppcheck](https://github.com/danmar/cppcheck/).
* In addition, [Cppcheck](https://github.com/danmar/cppcheck/) has a specific addon to check for [MISRA C:2012](https://www.misra.org.uk/MISRAHome/MISRAC2012/tabid/196/Default.aspx) violations. See [current coverage](https://github.com/commaai/panda/blob/master/tests/misra/coverage_table).
* Compiler options are relatively strict: the flags `-Wall -Wextra -Wstrict-prototypes -Werror` are enforced on board and pedal makefiles.
* The [safety logic](https://github.com/commaai/panda/tree/master/board/safety) is tested and verified by [unit tests](https://github.com/commaai/panda/tree/master/tests/safety) for each supported car variant.
* A recorded drive for each supported car variant is [replayed through the safety logic](https://github.com/commaai/panda/tree/master/tests/safety_replay)
to ensure that the behavior remains unchanged.
* An internal Hardware-in-the-loop test, which currently only runs on pull requests opened by comma.ai's organization members, verifies the following functionalities:
* compiling the code in various configuration and flashing it both through USB and WiFi.
* Receiving, sending and forwarding CAN messages on all buses, over USB and WiFi.
Hardware
------

View File

@@ -1 +1 @@
v1.4.7
v1.5.3

View File

@@ -36,7 +36,7 @@ struct board {
#define LED_GREEN 1U
#define LED_BLUE 2U
// USB power modes
// USB power modes (from cereal.log.health)
#define USB_POWER_NONE 0U
#define USB_POWER_CLIENT 1U
#define USB_POWER_CDP 2U

View File

@@ -38,7 +38,7 @@ void black_set_led(uint8_t color, bool enabled) {
break;
case LED_BLUE:
set_gpio_output(GPIOC, 6, !enabled);
break;
break;
default:
break;
}
@@ -53,11 +53,22 @@ void black_set_usb_load_switch(bool enabled) {
}
void black_set_usb_power_mode(uint8_t mode) {
usb_power_mode = mode;
if (mode == USB_POWER_NONE) {
black_set_usb_load_switch(false);
} else {
black_set_usb_load_switch(true);
bool valid = false;
switch (mode) {
case USB_POWER_CLIENT:
black_set_usb_load_switch(false);
valid = true;
break;
case USB_POWER_CDP:
black_set_usb_load_switch(true);
valid = true;
break;
default:
puts("Invalid USB power mode\n");
break;
}
if (valid) {
usb_power_mode = mode;
}
}
@@ -67,18 +78,15 @@ void black_set_esp_gps_mode(uint8_t mode) {
// GPS OFF
set_gpio_output(GPIOC, 14, 0);
set_gpio_output(GPIOC, 5, 0);
black_set_gps_load_switch(false);
break;
case ESP_GPS_ENABLED:
// GPS ON
set_gpio_output(GPIOC, 14, 1);
set_gpio_output(GPIOC, 5, 1);
black_set_gps_load_switch(true);
break;
case ESP_GPS_BOOTMODE:
set_gpio_output(GPIOC, 14, 1);
set_gpio_output(GPIOC, 5, 0);
black_set_gps_load_switch(true);
break;
default:
puts("Invalid ESP/GPS mode\n");
@@ -106,7 +114,7 @@ void black_set_can_mode(uint8_t mode){
// B12,B13: OBD mode
set_gpio_alternate(GPIOB, 12, GPIO_AF9_CAN2);
set_gpio_alternate(GPIOB, 13, GPIO_AF9_CAN2);
}
}
break;
default:
puts("Tried to set unsupported CAN mode: "); puth(mode); puts("\n");
@@ -154,6 +162,9 @@ void black_init(void) {
// Turn on USB load switch.
black_set_usb_load_switch(true);
// Set right power mode
black_set_usb_power_mode(USB_POWER_CDP);
// Initialize harness
harness_init();
@@ -203,4 +214,4 @@ const board board_black = {
.set_can_mode = black_set_can_mode,
.usb_power_mode_tick = black_usb_power_mode_tick,
.check_ignition = black_check_ignition
};
};

View File

@@ -34,7 +34,7 @@ void white_set_led(uint8_t color, bool enabled) {
break;
case LED_BLUE:
set_gpio_output(GPIOC, 6, !enabled);
break;
break;
default:
break;
}
@@ -125,7 +125,7 @@ void white_set_can_mode(uint8_t mode){
// A8,A15: normal CAN3 mode
set_gpio_alternate(GPIOA, 8, GPIO_AF11_CAN3);
set_gpio_alternate(GPIOA, 15, GPIO_AF11_CAN3);
set_gpio_alternate(GPIOA, 15, GPIO_AF11_CAN3);
break;
case CAN_MODE_GMLAN_CAN3:
// A8,A15: disable CAN3 mode
@@ -143,7 +143,7 @@ void white_set_can_mode(uint8_t mode){
// B5,B6: normal CAN2 mode
set_gpio_alternate(GPIOB, 5, GPIO_AF9_CAN2);
set_gpio_alternate(GPIOB, 6, GPIO_AF9_CAN2);
break;
break;
default:
puts("Tried to set unsupported CAN mode: "); puth(mode); puts("\n");
break;
@@ -152,7 +152,9 @@ void white_set_can_mode(uint8_t mode){
uint64_t marker = 0;
void white_usb_power_mode_tick(uint64_t tcnt){
#ifndef BOOTSTUB
// on EON or BOOTSTUB, no state machine
#if !defined(BOOTSTUB) && !defined(EON)
#define CURRENT_THRESHOLD 0xF00U
#define CLICKS 5U // 5 seconds to switch modes
@@ -177,22 +179,19 @@ void white_usb_power_mode_tick(uint64_t tcnt){
}
break;
case USB_POWER_CDP:
// On the EON, if we get into CDP mode we stay here. No need to go to DCP.
#ifndef EON
// been CLICKS clicks since we switched to CDP
if ((tcnt-marker) >= CLICKS) {
// measure current draw, if positive and no enumeration, switch to DCP
if (!is_enumerated && (current < CURRENT_THRESHOLD)) {
puts("USBP: no enumeration with current draw, switching to DCP mode\n");
white_set_usb_power_mode(USB_POWER_DCP);
marker = tcnt;
}
}
// keep resetting the timer if there's no current draw in CDP
if (current >= CURRENT_THRESHOLD) {
// been CLICKS clicks since we switched to CDP
if ((tcnt-marker) >= CLICKS) {
// measure current draw, if positive and no enumeration, switch to DCP
if (!is_enumerated && (current < CURRENT_THRESHOLD)) {
puts("USBP: no enumeration with current draw, switching to DCP mode\n");
white_set_usb_power_mode(USB_POWER_DCP);
marker = tcnt;
}
#endif
}
// keep resetting the timer if there's no current draw in CDP
if (current >= CURRENT_THRESHOLD) {
marker = tcnt;
}
break;
case USB_POWER_DCP:
// been at least CLICKS clicks since we switched to DCP
@@ -213,9 +212,9 @@ void white_usb_power_mode_tick(uint64_t tcnt){
puts("USB power mode invalid\n"); // set_usb_power_mode prevents assigning invalid values
break;
}
#else
#else
UNUSED(tcnt);
#endif
#endif
}
bool white_check_ignition(void){
@@ -242,9 +241,6 @@ void white_init(void) {
set_gpio_alternate(GPIOA, 6, GPIO_AF5_SPI1);
set_gpio_alternate(GPIOA, 7, GPIO_AF5_SPI1);
// Set USB power mode
white_set_usb_power_mode(USB_POWER_CLIENT);
// B12: GMLAN, ignition sense, pull up
set_gpio_pullup(GPIOB, 12, PULL_UP);
@@ -292,6 +288,16 @@ void white_init(void) {
EXTI->RTSR |= (1U << 1);
EXTI->FTSR |= (1U << 1);
NVIC_EnableIRQ(EXTI1_IRQn);
// Init usb power mode
uint32_t voltage = adc_get_voltage();
// Init in CDP mode only if panda is powered by 12V.
// Otherwise a PC would not be able to flash a standalone panda with EON build
if (voltage > 8000U) { // 8V threshold
white_set_usb_power_mode(USB_POWER_CDP);
} else {
white_set_usb_power_mode(USB_POWER_CLIENT);
}
}
const harness_configuration white_harness_config = {
@@ -310,4 +316,4 @@ const board board_white = {
.set_can_mode = white_set_can_mode,
.usb_power_mode_tick = white_usb_power_mode_tick,
.check_ignition = white_check_ignition
};
};

View File

@@ -32,6 +32,7 @@ const board *current_board;
#include "drivers/clock.h"
#include "drivers/llgpio.h"
#include "drivers/adc.h"
#include "board.h"
@@ -68,8 +69,6 @@ int main(void) {
detect_configuration();
detect_board_type();
current_board->set_usb_power_mode(USB_POWER_CLIENT);
if (enter_bootloader_mode == ENTER_SOFTLOADER_MAGIC) {
enter_bootloader_mode = 0;
soft_flasher_start();

View File

@@ -2,6 +2,7 @@
#define PANDA_CONFIG_H
//#define DEBUG
//#define DEBUG_UART
//#define DEBUG_USB
//#define DEBUG_SPI
@@ -22,7 +23,7 @@
#include <stdbool.h>
#define NULL ((void*)0)
#define COMPILE_TIME_ASSERT(pred) ((void)sizeof(char[1 - (2 * (!(pred)))]))
#define COMPILE_TIME_ASSERT(pred) ((void)sizeof(char[1 - (2 * ((int)(!(pred))))]))
#define MIN(a,b) \
({ __typeof__ (a) _a = (a); \

View File

@@ -36,3 +36,13 @@ uint32_t adc_get(unsigned int channel) {
return ADC1->JDR1;
}
uint32_t adc_get_voltage(void) {
// REVC has a 10, 1 (1/11) voltage divider
// Here is the calculation for the scale (s)
// ADCV = VIN_S * (1/11) * (4095/3.3)
// RETVAL = ADCV * s = VIN_S*1000
// s = 1000/((4095/3.3)*(1/11)) = 8.8623046875
// Avoid needing floating point math, so output in mV
return (adc_get(ADCCHAN_VOLTAGE) * 8862U) / 1000U;
}

View File

@@ -298,7 +298,7 @@ void process_can(uint8_t can_number) {
to_push.RDTR = (CAN->sTxMailBox[0].TDTR & 0xFFFF000FU) | ((CAN_BUS_RET_FLAG | bus_number) << 4);
to_push.RDLR = CAN->sTxMailBox[0].TDLR;
to_push.RDHR = CAN->sTxMailBox[0].TDHR;
can_send_errs += !can_push(&can_rx_q, &to_push);
can_send_errs += can_push(&can_rx_q, &to_push) ? 0U : 1U;
}
if ((CAN->TSR & CAN_TSR_TERR0) == CAN_TSR_TERR0) {
@@ -367,7 +367,7 @@ void can_rx(uint8_t can_number) {
safety_rx_hook(&to_push);
current_board->set_led(LED_BLUE, true);
can_send_errs += !can_push(&can_rx_q, &to_push);
can_send_errs += can_push(&can_rx_q, &to_push) ? 0U : 1U;
// next
CAN->RF0R |= CAN_RF0R_RFOM0;
@@ -393,10 +393,9 @@ void can_send(CAN_FIFOMailBox_TypeDef *to_push, uint8_t bus_number) {
// bus number isn't passed through
to_push->RDTR &= 0xF;
if ((bus_number == 3U) && (can_num_lookup[3] == 0xFFU)) {
// TODO: why uint8 bro? only int8?
gmlan_send_errs += !bitbang_gmlan(to_push);
gmlan_send_errs += bitbang_gmlan(to_push) ? 0U : 1U;
} else {
can_fwd_errs += !can_push(can_queues[bus_number], to_push);
can_fwd_errs += can_push(can_queues[bus_number], to_push) ? 0U : 1U;
process_can(CAN_NUM_FROM_BUS_NUM(bus_number));
}
}

View File

@@ -1,18 +1,43 @@
// IRQs: USART1, USART2, USART3, UART5
#define FIFO_SIZE 0x400U
// ***************************** Definitions *****************************
#define FIFO_SIZE_INT 0x400U
#define FIFO_SIZE_DMA 0x1000U
typedef struct uart_ring {
volatile uint16_t w_ptr_tx;
volatile uint16_t r_ptr_tx;
uint8_t elems_tx[FIFO_SIZE];
uint8_t *elems_tx;
uint32_t tx_fifo_size;
volatile uint16_t w_ptr_rx;
volatile uint16_t r_ptr_rx;
uint8_t elems_rx[FIFO_SIZE];
uint8_t *elems_rx;
uint32_t rx_fifo_size;
USART_TypeDef *uart;
void (*callback)(struct uart_ring*);
bool dma_rx;
} uart_ring;
void uart_init(USART_TypeDef *u, int baud);
#define UART_BUFFER(x, size_rx, size_tx, uart_ptr, callback_ptr, rx_dma) \
uint8_t elems_rx_##x[size_rx]; \
uint8_t elems_tx_##x[size_tx]; \
uart_ring uart_ring_##x = { \
.w_ptr_tx = 0, \
.r_ptr_tx = 0, \
.elems_tx = ((uint8_t *)&elems_tx_##x), \
.tx_fifo_size = size_tx, \
.w_ptr_rx = 0, \
.r_ptr_rx = 0, \
.elems_rx = ((uint8_t *)&elems_rx_##x), \
.rx_fifo_size = size_rx, \
.uart = uart_ptr, \
.callback = callback_ptr, \
.dma_rx = rx_dma \
};
// ***************************** Function prototypes *****************************
void uart_init(uart_ring *q, int baud);
bool getc(uart_ring *q, char *elem);
bool putc(uart_ring *q, char elem);
@@ -21,48 +46,35 @@ void puts(const char *a);
void puth(unsigned int i);
void hexdump(const void *a, int l);
void debug_ring_callback(uart_ring *ring);
// ***************************** serial port queues *****************************
// ******************************** UART buffers ********************************
// esp = USART1
uart_ring esp_ring = { .w_ptr_tx = 0, .r_ptr_tx = 0,
.w_ptr_rx = 0, .r_ptr_rx = 0,
.uart = USART1,
.callback = NULL};
// esp_gps = USART1
UART_BUFFER(esp_gps, FIFO_SIZE_DMA, FIFO_SIZE_INT, USART1, NULL, true)
// lin1, K-LINE = UART5
// lin2, L-LINE = USART3
uart_ring lin1_ring = { .w_ptr_tx = 0, .r_ptr_tx = 0,
.w_ptr_rx = 0, .r_ptr_rx = 0,
.uart = UART5,
.callback = NULL};
uart_ring lin2_ring = { .w_ptr_tx = 0, .r_ptr_tx = 0,
.w_ptr_rx = 0, .r_ptr_rx = 0,
.uart = USART3,
.callback = NULL};
UART_BUFFER(lin1, FIFO_SIZE_INT, FIFO_SIZE_INT, UART5, NULL, false)
UART_BUFFER(lin2, FIFO_SIZE_INT, FIFO_SIZE_INT, USART3, NULL, false)
// debug = USART2
void debug_ring_callback(uart_ring *ring);
uart_ring debug_ring = { .w_ptr_tx = 0, .r_ptr_tx = 0,
.w_ptr_rx = 0, .r_ptr_rx = 0,
.uart = USART2,
.callback = debug_ring_callback};
UART_BUFFER(debug, FIFO_SIZE_INT, FIFO_SIZE_INT, USART2, debug_ring_callback, false)
uart_ring *get_ring_by_number(int a) {
uart_ring *ring = NULL;
switch(a) {
case 0:
ring = &debug_ring;
ring = &uart_ring_debug;
break;
case 1:
ring = &esp_ring;
ring = &uart_ring_esp_gps;
break;
case 2:
ring = &lin1_ring;
ring = &uart_ring_lin1;
break;
case 3:
ring = &lin2_ring;
ring = &uart_ring_lin2;
break;
default:
ring = NULL;
@@ -71,52 +83,219 @@ uart_ring *get_ring_by_number(int a) {
return ring;
}
// ***************************** serial port *****************************
// ***************************** Interrupt handlers *****************************
void uart_ring_process(uart_ring *q) {
void uart_tx_ring(uart_ring *q){
ENTER_CRITICAL();
// TODO: check if external serial is connected
int sr = q->uart->SR;
// Send out next byte of TX buffer
if (q->w_ptr_tx != q->r_ptr_tx) {
if ((sr & USART_SR_TXE) != 0) {
q->uart->DR = q->elems_tx[q->r_ptr_tx];
q->r_ptr_tx = (q->r_ptr_tx + 1U) % FIFO_SIZE;
// Only send if transmit register is empty (aka last byte has been sent)
if ((q->uart->SR & USART_SR_TXE) != 0) {
q->uart->DR = q->elems_tx[q->r_ptr_tx]; // This clears TXE
q->r_ptr_tx = (q->r_ptr_tx + 1U) % q->tx_fifo_size;
}
// there could be more to send
q->uart->CR1 |= USART_CR1_TXEIE;
} else {
// nothing to send
q->uart->CR1 &= ~USART_CR1_TXEIE;
}
if ((sr & USART_SR_RXNE) || (sr & USART_SR_ORE)) {
uint8_t c = q->uart->DR; // TODO: can drop packets
if (q != &esp_ring) {
uint16_t next_w_ptr = (q->w_ptr_rx + 1U) % FIFO_SIZE;
if (next_w_ptr != q->r_ptr_rx) {
q->elems_rx[q->w_ptr_rx] = c;
q->w_ptr_rx = next_w_ptr;
if (q->callback != NULL) {
q->callback(q);
}
// Enable TXE interrupt if there is still data to be sent
if(q->r_ptr_tx != q->w_ptr_tx){
q->uart->CR1 |= USART_CR1_TXEIE;
} else {
q->uart->CR1 &= ~USART_CR1_TXEIE;
}
}
EXIT_CRITICAL();
}
void uart_rx_ring(uart_ring *q){
// Do not read out directly if DMA enabled
if (q->dma_rx == false) {
ENTER_CRITICAL();
// Read out RX buffer
uint8_t c = q->uart->DR; // This read after reading SR clears a bunch of interrupts
uint16_t next_w_ptr = (q->w_ptr_rx + 1U) % q->rx_fifo_size;
// Do not overwrite buffer data
if (next_w_ptr != q->r_ptr_rx) {
q->elems_rx[q->w_ptr_rx] = c;
q->w_ptr_rx = next_w_ptr;
if (q->callback != NULL) {
q->callback(q);
}
}
EXIT_CRITICAL();
}
}
// This function should be called on:
// * Half-transfer DMA interrupt
// * Full-transfer DMA interrupt
// * UART IDLE detection
uint32_t prev_w_index = 0;
void dma_pointer_handler(uart_ring *q, uint32_t dma_ndtr) {
ENTER_CRITICAL();
uint32_t w_index = (q->rx_fifo_size - dma_ndtr);
// Check for new data
if (w_index != prev_w_index){
// Check for overflow
if (
((prev_w_index < q->r_ptr_rx) && (q->r_ptr_rx <= w_index)) || // No rollover
((w_index < prev_w_index) && ((q->r_ptr_rx <= w_index) || (prev_w_index < q->r_ptr_rx))) // Rollover
){
// We lost data. Set the new read pointer to the oldest byte still available
q->r_ptr_rx = (w_index + 1U) % q->rx_fifo_size;
}
// Set write pointer
q->w_ptr_rx = w_index;
}
if ((sr & USART_SR_ORE) != 0) {
// set dropped packet flag?
prev_w_index = w_index;
EXIT_CRITICAL();
}
// This read after reading SR clears all error interrupts. We don't want compiler warnings, nor optimizations
#define UART_READ_DR(uart) volatile uint8_t t = (uart)->DR; UNUSED(t);
void uart_interrupt_handler(uart_ring *q) {
ENTER_CRITICAL();
// Read UART status. This is also the first step necessary in clearing most interrupts
uint32_t status = q->uart->SR;
// If RXNE is set, perform a read. This clears RXNE, ORE, IDLE, NF and FE
if((status & USART_SR_RXNE) != 0U){
uart_rx_ring(q);
}
// Detect errors and clear them
uint32_t err = (status & USART_SR_ORE) | (status & USART_SR_NE) | (status & USART_SR_FE) | (status & USART_SR_PE);
if(err != 0U){
#ifdef DEBUG_UART
puts("Encountered UART error: "); puth(err); puts("\n");
#endif
UART_READ_DR(q->uart)
}
// Send if necessary
uart_tx_ring(q);
// Run DMA pointer handler if the line is idle
if(q->dma_rx && (status & USART_SR_IDLE)){
// Reset IDLE flag
UART_READ_DR(q->uart)
if(q == &uart_ring_esp_gps){
dma_pointer_handler(&uart_ring_esp_gps, DMA2_Stream5->NDTR);
} else {
#ifdef DEBUG_UART
puts("No IDLE dma_pointer_handler implemented for this UART.");
#endif
}
}
EXIT_CRITICAL();
}
// interrupt boilerplate
void USART1_IRQHandler(void) { uart_interrupt_handler(&uart_ring_esp_gps); }
void USART2_IRQHandler(void) { uart_interrupt_handler(&uart_ring_debug); }
void USART3_IRQHandler(void) { uart_interrupt_handler(&uart_ring_lin2); }
void UART5_IRQHandler(void) { uart_interrupt_handler(&uart_ring_lin1); }
void USART1_IRQHandler(void) { uart_ring_process(&esp_ring); }
void USART2_IRQHandler(void) { uart_ring_process(&debug_ring); }
void USART3_IRQHandler(void) { uart_ring_process(&lin2_ring); }
void UART5_IRQHandler(void) { uart_ring_process(&lin1_ring); }
void DMA2_Stream5_IRQHandler(void) {
ENTER_CRITICAL();
// Handle errors
if((DMA2->HISR & DMA_HISR_TEIF5) || (DMA2->HISR & DMA_HISR_DMEIF5) || (DMA2->HISR & DMA_HISR_FEIF5)){
#ifdef DEBUG_UART
puts("Encountered UART DMA error. Clearing and restarting DMA...\n");
#endif
// Clear flags
DMA2->HIFCR = DMA_HIFCR_CTEIF5 | DMA_HIFCR_CDMEIF5 | DMA_HIFCR_CFEIF5;
// Re-enable the DMA if necessary
DMA2_Stream5->CR |= DMA_SxCR_EN;
}
// Re-calculate write pointer and reset flags
dma_pointer_handler(&uart_ring_esp_gps, DMA2_Stream5->NDTR);
DMA2->HIFCR = DMA_HIFCR_CTCIF5 | DMA_HIFCR_CHTIF5;
EXIT_CRITICAL();
}
// ***************************** Hardware setup *****************************
void dma_rx_init(uart_ring *q) {
// Initialization is UART-dependent
if(q == &uart_ring_esp_gps){
// DMA2, stream 5, channel 4
// Disable FIFO mode (enable direct)
DMA2_Stream5->FCR &= ~DMA_SxFCR_DMDIS;
// Setup addresses
DMA2_Stream5->PAR = (uint32_t)&(USART1->DR); // Source
DMA2_Stream5->M0AR = (uint32_t)q->elems_rx; // Destination
DMA2_Stream5->NDTR = q->rx_fifo_size; // Number of bytes to copy
// Circular, Increment memory, byte size, periph -> memory, enable
// Transfer complete, half transfer, transfer error and direct mode error interrupt enable
DMA2_Stream5->CR = DMA_SxCR_CHSEL_2 | DMA_SxCR_MINC | DMA_SxCR_CIRC | DMA_SxCR_HTIE | DMA_SxCR_TCIE | DMA_SxCR_TEIE | DMA_SxCR_DMEIE | DMA_SxCR_EN;
// Enable DMA receiver in UART
q->uart->CR3 |= USART_CR3_DMAR;
// Enable UART IDLE interrupt
q->uart->CR1 |= USART_CR1_IDLEIE;
// Enable interrupt
NVIC_EnableIRQ(DMA2_Stream5_IRQn);
} else {
puts("Tried to initialize RX DMA for an unsupported UART\n");
}
}
#define __DIV(_PCLK_, _BAUD_) (((_PCLK_) * 25U) / (4U * (_BAUD_)))
#define __DIVMANT(_PCLK_, _BAUD_) (__DIV((_PCLK_), (_BAUD_)) / 100U)
#define __DIVFRAQ(_PCLK_, _BAUD_) ((((__DIV((_PCLK_), (_BAUD_)) - (__DIVMANT((_PCLK_), (_BAUD_)) * 100U)) * 16U) + 50U) / 100U)
#define __USART_BRR(_PCLK_, _BAUD_) ((__DIVMANT((_PCLK_), (_BAUD_)) << 4) | (__DIVFRAQ((_PCLK_), (_BAUD_)) & 0x0FU))
void uart_set_baud(USART_TypeDef *u, unsigned int baud) {
if (u == USART1) {
// USART1 is on APB2
u->BRR = __USART_BRR(48000000U, baud);
} else {
u->BRR = __USART_BRR(24000000U, baud);
}
}
void uart_init(uart_ring *q, int baud) {
// Set baud and enable peripheral with TX and RX mode
uart_set_baud(q->uart, baud);
q->uart->CR1 = USART_CR1_UE | USART_CR1_TE | USART_CR1_RE;
// Enable UART interrupts
if(q->uart == USART1){
NVIC_EnableIRQ(USART1_IRQn);
} else if (q->uart == USART2){
NVIC_EnableIRQ(USART2_IRQn);
} else if (q->uart == USART3){
NVIC_EnableIRQ(USART3_IRQn);
} else if (q->uart == UART5){
NVIC_EnableIRQ(UART5_IRQn);
} else {
// UART not used. Skip enabling interrupts
}
// Initialise RX DMA if used
if(q->dma_rx){
dma_rx_init(q);
}
}
// ************************* Low-level buffer functions *************************
bool getc(uart_ring *q, char *elem) {
bool ret = false;
@@ -124,7 +303,7 @@ bool getc(uart_ring *q, char *elem) {
ENTER_CRITICAL();
if (q->w_ptr_rx != q->r_ptr_rx) {
if (elem != NULL) *elem = q->elems_rx[q->r_ptr_rx];
q->r_ptr_rx = (q->r_ptr_rx + 1U) % FIFO_SIZE;
q->r_ptr_rx = (q->r_ptr_rx + 1U) % q->rx_fifo_size;
ret = true;
}
EXIT_CRITICAL();
@@ -137,7 +316,7 @@ bool injectc(uart_ring *q, char elem) {
uint16_t next_w_ptr;
ENTER_CRITICAL();
next_w_ptr = (q->w_ptr_rx + 1U) % FIFO_SIZE;
next_w_ptr = (q->w_ptr_rx + 1U) % q->tx_fifo_size;
if (next_w_ptr != q->r_ptr_rx) {
q->elems_rx[q->w_ptr_rx] = elem;
q->w_ptr_rx = next_w_ptr;
@@ -153,7 +332,7 @@ bool putc(uart_ring *q, char elem) {
uint16_t next_w_ptr;
ENTER_CRITICAL();
next_w_ptr = (q->w_ptr_tx + 1U) % FIFO_SIZE;
next_w_ptr = (q->w_ptr_tx + 1U) % q->tx_fifo_size;
if (next_w_ptr != q->r_ptr_tx) {
q->elems_tx[q->w_ptr_tx] = elem;
q->w_ptr_tx = next_w_ptr;
@@ -161,11 +340,13 @@ bool putc(uart_ring *q, char elem) {
}
EXIT_CRITICAL();
uart_ring_process(q);
uart_tx_ring(q);
return ret;
}
// Seems dangerous to use (might lock CPU if called with interrupts disabled f.e.)
// TODO: Remove? Not used anyways
void uart_flush(uart_ring *q) {
while (q->w_ptr_tx != q->r_ptr_tx) {
__WFI();
@@ -175,7 +356,7 @@ void uart_flush(uart_ring *q) {
void uart_flush_sync(uart_ring *q) {
// empty the TX buffer
while (q->w_ptr_tx != q->r_ptr_tx) {
uart_ring_process(q);
uart_tx_ring(q);
}
}
@@ -193,119 +374,15 @@ void clear_uart_buff(uart_ring *q) {
EXIT_CRITICAL();
}
// ***************************** start UART code *****************************
#define __DIV(_PCLK_, _BAUD_) (((_PCLK_) * 25U) / (4U * (_BAUD_)))
#define __DIVMANT(_PCLK_, _BAUD_) (__DIV((_PCLK_), (_BAUD_)) / 100U)
#define __DIVFRAQ(_PCLK_, _BAUD_) ((((__DIV((_PCLK_), (_BAUD_)) - (__DIVMANT((_PCLK_), (_BAUD_)) * 100U)) * 16U) + 50U) / 100U)
#define __USART_BRR(_PCLK_, _BAUD_) ((__DIVMANT((_PCLK_), (_BAUD_)) << 4) | (__DIVFRAQ((_PCLK_), (_BAUD_)) & 0x0FU))
void uart_set_baud(USART_TypeDef *u, unsigned int baud) {
if (u == USART1) {
// USART1 is on APB2
u->BRR = __USART_BRR(48000000U, baud);
} else {
u->BRR = __USART_BRR(24000000U, baud);
}
}
#define USART1_DMA_LEN 0x20
char usart1_dma[USART1_DMA_LEN];
void uart_dma_drain(void) {
uart_ring *q = &esp_ring;
ENTER_CRITICAL();
if ((DMA2->HISR & DMA_HISR_TCIF5) || (DMA2->HISR & DMA_HISR_HTIF5) || (DMA2_Stream5->NDTR != USART1_DMA_LEN)) {
// disable DMA
q->uart->CR3 &= ~USART_CR3_DMAR;
DMA2_Stream5->CR &= ~DMA_SxCR_EN;
while ((DMA2_Stream5->CR & DMA_SxCR_EN) != 0);
unsigned int i;
for (i = 0; i < (USART1_DMA_LEN - DMA2_Stream5->NDTR); i++) {
char c = usart1_dma[i];
uint16_t next_w_ptr = (q->w_ptr_rx + 1U) % FIFO_SIZE;
if (next_w_ptr != q->r_ptr_rx) {
q->elems_rx[q->w_ptr_rx] = c;
q->w_ptr_rx = next_w_ptr;
}
}
// reset DMA len
DMA2_Stream5->NDTR = USART1_DMA_LEN;
// clear interrupts
DMA2->HIFCR = DMA_HIFCR_CTCIF5 | DMA_HIFCR_CHTIF5;
//DMA2->HIFCR = DMA_HIFCR_CTEIF5 | DMA_HIFCR_CDMEIF5 | DMA_HIFCR_CFEIF5;
// enable DMA
DMA2_Stream5->CR |= DMA_SxCR_EN;
q->uart->CR3 |= USART_CR3_DMAR;
}
EXIT_CRITICAL();
}
void DMA2_Stream5_IRQHandler(void) {
//set_led(LED_BLUE, 1);
uart_dma_drain();
//set_led(LED_BLUE, 0);
}
void uart_init(USART_TypeDef *u, int baud) {
// enable uart and tx+rx mode
u->CR1 = USART_CR1_UE;
uart_set_baud(u, baud);
u->CR1 |= USART_CR1_TE | USART_CR1_RE;
//u->CR2 = USART_CR2_STOP_0 | USART_CR2_STOP_1;
//u->CR2 = USART_CR2_STOP_0;
// ** UART is ready to work **
// enable interrupts
if (u != USART1) {
u->CR1 |= USART_CR1_RXNEIE;
}
if (u == USART1) {
// DMA2, stream 2, channel 3
DMA2_Stream5->M0AR = (uint32_t)usart1_dma;
DMA2_Stream5->NDTR = USART1_DMA_LEN;
DMA2_Stream5->PAR = (uint32_t)&(USART1->DR);
// channel4, increment memory, periph -> memory, enable
DMA2_Stream5->CR = DMA_SxCR_CHSEL_2 | DMA_SxCR_MINC | DMA_SxCR_HTIE | DMA_SxCR_TCIE | DMA_SxCR_EN;
// this one uses DMA receiver
u->CR3 = USART_CR3_DMAR;
NVIC_EnableIRQ(DMA2_Stream5_IRQn);
NVIC_EnableIRQ(USART1_IRQn);
} else if (u == USART2) {
NVIC_EnableIRQ(USART2_IRQn);
} else if (u == USART3) {
NVIC_EnableIRQ(USART3_IRQn);
} else if (u == UART5) {
NVIC_EnableIRQ(UART5_IRQn);
} else {
// USART type undefined, skip
}
}
// ************************ High-level debug functions **********************
void putch(const char a) {
if (has_external_debug_serial) {
/*while ((debug_ring.uart->SR & USART_SR_TXE) == 0);
debug_ring.uart->DR = a;*/
// assuming debugging is important if there's external serial connected
while (!putc(&debug_ring, a));
while (!putc(&uart_ring_debug, a));
//putc(&debug_ring, a);
} else {
// misra-c2012-17.7: serial debug function, ok to ignore output
(void)injectc(&debug_ring, a);
(void)injectc(&uart_ring_debug, a);
}
}
@@ -327,7 +404,7 @@ void putui(uint32_t i) {
idx--;
i_copy /= 10;
} while (i_copy != 0U);
puts(str + idx + 1U);
puts(&str[idx + 1U]);
}
void puth(unsigned int i) {
@@ -345,10 +422,12 @@ void puth2(unsigned int i) {
}
void hexdump(const void *a, int l) {
for (int i=0; i < l; i++) {
if ((i != 0) && ((i & 0xf) == 0)) puts("\n");
puth2(((const unsigned char*)a)[i]);
puts(" ");
if (a != NULL) {
for (int i=0; i < l; i++) {
if ((i != 0) && ((i & 0xf) == 0)) puts("\n");
puth2(((const unsigned char*)a)[i]);
puts(" ");
}
}
puts("\n");
}

View File

@@ -439,7 +439,7 @@ void USB_WritePacket_EP0(uint8_t *src, uint16_t len) {
USB_WritePacket(src, wplen, 0);
if (wplen < len) {
ep0_txdata = src + wplen;
ep0_txdata = &src[wplen];
ep0_txlen = len - wplen;
USBx_DEVICE->DIEPEMPMSK |= 1;
} else {
@@ -985,7 +985,7 @@ void usb_irqhandler(void) {
if ((ep0_txlen != 0U) && ((USBx_INEP(0)->DTXFSTS & USB_OTG_DTXFSTS_INEPTFSAV) >= 0x40U)) {
uint16_t len = MIN(ep0_txlen, 0x40);
USB_WritePacket(ep0_txdata, len, 0);
ep0_txdata += len;
ep0_txdata = &ep0_txdata[len];
ep0_txlen -= len;
if (ep0_txlen == 0U) {
ep0_txdata = NULL;

View File

@@ -1,4 +1,4 @@
//#define EON
//#define EON
//#define PANDA
// ********************* Includes *********************
@@ -78,10 +78,14 @@ void started_interrupt_handler(uint8_t interrupt_line) {
// jenky debounce
delay(100000);
// set power savings mode here if on EON build
#ifdef EON
// set power savings mode here if on EON build
int power_save_state = current_board->check_ignition() ? POWER_SAVE_STATUS_DISABLED : POWER_SAVE_STATUS_ENABLED;
set_power_save_state(power_save_state);
// set CDP usb power mode everytime that the car starts to make sure EON is charging
if (current_board->check_ignition()) {
current_board->set_usb_power_mode(USB_POWER_CDP);
}
#endif
}
EXTI->PR = (1U << interrupt_line);
@@ -134,7 +138,7 @@ void set_safety_mode(uint16_t mode, int16_t param) {
}
can_silent = ALL_CAN_LIVE;
break;
}
}
if (safety_ignition_hook() != -1) {
// if the ignition hook depends on something other than the started GPIO
// we have to disable power savings (fix for GM and Tesla)
@@ -159,19 +163,10 @@ int get_health_pkt(void *dat) {
uint8_t controls_allowed_pkt;
uint8_t gas_interceptor_detected_pkt;
uint8_t car_harness_status_pkt;
uint8_t usb_power_mode_pkt;
} *health = dat;
//Voltage will be measured in mv. 5000 = 5V
uint32_t voltage = adc_get(ADCCHAN_VOLTAGE);
// REVC has a 10, 1 (1/11) voltage divider
// Here is the calculation for the scale (s)
// ADCV = VIN_S * (1/11) * (4095/3.3)
// RETVAL = ADCV * s = VIN_S*1000
// s = 1000/((4095/3.3)*(1/11)) = 8.8623046875
// Avoid needing floating point math
health->voltage_pkt = (voltage * 8862U) / 1000U;
health->voltage_pkt = adc_get_voltage();
// No current sense on panda black
if(hw_type != HW_TYPE_BLACK_PANDA){
@@ -195,7 +190,8 @@ int get_health_pkt(void *dat) {
health->can_fwd_errs_pkt = can_fwd_errs;
health->gmlan_send_errs_pkt = gmlan_send_errs;
health->car_harness_status_pkt = car_harness_status;
health->usb_power_mode_pkt = usb_power_mode;
return sizeof(*health);
}
@@ -215,7 +211,7 @@ void usb_cb_ep2_out(void *usbdata, int len, bool hardwired) {
uint8_t *usbdata8 = (uint8_t *)usbdata;
uart_ring *ur = get_ring_by_number(usbdata8[0]);
if ((len != 0) && (ur != NULL)) {
if ((usbdata8[0] < 2U) || safety_tx_lin_hook(usbdata8[0] - 2U, usbdata8 + 1, len - 1)) {
if ((usbdata8[0] < 2U) || safety_tx_lin_hook(usbdata8[0] - 2U, &usbdata8[1], len - 1)) {
for (int i = 1; i < len; i++) {
while (!putc(ur, usbdata8[i])) {
// wait
@@ -346,7 +342,7 @@ int usb_cb_control_msg(USB_Setup_TypeDef *setup, uint8_t *resp, bool hardwired)
} else {
// Disable OBD CAN
current_board->set_can_mode(CAN_MODE_NORMAL);
}
}
} else {
if (setup->b.wValue.w == 1U) {
// GMLAN ON
@@ -362,7 +358,7 @@ int usb_cb_control_msg(USB_Setup_TypeDef *setup, uint8_t *resp, bool hardwired)
}
}
break;
// **** 0xdc: set safety mode
case 0xdc:
// Blocked over WiFi.
@@ -403,9 +399,12 @@ int usb_cb_control_msg(USB_Setup_TypeDef *setup, uint8_t *resp, bool hardwired)
if (!ur) {
break;
}
if (ur == &esp_ring) {
uart_dma_drain();
// TODO: Remove this again and fix boardd code to hande the message bursts instead of single chars
if (ur == &uart_ring_esp_gps) {
dma_pointer_handler(ur, DMA2_Stream5->NDTR);
}
// read
while ((resp_len < MIN(setup->b.wLength.w, MAX_RESP_LEN)) &&
getc(ur, (char*)&resp[resp_len])) {
@@ -460,19 +459,7 @@ int usb_cb_control_msg(USB_Setup_TypeDef *setup, uint8_t *resp, bool hardwired)
break;
// **** 0xe6: set USB power
case 0xe6:
if (setup->b.wValue.w == 0U) {
puts("user setting NONE mode\n");
current_board->set_usb_power_mode(USB_POWER_NONE);
} else if (setup->b.wValue.w == 1U) {
puts("user setting CDP mode\n");
current_board->set_usb_power_mode(USB_POWER_CDP);
} else if (setup->b.wValue.w == 2U) {
puts("user setting DCP mode\n");
current_board->set_usb_power_mode(USB_POWER_DCP);
} else {
puts("user setting CLIENT mode\n");
current_board->set_usb_power_mode(USB_POWER_CLIENT);
}
current_board->set_usb_power_mode(setup->b.wValue.w);
break;
// **** 0xf0: do k-line wValue pulse on uart2 for Acura
case 0xf0:
@@ -591,8 +578,8 @@ void __attribute__ ((noinline)) enable_fpu(void) {
uint64_t tcnt = 0;
// go into NOOUTPUT when the EON does not send a heartbeat for this amount of seconds.
#define EON_HEARTBEAT_THRESHOLD_IGNITION_ON 5U
#define EON_HEARTBEAT_THRESHOLD_IGNITION_OFF 2U
#define EON_HEARTBEAT_IGNITION_CNT_ON 5U
#define EON_HEARTBEAT_IGNITION_CNT_OFF 2U
// called once per second
// cppcheck-suppress unusedFunction ; used in headers not included in cppcheck
@@ -629,9 +616,11 @@ void TIM3_IRQHandler(void) {
// check heartbeat counter if we are running EON code. If the heartbeat has been gone for a while, go to NOOUTPUT safety mode.
#ifdef EON
if (heartbeat_counter >= (current_board->check_ignition() ? EON_HEARTBEAT_THRESHOLD_IGNITION_ON : EON_HEARTBEAT_THRESHOLD_IGNITION_OFF)) {
if (heartbeat_counter >= (current_board->check_ignition() ? EON_HEARTBEAT_IGNITION_CNT_ON : EON_HEARTBEAT_IGNITION_CNT_OFF)) {
puts("EON hasn't sent a heartbeat for 0x"); puth(heartbeat_counter); puts(" seconds. Safety is set to NOOUTPUT mode.\n");
set_safety_mode(SAFETY_NOOUTPUT, 0U);
if(current_safety_mode != SAFETY_NOOUTPUT){
set_safety_mode(SAFETY_NOOUTPUT, 0U);
}
}
#endif
@@ -651,7 +640,7 @@ int main(void) {
detect_configuration();
detect_board_type();
adc_init();
// print hello
puts("\n\n\n************************ MAIN START ************************\n");
@@ -676,22 +665,22 @@ int main(void) {
if (has_external_debug_serial) {
// WEIRDNESS: without this gate around the UART, it would "crash", but only if the ESP is enabled
// assuming it's because the lines were left floating and spurious noise was on them
uart_init(USART2, 115200);
uart_init(&uart_ring_debug, 115200);
}
if (board_has_gps()) {
uart_init(USART1, 9600);
uart_init(&uart_ring_esp_gps, 9600);
} else {
// enable ESP uart
uart_init(USART1, 115200);
uart_init(&uart_ring_esp_gps, 115200);
}
// there is no LIN on panda black
if(hw_type != HW_TYPE_BLACK_PANDA){
// enable LIN
uart_init(UART5, 10400);
uart_init(&uart_ring_lin1, 10400);
UART5->CR2 |= USART_CR2_LINEN;
uart_init(USART3, 10400);
uart_init(&uart_ring_lin2, 10400);
USART3->CR2 |= USART_CR2_LINEN;
}

Some files were not shown because too many files have changed in this diff Show More