mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-12 05:44:14 +08:00
Compare commits
194 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
91bf49bdd4 | ||
|
|
017cbbfa51 | ||
|
|
8773fbf7d9 | ||
|
|
8d4ff30c60 | ||
|
|
be2ba93ca0 | ||
|
|
48425a1fc1 | ||
|
|
84c8790192 | ||
|
|
25681a31e5 | ||
|
|
61bbb52172 | ||
|
|
c9270bfa2f | ||
|
|
0a7d2f4343 | ||
|
|
dc6107dac3 | ||
|
|
5eacdcee9d | ||
|
|
978839a861 | ||
|
|
fbc243aa94 | ||
|
|
cf5c4aeacb | ||
|
|
194d4d7f71 | ||
|
|
5b596aec6f | ||
|
|
09533fee0c | ||
|
|
6ee6161d23 | ||
|
|
4e16a1454d | ||
|
|
d0bdd513cd | ||
|
|
54b920eb79 | ||
|
|
94053536b4 | ||
|
|
cd98235644 | ||
|
|
b539ae3e2d | ||
|
|
c8b4633cd1 | ||
|
|
1ff59baea7 | ||
|
|
53413fa019 | ||
|
|
813d5b9982 | ||
|
|
e453e79bc8 | ||
|
|
b02e848395 | ||
|
|
ed9d5615ba | ||
|
|
8264fd8b93 | ||
|
|
532e7710f3 | ||
|
|
63da1abe2c | ||
|
|
62bd6cee67 | ||
|
|
e8af5d6364 | ||
|
|
386ec39885 | ||
|
|
2a99c660c3 | ||
|
|
be28530ee4 | ||
|
|
15cb2f05c7 | ||
|
|
3595162d1a | ||
|
|
8e97f70b92 | ||
|
|
a9a35894ad | ||
|
|
c3a1a438d8 | ||
|
|
13bdfcdd95 | ||
|
|
9675794969 | ||
|
|
151a504507 | ||
|
|
99da7077ab | ||
|
|
3d941253a5 | ||
|
|
03e764bcb3 | ||
|
|
0d41146fa8 | ||
|
|
7f04682b4c | ||
|
|
a6545b1604 | ||
|
|
2db4cb0e8c | ||
|
|
26d0b8d4ee | ||
|
|
323660961f | ||
|
|
88966b488a | ||
|
|
41fc9c55a0 | ||
|
|
8c2b3d5e37 | ||
|
|
22fc7e9dae | ||
|
|
9f53e446d9 | ||
|
|
7e0ba31ceb | ||
|
|
fe46b24be5 | ||
|
|
a9e94ef9bb | ||
|
|
c9db3ef937 | ||
|
|
9a3dc91b35 | ||
|
|
c5e71d2f37 | ||
|
|
61ce864e28 | ||
|
|
36d0a70b69 | ||
|
|
20a2007d10 | ||
|
|
64701acb68 | ||
|
|
17922bd096 | ||
|
|
16eb74250c | ||
|
|
4a48ef8dbc | ||
|
|
5eda5fc81b | ||
|
|
76ab558ca6 | ||
|
|
60a20537c5 | ||
|
|
71e65750d1 | ||
|
|
2ce741275b | ||
|
|
8cb09e1329 | ||
|
|
17f21c5b6f | ||
|
|
0992311f83 | ||
|
|
a42fea2041 | ||
|
|
4aaf4f437b | ||
|
|
610bb58845 | ||
|
|
4c77b9162e | ||
|
|
cd096d1c2e | ||
|
|
11a7b2d9bf | ||
|
|
be020bdedb | ||
|
|
1e77f2482c | ||
|
|
7fa09edc03 | ||
|
|
13ae651f46 | ||
|
|
c345bb1d8f | ||
|
|
a2b00731cb | ||
|
|
d36b78e273 | ||
|
|
6ab7c27d9b | ||
|
|
a90c3bc8be | ||
|
|
8b3c922cf0 | ||
|
|
d460e0e735 | ||
|
|
a52b947ce2 | ||
|
|
c75137b262 | ||
|
|
6fd3f9bad8 | ||
|
|
d8da18ed54 | ||
|
|
6abd80f116 | ||
|
|
f4b258a082 | ||
|
|
8a9ed94f5f | ||
|
|
ae44a57565 | ||
|
|
78e4e4ea23 | ||
|
|
1c6164e11c | ||
|
|
b93f77ea0e | ||
|
|
dba8e01e54 | ||
|
|
983120bfed | ||
|
|
27803e787b | ||
|
|
24e096d9f0 | ||
|
|
6651d50c81 | ||
|
|
f64c4df8c8 | ||
|
|
00c48f0ba3 | ||
|
|
f78b6fdd17 | ||
|
|
7c537ee201 | ||
|
|
e2d77db22a | ||
|
|
bf5e361b26 | ||
|
|
a7ad4488b9 | ||
|
|
f7fbcfe59d | ||
|
|
1efed2ed00 | ||
|
|
15c43ad722 | ||
|
|
5fcbfcc359 | ||
|
|
672d80735f | ||
|
|
2f5e35035d | ||
|
|
1aafc5b0ef | ||
|
|
9f66b533e2 | ||
|
|
1883bd6135 | ||
|
|
1ba6b0004d | ||
|
|
68b86c7ca8 | ||
|
|
36881b6410 | ||
|
|
fe7e5cf5df | ||
|
|
d8b1588937 | ||
|
|
a2f4d6b5ad | ||
|
|
16d0c4a3e7 | ||
|
|
dd34ccfe28 | ||
|
|
7ccae06bce | ||
|
|
59bd6b8837 | ||
|
|
53c4b90ffc | ||
|
|
f91df07d3f | ||
|
|
0829b0a767 | ||
|
|
9a143c5ab2 | ||
|
|
1e8098c140 | ||
|
|
b5a88f5700 | ||
|
|
c0a3e48d94 | ||
|
|
65e1342e41 | ||
|
|
7ada2abca0 | ||
|
|
9278fad15c | ||
|
|
0aa41e348e | ||
|
|
64a6e9776c | ||
|
|
56b2945de4 | ||
|
|
b686ca87d3 | ||
|
|
1b3b260b4d | ||
|
|
25d43fe15e | ||
|
|
cbc73e55a2 | ||
|
|
9b31da0985 | ||
|
|
3f9059fea8 | ||
|
|
99c81d291f | ||
|
|
530b637d27 | ||
|
|
52e55eb244 | ||
|
|
ec36bc3a39 | ||
|
|
98797fb24e | ||
|
|
127998ca8b | ||
|
|
1da59216b0 | ||
|
|
184ba93833 | ||
|
|
a321836788 | ||
|
|
f5044670fa | ||
|
|
340e0f4a4c | ||
|
|
d8b1e99d77 | ||
|
|
2eebe49940 | ||
|
|
9dae0bfac4 | ||
|
|
2f92d577f9 | ||
|
|
684e7b9f9e | ||
|
|
790732bea3 | ||
|
|
3c25760cc9 | ||
|
|
7834995df4 | ||
|
|
0a7fed9437 | ||
|
|
a201322160 | ||
|
|
d64025cca4 | ||
|
|
58d645cd18 | ||
|
|
76dfb135ca | ||
|
|
27ef9f2236 | ||
|
|
185375ed64 | ||
|
|
7978afabe5 | ||
|
|
e89fd1236f | ||
|
|
bdf6585650 | ||
|
|
4662cfc8d7 | ||
|
|
dd32343342 | ||
|
|
1efa3f0eba |
7
.gitignore
vendored
7
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
venv/
|
||||
.DS_Store
|
||||
.tags
|
||||
.ipynb_checkpoints
|
||||
@@ -31,6 +32,12 @@ selfdrive/proclogd/proclogd
|
||||
selfdrive/ui/ui
|
||||
selfdrive/test/tests/plant/out
|
||||
selfdrive/visiond/visiond
|
||||
selfdrive/loggerd/loggerd
|
||||
selfdrive/sensord/gpsd
|
||||
selfdrive/sensord/sensord
|
||||
/src/
|
||||
|
||||
one
|
||||
openpilot
|
||||
xx
|
||||
|
||||
|
||||
585
.pylintrc
Normal file
585
.pylintrc
Normal file
@@ -0,0 +1,585 @@
|
||||
[MASTER]
|
||||
|
||||
# A comma-separated list of package or module names from where C extensions may
|
||||
# be loaded. Extensions are loading into the active Python interpreter and may
|
||||
# run arbitrary code
|
||||
extension-pkg-whitelist=scipy
|
||||
|
||||
# Add files or directories to the blacklist. They should be base names, not
|
||||
# paths.
|
||||
ignore=CVS
|
||||
|
||||
# Add files or directories matching the regex patterns to the blacklist. The
|
||||
# regex matches against base names, not paths.
|
||||
ignore-patterns=
|
||||
|
||||
# Python code to execute, usually for sys.path manipulation such as
|
||||
# pygtk.require().
|
||||
#init-hook=
|
||||
|
||||
# Use multiple processes to speed up Pylint.
|
||||
jobs=4
|
||||
|
||||
# List of plugins (as comma separated values of python modules names) to load,
|
||||
# usually to register additional checkers.
|
||||
load-plugins=
|
||||
|
||||
# Pickle collected data for later comparisons.
|
||||
persistent=yes
|
||||
|
||||
# Specify a configuration file.
|
||||
#rcfile=
|
||||
|
||||
# When enabled, pylint would attempt to guess common misconfiguration and emit
|
||||
# user-friendly hints instead of false-positive error messages
|
||||
suggestion-mode=yes
|
||||
|
||||
# Allow loading of arbitrary C extensions. Extensions are imported into the
|
||||
# active Python interpreter and may run arbitrary code.
|
||||
unsafe-load-any-extension=no
|
||||
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
|
||||
# Only show warnings with the listed confidence levels. Leave empty to show
|
||||
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
|
||||
confidence=
|
||||
|
||||
# Disable the message, report, category or checker with the given id(s). You
|
||||
# can either give multiple identifiers separated by comma (,) or put this
|
||||
# option multiple times (only on the command line, not in the configuration
|
||||
# file where it should appear only once).You can also use "--disable=all" to
|
||||
# disable everything first and then reenable specific checks. For example, if
|
||||
# you want to run only the similarities checker, you can use "--disable=all
|
||||
# --enable=similarities". If you want to run only the classes checker, but have
|
||||
# no Warning level messages displayed, use"--disable=all --enable=classes
|
||||
# --disable=W"
|
||||
disable=print-statement,
|
||||
parameter-unpacking,
|
||||
unpacking-in-except,
|
||||
old-raise-syntax,
|
||||
backtick,
|
||||
long-suffix,
|
||||
old-ne-operator,
|
||||
old-octal-literal,
|
||||
import-star-module-level,
|
||||
non-ascii-bytes-literal,
|
||||
raw-checker-failed,
|
||||
bad-inline-option,
|
||||
locally-disabled,
|
||||
locally-enabled,
|
||||
file-ignored,
|
||||
suppressed-message,
|
||||
useless-suppression,
|
||||
deprecated-pragma,
|
||||
apply-builtin,
|
||||
basestring-builtin,
|
||||
buffer-builtin,
|
||||
cmp-builtin,
|
||||
coerce-builtin,
|
||||
execfile-builtin,
|
||||
file-builtin,
|
||||
long-builtin,
|
||||
raw_input-builtin,
|
||||
reduce-builtin,
|
||||
standarderror-builtin,
|
||||
unicode-builtin,
|
||||
xrange-builtin,
|
||||
coerce-method,
|
||||
delslice-method,
|
||||
getslice-method,
|
||||
setslice-method,
|
||||
no-absolute-import,
|
||||
old-division,
|
||||
dict-iter-method,
|
||||
dict-view-method,
|
||||
next-method-called,
|
||||
metaclass-assignment,
|
||||
indexing-exception,
|
||||
raising-string,
|
||||
reload-builtin,
|
||||
oct-method,
|
||||
hex-method,
|
||||
nonzero-method,
|
||||
cmp-method,
|
||||
input-builtin,
|
||||
round-builtin,
|
||||
intern-builtin,
|
||||
unichr-builtin,
|
||||
map-builtin-not-iterating,
|
||||
zip-builtin-not-iterating,
|
||||
range-builtin-not-iterating,
|
||||
filter-builtin-not-iterating,
|
||||
using-cmp-argument,
|
||||
eq-without-hash,
|
||||
div-method,
|
||||
idiv-method,
|
||||
rdiv-method,
|
||||
exception-message-attribute,
|
||||
invalid-str-codec,
|
||||
sys-max-int,
|
||||
bad-python3-import,
|
||||
deprecated-string-function,
|
||||
deprecated-str-translate-call,
|
||||
deprecated-itertools-function,
|
||||
deprecated-types-field,
|
||||
next-method-defined,
|
||||
dict-items-not-iterating,
|
||||
dict-keys-not-iterating,
|
||||
dict-values-not-iterating,
|
||||
bad-indentation,
|
||||
line-too-long,
|
||||
missing-docstring,
|
||||
multiple-statements,
|
||||
bad-continuation,
|
||||
invalid-name,
|
||||
too-many-arguments,
|
||||
too-many-locals,
|
||||
superfluous-parens,
|
||||
bad-whitespace,
|
||||
too-many-instance-attributes,
|
||||
wrong-import-position,
|
||||
ungrouped-imports,
|
||||
wrong-import-order,
|
||||
protected-access,
|
||||
trailing-whitespace,
|
||||
too-many-branches,
|
||||
too-few-public-methods,
|
||||
too-many-statements,
|
||||
trailing-newlines,
|
||||
attribute-defined-outside-init,
|
||||
too-many-return-statements,
|
||||
too-many-public-methods,
|
||||
unused-argument,
|
||||
old-style-class,
|
||||
no-init,
|
||||
len-as-condition,
|
||||
unneeded-not,
|
||||
no-self-use,
|
||||
multiple-imports,
|
||||
no-else-return,
|
||||
logging-not-lazy,
|
||||
fixme,
|
||||
redefined-outer-name,
|
||||
unused-variable,
|
||||
unsubscriptable-object,
|
||||
expression-not-assigned,
|
||||
too-many-boolean-expressions,
|
||||
consider-using-ternary,
|
||||
invalid-unary-operand-type,
|
||||
relative-import,
|
||||
deprecated-lambda
|
||||
|
||||
|
||||
# Enable the message, report, category or checker with the given id(s). You can
|
||||
# either give multiple identifier separated by comma (,) or put this option
|
||||
# multiple time (only on the command line, not in the configuration file where
|
||||
# it should appear only once). See also the "--disable" option for examples.
|
||||
enable=c-extension-no-member
|
||||
|
||||
|
||||
[REPORTS]
|
||||
|
||||
# Python expression which should return a note less than 10 (10 is the highest
|
||||
# note). You have access to the variables errors warning, statement which
|
||||
# respectively contain the number of errors / warnings messages and the total
|
||||
# number of statements analyzed. This is used by the global evaluation report
|
||||
# (RP0004).
|
||||
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
|
||||
|
||||
# Template used to display messages. This is a python new-style format string
|
||||
# used to format the message information. See doc for all details
|
||||
#msg-template=
|
||||
|
||||
# Set the output format. Available formats are text, parseable, colorized, json
|
||||
# and msvs (visual studio).You can also give a reporter class, eg
|
||||
# mypackage.mymodule.MyReporterClass.
|
||||
output-format=text
|
||||
|
||||
# Tells whether to display a full report or only the messages
|
||||
reports=no
|
||||
|
||||
# Activate the evaluation score.
|
||||
score=yes
|
||||
|
||||
|
||||
[REFACTORING]
|
||||
|
||||
# Maximum number of nested blocks for function / method body
|
||||
max-nested-blocks=5
|
||||
|
||||
# Complete name of functions that never returns. When checking for
|
||||
# inconsistent-return-statements if a never returning function is called then
|
||||
# it will be considered as an explicit return statement and no message will be
|
||||
# printed.
|
||||
never-returning-functions=optparse.Values,sys.exit
|
||||
|
||||
|
||||
[LOGGING]
|
||||
|
||||
# Logging modules to check that the string format arguments are in logging
|
||||
# function parameter format
|
||||
logging-modules=logging
|
||||
|
||||
|
||||
[SPELLING]
|
||||
|
||||
# Limits count of emitted suggestions for spelling mistakes
|
||||
max-spelling-suggestions=4
|
||||
|
||||
# Spelling dictionary name. Available dictionaries: none. To make it working
|
||||
# install python-enchant package.
|
||||
spelling-dict=
|
||||
|
||||
# List of comma separated words that should not be checked.
|
||||
spelling-ignore-words=
|
||||
|
||||
# A path to a file that contains private dictionary; one word per line.
|
||||
spelling-private-dict-file=
|
||||
|
||||
# Tells whether to store unknown words to indicated private dictionary in
|
||||
# --spelling-private-dict-file option instead of raising a message.
|
||||
spelling-store-unknown-words=no
|
||||
|
||||
|
||||
[MISCELLANEOUS]
|
||||
|
||||
# List of note tags to take in consideration, separated by a comma.
|
||||
notes=FIXME,
|
||||
XXX,
|
||||
TODO
|
||||
|
||||
|
||||
[SIMILARITIES]
|
||||
|
||||
# Ignore comments when computing similarities.
|
||||
ignore-comments=yes
|
||||
|
||||
# Ignore docstrings when computing similarities.
|
||||
ignore-docstrings=yes
|
||||
|
||||
# Ignore imports when computing similarities.
|
||||
ignore-imports=no
|
||||
|
||||
# Minimum lines number of a similarity.
|
||||
min-similarity-lines=4
|
||||
|
||||
|
||||
[TYPECHECK]
|
||||
|
||||
# List of decorators that produce context managers, such as
|
||||
# contextlib.contextmanager. Add to this list to register other decorators that
|
||||
# produce valid context managers.
|
||||
contextmanager-decorators=contextlib.contextmanager
|
||||
|
||||
# List of members which are set dynamically and missed by pylint inference
|
||||
# system, and so shouldn't trigger E1101 when accessed. Python regular
|
||||
# expressions are accepted.
|
||||
generated-members=capnp.* cereal.* pygame.* zmq.* setproctitle.* smbus2.* usb1.* serial.* cv2.*
|
||||
|
||||
# Tells whether missing members accessed in mixin class should be ignored. A
|
||||
# mixin class is detected if its name ends with "mixin" (case insensitive).
|
||||
ignore-mixin-members=yes
|
||||
|
||||
# This flag controls whether pylint should warn about no-member and similar
|
||||
# checks whenever an opaque object is returned when inferring. The inference
|
||||
# can return multiple potential results while evaluating a Python object, but
|
||||
# some branches might not be evaluated, which results in partial inference. In
|
||||
# that case, it might be useful to still emit no-member and other checks for
|
||||
# the rest of the inferred objects.
|
||||
ignore-on-opaque-inference=yes
|
||||
|
||||
# List of class names for which member attributes should not be checked (useful
|
||||
# for classes with dynamically set attributes). This supports the use of
|
||||
# qualified names.
|
||||
ignored-classes=optparse.Values,thread._local,_thread._local
|
||||
|
||||
# List of module names for which member attributes should not be checked
|
||||
# (useful for modules/projects where namespaces are manipulated during runtime
|
||||
# and thus existing member attributes cannot be deduced by static analysis. It
|
||||
# supports qualified module names, as well as Unix pattern matching.
|
||||
ignored-modules=flask setproctitle usb1 flask.ext.socketio smbus2 usb1.*
|
||||
|
||||
# Show a hint with possible names when a member name was not found. The aspect
|
||||
# of finding the hint is based on edit distance.
|
||||
missing-member-hint=yes
|
||||
|
||||
# The minimum edit distance a name should have in order to be considered a
|
||||
# similar match for a missing member name.
|
||||
missing-member-hint-distance=1
|
||||
|
||||
# The total number of similar names that should be taken in consideration when
|
||||
# showing a hint for a missing member.
|
||||
missing-member-max-choices=1
|
||||
|
||||
|
||||
[VARIABLES]
|
||||
|
||||
# List of additional names supposed to be defined in builtins. Remember that
|
||||
# you should avoid to define new builtins when possible.
|
||||
additional-builtins=
|
||||
|
||||
# Tells whether unused global variables should be treated as a violation.
|
||||
allow-global-unused-variables=yes
|
||||
|
||||
# List of strings which can identify a callback function by name. A callback
|
||||
# name must start or end with one of those strings.
|
||||
callbacks=cb_,
|
||||
_cb
|
||||
|
||||
# A regular expression matching the name of dummy variables (i.e. expectedly
|
||||
# not used).
|
||||
dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
|
||||
|
||||
# Argument names that match this expression will be ignored. Default to name
|
||||
# with leading underscore
|
||||
ignored-argument-names=_.*|^ignored_|^unused_
|
||||
|
||||
# Tells whether we should check for unused import in __init__ files.
|
||||
init-import=no
|
||||
|
||||
# List of qualified module names which can have objects that can redefine
|
||||
# builtins.
|
||||
redefining-builtins-modules=six.moves,past.builtins,future.builtins
|
||||
|
||||
|
||||
[FORMAT]
|
||||
|
||||
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
|
||||
expected-line-ending-format=
|
||||
|
||||
# Regexp for a line that is allowed to be longer than the limit.
|
||||
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
|
||||
|
||||
# Number of spaces of indent required inside a hanging or continued line.
|
||||
indent-after-paren=4
|
||||
|
||||
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
|
||||
# tab).
|
||||
indent-string=' '
|
||||
|
||||
# Maximum number of characters on a single line.
|
||||
max-line-length=100
|
||||
|
||||
# Maximum number of lines in a module
|
||||
max-module-lines=1000
|
||||
|
||||
# List of optional constructs for which whitespace checking is disabled. `dict-
|
||||
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
|
||||
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
|
||||
# `empty-line` allows space-only lines.
|
||||
no-space-check=trailing-comma,
|
||||
dict-separator
|
||||
|
||||
# Allow the body of a class to be on the same line as the declaration if body
|
||||
# contains single statement.
|
||||
single-line-class-stmt=no
|
||||
|
||||
# Allow the body of an if to be on the same line as the test if there is no
|
||||
# else.
|
||||
single-line-if-stmt=no
|
||||
|
||||
|
||||
[BASIC]
|
||||
|
||||
# Naming style matching correct argument names
|
||||
argument-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct argument names. Overrides argument-
|
||||
# naming-style
|
||||
#argument-rgx=
|
||||
|
||||
# Naming style matching correct attribute names
|
||||
attr-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct attribute names. Overrides attr-naming-
|
||||
# style
|
||||
#attr-rgx=
|
||||
|
||||
# Bad variable names which should always be refused, separated by a comma
|
||||
bad-names=foo,
|
||||
bar,
|
||||
baz,
|
||||
toto,
|
||||
tutu,
|
||||
tata
|
||||
|
||||
# Naming style matching correct class attribute names
|
||||
class-attribute-naming-style=any
|
||||
|
||||
# Regular expression matching correct class attribute names. Overrides class-
|
||||
# attribute-naming-style
|
||||
#class-attribute-rgx=
|
||||
|
||||
# Naming style matching correct class names
|
||||
class-naming-style=PascalCase
|
||||
|
||||
# Regular expression matching correct class names. Overrides class-naming-style
|
||||
#class-rgx=
|
||||
|
||||
# Naming style matching correct constant names
|
||||
const-naming-style=UPPER_CASE
|
||||
|
||||
# Regular expression matching correct constant names. Overrides const-naming-
|
||||
# style
|
||||
#const-rgx=
|
||||
|
||||
# Minimum line length for functions/classes that require docstrings, shorter
|
||||
# ones are exempt.
|
||||
docstring-min-length=-1
|
||||
|
||||
# Naming style matching correct function names
|
||||
function-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct function names. Overrides function-
|
||||
# naming-style
|
||||
#function-rgx=
|
||||
|
||||
# Good variable names which should always be accepted, separated by a comma
|
||||
good-names=i,
|
||||
j,
|
||||
k,
|
||||
ex,
|
||||
Run,
|
||||
_
|
||||
|
||||
# Include a hint for the correct naming format with invalid-name
|
||||
include-naming-hint=no
|
||||
|
||||
# Naming style matching correct inline iteration names
|
||||
inlinevar-naming-style=any
|
||||
|
||||
# Regular expression matching correct inline iteration names. Overrides
|
||||
# inlinevar-naming-style
|
||||
#inlinevar-rgx=
|
||||
|
||||
# Naming style matching correct method names
|
||||
method-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct method names. Overrides method-naming-
|
||||
# style
|
||||
#method-rgx=
|
||||
|
||||
# Naming style matching correct module names
|
||||
module-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct module names. Overrides module-naming-
|
||||
# style
|
||||
#module-rgx=
|
||||
|
||||
# Colon-delimited sets of names that determine each other's naming style when
|
||||
# the name regexes allow several styles.
|
||||
name-group=
|
||||
|
||||
# Regular expression which should only match function or class names that do
|
||||
# not require a docstring.
|
||||
no-docstring-rgx=^_
|
||||
|
||||
# List of decorators that produce properties, such as abc.abstractproperty. Add
|
||||
# to this list to register other decorators that produce valid properties.
|
||||
property-classes=abc.abstractproperty
|
||||
|
||||
# Naming style matching correct variable names
|
||||
variable-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct variable names. Overrides variable-
|
||||
# naming-style
|
||||
#variable-rgx=
|
||||
|
||||
|
||||
[DESIGN]
|
||||
|
||||
# Maximum number of arguments for function / method
|
||||
max-args=5
|
||||
|
||||
# Maximum number of attributes for a class (see R0902).
|
||||
max-attributes=7
|
||||
|
||||
# Maximum number of boolean expressions in a if statement
|
||||
max-bool-expr=5
|
||||
|
||||
# Maximum number of branch for function / method body
|
||||
max-branches=12
|
||||
|
||||
# Maximum number of locals for function / method body
|
||||
max-locals=15
|
||||
|
||||
# Maximum number of parents for a class (see R0901).
|
||||
max-parents=7
|
||||
|
||||
# Maximum number of public methods for a class (see R0904).
|
||||
max-public-methods=20
|
||||
|
||||
# Maximum number of return / yield for function / method body
|
||||
max-returns=6
|
||||
|
||||
# Maximum number of statements in function / method body
|
||||
max-statements=50
|
||||
|
||||
# Minimum number of public methods for a class (see R0903).
|
||||
min-public-methods=2
|
||||
|
||||
|
||||
[CLASSES]
|
||||
|
||||
# List of method names used to declare (i.e. assign) instance attributes.
|
||||
defining-attr-methods=__init__,
|
||||
__new__,
|
||||
setUp
|
||||
|
||||
# List of member names, which should be excluded from the protected access
|
||||
# warning.
|
||||
exclude-protected=_asdict,
|
||||
_fields,
|
||||
_replace,
|
||||
_source,
|
||||
_make
|
||||
|
||||
# List of valid names for the first argument in a class method.
|
||||
valid-classmethod-first-arg=cls
|
||||
|
||||
# List of valid names for the first argument in a metaclass class method.
|
||||
valid-metaclass-classmethod-first-arg=mcs
|
||||
|
||||
|
||||
[IMPORTS]
|
||||
|
||||
# Allow wildcard imports from modules that define __all__.
|
||||
allow-wildcard-with-all=no
|
||||
|
||||
# Analyse import fallback blocks. This can be used to support both Python 2 and
|
||||
# 3 compatible code, which means that the block might have code that exists
|
||||
# only in one or another interpreter, leading to false positives when analysed.
|
||||
analyse-fallback-blocks=no
|
||||
|
||||
# Deprecated modules which should not be used, separated by a comma
|
||||
deprecated-modules=regsub,
|
||||
TERMIOS,
|
||||
Bastion,
|
||||
rexec
|
||||
|
||||
# Create a graph of external dependencies in the given file (report RP0402 must
|
||||
# not be disabled)
|
||||
ext-import-graph=
|
||||
|
||||
# Create a graph of every (i.e. internal and external) dependencies in the
|
||||
# given file (report RP0402 must not be disabled)
|
||||
import-graph=
|
||||
|
||||
# Create a graph of internal dependencies in the given file (report RP0402 must
|
||||
# not be disabled)
|
||||
int-import-graph=
|
||||
|
||||
# Force import order to recognize a module as part of the standard
|
||||
# compatibility libraries.
|
||||
known-standard-library=
|
||||
|
||||
# Force import order to recognize a module as part of a third party library.
|
||||
known-third-party=enchant
|
||||
|
||||
|
||||
[EXCEPTIONS]
|
||||
|
||||
# Exceptions that will emit a warning when being caught. Defaults to
|
||||
# "Exception"
|
||||
overgeneral-exceptions=Exception
|
||||
@@ -3,12 +3,5 @@ sudo: required
|
||||
services:
|
||||
- docker
|
||||
|
||||
install:
|
||||
- docker build -t tmppilot -f Dockerfile.openpilot .
|
||||
|
||||
script:
|
||||
- docker run
|
||||
-v "$(pwd)"/selfdrive/test/tests/plant/out:/tmp/openpilot/selfdrive/test/tests/plant/out
|
||||
tmppilot /bin/sh -c 'cd /tmp/openpilot/selfdrive/test/tests/plant && OPTEST=1 ./test_longitudinal.py'
|
||||
- docker run
|
||||
tmppilot /bin/sh -c 'cd /tmp/openpilot/selfdrive/test/ && ./test_fingerprints.py'
|
||||
- ./run_docker_tests.sh
|
||||
|
||||
@@ -10,9 +10,22 @@ Most open source development activity is coordinated through our [Discord](https
|
||||
* Make sure you have a [GitHub account](https://github.com/signup/free)
|
||||
* Fork [our repositories](https://github.com/commaai) on GitHub
|
||||
|
||||
## Testing
|
||||
|
||||
### Local Testing
|
||||
|
||||
You can test your changes on your machine by running `run_docker_tests.sh`. This will run some automated tests in docker against your code.
|
||||
|
||||
### Automated Testing
|
||||
|
||||
All PRs are automatically checked by travis. Check out `.travis.yml` for what travis runs. Any new tests sould be added to travis.
|
||||
|
||||
### Code Style and Linting
|
||||
|
||||
Code is automatically check for style by travis as part of the automated tests. You can also run these yourself by running `check_code_quality.sh`.
|
||||
|
||||
## Car Ports (openpilot)
|
||||
|
||||
We've released a [Model Port guide](https://medium.com/@comma_ai/openpilot-port-guide-for-toyota-models-e5467f4b5fe6) for porting to Toyota/Lexus models.
|
||||
|
||||
If you port openpilot to a substantially new car brand, see this more generic [Brand Port guide](https://medium.com/@comma_ai/how-to-write-a-car-port-for-openpilot-7ce0785eda84). You might also be eligible for a bounty. See our bounties at [comma.ai/bounties.html](https://comma.ai/bounties.html)
|
||||
|
||||
|
||||
@@ -2,38 +2,55 @@ FROM ubuntu:16.04
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
autoconf \
|
||||
build-essential \
|
||||
clang \
|
||||
vim \
|
||||
screen \
|
||||
wget \
|
||||
bzip2 \
|
||||
clang \
|
||||
git \
|
||||
libglib2.0-0 \
|
||||
python-pip \
|
||||
capnproto \
|
||||
libcapnp-dev \
|
||||
libzmq5-dev \
|
||||
libarchive-dev \
|
||||
libavcodec-dev \
|
||||
libavdevice-dev \
|
||||
libavfilter-dev \
|
||||
libavresample-dev \
|
||||
libavutil-dev \
|
||||
libffi-dev \
|
||||
libusb-1.0-0 \
|
||||
libglib2.0-0 \
|
||||
libssl-dev \
|
||||
libswscale-dev \
|
||||
libtool \
|
||||
libusb-1.0-0 \
|
||||
libzmq5-dev \
|
||||
ocl-icd-libopencl1 \
|
||||
ocl-icd-opencl-dev \
|
||||
opencl-headers
|
||||
opencl-headers \
|
||||
pkg-config \
|
||||
python-pip \
|
||||
wget
|
||||
|
||||
RUN pip install numpy==1.11.2 scipy==0.18.1 matplotlib==2.1.2
|
||||
COPY phonelibs/install_capnp.sh /tmp/install_capnp.sh
|
||||
RUN /tmp/install_capnp.sh
|
||||
|
||||
COPY requirements_openpilot.txt /tmp/
|
||||
RUN pip install -r /tmp/requirements_openpilot.txt
|
||||
RUN pip install --upgrade pip==18.0
|
||||
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 git clone --branch v0.6 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
|
||||
|
||||
COPY ./.pylintrc /tmp/openpilot/.pylintrc
|
||||
COPY ./common /tmp/openpilot/common
|
||||
COPY ./cereal /tmp/openpilot/cereal
|
||||
COPY ./opendbc /tmp/openpilot/opendbc
|
||||
COPY ./selfdrive /tmp/openpilot/selfdrive
|
||||
COPY ./phonelibs /tmp/openpilot/phonelibs
|
||||
COPY ./pyextra /tmp/openpilot/pyextra
|
||||
COPY ./panda /tmp/openpilot/panda
|
||||
|
||||
RUN mkdir -p /tmp/openpilot/selfdrive/test/out
|
||||
RUN make -C /tmp/openpilot/selfdrive/controls/lib/longitudinal_mpc clean
|
||||
|
||||
143
Pipfile
Normal file
143
Pipfile
Normal file
@@ -0,0 +1,143 @@
|
||||
[[source]]
|
||||
name = "pypi"
|
||||
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"
|
||||
bincopy = "*"
|
||||
bleach = "==1.5.0"
|
||||
boto = "*"
|
||||
"boto3" = "*"
|
||||
celery = "*"
|
||||
control = "*"
|
||||
datadog = "*"
|
||||
decorator = "*"
|
||||
dlib = "*"
|
||||
dominate = "*"
|
||||
elasticsearch = "*"
|
||||
entium = "==0.1.4"
|
||||
fasteners = "*"
|
||||
future = "*"
|
||||
futures = "*"
|
||||
gevent = "*"
|
||||
pycocotools = {git = "https://github.com/cocodataset/cocoapi.git",subdirectory = "PythonAPI"}
|
||||
gunicorn = "*"
|
||||
"h5py" = "*"
|
||||
hexdump = "*"
|
||||
"html5lib" = "==0.9999999"
|
||||
imageio = "*"
|
||||
intervaltree = "*"
|
||||
ipykernel = "<5.0"
|
||||
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"
|
||||
percache = "*"
|
||||
pprofile = "*"
|
||||
psutil = "*"
|
||||
pycurl = "*"
|
||||
git-pylint-commit-hook = "==2.5.1"
|
||||
pymongo = "*"
|
||||
"pynmea2" = "*"
|
||||
pypolyline = "==0.1.17"
|
||||
pysendfile = "*"
|
||||
python-logstash = "*"
|
||||
pyvcd = "*"
|
||||
redis = "*"
|
||||
redlock = "*"
|
||||
"s2sphere" = "*"
|
||||
scikit-image = "*"
|
||||
"subprocess32" = "*"
|
||||
supervisor = "*"
|
||||
tenacity = "*"
|
||||
tensorflow-gpu = "==1.13.0rc0"
|
||||
"transforms3d" = "*"
|
||||
utm = "*"
|
||||
"v4l2" = "*"
|
||||
visdom = "*"
|
||||
PyJWT = "==1.4.1"
|
||||
PyMySQL = "==0.9.2"
|
||||
Theano = "*"
|
||||
Werkzeug = "*"
|
||||
"backports.lzma" = "*"
|
||||
Flask-Cors = "*"
|
||||
Flask-SocketIO = "*"
|
||||
"GeoAlchemy2" = "*"
|
||||
Keras = ">=2.1.6"
|
||||
keras-maskrcnn = "*"
|
||||
keras-retinanet = "*"
|
||||
Pygments = "*"
|
||||
PyNaCl = "*"
|
||||
"PySDL2" = "*"
|
||||
reverse_geocoder = "*"
|
||||
Shapely = "*"
|
||||
SQLAlchemy = "==1.2.7"
|
||||
uWSGI = "*"
|
||||
scipy = "*"
|
||||
fastcluster = "==1.1.25"
|
||||
backports-abc = "*"
|
||||
pygame = "*"
|
||||
simplejson = "*"
|
||||
python-logstash-async = "*"
|
||||
pandas = "*"
|
||||
seaborn = "*"
|
||||
|
||||
[packages]
|
||||
overpy = {git = "https://github.com/commaai/python-overpy.git",ref = "f86529af402d4642e1faeb146671c40284007323"}
|
||||
atomicwrites = "*"
|
||||
cffi = "*"
|
||||
crcmod = "*"
|
||||
hexdump = "*"
|
||||
libusb1 = "*"
|
||||
numpy = "*"
|
||||
psutil = "*"
|
||||
pycapnp = "*"
|
||||
cryptography = "*"
|
||||
pyserial = "*"
|
||||
python-dateutil = "*"
|
||||
pyzmq = "*"
|
||||
raven = "*"
|
||||
requests = "*"
|
||||
setproctitle = "*"
|
||||
six = "*"
|
||||
smbus2 = "*"
|
||||
sympy = "*"
|
||||
tqdm = "*"
|
||||
Cython = "*"
|
||||
PyYAML = "*"
|
||||
websocket_client = "*"
|
||||
Logentries = {git = "https://github.com/commaai/le_python.git",ref = "5eef8f5be5929d33973e1b10e686fa0cdcd6792f"}
|
||||
urllib3 = "*"
|
||||
chardet = "*"
|
||||
idna = "*"
|
||||
gunicorn = "*"
|
||||
utm = "*"
|
||||
json-rpc = "*"
|
||||
Flask = "*"
|
||||
PyJWT = "*"
|
||||
"Jinja2" = "*"
|
||||
nose = "*"
|
||||
pyflakes = "*"
|
||||
pylint = "*"
|
||||
pycryptodome = "*"
|
||||
|
||||
[requires]
|
||||
python_version = "2.7"
|
||||
2860
Pipfile.lock
generated
Normal file
2860
Pipfile.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
60
README.md
60
README.md
@@ -1,4 +1,4 @@
|
||||
[](#)
|
||||
[](#)
|
||||
|
||||
Welcome to openpilot
|
||||
======
|
||||
@@ -60,14 +60,15 @@ Supported Cars
|
||||
|
||||
| Make | Model | Supported Package | Lateral | Longitudinal | No Accel Below | No Steer Below | Giraffe |
|
||||
| ---------------------| -------------------------| ---------------------| --------| ---------------| -----------------| ---------------|-------------------|
|
||||
| Acura | ILX 2016-17 | AcuraWatch Plus | Yes | Yes | 25mph<sup>1</sup>| 25mph | Nidec |
|
||||
| Acura | RDX 2018 | AcuraWatch Plus | Yes | Yes | 25mph<sup>1</sup>| 12mph | Nidec |
|
||||
| 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>|
|
||||
| Chrysler | Pacifica 2018 | Adaptive Cruise | Yes | Stock | 0mph | 9mph | FCA |
|
||||
| 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>|
|
||||
| Honda | Accord 2018 | All | Yes | Stock | 0mph | 3mph | Bosch |
|
||||
@@ -75,38 +76,50 @@ Supported Cars
|
||||
| Honda | Civic Sedan/Coupe 2019 | Honda Sensing | Yes | Stock | 0mph | 2mph | Bosch |
|
||||
| Honda | Civic Hatchback 2017-19 | Honda Sensing | Yes | Stock | 0mph | 12mph | Bosch |
|
||||
| Honda | CR-V 2015-16 | Touring | Yes | Yes | 25mph<sup>1</sup>| 12mph | Nidec |
|
||||
| Honda | CR-V 2017-18 | Honda Sensing | Yes | Stock | 0mph | 12mph | Bosch |
|
||||
| Honda | Odyssey 2017-19 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 0mph | Inverted Nidec |
|
||||
| Honda | CR-V 2017-19 | Honda Sensing | Yes | Stock | 0mph | 12mph | Bosch |
|
||||
| Honda | CR-V Hybrid 2017-2019 | Honda Sensing | Yes | Stock | 0mph | 12mph | Bosch |
|
||||
| Honda | Odyssey 2018-19 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 0mph | Inverted Nidec |
|
||||
| Honda | Passport 2019 | All | Yes | Yes | 25mph<sup>1</sup>| 12mph | Inverted Nidec |
|
||||
| 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 | SCC + LKAS | Yes | Stock | 19mph | 34mph | 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>|
|
||||
| Jeep | Grand Cherokee 2017-19 | Adaptive Cruise | Yes | Stock | 0mph | 9mph | FCA |
|
||||
| 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>|
|
||||
| Lexus | RX Hybrid 2016-18 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
|
||||
| Toyota | Camry 2018<sup>4</sup> | All | Yes | Stock | 0mph<sup>5</sup> | 0mph | Toyota |
|
||||
| Toyota | C-HR 2017-18<sup>4</sup> | All | Yes | Stock | 0mph | 0mph | Toyota |
|
||||
| Toyota | Corolla 2017-18 | All | Yes | Yes<sup>2</sup>| 20mph<sup>1</sup>| 0mph | Toyota |
|
||||
| Toyota | Highlander 2017-18 | All | Yes | Yes<sup>2</sup>| 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 |
|
||||
| Subaru | Crosstrek 2018 | EyeSight | Yes | Stock | 0mph | 0mph | Custom<sup>4</sup>|
|
||||
| Subaru | Impreza 2019 | EyeSight | Yes | Stock | 0mph | 0mph | Custom<sup>4</sup>|
|
||||
| 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 | C-HR 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 | Highlander 2017-19 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
|
||||
| Toyota | Highlander Hybrid 2018 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
|
||||
| Toyota | Prius 2016 | TSS-P | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
|
||||
| Toyota | Prius 2017-18 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
|
||||
| Toyota | Prius Prime 2017-18 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
|
||||
| Toyota | Prius 2017-19 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
|
||||
| Toyota | Prius Prime 2017-19 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
|
||||
| Toyota | Rav4 2016 | TSS-P | Yes | Yes<sup>2</sup>| 20mph<sup>1</sup>| 0mph | Toyota |
|
||||
| Toyota | Rav4 2017-18 | All | Yes | Yes<sup>2</sup>| 20mph<sup>1</sup>| 0mph | Toyota |
|
||||
| Toyota | Rav4 2019 | All | Yes | Yes | 0mph | 0mph | Toyota |
|
||||
| Toyota | Rav4 Hybrid 2017-18 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
|
||||
| Toyota | Sienna 2018 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
|
||||
|
||||
<sup>1</sup>[Comma Pedal](https://community.comma.ai/wiki/index.php/Comma_Pedal) is used to provide stop-and-go capability to some of the openpilot-supported cars that don't currently support stop-and-go. Here is how to [build a Comma Pedal](https://medium.com/@jfrux/comma-pedal-building-with-macrofab-6328bea791e8). ***NOTE: The Comma Pedal is not officially supported by [comma.ai](https://comma.ai)***
|
||||
<sup>2</sup>When disconnecting the Driver Support Unit (DSU), otherwise longitudinal control is stock ACC. For DSU locations, see [Toyota Wiki page](https://community.comma.ai/wiki/index.php/Toyota)
|
||||
<sup>3</sup>[GM installation guide](https://zoneos.com/volt/).
|
||||
<sup>4</sup>It needs an extra 120Ohm resistor ([pic1](https://i.imgur.com/CmdKtTP.jpg), [pic2](https://i.imgur.com/s2etUo6.jpg)) on bus 3 and giraffe switches set to 01X1 (11X1 for stock LKAS), where X depends on if you have the [comma power](https://comma.ai/shop/products/power/).
|
||||
<sup>5</sup>28mph for Camry 4CYL L, 4CYL LE and 4CYL SE which don't have Full-Speed Range Dynamic Radar Cruise Control.
|
||||
<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.
|
||||
<sup>7</sup>Community built Giraffe, find more information [here](https://zoneos.com/shop/).
|
||||
<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). <br />
|
||||
<sup>3</sup>[GM installation guide](https://zoneos.com/volt/). <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 />
|
||||
|
||||
Community Maintained Cars
|
||||
------
|
||||
@@ -154,6 +167,7 @@ Directory structure
|
||||
├── pyextra # Libraries used on EON
|
||||
└── selfdrive # Code needed to drive the car
|
||||
├── assets # Fonts and images for UI
|
||||
├── athena # Allows communication with the app
|
||||
├── boardd # Daemon to talk to the board
|
||||
├── can # Helpers for parsing CAN messages
|
||||
├── car # Car specific code to read states and control actuators
|
||||
@@ -163,8 +177,6 @@ Directory structure
|
||||
├── locationd # Soon to be home of precise location
|
||||
├── logcatd # Android logcat as a service
|
||||
├── loggerd # Logger and uploader of car data
|
||||
├── mapd # Fetches map data and computes next global path
|
||||
├── orbd # Computes ORB features from frames
|
||||
├── proclogd # Logs information from proc
|
||||
├── sensord # IMU / GPS interface code
|
||||
├── test # Car simulator running code through virtual maneuvers
|
||||
|
||||
64
RELEASES.md
64
RELEASES.md
@@ -1,13 +1,71 @@
|
||||
Version 0.6.1 (2019-07-21)
|
||||
========================
|
||||
* Remote SSH with comma prime and [ssh.comma.ai](https://ssh.comma.ai)
|
||||
* Panda code Misra-c2012 compliance, tested against cppcheck coverage
|
||||
* Lockout openpilot after 3 terminal alerts for driver distracted or unresponsive
|
||||
* Toyota Sienna support thanks to wocsor!
|
||||
|
||||
Version 0.6 (2019-07-01)
|
||||
========================
|
||||
* New model, with double the pixels and ten times the temporal context!
|
||||
* Car should not take exits when in the right lane
|
||||
* openpilot uses only ~65% of the CPU (down from 75%)
|
||||
* Routes visible in connect/explorer after only 0.2% is uploaded (qlogs)
|
||||
* loggerd and sensord are open source, every line of openpilot is now open
|
||||
* Panda safety code is MISRA compliant and ships with a signed version on release2
|
||||
* New NEOS is 500MB smaller and has a reproducible usr/pipenv
|
||||
* Lexus ES Hybrid support thanks to wocsor!
|
||||
* Improve tuning for supported Toyota with TSS2
|
||||
* Various other stability improvements
|
||||
|
||||
Version 0.5.13 (2019-05-31)
|
||||
==========================
|
||||
* Reduce panda power consumption by 70%, down to 80mW, when car is off (not for GM)
|
||||
* Reduce EON power consumption by 40%, down to 1100mW, when car is off
|
||||
* Reduce CPU utilization by 20% and improve stability
|
||||
* Temporarily remove mapd functionalities to improve stability
|
||||
* Add openpilot record-only mode for unsupported cars
|
||||
* Synchronize controlsd to boardd to reduce latency
|
||||
* Remove panda support for Subaru giraffe
|
||||
|
||||
Version 0.5.12 (2019-05-16)
|
||||
==========================
|
||||
* Improve lateral control for the Prius and Prius Prime
|
||||
* Compress logs before writing to disk
|
||||
* Remove old driving data when storage reaches 90% full
|
||||
* Fix small offset in following distance
|
||||
* Various small CPU optimizations
|
||||
* Improve offroad power consumption: require NEOS Update
|
||||
* Add default speed limits for Estonia thanks to martinl!
|
||||
* Subaru Crosstrek support thanks to martinl!
|
||||
* Toyota Avalon support thanks to njbrown09!
|
||||
* Toyota Rav4 with TSS 2.0 support thanks to wocsor!
|
||||
* Toyota Corolla with TSS 2.0 support thanks to wocsor!
|
||||
|
||||
Version 0.5.11 (2019-04-17)
|
||||
========================
|
||||
* Add support for Subaru
|
||||
* Reduce panda power consumption by 60% when car is off
|
||||
* Fix controlsd lag every 6 minutes. This would sometimes cause disengagements
|
||||
* Fix bug in controls with new angle-offset learner in MPC
|
||||
* Reduce cpu consumption of ubloxd by rewriting it in C++
|
||||
* Improve driver monitoring model and face detection
|
||||
* Improve performance of visiond and ui
|
||||
* Honda Passport 2019 support
|
||||
* Lexus RX Hybrid 2019 support thanks to schomems!
|
||||
* Improve road selection heuristic in mapd
|
||||
* Add Lane Departure Warning to dashboard for Toyota thanks to arne182
|
||||
|
||||
Version 0.5.10 (2019-03-19)
|
||||
========================
|
||||
* Self-tuning vehicle parameters: steering offset, tires stiffness and steering ratio
|
||||
* Self-tuning vehicle parameters: steering offset, tire stiffness and steering ratio
|
||||
* Improve longitudinal control at low speed when lead vehicle harshly decelerates
|
||||
* Fix panda bug going unexpectedly in DCP mode when EON is connected
|
||||
* Reduce white panda power consumption by 500mW when EON is disconnected by turning off WIFI
|
||||
* New Driver Monitoring Model
|
||||
* Support QR codes for login using comma connect
|
||||
* Refactor comma pedal FW and use CRC-8 checksum algorithm for safety. Reflashing pedal is required.
|
||||
Please see `#hw-pedal` on [discord](discord.comma.ai) for assistance updating comma pedal.
|
||||
* Refactor comma pedal FW and use CRC-8 checksum algorithm for safety. Reflashing pedal is required.
|
||||
Please see `#hw-pedal` on [discord](discord.comma.ai) for assistance updating comma pedal.
|
||||
* Additional speed limit rules for Germany thanks to arne182
|
||||
* Allow negative speed limit offsets
|
||||
|
||||
|
||||
13
SAFETY.md
13
SAFETY.md
@@ -133,6 +133,19 @@ Chrysler/Jeep/Fiat (Lateral only)
|
||||
units above the actual EPS generated motor torque to ensure limited differences between
|
||||
commanded and actual torques.
|
||||
|
||||
Subaru (Lateral only)
|
||||
------
|
||||
|
||||
- While the system is engaged, steer commands are subject to the same limits used by
|
||||
the stock system.
|
||||
|
||||
- Steering torque is controlled through the 0x122 CAN message and it's limited by the panda firmware and by
|
||||
openpilot to a value between -255 and 255. In addition, the vehicle EPS unit will fault for
|
||||
commands outside the values of -2047 and 2047. A steering torque rate limit is enforced by the panda firmware and by
|
||||
openpilot, so that the commanded steering torque must rise from 0 to max value no faster than
|
||||
0.41s. Commanded steering torque is gradually limited by the panda firmware and by openpilot if the driver's
|
||||
torque exceeds 60 units in the opposite dicrection to ensure limited applied torque against the
|
||||
driver's will.
|
||||
|
||||
**Extra note**: comma.ai strongly discourages the use of openpilot forks with safety code either missing or
|
||||
not fully meeting the above requirements.
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
3
cereal/.gitignore
vendored
3
cereal/.gitignore
vendored
@@ -1,3 +1,6 @@
|
||||
gen
|
||||
node_modules
|
||||
package-lock.json
|
||||
*.pyc
|
||||
__pycache__
|
||||
|
||||
|
||||
@@ -6,24 +6,24 @@ GENS := gen/cpp/car.capnp.c++ gen/cpp/log.capnp.c++
|
||||
JS := gen/js/car.capnp.js gen/js/log.capnp.js
|
||||
|
||||
UNAME_M ?= $(shell uname -m)
|
||||
# only generate C++ for docker tests
|
||||
ifneq ($(OPTEST),1)
|
||||
GENS += gen/c/car.capnp.c gen/c/log.capnp.c gen/c/include/c++.capnp.h gen/c/include/java.capnp.h
|
||||
|
||||
ifeq ($(UNAME_M),x86_64)
|
||||
ifneq (, $(shell which capnpc-java))
|
||||
GENS += gen/java/Car.java gen/java/Log.java
|
||||
else
|
||||
$(warning capnpc-java not found, skipping java build)
|
||||
endif
|
||||
endif
|
||||
GENS += gen/c/car.capnp.c gen/c/log.capnp.c gen/c/include/c++.capnp.h gen/c/include/java.capnp.h
|
||||
|
||||
ifeq ($(UNAME_M),x86_64)
|
||||
|
||||
ifneq (, $(shell which capnpc-java))
|
||||
GENS += gen/java/Car.java gen/java/Log.java
|
||||
else
|
||||
$(warning capnpc-java not found, skipping java build)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(UNAME_M),aarch64)
|
||||
CAPNPC=PATH=$(PWD)/../phonelibs/capnp-cpp/aarch64/bin/:$$PATH capnpc
|
||||
CAPNPC=PATH=$(PWD)/../phonelibs/capnp-cpp/aarch64/bin/:$$PATH capnpc
|
||||
else
|
||||
CAPNPC=capnpc
|
||||
CAPNPC=capnpc
|
||||
endif
|
||||
|
||||
.PHONY: all
|
||||
|
||||
157
cereal/car.capnp
157
cereal/car.capnp
@@ -22,7 +22,7 @@ struct CarEvent @0x9b1657f34caf3ad3 {
|
||||
|
||||
enum EventName @0xbaa8c5d505f727de {
|
||||
# TODO: copy from error list
|
||||
commIssue @0;
|
||||
canError @0;
|
||||
steerUnavailable @1;
|
||||
brakeUnavailable @2;
|
||||
gasUnavailable @3;
|
||||
@@ -37,7 +37,7 @@ struct CarEvent @0x9b1657f34caf3ad3 {
|
||||
buttonEnable @12;
|
||||
pedalPressed @13;
|
||||
cruiseDisabled @14;
|
||||
radarCommIssue @15;
|
||||
radarCanError @15;
|
||||
dataNeeded @16;
|
||||
speedTooLow @17;
|
||||
outOfSpace @18;
|
||||
@@ -49,7 +49,7 @@ struct CarEvent @0x9b1657f34caf3ad3 {
|
||||
pcmDisable @24;
|
||||
noTarget @25;
|
||||
radarFault @26;
|
||||
modelCommIssue @27;
|
||||
modelCommIssueDEPRECATED @27;
|
||||
brakeHold @28;
|
||||
parkBrake @29;
|
||||
manualRestart @30;
|
||||
@@ -73,6 +73,13 @@ struct CarEvent @0x9b1657f34caf3ad3 {
|
||||
lowBattery @48;
|
||||
invalidGiraffeHonda @49;
|
||||
vehicleModelInvalid @50;
|
||||
controlsFailed @51;
|
||||
sensorDataInvalid @52;
|
||||
commIssue @53;
|
||||
tooDistracted @54;
|
||||
posenetInvalid @55;
|
||||
manualSteeringRequired @56;
|
||||
manualSteeringRequiredBlinkersOn @57;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,6 +128,7 @@ struct CarState {
|
||||
# lock info
|
||||
doorOpen @24 :Bool;
|
||||
seatbeltUnlatched @25 :Bool;
|
||||
canValid @26 :Bool;
|
||||
|
||||
# which packets this state came from
|
||||
canMonoTimes @12: List(UInt64);
|
||||
@@ -174,7 +182,7 @@ struct CarState {
|
||||
|
||||
# ******* radar state @ 20hz *******
|
||||
|
||||
struct RadarState {
|
||||
struct RadarData @0x888ad6581cf0aacb {
|
||||
errors @0 :List(Error);
|
||||
points @1 :List(RadarPoint);
|
||||
|
||||
@@ -182,7 +190,7 @@ struct RadarState {
|
||||
canMonoTimes @2 :List(UInt64);
|
||||
|
||||
enum Error {
|
||||
commIssue @0;
|
||||
canError @0;
|
||||
fault @1;
|
||||
wrongConfig @2;
|
||||
}
|
||||
@@ -247,6 +255,8 @@ struct CarControl {
|
||||
audibleAlert @5: AudibleAlert;
|
||||
rightLaneVisible @6: Bool;
|
||||
leftLaneVisible @7: Bool;
|
||||
rightLaneDepart @8: Bool;
|
||||
leftLaneDepart @9: Bool;
|
||||
|
||||
enum VisualAlert {
|
||||
# these are the choices from the Honda
|
||||
@@ -279,33 +289,86 @@ struct CarControl {
|
||||
|
||||
struct CarParams {
|
||||
carName @0 :Text;
|
||||
radarNameDEPRECATED @1 :Text;
|
||||
carFingerprint @2 :Text;
|
||||
carFingerprint @1 :Text;
|
||||
|
||||
enableSteerDEPRECATED @3 :Bool;
|
||||
enableGasInterceptor @4 :Bool;
|
||||
enableBrakeDEPRECATED @5 :Bool;
|
||||
enableCruise @6 :Bool;
|
||||
enableCamera @26 :Bool;
|
||||
enableDsu @27 :Bool; # driving support unit
|
||||
enableApgs @28 :Bool; # advanced parking guidance system
|
||||
enableGasInterceptor @2 :Bool;
|
||||
enableCruise @3 :Bool;
|
||||
enableCamera @4 :Bool;
|
||||
enableDsu @5 :Bool; # driving support unit
|
||||
enableApgs @6 :Bool; # advanced parking guidance system
|
||||
|
||||
minEnableSpeed @17 :Float32;
|
||||
minSteerSpeed @49 :Float32;
|
||||
safetyModel @18 :Int16;
|
||||
safetyParam @41 :Int16;
|
||||
minEnableSpeed @7 :Float32;
|
||||
minSteerSpeed @8 :Float32;
|
||||
safetyModel @9 :SafetyModel;
|
||||
safetyParam @10 :Int16;
|
||||
|
||||
steerMaxBP @19 :List(Float32);
|
||||
steerMaxV @20 :List(Float32);
|
||||
gasMaxBP @21 :List(Float32);
|
||||
gasMaxV @22 :List(Float32);
|
||||
brakeMaxBP @23 :List(Float32);
|
||||
brakeMaxV @24 :List(Float32);
|
||||
steerMaxBP @11 :List(Float32);
|
||||
steerMaxV @12 :List(Float32);
|
||||
gasMaxBP @13 :List(Float32);
|
||||
gasMaxV @14 :List(Float32);
|
||||
brakeMaxBP @15 :List(Float32);
|
||||
brakeMaxV @16 :List(Float32);
|
||||
|
||||
longPidDeadzoneBP @32 :List(Float32);
|
||||
longPidDeadzoneV @33 :List(Float32);
|
||||
|
||||
enum SafetyModels {
|
||||
# things about the car in the manual
|
||||
mass @17 :Float32; # [kg] running weight
|
||||
wheelbase @18 :Float32; # [m] distance from rear to front axle
|
||||
centerToFront @19 :Float32; # [m] GC distance to front axle
|
||||
steerRatio @20 :Float32; # [] ratio between front wheels and steering wheel angles
|
||||
steerRatioRear @21 :Float32; # [] rear steering ratio wrt front steering (usually 0)
|
||||
|
||||
# things we can derive
|
||||
rotationalInertia @22 :Float32; # [kg*m2] body rotational inertia
|
||||
tireStiffnessFront @23 :Float32; # [N/rad] front tire coeff of stiff
|
||||
tireStiffnessRear @24 :Float32; # [N/rad] rear tire coeff of stiff
|
||||
|
||||
longitudinalTuning @25 :LongitudinalPIDTuning;
|
||||
lateralTuning :union {
|
||||
pid @26 :LateralPIDTuning;
|
||||
indi @27 :LateralINDITuning;
|
||||
}
|
||||
|
||||
steerLimitAlert @28 :Bool;
|
||||
|
||||
vEgoStopping @29 :Float32; # Speed at which the car goes into stopping state
|
||||
directAccelControl @30 :Bool; # Does the car have direct accel control or just gas/brake
|
||||
stoppingControl @31 :Bool; # Does the car allows full control even at lows speeds when stopping
|
||||
startAccel @32 :Float32; # Required acceleraton to overcome creep braking
|
||||
steerRateCost @33 :Float32; # Lateral MPC cost on steering rate
|
||||
steerControlType @34 :SteerControlType;
|
||||
radarOffCan @35 :Bool; # True when radar objects aren't visible on CAN
|
||||
|
||||
steerActuatorDelay @36 :Float32; # Steering wheel actuator delay in seconds
|
||||
openpilotLongitudinalControl @37 :Bool; # is openpilot doing the longitudinal control?
|
||||
carVin @38 :Text; # VIN number queried during fingerprinting
|
||||
|
||||
struct LateralPIDTuning {
|
||||
kpBP @0 :List(Float32);
|
||||
kpV @1 :List(Float32);
|
||||
kiBP @2 :List(Float32);
|
||||
kiV @3 :List(Float32);
|
||||
kf @4 :Float32;
|
||||
}
|
||||
|
||||
struct LongitudinalPIDTuning {
|
||||
kpBP @0 :List(Float32);
|
||||
kpV @1 :List(Float32);
|
||||
kiBP @2 :List(Float32);
|
||||
kiV @3 :List(Float32);
|
||||
deadzoneBP @4 :List(Float32);
|
||||
deadzoneV @5 :List(Float32);
|
||||
}
|
||||
|
||||
|
||||
struct LateralINDITuning {
|
||||
outerLoopGain @0 :Float32;
|
||||
innerLoopGain @1 :Float32;
|
||||
timeConstant @2 :Float32;
|
||||
actuatorEffectiveness @3 :Float32;
|
||||
}
|
||||
|
||||
|
||||
enum SafetyModel {
|
||||
# does NOT match board setting
|
||||
noOutput @0;
|
||||
honda @1;
|
||||
@@ -321,46 +384,6 @@ struct CarParams {
|
||||
subaru @11;
|
||||
}
|
||||
|
||||
# things about the car in the manual
|
||||
mass @7 :Float32; # [kg] running weight
|
||||
wheelbase @8 :Float32; # [m] distance from rear to front axle
|
||||
centerToFront @9 :Float32; # [m] GC distance to front axle
|
||||
steerRatio @10 :Float32; # [] ratio between front wheels and steering wheel angles
|
||||
steerRatioRear @11 :Float32; # [] rear steering ratio wrt front steering (usually 0)
|
||||
|
||||
# things we can derive
|
||||
rotationalInertia @12 :Float32; # [kg*m2] body rotational inertia
|
||||
tireStiffnessFront @13 :Float32; # [N/rad] front tire coeff of stiff
|
||||
tireStiffnessRear @14 :Float32; # [N/rad] rear tire coeff of stiff
|
||||
|
||||
# Kp and Ki for the lateral control
|
||||
steerKpBP @42 :List(Float32);
|
||||
steerKpV @43 :List(Float32);
|
||||
steerKiBP @44 :List(Float32);
|
||||
steerKiV @45 :List(Float32);
|
||||
steerKpDEPRECATED @15 :Float32;
|
||||
steerKiDEPRECATED @16 :Float32;
|
||||
steerKf @25 :Float32;
|
||||
|
||||
# Kp and Ki for the longitudinal control
|
||||
longitudinalKpBP @36 :List(Float32);
|
||||
longitudinalKpV @37 :List(Float32);
|
||||
longitudinalKiBP @38 :List(Float32);
|
||||
longitudinalKiV @39 :List(Float32);
|
||||
|
||||
steerLimitAlert @29 :Bool;
|
||||
|
||||
vEgoStopping @30 :Float32; # Speed at which the car goes into stopping state
|
||||
directAccelControl @31 :Bool; # Does the car have direct accel control or just gas/brake
|
||||
stoppingControl @34 :Bool; # Does the car allows full control even at lows speeds when stopping
|
||||
startAccel @35 :Float32; # Required acceleraton to overcome creep braking
|
||||
steerRateCost @40 :Float32; # Lateral MPC cost on steering rate
|
||||
steerControlType @46 :SteerControlType;
|
||||
radarOffCan @47 :Bool; # True when radar objects aren't visible on CAN
|
||||
|
||||
steerActuatorDelay @48 :Float32; # Steering wheel actuator delay in seconds
|
||||
openpilotLongitudinalControl @50 :Bool; # is openpilot doing the longitudinal control?
|
||||
|
||||
enum SteerControlType {
|
||||
torque @0;
|
||||
angle @1;
|
||||
|
||||
26
cereal/generate_javascript.sh
Executable file
26
cereal/generate_javascript.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -r gen/ts
|
||||
rm -r gen/js
|
||||
|
||||
mkdir gen/ts
|
||||
mkdir gen/js
|
||||
|
||||
echo "Installing needed npm modules"
|
||||
npm i capnpc-ts capnp-ts
|
||||
|
||||
capnpc -o node_modules/.bin/capnpc-ts:gen/ts log.capnp car.capnp
|
||||
capnpc -o node_modules/.bin/capnpc-ts:gen/ts car.capnp
|
||||
|
||||
cat log.capnp | egrep '\([a-zA-Z]*\.[^\s]+\.[^s]+\)' | sed 's/^.*([a-zA-Z]*\.\([a-zA-Z.]*\)).*/\1/' | while read line
|
||||
do
|
||||
TOKEN=`echo $line | sed 's/\./_/g'`
|
||||
ROOT=`echo $line | sed 's/\..*$//g'`
|
||||
cat gen/ts/log.capnp.ts | grep '^import.*'${TOKEN}
|
||||
if [[ "$?" == "1" ]]
|
||||
then
|
||||
sed -i 's/^\(import {.*\)'${ROOT}'\(,*\) \(.*\)$/\1'${ROOT}', '${TOKEN}'\2 \3/' ./gen/ts/log.capnp.ts
|
||||
fi
|
||||
done
|
||||
|
||||
tsc ./gen/ts/* --lib es2015 --outDir ./gen/js
|
||||
39
cereal/install_capnp.sh
Executable file
39
cereal/install_capnp.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
set -e
|
||||
echo "Installing capnp"
|
||||
|
||||
cd /tmp
|
||||
VERSION=0.6.1
|
||||
wget https://capnproto.org/capnproto-c++-${VERSION}.tar.gz
|
||||
tar xvf capnproto-c++-${VERSION}.tar.gz
|
||||
cd capnproto-c++-${VERSION}
|
||||
CXXFLAGS="-fPIC" ./configure
|
||||
|
||||
make -j4
|
||||
|
||||
# manually build binaries statically
|
||||
g++ -std=gnu++11 -I./src -I./src -DKJ_HEADER_WARNINGS -DCAPNP_HEADER_WARNINGS -DCAPNP_INCLUDE_DIR=\"/usr/local/include\" -pthread -O2 -DNDEBUG -pthread -pthread -o .libs/capnp src/capnp/compiler/module-loader.o src/capnp/compiler/capnp.o ./.libs/libcapnpc.a ./.libs/libcapnp.a ./.libs/libkj.a -lpthread -pthread
|
||||
|
||||
g++ -std=gnu++11 -I./src -I./src -DKJ_HEADER_WARNINGS -DCAPNP_HEADER_WARNINGS -DCAPNP_INCLUDE_DIR=\"/usr/local/include\" -pthread -O2 -DNDEBUG -pthread -pthread -o .libs/capnpc-c++ src/capnp/compiler/capnpc-c++.o ./.libs/libcapnp.a ./.libs/libkj.a -lpthread -pthread
|
||||
|
||||
g++ -std=gnu++11 -I./src -I./src -DKJ_HEADER_WARNINGS -DCAPNP_HEADER_WARNINGS -DCAPNP_INCLUDE_DIR=\"/usr/local/include\" -pthread -O2 -DNDEBUG -pthread -pthread -o .libs/capnpc-capnp src/capnp/compiler/capnpc-capnp.o ./.libs/libcapnp.a ./.libs/libkj.a -lpthread -pthread
|
||||
|
||||
cp .libs/capnp /usr/local/bin/
|
||||
ln -s /usr/local/bin/capnp /usr/local/bin/capnpc
|
||||
cp .libs/capnpc-c++ /usr/local/bin/
|
||||
cp .libs/capnpc-capnp /usr/local/bin/
|
||||
cp .libs/*.a /usr/local/lib
|
||||
|
||||
cd /tmp
|
||||
echo "Installing c-capnp"
|
||||
git clone https://github.com/commaai/c-capnproto.git
|
||||
cd c-capnproto
|
||||
git submodule update --init --recursive
|
||||
autoreconf -f -i -s
|
||||
CXXFLAGS="-fPIC" ./configure
|
||||
make -j4
|
||||
|
||||
# manually build binaries statically
|
||||
gcc -fPIC -o .libs/capnpc-c compiler/capnpc-c.o compiler/schema.capnp.o compiler/str.o ./.libs/libcapnp_c.a
|
||||
|
||||
cp .libs/capnpc-c /usr/local/bin/
|
||||
cp .libs/*.a /usr/local/lib
|
||||
108
cereal/log.capnp
108
cereal/log.capnp
@@ -150,6 +150,12 @@ struct FrameData {
|
||||
}
|
||||
}
|
||||
|
||||
struct Thumbnail {
|
||||
frameId @0 :UInt32;
|
||||
timestampEof @1 :UInt64;
|
||||
thumbnail @2 :Data;
|
||||
}
|
||||
|
||||
struct GPSNMEAData {
|
||||
timestamp @0 :Int64;
|
||||
localWallTime @1 :UInt64;
|
||||
@@ -294,8 +300,20 @@ struct HealthData {
|
||||
started @2 :Bool;
|
||||
controlsAllowed @3 :Bool;
|
||||
gasInterceptorDetected @4 :Bool;
|
||||
startedSignalDetected @5 :Bool;
|
||||
startedSignalDetectedDeprecated @5 :Bool;
|
||||
isGreyPanda @6 :Bool;
|
||||
canSendErrs @7 :UInt32;
|
||||
canFwdErrs @8 :UInt32;
|
||||
gmlanSendErrs @9 :UInt32;
|
||||
hwType @10: HwType;
|
||||
|
||||
enum HwType {
|
||||
unknown @0;
|
||||
whitePanda @1;
|
||||
greyPanda @2;
|
||||
blackPanda @3;
|
||||
pedal @4;
|
||||
}
|
||||
}
|
||||
|
||||
struct LiveUI {
|
||||
@@ -305,12 +323,12 @@ struct LiveUI {
|
||||
awarenessStatus @3 :Float32;
|
||||
}
|
||||
|
||||
struct Live20Data {
|
||||
struct RadarState @0x9a185389d6fdd05f {
|
||||
canMonoTimes @10 :List(UInt64);
|
||||
mdMonoTime @6 :UInt64;
|
||||
ftMonoTimeDEPRECATED @7 :UInt64;
|
||||
l100MonoTime @11 :UInt64;
|
||||
radarErrors @12 :List(Car.RadarState.Error);
|
||||
controlsStateMonoTime @11 :UInt64;
|
||||
radarErrors @12 :List(Car.RadarData.Error);
|
||||
|
||||
# all deprecated
|
||||
warpMatrixDEPRECATED @0 :List(Float32);
|
||||
@@ -337,6 +355,8 @@ struct Live20Data {
|
||||
fcw @10 :Bool;
|
||||
status @11 :Bool;
|
||||
aLeadTau @12 :Float32;
|
||||
modelProb @13 :Float32;
|
||||
radar @14 :Bool;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -368,15 +388,15 @@ struct LiveTracks {
|
||||
oncoming @9 :Bool;
|
||||
}
|
||||
|
||||
struct Live100Data {
|
||||
struct ControlsState @0x97ff69c53601abf1 {
|
||||
canMonoTimeDEPRECATED @16 :UInt64;
|
||||
canMonoTimes @21 :List(UInt64);
|
||||
l20MonoTimeDEPRECATED @17 :UInt64;
|
||||
radarStateMonoTimeDEPRECATED @17 :UInt64;
|
||||
mdMonoTimeDEPRECATED @18 :UInt64;
|
||||
planMonoTime @28 :UInt64;
|
||||
pathPlanMonoTime @50 :UInt64;
|
||||
|
||||
state @31 :ControlState;
|
||||
state @31 :OpenpilotState;
|
||||
vEgo @0 :Float32;
|
||||
vEgoRaw @32 :Float32;
|
||||
aEgoDEPRECATED @1 :Float32;
|
||||
@@ -388,9 +408,9 @@ struct Live100Data {
|
||||
ufAccelCmd @33 :Float32;
|
||||
yActualDEPRECATED @6 :Float32;
|
||||
yDesDEPRECATED @7 :Float32;
|
||||
upSteer @8 :Float32;
|
||||
uiSteer @9 :Float32;
|
||||
ufSteer @34 :Float32;
|
||||
upSteerDEPRECATED @8 :Float32;
|
||||
uiSteerDEPRECATED @9 :Float32;
|
||||
ufSteerDEPRECATED @34 :Float32;
|
||||
aTargetMinDEPRECATED @10 :Float32;
|
||||
aTargetMaxDEPRECATED @11 :Float32;
|
||||
aTarget @35 :Float32;
|
||||
@@ -428,7 +448,12 @@ struct Live100Data {
|
||||
vCurvature @46 :Float32;
|
||||
decelForTurn @47 :Bool;
|
||||
|
||||
enum ControlState {
|
||||
lateralControlState :union {
|
||||
indiState @52 :LateralINDIState;
|
||||
pidState @53 :LateralPIDState;
|
||||
}
|
||||
|
||||
enum OpenpilotState @0xdbe58b96d2d1ac61 {
|
||||
disabled @0;
|
||||
preEnabled @1;
|
||||
enabled @2;
|
||||
@@ -455,6 +480,31 @@ struct Live100Data {
|
||||
full @3; # full screen
|
||||
}
|
||||
|
||||
struct LateralINDIState {
|
||||
active @0 :Bool;
|
||||
steerAngle @1 :Float32;
|
||||
steerRate @2 :Float32;
|
||||
steerAccel @3 :Float32;
|
||||
rateSetPoint @4 :Float32;
|
||||
accelSetPoint @5 :Float32;
|
||||
accelError @6 :Float32;
|
||||
delayedOutput @7 :Float32;
|
||||
delta @8 :Float32;
|
||||
output @9 :Float32;
|
||||
}
|
||||
|
||||
struct LateralPIDState {
|
||||
active @0 :Bool;
|
||||
steerAngle @1 :Float32;
|
||||
steerRate @2 :Float32;
|
||||
angleError @3 :Float32;
|
||||
p @4 :Float32;
|
||||
i @5 :Float32;
|
||||
f @6 :Float32;
|
||||
output @7 :Float32;
|
||||
saturated @8 :Bool;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
struct LiveEventData {
|
||||
@@ -472,17 +522,27 @@ struct ModelData {
|
||||
freePath @6 :List(Float32);
|
||||
|
||||
settings @5 :ModelSettings;
|
||||
leadFuture @7 :LeadData;
|
||||
speed @8 :List(Float32);
|
||||
|
||||
struct PathData {
|
||||
points @0 :List(Float32);
|
||||
prob @1 :Float32;
|
||||
std @2 :Float32;
|
||||
stds @3 :List(Float32);
|
||||
poly @4 :List(Float32);
|
||||
}
|
||||
|
||||
struct LeadData {
|
||||
dist @0 :Float32;
|
||||
prob @1 :Float32;
|
||||
std @2 :Float32;
|
||||
relVel @3 :Float32;
|
||||
relVelStd @4 :Float32;
|
||||
relY @5 :Float32;
|
||||
relYStd @6 :Float32;
|
||||
relA @7 :Float32;
|
||||
relAStd @8 :Float32;
|
||||
}
|
||||
|
||||
struct ModelSettings {
|
||||
@@ -544,8 +604,10 @@ struct LogRotate {
|
||||
|
||||
struct Plan {
|
||||
mdMonoTime @9 :UInt64;
|
||||
l20MonoTime @10 :UInt64;
|
||||
events @13 :List(Car.CarEvent);
|
||||
radarStateMonoTime @10 :UInt64;
|
||||
commIssue @31 :Bool;
|
||||
|
||||
eventsDEPRECATED @13 :List(Car.CarEvent);
|
||||
|
||||
# lateral, 3rd order polynomial
|
||||
lateralValidDEPRECATED @0 :Bool;
|
||||
@@ -583,6 +645,7 @@ struct Plan {
|
||||
decelForTurn @22 :Bool;
|
||||
mapValid @25 :Bool;
|
||||
radarValid @28 :Bool;
|
||||
radarCanError @30 :Bool;
|
||||
|
||||
processingDelay @29 :Float32;
|
||||
|
||||
@@ -613,10 +676,13 @@ struct PathPlan {
|
||||
|
||||
angleSteers @8 :Float32; # deg
|
||||
rateSteers @13 :Float32; # deg/s
|
||||
valid @9 :Bool;
|
||||
mpcSolutionValid @9 :Bool;
|
||||
paramsValid @10 :Bool;
|
||||
modelValid @12 :Bool;
|
||||
modelValidDEPRECATED @12 :Bool;
|
||||
angleOffset @11 :Float32;
|
||||
sensorValid @14 :Bool;
|
||||
commIssue @15 :Bool;
|
||||
posenetValid @16 :Bool;
|
||||
}
|
||||
|
||||
struct LiveLocationData {
|
||||
@@ -1612,6 +1678,10 @@ struct LiveParametersData {
|
||||
angleOffsetAverage @3 :Float32;
|
||||
stiffnessFactor @4 :Float32;
|
||||
steerRatio @5 :Float32;
|
||||
sensorValid @6 :Bool;
|
||||
yawRate @7 :Float32;
|
||||
posenetSpeed @8 :Float32;
|
||||
posenetValid @9 :Bool;
|
||||
}
|
||||
|
||||
struct LiveMapData {
|
||||
@@ -1651,6 +1721,7 @@ struct KalmanOdometry {
|
||||
struct Event {
|
||||
# in nanoseconds?
|
||||
logMonoTime @0 :UInt64;
|
||||
valid @67 :Bool = true;
|
||||
|
||||
union {
|
||||
initData @1 :InitData;
|
||||
@@ -1659,13 +1730,13 @@ struct Event {
|
||||
sensorEventDEPRECATED @4 :SensorEventData;
|
||||
can @5 :List(CanData);
|
||||
thermal @6 :ThermalData;
|
||||
live100 @7 :Live100Data;
|
||||
controlsState @7 :ControlsState;
|
||||
liveEventDEPRECATED @8 :List(LiveEventData);
|
||||
model @9 :ModelData;
|
||||
features @10 :CalibrationFeatures;
|
||||
sensorEvents @11 :List(SensorEventData);
|
||||
health @12 :HealthData;
|
||||
live20 @13 :Live20Data;
|
||||
radarState @13 :RadarState;
|
||||
liveUIDEPRECATED @14 :LiveUI;
|
||||
encodeIdx @15 :EncodeIndex;
|
||||
liveTracks @16 :List(LiveTracks);
|
||||
@@ -1718,5 +1789,8 @@ struct Event {
|
||||
cameraOdometry @63 :CameraOdometry;
|
||||
pathPlan @64 :PathPlan;
|
||||
kalmanOdometry @65 :KalmanOdometry;
|
||||
thumbnail @66: Thumbnail;
|
||||
carEvents @68: List(Car.CarEvent);
|
||||
carParams @69: Car.CarParams;
|
||||
}
|
||||
}
|
||||
|
||||
53
cereal/maptile.capnp
Normal file
53
cereal/maptile.capnp
Normal file
@@ -0,0 +1,53 @@
|
||||
using Cxx = import "./include/c++.capnp";
|
||||
$Cxx.namespace("cereal");
|
||||
|
||||
using Java = import "./include/java.capnp";
|
||||
$Java.package("ai.comma.openpilot.cereal");
|
||||
$Java.outerClassname("Map");
|
||||
|
||||
@0xa086df597ef5d7a0;
|
||||
|
||||
# Geometry
|
||||
struct Point {
|
||||
x @0: Float64;
|
||||
y @1: Float64;
|
||||
z @2: Float64;
|
||||
}
|
||||
|
||||
struct PolyLine {
|
||||
points @0: List(Point);
|
||||
}
|
||||
|
||||
# Map features
|
||||
struct Lane {
|
||||
id @0 :Text;
|
||||
|
||||
leftBoundary @1 :LaneBoundary;
|
||||
rightBoundary @2 :LaneBoundary;
|
||||
|
||||
leftAdjacentId @3 :Text;
|
||||
rightAdjacentId @4 :Text;
|
||||
|
||||
inboundIds @5 :List(Text);
|
||||
outboundIds @6 :List(Text);
|
||||
|
||||
struct LaneBoundary {
|
||||
polyLine @0 :PolyLine;
|
||||
startHeading @1 :Float32; # WRT north
|
||||
}
|
||||
}
|
||||
|
||||
# Map tiles
|
||||
struct TileSummary {
|
||||
version @0 :Text;
|
||||
updatedAt @1 :UInt64; # Millis since epoch
|
||||
|
||||
level @2 :UInt8;
|
||||
x @3 :UInt16;
|
||||
y @4 :UInt16;
|
||||
}
|
||||
|
||||
struct MapTile {
|
||||
summary @0 :TileSummary;
|
||||
lanes @1 :List(Lane);
|
||||
}
|
||||
11
check_code_quality.sh
Normal file
11
check_code_quality.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
pyflakes $(find . -iname "*.py" | grep -vi "^\./pyextra.*" | grep -vi "^\./panda")
|
||||
RESULT=$?
|
||||
if [ $RESULT -eq 0 ]; then
|
||||
pylint $(find . -iname "*.py" | grep -vi "^\./pyextra.*" | grep -vi "^\./panda")
|
||||
RESULT=$? & 3
|
||||
fi
|
||||
|
||||
[ $RESULT -ne 0 ] && exit 1
|
||||
exit 0
|
||||
16
common/clock.pyx
Normal file
16
common/clock.pyx
Normal file
@@ -0,0 +1,16 @@
|
||||
from posix.time cimport clock_gettime, timespec, CLOCK_BOOTTIME, CLOCK_MONOTONIC_RAW
|
||||
|
||||
cdef double readclock(int clock_id):
|
||||
cdef timespec ts
|
||||
cdef double current
|
||||
|
||||
clock_gettime(clock_id, &ts)
|
||||
current = ts.tv_sec + (ts.tv_nsec / 1000000000.)
|
||||
return current
|
||||
|
||||
|
||||
def monotonic_time():
|
||||
return readclock(CLOCK_MONOTONIC_RAW)
|
||||
|
||||
def sec_since_boot():
|
||||
return readclock(CLOCK_BOOTTIME)
|
||||
@@ -7,9 +7,9 @@ from collections import namedtuple, defaultdict
|
||||
|
||||
def int_or_float(s):
|
||||
# return number, trying to maintain int format
|
||||
try:
|
||||
return int(s)
|
||||
except ValueError:
|
||||
if s.isdigit():
|
||||
return int(s, 10)
|
||||
else:
|
||||
return float(s)
|
||||
|
||||
DBCSignal = namedtuple(
|
||||
@@ -21,7 +21,7 @@ class dbc(object):
|
||||
def __init__(self, fn):
|
||||
self.name, _ = os.path.splitext(os.path.basename(fn))
|
||||
with open(fn) as f:
|
||||
self.txt = f.read().split("\n")
|
||||
self.txt = f.readlines()
|
||||
self._warned_addresses = set()
|
||||
|
||||
# regexps from https://github.com/ebroecker/canmatrix/blob/master/canmatrix/importdbc.py
|
||||
@@ -51,7 +51,8 @@ class dbc(object):
|
||||
dat = bo_regexp.match(l)
|
||||
|
||||
if dat is None:
|
||||
print "bad BO", l
|
||||
print("bad BO {0}".format(l))
|
||||
|
||||
name = dat.group(2)
|
||||
size = int(dat.group(3))
|
||||
ids = int(dat.group(1), 0) # could be hex
|
||||
@@ -67,8 +68,9 @@ class dbc(object):
|
||||
if dat is None:
|
||||
dat = sgm_regexp.match(l)
|
||||
go = 1
|
||||
|
||||
if dat is None:
|
||||
print "bad SG", l
|
||||
print("bad SG {0}".format(l))
|
||||
|
||||
sgname = dat.group(1)
|
||||
start_bit = int(dat.group(go+2))
|
||||
@@ -90,12 +92,13 @@ class dbc(object):
|
||||
dat = val_regexp.match(l)
|
||||
|
||||
if dat is None:
|
||||
print "bad VAL", l
|
||||
print("bad VAL {0}".format(l))
|
||||
|
||||
ids = int(dat.group(1), 0) # could be hex
|
||||
sgname = dat.group(2)
|
||||
defvals = dat.group(3)
|
||||
|
||||
defvals = defvals.replace("?","\?") #escape sequence in C++
|
||||
defvals = defvals.replace("?",r"\?") #escape sequence in C++
|
||||
defvals = defvals.split('"')[:-1]
|
||||
|
||||
defs = defvals[1::2]
|
||||
@@ -109,7 +112,7 @@ class dbc(object):
|
||||
|
||||
self.def_vals[ids].append((sgname, defvals))
|
||||
|
||||
for msg in self.msgs.viewvalues():
|
||||
for msg in self.msgs.values():
|
||||
msg[1].sort(key=lambda x: x.start_bit)
|
||||
|
||||
self.msg_name_to_address = {}
|
||||
@@ -208,7 +211,7 @@ class dbc(object):
|
||||
|
||||
name = msg[0][0]
|
||||
if debug:
|
||||
print name
|
||||
print(name)
|
||||
|
||||
st = x[2].ljust(8, '\x00')
|
||||
le, be = None, None
|
||||
@@ -252,7 +255,7 @@ class dbc(object):
|
||||
tmp = tmp * factor + offset
|
||||
|
||||
# if debug:
|
||||
# print "%40s %2d %2d %7.2f %s" % (s[0], s[1], s[2], tmp, s[-1])
|
||||
# print("%40s %2d %2d %7.2f %s" % (s[0], s[1], s[2], tmp, s[-1]))
|
||||
|
||||
if arr is None:
|
||||
out[s[0]] = tmp
|
||||
|
||||
@@ -4,10 +4,8 @@ import fcntl
|
||||
import hashlib
|
||||
from cffi import FFI
|
||||
|
||||
TMPDIR = "/tmp/ccache"
|
||||
|
||||
|
||||
def ffi_wrap(name, c_code, c_header, tmpdir=TMPDIR, cflags="", libraries=None):
|
||||
def ffi_wrap(name, c_code, c_header, tmpdir="/tmp/ccache", cflags="", libraries=None):
|
||||
if libraries is None:
|
||||
libraries = []
|
||||
|
||||
@@ -24,7 +22,7 @@ def ffi_wrap(name, c_code, c_header, tmpdir=TMPDIR, cflags="", libraries=None):
|
||||
try:
|
||||
mod = __import__(cache)
|
||||
except Exception:
|
||||
print "cache miss", cache
|
||||
print("cache miss {0}".format(cache))
|
||||
compile_code(cache, c_code, c_header, tmpdir, cflags, libraries)
|
||||
mod = __import__(cache)
|
||||
finally:
|
||||
|
||||
118
common/file_helpers.py
Normal file
118
common/file_helpers.py
Normal file
@@ -0,0 +1,118 @@
|
||||
import os
|
||||
import shutil
|
||||
import tempfile
|
||||
from atomicwrites import AtomicWriter
|
||||
|
||||
def mkdirs_exists_ok(path):
|
||||
try:
|
||||
os.makedirs(path)
|
||||
except OSError:
|
||||
if not os.path.isdir(path):
|
||||
raise
|
||||
|
||||
def rm_not_exists_ok(path):
|
||||
try:
|
||||
os.remove(path)
|
||||
except OSError:
|
||||
if os.path.exists(path):
|
||||
raise
|
||||
|
||||
def rm_tree_or_link(path):
|
||||
if os.path.islink(path):
|
||||
os.unlink(path)
|
||||
elif os.path.isdir(path):
|
||||
shutil.rmtree(path)
|
||||
|
||||
def get_tmpdir_on_same_filesystem(path):
|
||||
# TODO(mgraczyk): HACK, we should actually check for which filesystem.
|
||||
normpath = os.path.normpath(path)
|
||||
parts = normpath.split("/")
|
||||
if len(parts) > 1:
|
||||
if parts[1].startswith("raid") or parts[1].startswith("datasets"):
|
||||
if len(parts) > 2 and parts[2] == "runner":
|
||||
return "/{}/runner/tmp".format(parts[1])
|
||||
elif len(parts) > 2 and parts[2] == "aws":
|
||||
return "/{}/aws/tmp".format(parts[1])
|
||||
else:
|
||||
return "/{}/tmp".format(parts[1])
|
||||
elif parts[1] == "aws":
|
||||
return "/aws/tmp"
|
||||
elif parts[1] == "scratch":
|
||||
return "/scratch/tmp"
|
||||
return "/tmp"
|
||||
|
||||
class AutoMoveTempdir(object):
|
||||
def __init__(self, target_path, temp_dir=None):
|
||||
self._target_path = target_path
|
||||
self._path = tempfile.mkdtemp(dir=temp_dir)
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
return self._path
|
||||
|
||||
def close(self):
|
||||
os.rename(self._path, self._target_path)
|
||||
|
||||
def __enter__(self): return self
|
||||
|
||||
def __exit__(self, type, value, traceback):
|
||||
if type is None:
|
||||
self.close()
|
||||
else:
|
||||
shutil.rmtree(self._path)
|
||||
|
||||
class NamedTemporaryDir(object):
|
||||
def __init__(self, temp_dir=None):
|
||||
self._path = tempfile.mkdtemp(dir=temp_dir)
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
return self._path
|
||||
|
||||
def close(self):
|
||||
shutil.rmtree(self._path)
|
||||
|
||||
def __enter__(self): return self
|
||||
|
||||
def __exit__(self, type, value, traceback):
|
||||
self.close()
|
||||
|
||||
def _get_fileobject_func(writer, temp_dir):
|
||||
def _get_fileobject():
|
||||
file_obj = writer.get_fileobject(dir=temp_dir)
|
||||
os.chmod(file_obj.name, 0o644)
|
||||
return file_obj
|
||||
return _get_fileobject
|
||||
|
||||
def atomic_write_on_fs_tmp(path, **kwargs):
|
||||
"""Creates an atomic writer using a temporary file in a temporary directory
|
||||
on the same filesystem as path.
|
||||
"""
|
||||
# TODO(mgraczyk): This use of AtomicWriter relies on implementation details to set the temp
|
||||
# directory.
|
||||
writer = AtomicWriter(path, **kwargs)
|
||||
return writer._open(_get_fileobject_func(writer, get_tmpdir_on_same_filesystem(path)))
|
||||
|
||||
|
||||
def atomic_write_in_dir(path, **kwargs):
|
||||
"""Creates an atomic writer using a temporary file in the same directory
|
||||
as the destination file.
|
||||
"""
|
||||
writer = AtomicWriter(path, **kwargs)
|
||||
return writer._open(_get_fileobject_func(writer, os.path.dirname(path)))
|
||||
|
||||
def atomic_write_in_dir_neos(path, contents, mode=None):
|
||||
"""
|
||||
Atomically writes contents to path using a temporary file in the same directory
|
||||
as path. Useful on NEOS, where `os.link` (required by atomic_write_in_dir) is missing.
|
||||
"""
|
||||
|
||||
f = tempfile.NamedTemporaryFile(delete=False, prefix=".tmp", dir=os.path.dirname(path))
|
||||
f.write(contents)
|
||||
f.flush()
|
||||
if mode is not None:
|
||||
os.fchmod(f.fileno(), mode)
|
||||
os.fsync(f.fileno())
|
||||
f.close()
|
||||
|
||||
os.rename(f.name, path)
|
||||
@@ -4,7 +4,7 @@ from common.basedir import BASEDIR
|
||||
def get_fingerprint_list():
|
||||
# read all the folders in selfdrive/car and return a dict where:
|
||||
# - keys are all the car models for which we have a fingerprint
|
||||
# - values are lists dicts of messages that constitute the unique
|
||||
# - values are lists dicts of messages that constitute the unique
|
||||
# CAN fingerprint of each car model and all its variants
|
||||
fingerprints = {}
|
||||
for car_folder in [x[0] for x in os.walk(BASEDIR + '/selfdrive/car')]:
|
||||
@@ -28,10 +28,8 @@ _DEBUG_ADDRESS = {1880: 8} # reserved for debug purposes
|
||||
|
||||
def is_valid_for_fingerprint(msg, car_fingerprint):
|
||||
adr = msg.address
|
||||
bus = msg.src
|
||||
# ignore addresses that are more than 11 bits
|
||||
return (adr in car_fingerprint and car_fingerprint[adr] == len(msg.dat)) or \
|
||||
bus != 0 or adr >= 0x800
|
||||
return (adr in car_fingerprint and car_fingerprint[adr] == len(msg.dat)) or adr >= 0x800
|
||||
|
||||
|
||||
def eliminate_incompatible_cars(msg, candidate_cars):
|
||||
@@ -61,4 +59,4 @@ def eliminate_incompatible_cars(msg, candidate_cars):
|
||||
|
||||
def all_known_cars():
|
||||
"""Returns a list of all known car strings."""
|
||||
return _FINGERPRINTS.keys()
|
||||
return list(_FINGERPRINTS.keys())
|
||||
|
||||
10
common/kalman/Makefile
Normal file
10
common/kalman/Makefile
Normal file
@@ -0,0 +1,10 @@
|
||||
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
|
||||
rm -rf build
|
||||
rm simple_kalman_impl.c
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f simple_kalman_impl.so
|
||||
@@ -1,23 +1,10 @@
|
||||
import numpy as np
|
||||
# pylint: skip-file
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
kalman_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
subprocess.check_call(["make", "simple_kalman_impl.so"], cwd=kalman_dir)
|
||||
|
||||
class KF1D:
|
||||
# this EKF assumes constant covariance matrix, so calculations are much simpler
|
||||
# the Kalman gain also needs to be precomputed using the control module
|
||||
|
||||
def __init__(self, x0, A, C, K):
|
||||
self.x = x0
|
||||
self.A = A
|
||||
self.C = C
|
||||
self.K = K
|
||||
|
||||
self.A_K = self.A - np.dot(self.K, self.C)
|
||||
|
||||
# K matrix needs to be pre-computed as follow:
|
||||
# import control
|
||||
# (x, l, K) = control.dare(np.transpose(self.A), np.transpose(self.C), Q, R)
|
||||
# self.K = np.transpose(K)
|
||||
|
||||
def update(self, meas):
|
||||
self.x = np.dot(self.A_K, self.x) + np.dot(self.K, meas)
|
||||
return self.x
|
||||
from simple_kalman_impl import KF1D as KF1D
|
||||
# Silence pyflakes
|
||||
assert KF1D
|
||||
|
||||
16
common/kalman/simple_kalman_impl.pxd
Normal file
16
common/kalman/simple_kalman_impl.pxd
Normal file
@@ -0,0 +1,16 @@
|
||||
cdef class KF1D:
|
||||
cdef public:
|
||||
double x0_0
|
||||
double x1_0
|
||||
double K0_0
|
||||
double K1_0
|
||||
double A0_0
|
||||
double A0_1
|
||||
double A1_0
|
||||
double A1_1
|
||||
double C0_0
|
||||
double C0_1
|
||||
double A_K_0
|
||||
double A_K_1
|
||||
double A_K_2
|
||||
double A_K_3
|
||||
35
common/kalman/simple_kalman_impl.pyx
Normal file
35
common/kalman/simple_kalman_impl.pyx
Normal file
@@ -0,0 +1,35 @@
|
||||
|
||||
cdef class KF1D:
|
||||
def __init__(self, x0, A, C, K):
|
||||
self.x0_0 = x0[0][0]
|
||||
self.x1_0 = x0[1][0]
|
||||
self.A0_0 = A[0][0]
|
||||
self.A0_1 = A[0][1]
|
||||
self.A1_0 = A[1][0]
|
||||
self.A1_1 = A[1][1]
|
||||
self.C0_0 = C[0]
|
||||
self.C0_1 = C[1]
|
||||
self.K0_0 = K[0][0]
|
||||
self.K1_0 = K[1][0]
|
||||
|
||||
self.A_K_0 = self.A0_0 - self.K0_0 * self.C0_0
|
||||
self.A_K_1 = self.A0_1 - self.K0_0 * self.C0_1
|
||||
self.A_K_2 = self.A1_0 - self.K1_0 * self.C0_0
|
||||
self.A_K_3 = self.A1_1 - self.K1_0 * self.C0_1
|
||||
|
||||
def update(self, meas):
|
||||
cdef double x0_0 = self.A_K_0 * self.x0_0 + self.A_K_1 * self.x1_0 + self.K0_0 * meas
|
||||
cdef double x1_0 = self.A_K_2 * self.x0_0 + self.A_K_3 * self.x1_0 + self.K1_0 * meas
|
||||
self.x0_0 = x0_0
|
||||
self.x1_0 = x1_0
|
||||
|
||||
return [self.x0_0, self.x1_0]
|
||||
|
||||
@property
|
||||
def x(self):
|
||||
return [[self.x0_0], [self.x1_0]]
|
||||
|
||||
@x.setter
|
||||
def x(self, x):
|
||||
self.x0_0 = x[0][0]
|
||||
self.x1_0 = x[1][0]
|
||||
23
common/kalman/simple_kalman_old.py
Normal file
23
common/kalman/simple_kalman_old.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import numpy as np
|
||||
|
||||
|
||||
class KF1D:
|
||||
# this EKF assumes constant covariance matrix, so calculations are much simpler
|
||||
# the Kalman gain also needs to be precomputed using the control module
|
||||
|
||||
def __init__(self, x0, A, C, K):
|
||||
self.x = x0
|
||||
self.A = A
|
||||
self.C = C
|
||||
self.K = K
|
||||
|
||||
self.A_K = self.A - np.dot(self.K, self.C)
|
||||
|
||||
# K matrix needs to be pre-computed as follow:
|
||||
# import control
|
||||
# (x, l, K) = control.dare(np.transpose(self.A), np.transpose(self.C), Q, R)
|
||||
# self.K = np.transpose(K)
|
||||
|
||||
def update(self, meas):
|
||||
self.x = np.dot(self.A_K, self.x) + np.dot(self.K, meas)
|
||||
return self.x
|
||||
5
common/kalman/simple_kalman_setup.py
Normal file
5
common/kalman/simple_kalman_setup.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from distutils.core import setup, Extension
|
||||
from Cython.Build import cythonize
|
||||
|
||||
setup(name='Simple Kalman Implementation',
|
||||
ext_modules=cythonize(Extension("simple_kalman_impl", ["simple_kalman_impl.pyx"])))
|
||||
116
common/kalman/tests/test_ekf.py
Normal file
116
common/kalman/tests/test_ekf.py
Normal file
@@ -0,0 +1,116 @@
|
||||
import numpy as np
|
||||
import numpy.matlib
|
||||
import unittest
|
||||
import timeit
|
||||
|
||||
from common.kalman.ekf import EKF, SimpleSensor, FastEKF1D
|
||||
|
||||
class TestEKF(EKF):
|
||||
def __init__(self, var_init, Q):
|
||||
super(TestEKF, self).__init__(False)
|
||||
self.identity = numpy.matlib.identity(2)
|
||||
self.state = numpy.matlib.zeros((2, 1))
|
||||
self.covar = self.identity * var_init
|
||||
|
||||
self.process_noise = numpy.matlib.diag(Q)
|
||||
|
||||
def calc_transfer_fun(self, dt):
|
||||
tf = numpy.matlib.identity(2)
|
||||
tf[0, 1] = dt
|
||||
return tf, tf
|
||||
|
||||
|
||||
class EKFTest(unittest.TestCase):
|
||||
def test_update_scalar(self):
|
||||
ekf = TestEKF(1e3, [0.1, 1])
|
||||
dt = 1. / 100
|
||||
|
||||
sensor = SimpleSensor(0, 1, 2)
|
||||
readings = map(sensor.read, np.arange(100, 300))
|
||||
|
||||
for reading in readings:
|
||||
ekf.update_scalar(reading)
|
||||
ekf.predict(dt)
|
||||
|
||||
np.testing.assert_allclose(ekf.state, [[300], [100]], 1e-4)
|
||||
np.testing.assert_allclose(
|
||||
ekf.covar,
|
||||
np.asarray([[0.0563, 0.10278], [0.10278, 0.55779]]),
|
||||
atol=1e-4)
|
||||
|
||||
def test_unbiased(self):
|
||||
ekf = TestEKF(1e3, [0., 0.])
|
||||
dt = np.float64(1. / 100)
|
||||
|
||||
sensor = SimpleSensor(0, 1, 2)
|
||||
readings = map(sensor.read, np.arange(1000))
|
||||
|
||||
for reading in readings:
|
||||
ekf.update_scalar(reading)
|
||||
ekf.predict(dt)
|
||||
|
||||
np.testing.assert_allclose(ekf.state, [[1000.], [100.]], 1e-4)
|
||||
|
||||
|
||||
class FastEKF1DTest(unittest.TestCase):
|
||||
def test_correctness(self):
|
||||
dt = 1. / 100
|
||||
reading = SimpleSensor(0, 1, 2).read(100)
|
||||
|
||||
ekf = TestEKF(1e3, [0.1, 1])
|
||||
fast_ekf = FastEKF1D(dt, 1e3, [0.1, 1])
|
||||
|
||||
ekf.update_scalar(reading)
|
||||
fast_ekf.update_scalar(reading)
|
||||
self.assertAlmostEqual(ekf.state[0] , fast_ekf.state[0])
|
||||
self.assertAlmostEqual(ekf.state[1] , fast_ekf.state[1])
|
||||
self.assertAlmostEqual(ekf.covar[0, 0], fast_ekf.covar[0])
|
||||
self.assertAlmostEqual(ekf.covar[0, 1], fast_ekf.covar[2])
|
||||
self.assertAlmostEqual(ekf.covar[1, 1], fast_ekf.covar[1])
|
||||
|
||||
ekf.predict(dt)
|
||||
fast_ekf.predict(dt)
|
||||
self.assertAlmostEqual(ekf.state[0] , fast_ekf.state[0])
|
||||
self.assertAlmostEqual(ekf.state[1] , fast_ekf.state[1])
|
||||
self.assertAlmostEqual(ekf.covar[0, 0], fast_ekf.covar[0])
|
||||
self.assertAlmostEqual(ekf.covar[0, 1], fast_ekf.covar[2])
|
||||
self.assertAlmostEqual(ekf.covar[1, 1], fast_ekf.covar[1])
|
||||
|
||||
def test_speed(self):
|
||||
setup = """
|
||||
import numpy as np
|
||||
from common.kalman.tests.test_ekf import TestEKF
|
||||
from common.kalman.ekf import SimpleSensor, FastEKF1D
|
||||
|
||||
dt = 1. / 100
|
||||
reading = SimpleSensor(0, 1, 2).read(100)
|
||||
|
||||
var_init, Q = 1e3, [0.1, 1]
|
||||
ekf = TestEKF(var_init, Q)
|
||||
fast_ekf = FastEKF1D(dt, var_init, Q)
|
||||
"""
|
||||
|
||||
timeit.timeit("""
|
||||
ekf.update_scalar(reading)
|
||||
ekf.predict(dt)
|
||||
""", setup=setup, number=1000)
|
||||
|
||||
ekf_speed = timeit.timeit("""
|
||||
ekf.update_scalar(reading)
|
||||
ekf.predict(dt)
|
||||
""", setup=setup, number=20000)
|
||||
|
||||
timeit.timeit("""
|
||||
fast_ekf.update_scalar(reading)
|
||||
fast_ekf.predict(dt)
|
||||
""", setup=setup, number=1000)
|
||||
|
||||
fast_ekf_speed = timeit.timeit("""
|
||||
fast_ekf.update_scalar(reading)
|
||||
fast_ekf.predict(dt)
|
||||
""", setup=setup, number=20000)
|
||||
|
||||
assert fast_ekf_speed < ekf_speed / 4
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
85
common/kalman/tests/test_simple_kalman.py
Normal file
85
common/kalman/tests/test_simple_kalman.py
Normal file
@@ -0,0 +1,85 @@
|
||||
import unittest
|
||||
import random
|
||||
import timeit
|
||||
import numpy as np
|
||||
|
||||
from common.kalman.simple_kalman import KF1D
|
||||
from common.kalman.simple_kalman_old import KF1D as KF1D_old
|
||||
|
||||
|
||||
class TestSimpleKalman(unittest.TestCase):
|
||||
def setUp(self):
|
||||
dt = 0.01
|
||||
x0_0 = 0.0
|
||||
x1_0 = 0.0
|
||||
A0_0 = 1.0
|
||||
A0_1 = dt
|
||||
A1_0 = 0.0
|
||||
A1_1 = 1.0
|
||||
C0_0 = 1.0
|
||||
C0_1 = 0.0
|
||||
K0_0 = 0.12287673
|
||||
K1_0 = 0.29666309
|
||||
|
||||
self.kf_old = KF1D_old(x0=np.matrix([[x0_0], [x1_0]]),
|
||||
A=np.matrix([[A0_0, A0_1], [A1_0, A1_1]]),
|
||||
C=np.matrix([C0_0, C0_1]),
|
||||
K=np.matrix([[K0_0], [K1_0]]))
|
||||
|
||||
self.kf = KF1D(x0=[[x0_0], [x1_0]],
|
||||
A=[[A0_0, A0_1], [A1_0, A1_1]],
|
||||
C=[C0_0, C0_1],
|
||||
K=[[K0_0], [K1_0]])
|
||||
|
||||
def test_getter_setter(self):
|
||||
self.kf.x = [[1.0], [1.0]]
|
||||
self.assertEqual(self.kf.x, [[1.0], [1.0]])
|
||||
|
||||
def update_returns_state(self):
|
||||
x = self.kf.update(100)
|
||||
self.assertEqual(x, self.kf.x)
|
||||
|
||||
def test_old_equal_new(self):
|
||||
for _ in range(1000):
|
||||
v_wheel = random.uniform(0, 200)
|
||||
|
||||
x_old = self.kf_old.update(v_wheel)
|
||||
x = self.kf.update(v_wheel)
|
||||
|
||||
# Compare the output x, verify that the error is less than 1e-4
|
||||
self.assertAlmostEqual(x_old[0], x[0])
|
||||
self.assertAlmostEqual(x_old[1], x[1])
|
||||
|
||||
|
||||
def test_new_is_faster(self):
|
||||
setup = """
|
||||
import numpy as np
|
||||
|
||||
from common.kalman.simple_kalman import KF1D
|
||||
from common.kalman.simple_kalman_old import KF1D as KF1D_old
|
||||
|
||||
dt = 0.01
|
||||
x0_0 = 0.0
|
||||
x1_0 = 0.0
|
||||
A0_0 = 1.0
|
||||
A0_1 = dt
|
||||
A1_0 = 0.0
|
||||
A1_1 = 1.0
|
||||
C0_0 = 1.0
|
||||
C0_1 = 0.0
|
||||
K0_0 = 0.12287673
|
||||
K1_0 = 0.29666309
|
||||
|
||||
kf_old = KF1D_old(x0=np.matrix([[x0_0], [x1_0]]),
|
||||
A=np.matrix([[A0_0, A0_1], [A1_0, A1_1]]),
|
||||
C=np.matrix([C0_0, C0_1]),
|
||||
K=np.matrix([[K0_0], [K1_0]]))
|
||||
|
||||
kf = KF1D(x0=[[x0_0], [x1_0]],
|
||||
A=[[A0_0, A0_1], [A1_0, A1_1]],
|
||||
C=[C0_0, C0_1],
|
||||
K=[[K0_0], [K1_0]])
|
||||
"""
|
||||
kf_speed = timeit.timeit("kf.update(1234)", setup=setup, number=10000)
|
||||
kf_old_speed = timeit.timeit("kf_old.update(1234)", setup=setup, number=10000)
|
||||
self.assertTrue(kf_speed < kf_old_speed / 4)
|
||||
@@ -41,7 +41,7 @@ def mkdirs_exists_ok(path):
|
||||
class TxType(Enum):
|
||||
PERSISTENT = 1
|
||||
CLEAR_ON_MANAGER_START = 2
|
||||
CLEAR_ON_CAR_START = 3
|
||||
CLEAR_ON_PANDA_DISCONNECT = 3
|
||||
|
||||
|
||||
class UnknownKeyName(Exception):
|
||||
@@ -49,32 +49,55 @@ class UnknownKeyName(Exception):
|
||||
|
||||
|
||||
keys = {
|
||||
"AccessToken": TxType.PERSISTENT,
|
||||
"CalibrationParams": TxType.PERSISTENT,
|
||||
"CarParams": TxType.CLEAR_ON_CAR_START,
|
||||
"CompletedTrainingVersion": TxType.PERSISTENT,
|
||||
"ControlsParams": TxType.PERSISTENT,
|
||||
"DoUninstall": TxType.CLEAR_ON_MANAGER_START,
|
||||
"DongleId": TxType.PERSISTENT,
|
||||
"GitBranch": TxType.PERSISTENT,
|
||||
"GitCommit": TxType.PERSISTENT,
|
||||
"GitRemote": TxType.PERSISTENT,
|
||||
"HasAcceptedTerms": TxType.PERSISTENT,
|
||||
"IsDriverMonitoringEnabled": TxType.PERSISTENT,
|
||||
"IsFcwEnabled": TxType.PERSISTENT,
|
||||
"IsGeofenceEnabled": TxType.PERSISTENT,
|
||||
"IsMetric": TxType.PERSISTENT,
|
||||
"IsUpdateAvailable": TxType.PERSISTENT,
|
||||
"IsUploadVideoOverCellularEnabled": TxType.PERSISTENT,
|
||||
"LimitSetSpeed": TxType.PERSISTENT,
|
||||
"LiveParameters": TxType.PERSISTENT,
|
||||
"LongitudinalControl": TxType.PERSISTENT,
|
||||
"Passive": TxType.PERSISTENT,
|
||||
"RecordFront": TxType.PERSISTENT,
|
||||
"ShouldDoUpdate": TxType.CLEAR_ON_MANAGER_START,
|
||||
"SpeedLimitOffset": TxType.PERSISTENT,
|
||||
"TrainingVersion": TxType.PERSISTENT,
|
||||
"Version": TxType.PERSISTENT,
|
||||
"AccessToken": [TxType.PERSISTENT],
|
||||
"AthenadPid": [TxType.PERSISTENT],
|
||||
"CalibrationParams": [TxType.PERSISTENT],
|
||||
"CarParams": [TxType.CLEAR_ON_MANAGER_START, TxType.CLEAR_ON_PANDA_DISCONNECT],
|
||||
"CompletedTrainingVersion": [TxType.PERSISTENT],
|
||||
"ControlsParams": [TxType.PERSISTENT],
|
||||
"DoUninstall": [TxType.CLEAR_ON_MANAGER_START],
|
||||
"DongleId": [TxType.PERSISTENT],
|
||||
"GithubSshKeys": [TxType.PERSISTENT],
|
||||
"GitBranch": [TxType.PERSISTENT],
|
||||
"GitCommit": [TxType.PERSISTENT],
|
||||
"GitRemote": [TxType.PERSISTENT],
|
||||
"HasAcceptedTerms": [TxType.PERSISTENT],
|
||||
"IsDriverMonitoringEnabled": [TxType.PERSISTENT],
|
||||
"IsFcwEnabled": [TxType.PERSISTENT],
|
||||
"IsGeofenceEnabled": [TxType.PERSISTENT],
|
||||
"IsMetric": [TxType.PERSISTENT],
|
||||
"IsUpdateAvailable": [TxType.PERSISTENT],
|
||||
"IsUploadRawEnabled": [TxType.PERSISTENT],
|
||||
"IsUploadVideoOverCellularEnabled": [TxType.PERSISTENT],
|
||||
"LimitSetSpeed": [TxType.PERSISTENT],
|
||||
"LiveParameters": [TxType.PERSISTENT],
|
||||
"LongitudinalControl": [TxType.PERSISTENT],
|
||||
"Passive": [TxType.PERSISTENT],
|
||||
"RecordFront": [TxType.PERSISTENT],
|
||||
"ShouldDoUpdate": [TxType.CLEAR_ON_MANAGER_START],
|
||||
"SpeedLimitOffset": [TxType.PERSISTENT],
|
||||
"SubscriberInfo": [TxType.PERSISTENT],
|
||||
"TermsVersion": [TxType.PERSISTENT],
|
||||
"TrainingVersion": [TxType.PERSISTENT],
|
||||
"Version": [TxType.PERSISTENT],
|
||||
#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],
|
||||
"DragonCachedModel": [TxType.PERSISTENT],
|
||||
"DragonCachedFP": [TxType.PERSISTENT],
|
||||
"DragonCachedVIN": [TxType.PERSISTENT],
|
||||
"DragonAllowGas": [TxType.PERSISTENT],
|
||||
"DragonBBUI": [TxType.PERSISTENT],
|
||||
}
|
||||
|
||||
|
||||
@@ -308,14 +331,14 @@ class Params(object):
|
||||
def _clear_keys_with_type(self, tx_type):
|
||||
with self.transaction(write=True) as txn:
|
||||
for key in keys:
|
||||
if keys[key] == tx_type:
|
||||
if tx_type in keys[key]:
|
||||
txn.delete(key)
|
||||
|
||||
def manager_start(self):
|
||||
self._clear_keys_with_type(TxType.CLEAR_ON_MANAGER_START)
|
||||
|
||||
def car_start(self):
|
||||
self._clear_keys_with_type(TxType.CLEAR_ON_CAR_START)
|
||||
def panda_disconnect(self):
|
||||
self._clear_keys_with_type(TxType.CLEAR_ON_PANDA_DISCONNECT)
|
||||
|
||||
def delete(self, key):
|
||||
with self.transaction(write=True) as txn:
|
||||
|
||||
@@ -2,58 +2,31 @@
|
||||
import os
|
||||
import time
|
||||
import platform
|
||||
import threading
|
||||
import subprocess
|
||||
import multiprocessing
|
||||
|
||||
from cffi import FFI
|
||||
|
||||
# Build and load cython module
|
||||
import pyximport
|
||||
installer = pyximport.install(inplace=True, build_dir='/tmp')
|
||||
from common.clock import monotonic_time, sec_since_boot # pylint: disable=no-name-in-module, import-error
|
||||
pyximport.uninstall(*installer)
|
||||
assert monotonic_time
|
||||
assert sec_since_boot
|
||||
|
||||
|
||||
# time step for each process
|
||||
DT_CTRL = 0.01 # controlsd
|
||||
DT_PLAN = 0.05 # mpc
|
||||
DT_MDL = 0.05 # model
|
||||
DT_DMON = 0.1 # driver monitoring
|
||||
|
||||
|
||||
ffi = FFI()
|
||||
ffi.cdef("""
|
||||
|
||||
typedef int clockid_t;
|
||||
struct timespec {
|
||||
long tv_sec; /* Seconds. */
|
||||
long tv_nsec; /* Nanoseconds. */
|
||||
};
|
||||
int clock_gettime (clockid_t clk_id, struct timespec *tp);
|
||||
|
||||
long syscall(long number, ...);
|
||||
|
||||
"""
|
||||
)
|
||||
ffi.cdef("long syscall(long number, ...);")
|
||||
libc = ffi.dlopen(None)
|
||||
|
||||
|
||||
# see <linux/time.h>
|
||||
CLOCK_MONOTONIC_RAW = 4
|
||||
CLOCK_BOOTTIME = 7
|
||||
|
||||
if platform.system() != 'Darwin' and hasattr(libc, 'clock_gettime'):
|
||||
c_clock_gettime = libc.clock_gettime
|
||||
|
||||
tlocal = threading.local()
|
||||
def clock_gettime(clk_id):
|
||||
if not hasattr(tlocal, 'ts'):
|
||||
tlocal.ts = ffi.new('struct timespec *')
|
||||
|
||||
ts = tlocal.ts
|
||||
|
||||
r = c_clock_gettime(clk_id, ts)
|
||||
if r != 0:
|
||||
raise OSError("clock_gettime")
|
||||
return ts.tv_sec + ts.tv_nsec * 1e-9
|
||||
else:
|
||||
# hack. only for OS X < 10.12
|
||||
def clock_gettime(clk_id):
|
||||
return time.time()
|
||||
|
||||
def monotonic_time():
|
||||
return clock_gettime(CLOCK_MONOTONIC_RAW)
|
||||
|
||||
def sec_since_boot():
|
||||
return clock_gettime(CLOCK_BOOTTIME)
|
||||
|
||||
|
||||
def set_realtime_priority(level):
|
||||
if os.getuid() != 0:
|
||||
print("not setting priority, not root")
|
||||
@@ -99,10 +72,9 @@ class Ratekeeper(object):
|
||||
lagged = False
|
||||
remaining = self._next_frame_time - sec_since_boot()
|
||||
self._next_frame_time += self._interval
|
||||
if remaining < -self._print_delay_threshold:
|
||||
if self._print_delay_threshold is not None and remaining < -self._print_delay_threshold:
|
||||
print("%s lagging by %.2f ms" % (self._process_name, -remaining * 1000))
|
||||
lagged = True
|
||||
self._frame += 1
|
||||
self._remaining = remaining
|
||||
return lagged
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ def sympy_into_c(sympy_functions):
|
||||
routines.append(r)
|
||||
|
||||
[(c_name, c_code), (h_name, c_header)] = codegen.get_code_generator('C', 'ekf', 'C99').write(routines, "ekf")
|
||||
c_code = '\n'.join(filter(lambda x: len(x) > 0 and x[0] != '#', c_code.split("\n")))
|
||||
c_header = '\n'.join(filter(lambda x: len(x) > 0 and x[0] != '#', c_header.split("\n")))
|
||||
c_code = '\n'.join(x for x in c_code.split("\n") if len(x) > 0 and x[0] != '#')
|
||||
c_header = '\n'.join(x for x in c_header.split("\n") if len(x) > 0 and x[0] != '#')
|
||||
|
||||
return c_header, c_code
|
||||
|
||||
28
common/timeout.py
Normal file
28
common/timeout.py
Normal file
@@ -0,0 +1,28 @@
|
||||
import signal
|
||||
|
||||
class TimeoutException(Exception):
|
||||
pass
|
||||
|
||||
class Timeout:
|
||||
"""
|
||||
Timeout context manager.
|
||||
For example this code will raise a TimeoutException:
|
||||
with Timeout(seconds=5, error_msg="Sleep was too long"):
|
||||
time.sleep(10)
|
||||
"""
|
||||
def __init__(self, seconds, error_msg=None):
|
||||
if error_msg is None:
|
||||
error_msg = 'Timed out after {} seconds'.format(seconds)
|
||||
self.seconds = seconds
|
||||
self.error_msg = error_msg
|
||||
|
||||
def handle_timeout(self, signume, frame):
|
||||
raise TimeoutException(self.error_msg)
|
||||
|
||||
def __enter__(self):
|
||||
signal.signal(signal.SIGALRM, self.handle_timeout)
|
||||
signal.alarm(self.seconds)
|
||||
|
||||
def __exit__(self, exc_type, exc_val, exc_tb):
|
||||
signal.alarm(0)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import numpy as np
|
||||
import common.transformations.orientation as orient
|
||||
import cv2
|
||||
import math
|
||||
|
||||
FULL_FRAME_SIZE = (1164, 874)
|
||||
W, H = FULL_FRAME_SIZE[0], FULL_FRAME_SIZE[1]
|
||||
@@ -12,6 +12,17 @@ eon_intrinsics = np.array([
|
||||
[ 0., FOCAL, H/2.],
|
||||
[ 0., 0., 1.]])
|
||||
|
||||
|
||||
leon_dcam_intrinsics = np.array([
|
||||
[650, 0, 816//2],
|
||||
[ 0, 650, 612//2],
|
||||
[ 0, 0, 1]])
|
||||
|
||||
eon_dcam_intrinsics = np.array([
|
||||
[860, 0, 1152//2],
|
||||
[ 0, 860, 864//2],
|
||||
[ 0, 0, 1]])
|
||||
|
||||
# aka 'K_inv' aka view_frame_from_camera_frame
|
||||
eon_intrinsics_inv = np.linalg.inv(eon_intrinsics)
|
||||
|
||||
@@ -64,7 +75,7 @@ def normalize(img_pts, intrinsics=eon_intrinsics):
|
||||
input_shape = img_pts.shape
|
||||
img_pts = np.atleast_2d(img_pts)
|
||||
img_pts = np.hstack((img_pts, np.ones((img_pts.shape[0],1))))
|
||||
img_pts_normalized = intrinsics_inv.dot(img_pts.T).T
|
||||
img_pts_normalized = img_pts.dot(intrinsics_inv.T)
|
||||
img_pts_normalized[(img_pts < 0).any(axis=1)] = np.nan
|
||||
return img_pts_normalized[:,:2].reshape(input_shape)
|
||||
|
||||
@@ -76,7 +87,7 @@ def denormalize(img_pts, intrinsics=eon_intrinsics):
|
||||
input_shape = img_pts.shape
|
||||
img_pts = np.atleast_2d(img_pts)
|
||||
img_pts = np.hstack((img_pts, np.ones((img_pts.shape[0],1))))
|
||||
img_pts_denormalized = intrinsics.dot(img_pts.T).T
|
||||
img_pts_denormalized = img_pts.dot(intrinsics.T)
|
||||
img_pts_denormalized[img_pts_denormalized[:,0] > W] = np.nan
|
||||
img_pts_denormalized[img_pts_denormalized[:,0] < 0] = np.nan
|
||||
img_pts_denormalized[img_pts_denormalized[:,1] > H] = np.nan
|
||||
@@ -114,6 +125,8 @@ 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
|
||||
|
||||
size = img.shape[:2]
|
||||
rot = orient.rot_from_euler(eulers)
|
||||
quadrangle = np.array([[0, 0],
|
||||
@@ -147,28 +160,57 @@ def transform_img(base_img,
|
||||
from_intr=eon_intrinsics,
|
||||
to_intr=eon_intrinsics,
|
||||
calib_rot_view=None,
|
||||
output_size=None):
|
||||
cy = from_intr[1,2]
|
||||
output_size=None,
|
||||
pretransform=None,
|
||||
top_hacks=True):
|
||||
import cv2
|
||||
|
||||
size = base_img.shape[:2]
|
||||
if not output_size:
|
||||
output_size = size[::-1]
|
||||
h = 1.22
|
||||
quadrangle = np.array([[0, cy + 20],
|
||||
[size[1]-1, cy + 20],
|
||||
[0, size[0]-1],
|
||||
[size[1]-1, size[0]-1]], dtype=np.float32)
|
||||
quadrangle_norm = np.hstack((normalize(quadrangle, intrinsics=from_intr), np.ones((4,1))))
|
||||
quadrangle_world = np.column_stack((h*quadrangle_norm[:,0]/quadrangle_norm[:,1],
|
||||
h*np.ones(4),
|
||||
h/quadrangle_norm[:,1]))
|
||||
rot = orient.rot_from_euler(augment_eulers)
|
||||
if calib_rot_view is not None:
|
||||
rot = calib_rot_view.dot(rot)
|
||||
to_extrinsics = np.hstack((rot.T, -augment_trans[:,None]))
|
||||
to_KE = to_intr.dot(to_extrinsics)
|
||||
warped_quadrangle_full = np.einsum('jk,ik->ij', to_KE, np.hstack((quadrangle_world, np.ones((4,1)))))
|
||||
warped_quadrangle = np.column_stack((warped_quadrangle_full[:,0]/warped_quadrangle_full[:,2],
|
||||
warped_quadrangle_full[:,1]/warped_quadrangle_full[:,2])).astype(np.float32)
|
||||
M = cv2.getPerspectiveTransform(quadrangle, warped_quadrangle.astype(np.float32))
|
||||
|
||||
cy = from_intr[1,2]
|
||||
def get_M(h=1.22):
|
||||
quadrangle = np.array([[0, cy + 20],
|
||||
[size[1]-1, cy + 20],
|
||||
[0, size[0]-1],
|
||||
[size[1]-1, size[0]-1]], dtype=np.float32)
|
||||
quadrangle_norm = np.hstack((normalize(quadrangle, intrinsics=from_intr), np.ones((4,1))))
|
||||
quadrangle_world = np.column_stack((h*quadrangle_norm[:,0]/quadrangle_norm[:,1],
|
||||
h*np.ones(4),
|
||||
h/quadrangle_norm[:,1]))
|
||||
rot = orient.rot_from_euler(augment_eulers)
|
||||
if calib_rot_view is not None:
|
||||
rot = calib_rot_view.dot(rot)
|
||||
to_extrinsics = np.hstack((rot.T, -augment_trans[:,None]))
|
||||
to_KE = to_intr.dot(to_extrinsics)
|
||||
warped_quadrangle_full = np.einsum('jk,ik->ij', to_KE, np.hstack((quadrangle_world, np.ones((4,1)))))
|
||||
warped_quadrangle = np.column_stack((warped_quadrangle_full[:,0]/warped_quadrangle_full[:,2],
|
||||
warped_quadrangle_full[:,1]/warped_quadrangle_full[:,2])).astype(np.float32)
|
||||
M = cv2.getPerspectiveTransform(quadrangle, warped_quadrangle.astype(np.float32))
|
||||
return M
|
||||
|
||||
M = get_M()
|
||||
if pretransform is not None:
|
||||
M = M.dot(pretransform)
|
||||
augmented_rgb = cv2.warpPerspective(base_img, M, output_size, borderMode=cv2.BORDER_REPLICATE)
|
||||
|
||||
if top_hacks:
|
||||
cyy = int(math.ceil(to_intr[1,2]))
|
||||
M = get_M(1000)
|
||||
if pretransform is not None:
|
||||
M = M.dot(pretransform)
|
||||
augmented_rgb[:cyy] = cv2.warpPerspective(base_img, M, (output_size[0], cyy), borderMode=cv2.BORDER_REPLICATE)
|
||||
|
||||
return augmented_rgb
|
||||
|
||||
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
|
||||
rgb = cv2.cvtColor(frame, cv2.COLOR_YUV2RGB_I420)
|
||||
if not center:
|
||||
center = (rgb.shape[0]/2, rgb.shape[1]/2)
|
||||
rgb_crop = rgb[center[0] - output_size[1]/2: center[0] + output_size[1]/2,
|
||||
center[1] - output_size[0]/2: center[1] + output_size[0]/2]
|
||||
return cv2.cvtColor(rgb_crop, cv2.COLOR_RGB2YUV_I420)
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import numpy as np
|
||||
|
||||
from common.transformations.camera import eon_focal_length, \
|
||||
vp_from_ke, \
|
||||
get_view_frame_from_road_frame, \
|
||||
FULL_FRAME_SIZE
|
||||
vp_from_ke, get_view_frame_from_road_frame, \
|
||||
FULL_FRAME_SIZE
|
||||
|
||||
# segnet
|
||||
|
||||
@@ -32,7 +31,7 @@ model_intrinsics = np.array(
|
||||
|
||||
|
||||
# MED model
|
||||
MEDMODEL_INPUT_SIZE = (640, 240)
|
||||
MEDMODEL_INPUT_SIZE = (512, 256)
|
||||
MEDMODEL_YUV_SIZE = (MEDMODEL_INPUT_SIZE[0], MEDMODEL_INPUT_SIZE[1] * 3 // 2)
|
||||
MEDMODEL_CY = 47.6
|
||||
|
||||
@@ -117,6 +116,16 @@ def get_camera_frame_from_model_frame(camera_frame_from_road_frame, height=model
|
||||
return np.dot(camera_from_model_camera, model_camera_from_model_frame)
|
||||
|
||||
|
||||
def get_camera_frame_from_medmodel_frame(camera_frame_from_road_frame):
|
||||
camera_frame_from_ground = camera_frame_from_road_frame[:, (0, 1, 3)]
|
||||
medmodel_frame_from_ground = medmodel_frame_from_road_frame[:, (0, 1, 3)]
|
||||
|
||||
ground_from_medmodel_frame = np.linalg.inv(medmodel_frame_from_ground)
|
||||
camera_frame_from_medmodel_frame = np.dot(camera_frame_from_ground, ground_from_medmodel_frame)
|
||||
|
||||
return camera_frame_from_medmodel_frame
|
||||
|
||||
|
||||
def get_camera_frame_from_bigmodel_frame(camera_frame_from_road_frame):
|
||||
camera_frame_from_ground = camera_frame_from_road_frame[:, (0, 1, 3)]
|
||||
bigmodel_frame_from_ground = bigmodel_frame_from_road_frame[:, (0, 1, 3)]
|
||||
|
||||
95
common/vin.py
Executable file
95
common/vin.py
Executable file
@@ -0,0 +1,95 @@
|
||||
#!/usr/bin/env python
|
||||
import time
|
||||
from common.realtime import sec_since_boot
|
||||
import selfdrive.messaging as messaging
|
||||
from selfdrive.boardd.boardd import can_list_to_can_capnp
|
||||
|
||||
def get_vin(logcan, sendcan):
|
||||
|
||||
# works on standard 11-bit addresses for diagnostic. Tested on Toyota and Subaru;
|
||||
# Honda uses the extended 29-bit addresses, and unfortunately only works from OBDII
|
||||
query_msg = [[0x7df, 0, '\x02\x09\x02'.ljust(8, "\x00"), 0],
|
||||
[0x7e0, 0, '\x30'.ljust(8, "\x00"), 0]]
|
||||
|
||||
cnts = [1, 2] # Number of messages to wait for at each iteration
|
||||
vin_valid = True
|
||||
|
||||
dat = []
|
||||
for i in range(len(query_msg)):
|
||||
cnt = 0
|
||||
sendcan.send(can_list_to_can_capnp([query_msg[i]], msgtype='sendcan'))
|
||||
got_response = False
|
||||
t_start = sec_since_boot()
|
||||
while sec_since_boot() - t_start < 0.05 and not got_response:
|
||||
for a in messaging.drain_sock(logcan):
|
||||
for can in a.can:
|
||||
if can.src == 0 and can.address == 0x7e8:
|
||||
vin_valid = vin_valid and is_vin_response_valid(can.dat, i, cnt)
|
||||
dat += can.dat[2:] if i == 0 else can.dat[1:]
|
||||
cnt += 1
|
||||
if cnt == cnts[i]:
|
||||
got_response = True
|
||||
time.sleep(0.01)
|
||||
|
||||
return "".join(dat[3:]) if vin_valid else ""
|
||||
|
||||
"""
|
||||
if 'vin' not in gctx:
|
||||
print "getting vin"
|
||||
gctx['vin'] = query_vin()[3:]
|
||||
print "got VIN %s" % (gctx['vin'],)
|
||||
cloudlog.info("got VIN %s" % (gctx['vin'],))
|
||||
|
||||
# *** determine platform based on VIN ****
|
||||
if vin.startswith("19UDE2F36G"):
|
||||
print "ACURA ILX 2016"
|
||||
self.civic = False
|
||||
else:
|
||||
# TODO: add Honda check explicitly
|
||||
print "HONDA CIVIC 2016"
|
||||
self.civic = True
|
||||
|
||||
# *** special case VIN of Acura test platform
|
||||
if vin == "19UDE2F36GA001322":
|
||||
print "comma.ai test platform detected"
|
||||
# it has a gas interceptor and a torque mod
|
||||
self.torque_mod = True
|
||||
"""
|
||||
|
||||
|
||||
# sanity checks on response messages from vin query
|
||||
def is_vin_response_valid(can_dat, step, cnt):
|
||||
|
||||
can_dat = [ord(i) for i in can_dat]
|
||||
|
||||
if len(can_dat) != 8:
|
||||
# ISO-TP meesages are all 8 bytes
|
||||
return False
|
||||
|
||||
if step == 0:
|
||||
# VIN does not fit in a single message and it's 20 bytes of data
|
||||
if can_dat[0] != 0x10 or can_dat[1] != 0x14:
|
||||
return False
|
||||
|
||||
if step == 1 and cnt == 0:
|
||||
# first response after a CONTINUE query is sent
|
||||
if can_dat[0] != 0x21:
|
||||
return False
|
||||
|
||||
if step == 1 and cnt == 1:
|
||||
# second response after a CONTINUE query is sent
|
||||
if can_dat[0] != 0x22:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import zmq
|
||||
from selfdrive.services import service_list
|
||||
context = zmq.Context()
|
||||
logcan = messaging.sub_sock(context, service_list['can'].port)
|
||||
sendcan = messaging.pub_sock(context, service_list['sendcan'].port)
|
||||
time.sleep(1.) # give time to sendcan socket to start
|
||||
|
||||
print get_vin(logcan, sendcan)
|
||||
BIN
dragonpilot/chinese-fonts/Miui-Bold.ttf
Normal file
BIN
dragonpilot/chinese-fonts/Miui-Bold.ttf
Normal file
Binary file not shown.
BIN
dragonpilot/chinese-fonts/Miui-Regular.ttf
Normal file
BIN
dragonpilot/chinese-fonts/Miui-Regular.ttf
Normal file
Binary file not shown.
371
dragonpilot/chinese-fonts/fonts.xml
Normal file
371
dragonpilot/chinese-fonts/fonts.xml
Normal file
@@ -0,0 +1,371 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
NOTE: this is the newer (L) version of the system font configuration,
|
||||
supporting richer weight selection. Some apps will expect the older
|
||||
version, so please keep system_fonts.xml and fallback_fonts.xml in sync
|
||||
with any changes, even though framework will only read this file.
|
||||
|
||||
All fonts withohut names are added to the default list. Fonts are chosen
|
||||
based on a match: full BCP-47 language tag including script, then just
|
||||
language, and finally order (the first font containing the glyph).
|
||||
|
||||
Order of appearance is also the tiebreaker for weight matching. This is
|
||||
the reason why the 900 weights of Roboto precede the 700 weights - we
|
||||
prefer the former when an 800 weight is requested. Since bold spans
|
||||
effectively add 300 to the weight, this ensures that 900 is the bold
|
||||
paired with the 500 weight, ensuring adequate contrast.
|
||||
-->
|
||||
<familyset version="22">
|
||||
<!-- first font is default -->
|
||||
<family name="sans-serif">
|
||||
<font weight="100" style="normal">Roboto-Thin.ttf</font>
|
||||
<font weight="100" style="italic">Roboto-ThinItalic.ttf</font>
|
||||
<font weight="300" style="normal">Roboto-Light.ttf</font>
|
||||
<font weight="300" style="italic">Roboto-LightItalic.ttf</font>
|
||||
<font weight="400" style="normal">Roboto-Regular.ttf</font>
|
||||
<font weight="400" style="italic">Roboto-Italic.ttf</font>
|
||||
<font weight="500" style="normal">Roboto-Medium.ttf</font>
|
||||
<font weight="500" style="italic">Roboto-MediumItalic.ttf</font>
|
||||
<font weight="900" style="normal">Roboto-Black.ttf</font>
|
||||
<font weight="900" style="italic">Roboto-BlackItalic.ttf</font>
|
||||
<font weight="700" style="normal">Roboto-Bold.ttf</font>
|
||||
<font weight="700" style="italic">Roboto-BoldItalic.ttf</font>
|
||||
</family>
|
||||
|
||||
<!-- Note that aliases must come after the fonts they reference. -->
|
||||
<alias name="sans-serif-thin" to="sans-serif" weight="100" />
|
||||
<alias name="sans-serif-light" to="sans-serif" weight="300" />
|
||||
<alias name="sans-serif-medium" to="sans-serif" weight="500" />
|
||||
<alias name="sans-serif-black" to="sans-serif" weight="900" />
|
||||
<alias name="arial" to="sans-serif" />
|
||||
<alias name="helvetica" to="sans-serif" />
|
||||
<alias name="tahoma" to="sans-serif" />
|
||||
<alias name="verdana" to="sans-serif" />
|
||||
|
||||
<family name="sans-serif-condensed">
|
||||
<font weight="300" style="normal">RobotoCondensed-Light.ttf</font>
|
||||
<font weight="300" style="italic">RobotoCondensed-LightItalic.ttf</font>
|
||||
<font weight="400" style="normal">RobotoCondensed-Regular.ttf</font>
|
||||
<font weight="400" style="italic">RobotoCondensed-Italic.ttf</font>
|
||||
<font weight="700" style="normal">RobotoCondensed-Bold.ttf</font>
|
||||
<font weight="700" style="italic">RobotoCondensed-BoldItalic.ttf</font>
|
||||
</family>
|
||||
<alias name="sans-serif-condensed-light" to="sans-serif-condensed" weight="300" />
|
||||
|
||||
<family name="serif">
|
||||
<font weight="400" style="normal">NotoSerif-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSerif-Bold.ttf</font>
|
||||
<font weight="400" style="italic">NotoSerif-Italic.ttf</font>
|
||||
<font weight="700" style="italic">NotoSerif-BoldItalic.ttf</font>
|
||||
</family>
|
||||
<alias name="times" to="serif" />
|
||||
<alias name="times new roman" to="serif" />
|
||||
<alias name="palatino" to="serif" />
|
||||
<alias name="georgia" to="serif" />
|
||||
<alias name="baskerville" to="serif" />
|
||||
<alias name="goudy" to="serif" />
|
||||
<alias name="fantasy" to="serif" />
|
||||
<alias name="ITC Stone Serif" to="serif" />
|
||||
|
||||
<family name="monospace">
|
||||
<font weight="400" style="normal">DroidSansMono.ttf</font>
|
||||
</family>
|
||||
<alias name="sans-serif-monospace" to="monospace" />
|
||||
<alias name="monaco" to="monospace" />
|
||||
|
||||
<family name="serif-monospace">
|
||||
<font weight="400" style="normal">CutiveMono.ttf</font>
|
||||
</family>
|
||||
<alias name="courier" to="serif-monospace" />
|
||||
<alias name="courier new" to="serif-monospace" />
|
||||
|
||||
<family name="casual">
|
||||
<font weight="400" style="normal">ComingSoon.ttf</font>
|
||||
</family>
|
||||
|
||||
<family name="cursive">
|
||||
<font weight="400" style="normal">DancingScript-Regular.ttf</font>
|
||||
<font weight="700" style="normal">DancingScript-Bold.ttf</font>
|
||||
</family>
|
||||
|
||||
<family name="sans-serif-smallcaps">
|
||||
<font weight="400" style="normal">CarroisGothicSC-Regular.ttf</font>
|
||||
</family>
|
||||
|
||||
<!-- fallback fonts -->
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoNaskhArabic-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoNaskhArabic-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoNaskhArabicUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoNaskhArabicUI-Bold.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansEthiopic-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansEthiopic-Bold.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansHebrew-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansHebrew-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansThai-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansThai-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansThaiUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansThaiUI-Bold.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansArmenian-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansArmenian-Bold.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansGeorgian-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansGeorgian-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansDevanagari-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansDevanagari-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansDevanagariUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansDevanagariUI-Bold.ttf</font>
|
||||
</family>
|
||||
<!-- Gujarati should come after Devanagari -->
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansGujarati-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansGujarati-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansGujaratiUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansGujaratiUI-Bold.ttf</font>
|
||||
</family>
|
||||
<!-- Gurmukhi should come after Devanagari -->
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansGurmukhi-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansGurmukhi-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansGurmukhiUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansGurmukhiUI-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansTamil-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansTamil-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansTamilUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansTamilUI-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansMalayalam-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansMalayalam-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansMalayalamUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansMalayalamUI-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansBengali-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansBengali-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansBengaliUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansBengaliUI-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansTelugu-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansTelugu-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansTeluguUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansTeluguUI-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansKannada-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansKannada-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansKannadaUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansKannadaUI-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansOriya-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansOriya-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansOriyaUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansOriyaUI-Bold.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansSinhala-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansSinhala-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansKhmer-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansKhmer-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansKhmerUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansKhmerUI-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansLao-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansLao-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansLaoUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansLaoUI-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansMyanmar-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansMyanmar-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansMyanmarUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansMyanmarUI-Bold.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansThaana-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansThaana-Bold.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansCham-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansCham-Bold.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansBalinese-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansBamum-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansBatak-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansBuginese-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansBuhid-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansCanadianAboriginal-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansCherokee-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansCoptic-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansGlagolitic-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansHanunoo-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansJavanese-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansKayahLi-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansLepcha-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansLimbu-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansLisu-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansMandaic-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansMeeteiMayek-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansNewTaiLue-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansNKo-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansOlChiki-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansRejang-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansSaurashtra-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansSundanese-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansSylotiNagri-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansSyriacEstrangela-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansTagbanwa-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansTaiTham-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansTaiViet-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansTibetan-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansTifinagh-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansVai-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansYi-Regular.ttf</font>
|
||||
</family>
|
||||
<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>
|
||||
<family lang="ko">
|
||||
<font weight="400" style="normal">NotoSansKR-Regular.otf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NanumGothic.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoColorEmoji.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">Miui-Regular.ttf</font>
|
||||
</family>
|
||||
<family lang="ja">
|
||||
<font weight="400" style="normal">MTLmr3m.ttf</font>
|
||||
</family>
|
||||
<!--
|
||||
Tai Le and Mongolian are intentionally kept last, to make sure they don't override
|
||||
the East Asian punctuation for Chinese.
|
||||
-->
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansTaiLe-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansMongolian-Regular.ttf</font>
|
||||
</family>
|
||||
</familyset>
|
||||
50
dragonpilot/chinese-fonts/installer.sh
Executable file
50
dragonpilot/chinese-fonts/installer.sh
Executable file
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Anndroid system locale, zh-TW = Traditional Chinese, zh-CN = Simplified Chinese
|
||||
lang=en
|
||||
|
||||
update_font_reg=0
|
||||
update_font_bold=0
|
||||
remove_old_font=0
|
||||
|
||||
# check regular font
|
||||
if [ ! -f "/system/fonts/Miui-Regular.ttf" ]; then
|
||||
update_font_reg=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
|
||||
remove_old_font=1
|
||||
fi
|
||||
|
||||
if [ $update_font_reg -eq "1" ] || [ $update_font_bold -eq "1" ] || [ $remove_old_font -eq "1" ]; then
|
||||
# sleep 5 secs in case, make sure the /system is remountable
|
||||
sleep 5
|
||||
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
|
||||
chmod 644 /system/etc/fonts.xml
|
||||
chmod 644 /system/fonts/Miui-*
|
||||
fi
|
||||
# remove driodsans font
|
||||
if [ $remove_old_font -eq "1" ]; then
|
||||
rm -fr /system/fonts/DroidSansFallback*.ttf
|
||||
fi
|
||||
mount -o remount,r /system
|
||||
# change system locale
|
||||
setprop persist.sys.locale $lang
|
||||
fi
|
||||
88
installer/updater/Makefile
Normal file
88
installer/updater/Makefile
Normal file
@@ -0,0 +1,88 @@
|
||||
CC = clang
|
||||
CXX = clang++
|
||||
|
||||
PHONELIBS = ../../phonelibs
|
||||
|
||||
WARN_FLAGS = -Werror=implicit-function-declaration \
|
||||
-Werror=incompatible-pointer-types \
|
||||
-Werror=int-conversion \
|
||||
-Werror=return-type \
|
||||
-Werror=format-extra-args
|
||||
|
||||
CFLAGS = -std=gnu11 -g -fPIC -O2 $(WARN_FLAGS)
|
||||
CXXFLAGS = -std=c++11 -g -fPIC -O2 $(WARN_FLAGS)
|
||||
|
||||
CURL_FLAGS = -I$(PHONELIBS)/curl/include
|
||||
CURL_LIBS = $(PHONELIBS)/curl/lib/libcurl.a \
|
||||
$(PHONELIBS)/zlib/lib/libz.a
|
||||
|
||||
BORINGSSL_FLAGS = -I$(PHONELIBS)/boringssl/include
|
||||
BORINGSSL_LIBS = $(PHONELIBS)/boringssl/lib/libssl_static.a \
|
||||
$(PHONELIBS)/boringssl/lib/libcrypto_static.a \
|
||||
|
||||
NANOVG_FLAGS = -I$(PHONELIBS)/nanovg
|
||||
|
||||
JSON11_FLAGS = -I$(PHONELIBS)/json11
|
||||
|
||||
OPENGL_LIBS = -lGLESv3
|
||||
|
||||
FRAMEBUFFER_LIBS = -lutils -lgui -lEGL
|
||||
|
||||
.PHONY: all
|
||||
all: updater
|
||||
|
||||
OBJS = courbd.ttf.o \
|
||||
../../selfdrive/common/touch.o \
|
||||
../../selfdrive/common/framebuffer.o \
|
||||
$(PHONELIBS)/json11/json11.o \
|
||||
$(PHONELIBS)/nanovg/nanovg.o
|
||||
|
||||
DEPS := $(OBJS:.o=.d)
|
||||
|
||||
updater: updater.o $(OBJS)
|
||||
@echo "[ LINK ] $@"
|
||||
$(CXX) $(CPPFLAGS) -fPIC -o 'updater' $^ \
|
||||
$(FRAMEBUFFER_LIBS) \
|
||||
$(CURL_LIBS) \
|
||||
$(BORINGSSL_LIBS) \
|
||||
-L/system/vendor/lib64 \
|
||||
$(OPENGL_LIBS) \
|
||||
-lcutils -lm -llog
|
||||
strip updater
|
||||
|
||||
courbd.ttf.o: ../../selfdrive/assets/courbd.ttf
|
||||
@echo "[ bin2o ] $@"
|
||||
cd '$(dir $<)' && ld -r -b binary '$(notdir $<)' -o '$(abspath $@)'
|
||||
|
||||
%.o: %.c
|
||||
mkdir -p $(@D)
|
||||
@echo "[ CC ] $@"
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) \
|
||||
-I../.. \
|
||||
-I$(PHONELIBS)/android_frameworks_native/include \
|
||||
-I$(PHONELIBS)/android_system_core/include \
|
||||
-I$(PHONELIBS)/android_hardware_libhardware/include \
|
||||
$(NANOVG_FLAGS) \
|
||||
-c -o '$@' '$<'
|
||||
|
||||
%.o: %.cc
|
||||
mkdir -p $(@D)
|
||||
@echo "[ CXX ] $@"
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) \
|
||||
-I../../selfdrive \
|
||||
-I../../ \
|
||||
-I$(PHONELIBS)/android_frameworks_native/include \
|
||||
-I$(PHONELIBS)/android_system_core/include \
|
||||
-I$(PHONELIBS)/android_hardware_libhardware/include \
|
||||
$(NANOVG_FLAGS) \
|
||||
$(JSON11_FLAGS) \
|
||||
$(CURL_FLAGS) \
|
||||
$(BORINGSSL_FLAGS) \
|
||||
-c -o '$@' '$<'
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f $(OBJS) $(DEPS)
|
||||
|
||||
-include $(DEPS)
|
||||
7
installer/updater/update.json
Normal file
7
installer/updater/update.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"ota_url": "https://commadist.azureedge.net/neosupdate/ota-signed-c992abb59cbaf6588f51055db52db619061107851773fc8480acb8bb5d77a28f.zip",
|
||||
"ota_hash": "c992abb59cbaf6588f51055db52db619061107851773fc8480acb8bb5d77a28f",
|
||||
"recovery_url": "https://commadist.azureedge.net/neosupdate/recovery-af099a84cfd7b91266090779238ac358278948dcde2dcfa0fbca6e8397366f0a.img",
|
||||
"recovery_len": 15136044,
|
||||
"recovery_hash": "af099a84cfd7b91266090779238ac358278948dcde2dcfa0fbca6e8397366f0a"
|
||||
}
|
||||
Binary file not shown.
675
installer/updater/updater.cc
Normal file
675
installer/updater/updater.cc
Normal file
@@ -0,0 +1,675 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <cassert>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/statvfs.h>
|
||||
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
|
||||
#include <curl/curl.h>
|
||||
#include <openssl/sha.h>
|
||||
|
||||
#include <GLES3/gl3.h>
|
||||
#include <EGL/egl.h>
|
||||
#include <EGL/eglext.h>
|
||||
|
||||
#include "nanovg.h"
|
||||
#define NANOVG_GLES3_IMPLEMENTATION
|
||||
#include "nanovg_gl.h"
|
||||
#include "nanovg_gl_utils.h"
|
||||
|
||||
#include "json11.hpp"
|
||||
|
||||
#include "common/framebuffer.h"
|
||||
#include "common/touch.h"
|
||||
#include "common/utilpp.h"
|
||||
|
||||
#define USER_AGENT "NEOSUpdater-0.2"
|
||||
|
||||
#define MANIFEST_URL_EON_STAGING "https://github.com/commaai/eon-neos/raw/master/update.staging.json"
|
||||
#define MANIFEST_URL_EON_LOCAL "http://192.168.5.1:8000/neosupdate/update.local.json"
|
||||
#define MANIFEST_URL_EON "https://github.com/commaai/eon-neos/raw/master/update.json"
|
||||
const char *manifest_url = MANIFEST_URL_EON;
|
||||
|
||||
#define RECOVERY_DEV "/dev/block/bootdevice/by-name/recovery"
|
||||
#define RECOVERY_COMMAND "/cache/recovery/command"
|
||||
|
||||
#define UPDATE_DIR "/data/neoupdate"
|
||||
|
||||
extern const uint8_t bin_courbd[] asm("_binary_courbd_ttf_start");
|
||||
extern const uint8_t bin_courbd_end[] asm("_binary_courbd_ttf_end");
|
||||
|
||||
namespace {
|
||||
|
||||
std::string sha256_file(std::string fn, size_t limit=0) {
|
||||
SHA256_CTX ctx;
|
||||
SHA256_Init(&ctx);
|
||||
|
||||
FILE *file = fopen(fn.c_str(), "rb");
|
||||
if (!file) return "";
|
||||
|
||||
const size_t buf_size = 8192;
|
||||
std::unique_ptr<char[]> buffer( new char[ buf_size ] );
|
||||
|
||||
bool read_limit = (limit != 0);
|
||||
while (true) {
|
||||
size_t read_size = buf_size;
|
||||
if (read_limit) read_size = std::min(read_size, limit);
|
||||
size_t bytes_read = fread(buffer.get(), 1, read_size, file);
|
||||
if (!bytes_read) break;
|
||||
|
||||
SHA256_Update(&ctx, buffer.get(), bytes_read);
|
||||
|
||||
if (read_limit) {
|
||||
limit -= bytes_read;
|
||||
if (limit == 0) break;
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t hash[SHA256_DIGEST_LENGTH];
|
||||
SHA256_Final(hash, &ctx);
|
||||
|
||||
fclose(file);
|
||||
|
||||
return util::tohex(hash, sizeof(hash));
|
||||
}
|
||||
|
||||
size_t download_string_write(void *ptr, size_t size, size_t nmeb, void *up) {
|
||||
size_t sz = size * nmeb;
|
||||
((std::string*)up)->append((char*)ptr, sz);
|
||||
return sz;
|
||||
}
|
||||
|
||||
std::string download_string(CURL *curl, std::string url) {
|
||||
std::string os;
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
|
||||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
|
||||
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
|
||||
curl_easy_setopt(curl, CURLOPT_USERAGENT, USER_AGENT);
|
||||
curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);
|
||||
curl_easy_setopt(curl, CURLOPT_RESUME_FROM, 0);
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1);
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, download_string_write);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &os);
|
||||
CURLcode res = curl_easy_perform(curl);
|
||||
if (res != CURLE_OK) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
size_t download_file_write(void *ptr, size_t size, size_t nmeb, void *up) {
|
||||
return fwrite(ptr, size, nmeb, (FILE*)up);
|
||||
}
|
||||
|
||||
bool check_battery() {
|
||||
std::string bat_cap_s = util::read_file("/sys/class/power_supply/battery/capacity");
|
||||
int bat_cap = atoi(bat_cap_s.c_str());
|
||||
std::string current_now_s = util::read_file("/sys/class/power_supply/battery/current_now");
|
||||
int current_now = atoi(current_now_s.c_str());
|
||||
return bat_cap > 35 || (current_now < 0 && bat_cap > 10);
|
||||
}
|
||||
|
||||
bool check_space() {
|
||||
struct statvfs stat;
|
||||
if (statvfs("/data/", &stat) != 0) {
|
||||
return false;
|
||||
}
|
||||
size_t space = stat.f_bsize * stat.f_bavail;
|
||||
return space > 2000000000ULL; // 2GB
|
||||
}
|
||||
|
||||
static void start_settings_activity(const char* name) {
|
||||
char launch_cmd[1024];
|
||||
snprintf(launch_cmd, sizeof(launch_cmd),
|
||||
"am start -W --ez :settings:show_fragment_as_subsetting true -n 'com.android.settings/.%s'", name);
|
||||
system(launch_cmd);
|
||||
}
|
||||
|
||||
struct Updater {
|
||||
bool do_exit = false;
|
||||
|
||||
TouchState touch;
|
||||
|
||||
int fb_w, fb_h;
|
||||
EGLDisplay display;
|
||||
EGLSurface surface;
|
||||
|
||||
FramebufferState *fb = NULL;
|
||||
NVGcontext *vg = NULL;
|
||||
int font;
|
||||
|
||||
std::thread update_thread_handle;
|
||||
|
||||
std::mutex lock;
|
||||
|
||||
// i hate state machines give me coroutines already
|
||||
enum UpdateState {
|
||||
CONFIRMATION,
|
||||
RUNNING,
|
||||
ERROR,
|
||||
};
|
||||
UpdateState state;
|
||||
|
||||
std::string progress_text;
|
||||
float progress_frac;
|
||||
|
||||
std::string error_text;
|
||||
|
||||
// button
|
||||
int b_x, b_w, b_y, b_h;
|
||||
int balt_x;
|
||||
|
||||
CURL *curl = NULL;
|
||||
|
||||
Updater() {
|
||||
touch_init(&touch);
|
||||
|
||||
fb = framebuffer_init("updater", 0x00001000, false,
|
||||
&display, &surface, &fb_w, &fb_h);
|
||||
assert(fb);
|
||||
|
||||
vg = nvgCreateGLES3(NVG_ANTIALIAS | NVG_STENCIL_STROKES | NVG_DEBUG);
|
||||
assert(vg);
|
||||
font = nvgCreateFontMem(vg, "courbd", (unsigned char*)bin_courbd, (bin_courbd_end - bin_courbd), 0);
|
||||
assert(font >= 0);
|
||||
|
||||
b_w = 600;
|
||||
balt_x = 200;
|
||||
b_x = fb_w-b_w-200;
|
||||
b_y = 700;
|
||||
b_h = 250;
|
||||
|
||||
state = CONFIRMATION;
|
||||
|
||||
}
|
||||
|
||||
int download_file_xferinfo(curl_off_t dltotal, curl_off_t dlno,
|
||||
curl_off_t ultotal, curl_off_t ulnow) {
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(lock);
|
||||
if (dltotal != 0) {
|
||||
progress_frac = (float) dlno / dltotal;
|
||||
}
|
||||
}
|
||||
// printf("info: %ld %ld %f\n", dltotal, dlno, progress_frac);
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool download_file(std::string url, std::string out_fn) {
|
||||
FILE *of = fopen(out_fn.c_str(), "ab");
|
||||
assert(of);
|
||||
|
||||
CURLcode res;
|
||||
long last_resume_from = 0;
|
||||
|
||||
fseek(of, 0, SEEK_END);
|
||||
|
||||
int tries = 4;
|
||||
|
||||
bool ret = false;
|
||||
|
||||
while (true) {
|
||||
long resume_from = ftell(of);
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
|
||||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
|
||||
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
|
||||
curl_easy_setopt(curl, CURLOPT_USERAGENT, USER_AGENT);
|
||||
curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);
|
||||
curl_easy_setopt(curl, CURLOPT_RESUME_FROM, resume_from);
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, download_file_write);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, of);
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_XFERINFODATA, this);
|
||||
curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, &Updater::download_file_xferinfo);
|
||||
|
||||
CURLcode res = curl_easy_perform(curl);
|
||||
|
||||
long response_code = 0;
|
||||
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response_code);
|
||||
|
||||
// double content_length = 0.0;
|
||||
// curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &content_length);
|
||||
|
||||
printf("download %s res %d, code %ld, resume from %ld\n", url.c_str(), res, response_code, resume_from);
|
||||
if (res == CURLE_OK) {
|
||||
ret = true;
|
||||
break;
|
||||
} else if (res == CURLE_HTTP_RETURNED_ERROR && response_code == 416) {
|
||||
// failed because the file is already complete?
|
||||
ret = true;
|
||||
break;
|
||||
} else if (resume_from == last_resume_from) {
|
||||
// failed and dind't make make forward progress. only retry a couple times
|
||||
tries--;
|
||||
if (tries <= 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
last_resume_from = resume_from;
|
||||
}
|
||||
// printf("res %d\n", res);
|
||||
|
||||
// printf("- %ld %f\n", response_code, content_length);
|
||||
|
||||
fclose(of);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void set_progress(std::string text) {
|
||||
std::lock_guard<std::mutex> guard(lock);
|
||||
progress_text = text;
|
||||
}
|
||||
|
||||
void set_error(std::string text) {
|
||||
std::lock_guard<std::mutex> guard(lock);
|
||||
error_text = text;
|
||||
state = ERROR;
|
||||
}
|
||||
|
||||
std::string stage_download(std::string url, std::string hash, std::string name) {
|
||||
std::string out_fn = UPDATE_DIR "/" + util::base_name(url);
|
||||
|
||||
set_progress("downloading " + name + "...");
|
||||
bool r = download_file(url, out_fn);
|
||||
if (!r) {
|
||||
set_error("failed to download " + name);
|
||||
return "";
|
||||
}
|
||||
|
||||
set_progress("verifying " + name + "...");
|
||||
std::string fn_hash = sha256_file(out_fn);
|
||||
printf("got %s hash: %s\n", name.c_str(), hash.c_str());
|
||||
if (fn_hash != hash) {
|
||||
set_error(name + " was corrupt");
|
||||
unlink(out_fn.c_str());
|
||||
return "";
|
||||
}
|
||||
|
||||
return out_fn;
|
||||
}
|
||||
|
||||
void run_stages() {
|
||||
curl = curl_easy_init();
|
||||
assert(curl);
|
||||
|
||||
if (!check_battery()) {
|
||||
set_error("Please plug power in to your EON and wait for charge");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!check_space()) {
|
||||
set_error("2GB of free space required to update");
|
||||
return;
|
||||
}
|
||||
|
||||
mkdir(UPDATE_DIR, 0777);
|
||||
|
||||
const int EON = (access("/EON", F_OK) != -1);
|
||||
|
||||
set_progress("finding latest version...");
|
||||
std::string manifest_s;
|
||||
if (EON) {
|
||||
manifest_s = download_string(curl, manifest_url);
|
||||
} else {
|
||||
// don't update NEO
|
||||
exit(0);
|
||||
}
|
||||
|
||||
printf("manifest: %s\n", manifest_s.c_str());
|
||||
|
||||
std::string err;
|
||||
auto manifest = json11::Json::parse(manifest_s, err);
|
||||
if (manifest.is_null() || !err.empty()) {
|
||||
set_error("failed to load update manifest");
|
||||
return;
|
||||
}
|
||||
|
||||
std::string ota_url = manifest["ota_url"].string_value();
|
||||
std::string ota_hash = manifest["ota_hash"].string_value();
|
||||
|
||||
std::string recovery_url = manifest["recovery_url"].string_value();
|
||||
std::string recovery_hash = manifest["recovery_hash"].string_value();
|
||||
int recovery_len = manifest["recovery_len"].int_value();
|
||||
|
||||
// std::string installer_url = manifest["installer_url"].string_value();
|
||||
// std::string installer_hash = manifest["installer_hash"].string_value();
|
||||
|
||||
if (ota_url.empty() || ota_hash.empty()) {
|
||||
set_error("invalid update manifest");
|
||||
return;
|
||||
}
|
||||
|
||||
// std::string installer_fn = stage_download(installer_url, installer_hash, "installer");
|
||||
// if (installer_fn.empty()) {
|
||||
// //error'd
|
||||
// return;
|
||||
// }
|
||||
|
||||
std::string recovery_fn;
|
||||
if (recovery_url.empty() || recovery_hash.empty() || recovery_len == 0) {
|
||||
set_progress("skipping recovery flash...");
|
||||
} else {
|
||||
// only download the recovery if it differs from what's flashed
|
||||
set_progress("checking recovery...");
|
||||
std::string existing_recovery_hash = sha256_file(RECOVERY_DEV, recovery_len);
|
||||
printf("existing recovery hash: %s\n", existing_recovery_hash.c_str());
|
||||
|
||||
if (existing_recovery_hash != recovery_hash) {
|
||||
recovery_fn = stage_download(recovery_url, recovery_hash, "recovery");
|
||||
if (recovery_fn.empty()) {
|
||||
// error'd
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::string ota_fn = stage_download(ota_url, ota_hash, "update");
|
||||
if (ota_fn.empty()) {
|
||||
//error'd
|
||||
return;
|
||||
}
|
||||
|
||||
if (!check_battery()) {
|
||||
set_error("must have at least 35% battery to update");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!recovery_fn.empty()) {
|
||||
// flash recovery
|
||||
set_progress("flashing recovery...");
|
||||
|
||||
FILE *flash_file = fopen(recovery_fn.c_str(), "rb");
|
||||
if (!flash_file) {
|
||||
set_error("failed to flash recovery");
|
||||
return;
|
||||
}
|
||||
|
||||
FILE *recovery_dev = fopen(RECOVERY_DEV, "w+b");
|
||||
if (!recovery_dev) {
|
||||
fclose(flash_file);
|
||||
set_error("failed to flash recovery");
|
||||
return;
|
||||
}
|
||||
|
||||
const size_t buf_size = 4096;
|
||||
std::unique_ptr<char[]> buffer( new char[ buf_size ] );
|
||||
|
||||
while (true) {
|
||||
size_t bytes_read = fread(buffer.get(), 1, buf_size, flash_file);
|
||||
if (!bytes_read) break;
|
||||
|
||||
size_t bytes_written = fwrite(buffer.get(), 1, bytes_read, recovery_dev);
|
||||
if (bytes_read != bytes_written) {
|
||||
fclose(recovery_dev);
|
||||
fclose(flash_file);
|
||||
set_error("failed to flash recovery: write failed");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
fclose(recovery_dev);
|
||||
fclose(flash_file);
|
||||
|
||||
set_progress("verifying flash...");
|
||||
std::string new_recovery_hash = sha256_file(RECOVERY_DEV, recovery_len);
|
||||
printf("new recovery hash: %s\n", new_recovery_hash.c_str());
|
||||
|
||||
if (new_recovery_hash != recovery_hash) {
|
||||
set_error("recovery flash corrupted");
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// write arguments to recovery
|
||||
FILE *cmd_file = fopen(RECOVERY_COMMAND, "wb");
|
||||
if (!cmd_file) {
|
||||
set_error("failed to reboot into recovery");
|
||||
return;
|
||||
}
|
||||
fprintf(cmd_file, "--update_package=%s\n", ota_fn.c_str());
|
||||
fclose(cmd_file);
|
||||
|
||||
set_progress("rebooting");
|
||||
|
||||
// remove the continue.sh so we come back into the setup.
|
||||
// maybe we should go directly into the installer, but what if we don't come back with internet? :/
|
||||
//unlink("/data/data/com.termux/files/continue.sh");
|
||||
|
||||
// TODO: this should be generic between android versions
|
||||
// IPowerManager.reboot(confirm=false, reason="recovery", wait=true)
|
||||
system("service call power 16 i32 0 s16 recovery i32 1");
|
||||
while(1) pause();
|
||||
|
||||
// execl("/system/bin/reboot", "recovery");
|
||||
// set_error("failed to reboot into recovery");
|
||||
}
|
||||
|
||||
void draw_ack_screen(const char *message, const char *button, const char *altbutton) {
|
||||
nvgFontSize(vg, 96.0f);
|
||||
nvgFillColor(vg, nvgRGBA(255,255,255,255));
|
||||
nvgTextAlign(vg, NVG_ALIGN_LEFT | NVG_ALIGN_BASELINE);
|
||||
nvgTextBox(vg, 50, 100, fb_w-100, message, NULL);
|
||||
|
||||
// draw button
|
||||
if (button) {
|
||||
nvgBeginPath(vg);
|
||||
nvgFillColor(vg, nvgRGBA(0, 0, 0, 255));
|
||||
nvgRoundedRect(vg, b_x, b_y, b_w, b_h, 20);
|
||||
nvgFill(vg);
|
||||
|
||||
nvgFillColor(vg, nvgRGBA(255, 255, 255, 255));
|
||||
nvgTextAlign(vg, NVG_ALIGN_CENTER | NVG_ALIGN_MIDDLE);
|
||||
nvgText(vg, b_x+b_w/2, b_y+b_h/2, button, NULL);
|
||||
|
||||
nvgBeginPath(vg);
|
||||
nvgStrokeColor(vg, nvgRGBA(255, 255, 255, 255));
|
||||
nvgStrokeWidth(vg, 5);
|
||||
nvgRoundedRect(vg, b_x, b_y, b_w, b_h, 20);
|
||||
nvgStroke(vg);
|
||||
}
|
||||
|
||||
// draw button
|
||||
if (altbutton) {
|
||||
nvgBeginPath(vg);
|
||||
nvgFillColor(vg, nvgRGBA(0, 0, 0, 255));
|
||||
nvgRoundedRect(vg, balt_x, b_y, b_w, b_h, 20);
|
||||
nvgFill(vg);
|
||||
|
||||
nvgFillColor(vg, nvgRGBA(255, 255, 255, 255));
|
||||
nvgTextAlign(vg, NVG_ALIGN_CENTER | NVG_ALIGN_MIDDLE);
|
||||
nvgText(vg, balt_x+b_w/2, b_y+b_h/2, altbutton, NULL);
|
||||
|
||||
nvgBeginPath(vg);
|
||||
nvgStrokeColor(vg, nvgRGBA(255, 255, 255, 255));
|
||||
nvgStrokeWidth(vg, 5);
|
||||
nvgRoundedRect(vg, balt_x, b_y, b_w, b_h, 20);
|
||||
nvgStroke(vg);
|
||||
}
|
||||
}
|
||||
|
||||
void draw_progress_screen() {
|
||||
// draw progress message
|
||||
nvgFontSize(vg, 64.0f);
|
||||
nvgFillColor(vg, nvgRGBA(255,255,255,255));
|
||||
nvgTextAlign(vg, NVG_ALIGN_CENTER | NVG_ALIGN_BASELINE);
|
||||
nvgTextBox(vg, 0, 700, fb_w, progress_text.c_str(), NULL);
|
||||
|
||||
// draw progress bar
|
||||
{
|
||||
int progress_width = 800;
|
||||
int progress_x = fb_w/2-progress_width/2;
|
||||
int progress_y = 768;
|
||||
int progress_height = 15;
|
||||
|
||||
int powerprompt_y = 512;
|
||||
nvgText(vg, fb_w/2, powerprompt_y, "Ensure EON is connected to power", NULL);
|
||||
|
||||
NVGpaint paint = nvgBoxGradient(
|
||||
vg, progress_x + 1, progress_y + 1,
|
||||
progress_width - 2, progress_height, 3, 4, nvgRGB(0, 32, 0), nvgRGB(0, 92, 0));
|
||||
nvgBeginPath(vg);
|
||||
nvgRoundedRect(vg, progress_x, progress_y, progress_width, progress_height, 3);
|
||||
nvgFillPaint(vg, paint);
|
||||
nvgFill(vg);
|
||||
|
||||
float value = std::min(std::max(0.0f, progress_frac), 1.0f);
|
||||
int bar_pos = ((progress_width - 2) * value);
|
||||
|
||||
paint = nvgBoxGradient(
|
||||
vg, progress_x, progress_y,
|
||||
bar_pos+1.5f, progress_height-1, 3, 4,
|
||||
nvgRGB(220, 100, 0), nvgRGB(128, 100, 0));
|
||||
|
||||
nvgBeginPath(vg);
|
||||
nvgRoundedRect(
|
||||
vg, progress_x+1, progress_y+1,
|
||||
bar_pos, progress_height-2, 3);
|
||||
nvgFillPaint(vg, paint);
|
||||
nvgFill(vg);
|
||||
}
|
||||
}
|
||||
|
||||
void ui_draw() {
|
||||
std::lock_guard<std::mutex> guard(lock);
|
||||
|
||||
nvgBeginFrame(vg, fb_w, fb_h, 1.0f);
|
||||
|
||||
switch (state) {
|
||||
case CONFIRMATION:
|
||||
draw_ack_screen("An upgrade to NEOS is required.\n\n"
|
||||
"Your device will now be reset and upgraded. You may want to connect to wifi as download is around 1 GB\nData on device shouldn't be lost.",
|
||||
"continue",
|
||||
"wifi");
|
||||
break;
|
||||
case RUNNING:
|
||||
draw_progress_screen();
|
||||
break;
|
||||
case ERROR:
|
||||
draw_ack_screen(("ERROR: " + error_text + "\n\nYou will need to retry").c_str(), NULL, "exit");
|
||||
break;
|
||||
}
|
||||
|
||||
nvgEndFrame(vg);
|
||||
}
|
||||
|
||||
void ui_update() {
|
||||
std::lock_guard<std::mutex> guard(lock);
|
||||
|
||||
switch (state) {
|
||||
case ERROR:
|
||||
case CONFIRMATION: {
|
||||
int touch_x = -1, touch_y = -1;
|
||||
int res = touch_poll(&touch, &touch_x, &touch_y, 0);
|
||||
if (res == 1 && !is_settings_active()) {
|
||||
if (touch_x >= b_x && touch_x < b_x+b_w && touch_y >= b_y && touch_y < b_y+b_h) {
|
||||
if (state == CONFIRMATION) {
|
||||
state = RUNNING;
|
||||
update_thread_handle = std::thread(&Updater::run_stages, this);
|
||||
}
|
||||
}
|
||||
if (touch_x >= balt_x && touch_x < balt_x+b_w && touch_y >= b_y && touch_y < b_y+b_h) {
|
||||
if (state == CONFIRMATION) {
|
||||
start_settings_activity("Settings$WifiSettingsActivity");
|
||||
} else if (state == ERROR) {
|
||||
do_exit = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void go() {
|
||||
while (!do_exit) {
|
||||
ui_update();
|
||||
|
||||
glClearColor(0.19, 0.09, 0.2, 1.0);
|
||||
glClear(GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
|
||||
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
ui_draw();
|
||||
|
||||
glDisable(GL_BLEND);
|
||||
|
||||
eglSwapBuffers(display, surface);
|
||||
assert(glGetError() == GL_NO_ERROR);
|
||||
|
||||
// no simple way to do 30fps vsync with surfaceflinger...
|
||||
usleep(30000);
|
||||
}
|
||||
|
||||
if (update_thread_handle.joinable()) {
|
||||
update_thread_handle.join();
|
||||
}
|
||||
|
||||
system("service call power 16 i32 0 i32 0 i32 1");
|
||||
}
|
||||
|
||||
bool is_settings_active() {
|
||||
FILE *fp;
|
||||
char sys_output[4096];
|
||||
|
||||
fp = popen("/bin/dumpsys window windows", "r");
|
||||
if (fp == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool active = false;
|
||||
while (fgets(sys_output, sizeof(sys_output), fp) != NULL) {
|
||||
if (strstr(sys_output, "mCurrentFocus=null") != NULL) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (strstr(sys_output, "mCurrentFocus=Window") != NULL) {
|
||||
active = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
pclose(fp);
|
||||
|
||||
return active;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
int main(int argc, char *argv[]) {
|
||||
if (argc > 1) {
|
||||
if (strcmp(argv[1], "local") == 0) {
|
||||
manifest_url = MANIFEST_URL_EON_LOCAL;
|
||||
} else if (strcmp(argv[1], "staging") == 0) {
|
||||
manifest_url = MANIFEST_URL_EON_STAGING;
|
||||
} else {
|
||||
manifest_url = argv[1];
|
||||
}
|
||||
}
|
||||
printf("updating from %s\n", manifest_url);
|
||||
Updater updater;
|
||||
updater.go();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,16 +1,29 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
export OMP_NUM_THREADS=1
|
||||
export MKL_NUM_THREADS=1
|
||||
export NUMEXPR_NUM_THREADS=1
|
||||
export OPENBLAS_NUM_THREADS=1
|
||||
export VECLIB_MAXIMUM_THREADS=1
|
||||
|
||||
if [ -z "$PASSIVE" ]; then
|
||||
export PASSIVE="1"
|
||||
fi
|
||||
|
||||
function launch {
|
||||
# apply update
|
||||
if [ "$(git rev-parse HEAD)" != "$(git rev-parse @{u})" ]; then
|
||||
git reset --hard @{u} &&
|
||||
git clean -xdf &&
|
||||
exec "${BASH_SOURCE[0]}"
|
||||
fi
|
||||
# if [ "$(git rev-parse HEAD)" != "$(git rev-parse @{u})" ]; then
|
||||
# git reset --hard @{u} &&
|
||||
# git clean -xdf &&
|
||||
#
|
||||
# # Touch all files on release2 after checkout to prevent rebuild
|
||||
# BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
# if [[ "$BRANCH" == "release2" ]]; then
|
||||
# touch **
|
||||
# fi
|
||||
#
|
||||
# exec "${BASH_SOURCE[0]}"
|
||||
# fi
|
||||
|
||||
# no cpu rationing for now
|
||||
echo 0-3 > /dev/cpuset/background/cpus
|
||||
@@ -19,6 +32,8 @@ function launch {
|
||||
echo 0-3 > /dev/cpuset/foreground/cpus
|
||||
echo 0-3 > /dev/cpuset/android/cpus
|
||||
|
||||
# handle pythonpath
|
||||
ln -s /data/openpilot /data/pythonpath
|
||||
export PYTHONPATH="$PWD"
|
||||
|
||||
# start manager
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
/usr/bin/sh /data/openpilot/dragonpilot/chinese-fonts/installer.sh &
|
||||
export PASSIVE="0"
|
||||
exec ./launch_chffrplus.sh
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -164,14 +164,15 @@ BO_ 780 ACC_HUD: 8 ADAS
|
||||
SG_ FCM_PROBLEM : 34|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ RADAR_OBSTRUCTED : 33|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ ENABLE_MINI_CAR : 32|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X03 : 47|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_DISTANCE : 47|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_LEAD : 45|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_3 : 43|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_4 : 42|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_5 : 41|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CRUISE_CONTROL_LABEL : 40|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_DISTANCE_3 : 52|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X03_2 : 55|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ IMPERIAL_UNIT : 54|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01_2 : 55|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01 : 48|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" BDY
|
||||
|
||||
@@ -164,14 +164,15 @@ BO_ 780 ACC_HUD: 8 ADAS
|
||||
SG_ FCM_PROBLEM : 34|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ RADAR_OBSTRUCTED : 33|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ ENABLE_MINI_CAR : 32|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X03 : 47|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_DISTANCE : 47|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_LEAD : 45|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_3 : 43|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_4 : 42|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_5 : 41|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CRUISE_CONTROL_LABEL : 40|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_DISTANCE_3 : 52|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X03_2 : 55|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ IMPERIAL_UNIT : 54|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01_2 : 55|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01 : 48|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" BDY
|
||||
|
||||
@@ -209,6 +209,7 @@ BO_ 571 WHEEL_BUTTONS: 3 XXX
|
||||
SG_ ACC_FOLLOW_INC : 8|1@0+ (1,0) [0|15] "" XXX
|
||||
SG_ ACC_CANCEL : 0|1@0+ (1,0) [0|15] "" XXX
|
||||
SG_ COUNTER : 15|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ ACC_RESUME : 4|1@0+ (1,0) [0|15] "" XXX
|
||||
|
||||
BO_ 669 NEW_MSG_29d: 3 XXX
|
||||
SG_ COUNTER : 15|4@0+ (1,0) [0|15] "" XXX
|
||||
|
||||
@@ -31,6 +31,8 @@ NS_ :
|
||||
BU_BO_REL_
|
||||
SG_MUL_VAL_
|
||||
|
||||
BS_:
|
||||
|
||||
BU_: XXX
|
||||
|
||||
|
||||
|
||||
@@ -31,6 +31,8 @@ NS_ :
|
||||
BU_BO_REL_
|
||||
SG_MUL_VAL_
|
||||
|
||||
BS_:
|
||||
|
||||
BU_: XXX
|
||||
|
||||
|
||||
|
||||
@@ -31,6 +31,8 @@ NS_ :
|
||||
BU_BO_REL_
|
||||
SG_MUL_VAL_
|
||||
|
||||
BS_:
|
||||
|
||||
BU_: XXX
|
||||
|
||||
BO_ 1280 Object_00: 8 XXX
|
||||
|
||||
@@ -31,6 +31,8 @@ NS_ :
|
||||
BU_BO_REL_
|
||||
SG_MUL_VAL_
|
||||
|
||||
BS_:
|
||||
|
||||
BU_: XXX
|
||||
|
||||
BO_ 130 EPAS_INFO: 8 XXX
|
||||
@@ -128,9 +130,10 @@ BO_ 984 Lane_Keep_Assist_Ui: 8 XXX
|
||||
SG_ Hands_Warning : 49|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ Set_Me_X30 : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
CM_ SG_ 970 Lkas_Action "only vals 4, 5, 8, 9 seem to work. 4 and 5 are a bit smoother" ;
|
||||
|
||||
VAL_ 357 Cruise_State 4 "active" 3 "standby" 0 "off" ;
|
||||
VAL_ 970 Lkas_Action 15 "off" 9 "abrupt" 8 "abrupt2" 5 "smooth" 4 "smooth2" ;
|
||||
VAL_ 970 Lkas_Alert 15 "no_alert" 3 "high_intensity" 2 "mid_intensity" 1 "low_intensity" ;
|
||||
VAL_ 972 LaActAvail_D_Actl 3 "available" 2 "tbd" 1 "not_available" 0 "fault" ;
|
||||
VAL_ 984 Lines_Hud 15 "none" 11 "grey_yellow" 8 "green_red" 7 "yellow_grey" 6 "grey_grey" 4 "red_green" 3 "green_green" ;
|
||||
CM_ SG_ 970 Lkas_Action "only vals 4, 5, 8, 9 seem to work. 4 and 5 are a bit smoother" ;
|
||||
|
||||
@@ -196,7 +196,8 @@ BO_ 780 ACC_HUD: 8 ADAS
|
||||
SG_ ACC_PROBLEM : 37|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ ACC_ON : 52|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BOH_6 : 51|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ SET_TO_X3 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ IMPERIAL_UNIT : 55|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_TO_X1 : 56|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" XXX
|
||||
|
||||
@@ -260,4 +261,4 @@ BO_ 891 STALK_STATUS_2: 8 XXX
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
|
||||
VAL_ 399 STEER_STATUS 6 "tmp_fault" 5 "fault_1" 4 "no_torque_alert_2" 3 "low_speed_lockout" 2 "no_torque_alert_1" 0 "normal" ;
|
||||
VAL_ 399 STEER_STATUS 6 "tmp_fault" 5 "fault_1" 4 "no_torque_alert_2" 3 "low_speed_lockout" 2 "no_torque_alert_1" 0 "normal" ;
|
||||
|
||||
@@ -142,14 +142,15 @@ BO_ 780 ACC_HUD: 8 ADAS
|
||||
SG_ FCM_PROBLEM : 34|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ RADAR_OBSTRUCTED : 33|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ ENABLE_MINI_CAR : 32|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X03 : 47|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_DISTANCE : 47|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_LEAD : 45|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_3 : 43|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_4 : 42|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_5 : 41|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CRUISE_CONTROL_LABEL : 40|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_DISTANCE_3 : 52|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X03_2 : 55|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ IMPERIAL_UNIT : 54|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01_2 : 55|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01 : 48|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" BDY
|
||||
|
||||
@@ -50,6 +50,9 @@ BO_ 450 EPB_STATUS: 8 EPB
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 493 HUD_SETTING: 5 XXX
|
||||
SG_ IMPERIAL_UNIT : 5|1@0+ (1,0) [0|1] "" EON
|
||||
|
||||
BO_ 487 BRAKE_PRESSURE: 4 VSA
|
||||
SG_ BRAKE_PRESSURE1 : 7|10@0+ (0.015625,-103) [0|1000] "" EON
|
||||
SG_ BRAKE_PRESSURE2 : 9|10@0+ (0.015625,-103) [0|1000] "" EON
|
||||
|
||||
@@ -91,7 +91,7 @@ BO_ 614 STEERING_IPAS: 8 IPAS
|
||||
SG_ SET_ME_X00 : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ DIRECTION_CMD : 38|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X40 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00_1 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 643 PRE_COLLISION: 8 XXX
|
||||
@@ -254,9 +254,9 @@ VAL_ 1553 UNITS 1 "km" 2 "miles";
|
||||
VAL_ 1556 TURN_SIGNALS 3 "none" 2 "right" 1 "left";
|
||||
VAL_ 1161 TSGN1 1 "speed sign" 0 "none";
|
||||
VAL_ 1161 TSGN2 1 "speed sign" 0 "none";
|
||||
VAL_ 1161 SPLSGN2 15 "conditional blank" 5 "rain" 0 "none";
|
||||
VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highway" 17 "no highway" 18 "motorway" 19 "no motorway" 20 "in city" 21 "outside city" 22 "pedestrian area" 23 "no pedestrian area" 65 "no overtaking left" 66 "no overtaking right" 67 "overtaking allowed again" 65 "no overtake" 129 "no entry";
|
||||
VAL_ 1162 SPLSGN3 15 "conditional blank" 5 "rain" 0 "none";
|
||||
VAL_ 1161 SPLSGN2 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highway" 17 "no highway" 18 "motorway" 19 "no motorway" 20 "in city" 21 "outside city" 22 "pedestrian area" 23 "no pedestrian area" 65 "no overtaking left" 66 "no overtaking right" 67 "overtaking allowed again" 129 "no entry";
|
||||
VAL_ 1162 SPLSGN3 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
|
||||
|
||||
CM_ "CHFFR_METRIC 37 STEER_ANGLE STEER_ANGLE 0.36 180";
|
||||
|
||||
38
opendbc/generator/toyota/lexus_gs300h_2017_pt.dbc
Normal file
38
opendbc/generator/toyota/lexus_gs300h_2017_pt.dbc
Normal file
@@ -0,0 +1,38 @@
|
||||
CM_ "IMPORT _toyota_2017.dbc"
|
||||
CM_ "IMPORT _comma.dbc"
|
||||
|
||||
BO_ 550 BRAKE_MODULE: 8 XXX
|
||||
SG_ BRAKE_PRESSURE : 0|9@0+ (1,0) [0|511] "" XXX
|
||||
SG_ BRAKE_POSITION : 16|9@0+ (1,0) [0|511] "" XXX
|
||||
SG_ BRAKE_PRESSED : 37|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 581 GAS_PEDAL: 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_DRIVER : 15|16@0- (1,0) [-32768|32767] "" XXX
|
||||
SG_ STEER_OVERRIDE : 0|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 610 EPS_STATUS: 5 EPS
|
||||
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ LKA_STATE : 31|7@0+ (1,0) [0|127] "" XXX
|
||||
SG_ TYPE : 24|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 956 GEAR_PACKET: 8 XXX
|
||||
SG_ GEAR : 13|6@0+ (1,0) [0|63] "" XXX
|
||||
|
||||
BO_ 1009 PCM_CRUISE_3: 8 XXX
|
||||
SG_ MAIN_ON : 13|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_SPEED : 23|8@0+ (1,0) [0|255] "mph" XXX
|
||||
SG_ CRUISE_STATE : 10|1@0+ (1,0) [0|15] "" XXX
|
||||
|
||||
CM_ SG_ 550 BRAKE_PRESSURE "seems prop to pedal force";
|
||||
CM_ SG_ 550 BRAKE_POSITION "seems proportional to pedal displacement, unclear the max value of 0x1c8";
|
||||
CM_ SG_ 581 GAS_PEDAL "it seems slightly filtered";
|
||||
CM_ SG_ 610 TYPE "seems 1 on Corolla, 0 on all others";
|
||||
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";
|
||||
37
opendbc/generator/toyota/lexus_rx_350_2016_pt.dbc
Normal file
37
opendbc/generator/toyota/lexus_rx_350_2016_pt.dbc
Normal file
@@ -0,0 +1,37 @@
|
||||
CM_ "IMPORT _toyota_2017.dbc"
|
||||
CM_ "IMPORT _comma.dbc"
|
||||
|
||||
BO_ 550 BRAKE_MODULE: 8 XXX
|
||||
SG_ BRAKE_PRESSURE : 0|9@0+ (1,0) [0|511] "" XXX
|
||||
SG_ BRAKE_POSITION : 16|9@0+ (1,0) [0|511] "" XXX
|
||||
SG_ BRAKE_PRESSED : 37|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 608 STEER_TORQUE_SENSOR: 8 XXX
|
||||
SG_ STEER_TORQUE_EPS : 47|16@0- (0.73,0) [-20000|20000] "" XXX
|
||||
SG_ STEER_TORQUE_DRIVER : 15|16@0- (1,0) [-32768|32767] "" XXX
|
||||
SG_ STEER_OVERRIDE : 0|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 610 EPS_STATUS: 5 EPS
|
||||
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ LKA_STATE : 31|7@0+ (1,0) [0|127] "" XXX
|
||||
SG_ TYPE : 24|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 956 GEAR_PACKET: 8 XXX
|
||||
SG_ SPORT_ON : 2|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ GEAR : 13|6@0+ (1,0) [0|63] "" XXX
|
||||
SG_ ECON_ON : 40|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 705 GAS_PEDAL: 8 XXX
|
||||
SG_ GAS_PEDAL : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
|
||||
CM_ SG_ 550 BRAKE_PRESSURE "seems prop to pedal force";
|
||||
CM_ SG_ 550 BRAKE_POSITION "seems proportional to pedal displacement, unclear the max value of 0x1c8";
|
||||
CM_ SG_ 610 TYPE "seems 1 on Corolla, 0 on all others";
|
||||
VAL_ 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 SPORT_ON 0 "off" 1 "on" ;
|
||||
VAL_ 956 GEAR 0 "D" 1 "S" 8 "N" 16 "R" 32 "P" ;
|
||||
VAL_ 956 ECON_ON 0 "off" 1 "on" ;
|
||||
@@ -16,7 +16,7 @@ BO_ 581 GAS_PEDAL: 8 XXX
|
||||
SG_ GAS_PEDAL : 23|8@0+ (0.005,0) [0|1] "" XXX
|
||||
|
||||
BO_ 608 STEER_TORQUE_SENSOR: 8 XXX
|
||||
SG_ STEER_TORQUE_EPS : 47|16@0- (0.66,0) [-20000|20000] "" XXX
|
||||
SG_ STEER_TORQUE_EPS : 47|16@0- (0.73,0) [-20000|20000] "" XXX
|
||||
SG_ STEER_TORQUE_DRIVER : 15|16@0- (1,0) [-32768|32767] "" XXX
|
||||
SG_ STEER_OVERRIDE : 0|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
@@ -23,6 +23,7 @@ BO_ 610 EPS_STATUS: 5 EPS
|
||||
|
||||
BO_ 956 GEAR_PACKET: 8 XXX
|
||||
SG_ GEAR : 13|6@0+ (1,0) [0|63] "" XXX
|
||||
SG_ SPORT_ON : 3|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
CM_ SG_ 548 BRAKE_PRESSURE "seems prop to pedal force";
|
||||
CM_ SG_ 548 BRAKE_POSITION "seems proportional to pedal displacement, unclear the max value of 0x1c8";
|
||||
|
||||
@@ -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.056,0) [-500|500] "" XXX
|
||||
|
||||
BO_ 610 EPS_STATUS: 8 EPS
|
||||
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX
|
||||
@@ -1,6 +1,17 @@
|
||||
CM_ "IMPORT _toyota_2017.dbc"
|
||||
CM_ "IMPORT _comma.dbc"
|
||||
|
||||
BO_ 401 STEERING_LTA: 8 XXX
|
||||
SG_ COUNTER : 7|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SETME_X3 : 29|2@0+ (1,0) [0|3] "" 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_REQUEST : 25|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BIT : 30|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 550 BRAKE_MODULE: 8 XXX
|
||||
SG_ BRAKE_PRESSURE : 0|9@0+ (1,0) [0|511] "" XXX
|
||||
SG_ BRAKE_POSITION : 16|9@0+ (1,0) [0|511] "" XXX
|
||||
@@ -15,6 +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
|
||||
|
||||
BO_ 610 EPS_STATUS: 8 EPS
|
||||
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX
|
||||
@@ -200,7 +200,8 @@ BO_ 780 ACC_HUD: 8 ADAS
|
||||
SG_ ACC_PROBLEM : 37|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ ACC_ON : 52|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BOH_6 : 51|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ SET_TO_X3 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ IMPERIAL_UNIT : 55|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_TO_X1 : 56|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" XXX
|
||||
|
||||
@@ -265,6 +266,7 @@ BO_ 891 STALK_STATUS_2: 8 XXX
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
|
||||
VAL_ 399 STEER_STATUS 6 "tmp_fault" 5 "fault_1" 4 "no_torque_alert_2" 3 "low_speed_lockout" 2 "no_torque_alert_1" 0 "normal" ;
|
||||
|
||||
CM_ "honda_accord_lx15t_2018_can.dbc starts here"
|
||||
|
||||
|
||||
|
||||
@@ -200,7 +200,8 @@ BO_ 780 ACC_HUD: 8 ADAS
|
||||
SG_ ACC_PROBLEM : 37|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ ACC_ON : 52|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BOH_6 : 51|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ SET_TO_X3 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ IMPERIAL_UNIT : 55|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_TO_X1 : 56|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" XXX
|
||||
|
||||
@@ -265,6 +266,7 @@ BO_ 891 STALK_STATUS_2: 8 XXX
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
|
||||
VAL_ 399 STEER_STATUS 6 "tmp_fault" 5 "fault_1" 4 "no_torque_alert_2" 3 "low_speed_lockout" 2 "no_torque_alert_1" 0 "normal" ;
|
||||
|
||||
CM_ "honda_accord_s2t_2018_can.dbc starts here"
|
||||
|
||||
|
||||
|
||||
@@ -200,7 +200,8 @@ BO_ 780 ACC_HUD: 8 ADAS
|
||||
SG_ ACC_PROBLEM : 37|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ ACC_ON : 52|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BOH_6 : 51|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ SET_TO_X3 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ IMPERIAL_UNIT : 55|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_TO_X1 : 56|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" XXX
|
||||
|
||||
@@ -265,6 +266,7 @@ BO_ 891 STALK_STATUS_2: 8 XXX
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
|
||||
VAL_ 399 STEER_STATUS 6 "tmp_fault" 5 "fault_1" 4 "no_torque_alert_2" 3 "low_speed_lockout" 2 "no_torque_alert_1" 0 "normal" ;
|
||||
|
||||
CM_ "honda_civic_hatchback_ex_2017_can.dbc starts here"
|
||||
|
||||
|
||||
|
||||
@@ -164,14 +164,15 @@ BO_ 780 ACC_HUD: 8 ADAS
|
||||
SG_ FCM_PROBLEM : 34|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ RADAR_OBSTRUCTED : 33|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ ENABLE_MINI_CAR : 32|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X03 : 47|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_DISTANCE : 47|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_LEAD : 45|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_3 : 43|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_4 : 42|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_5 : 41|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CRUISE_CONTROL_LABEL : 40|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_DISTANCE_3 : 52|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X03_2 : 55|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ IMPERIAL_UNIT : 54|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01_2 : 55|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01 : 48|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" BDY
|
||||
@@ -288,6 +289,9 @@ BO_ 450 EPB_STATUS: 8 EPB
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
|
||||
|
||||
BO_ 493 HUD_SETTING: 5 XXX
|
||||
SG_ IMPERIAL_UNIT : 5|1@0+ (1,0) [0|1] "" EON
|
||||
|
||||
BO_ 487 BRAKE_PRESSURE: 4 VSA
|
||||
SG_ BRAKE_PRESSURE1 : 7|10@0+ (0.015625,-103) [0|1000] "" EON
|
||||
SG_ BRAKE_PRESSURE2 : 9|10@0+ (0.015625,-103) [0|1000] "" EON
|
||||
|
||||
@@ -409,6 +409,7 @@ BO_TX_BU_ 862 : NEO,ADAS;
|
||||
BO_TX_BU_ 927 : NEO,ADAS;
|
||||
|
||||
|
||||
CM_ "CHFFR_METRIC 330 STEER_ANGLE STEER_ANGLE 0.36 180; CHFFR_METRIC 380 ENGINE_RPM ENGINE_RPM 1 0; CHFFR_METRIC 804 ENGINE_TEMPERATURE ENGINE_TEMPERATURE 1 0";
|
||||
CM_ SG_ 401 GEAR "10 = reverse, 11 = transition";
|
||||
CM_ SG_ 490 LONG_ACCEL "wheel speed derivative, noisy and zero snapping";
|
||||
CM_ SG_ 773 PASS_AIRBAG_ON "Might just be indicator light";
|
||||
@@ -430,4 +431,3 @@ VAL_ 806 CMBS_BUTTON 3 "pressed" 0 "released" ;
|
||||
VAL_ 829 BEEP 3 "single_beep" 2 "triple_beep" 1 "repeated_beep" 0 "no_beep" ;
|
||||
VAL_ 891 WIPERS 4 "High" 2 "Low" 0 "Off" ;
|
||||
VAL_ 927 ACC_ALERTS 29 "esp_active_acc_canceled" 10 "b_pedal_applied" 9 "speed_too_low" 8 "speed_too_high" 7 "p_brake_applied" 6 "gear_no_d" 5 "seatbelt" 4 "too_steep_downhill" 3 "too_steep_uphill" 2 "too_close" 1 "no_vehicle_ahead" ;
|
||||
CM_ "CHFFR_METRIC 330 STEER_ANGLE STEER_ANGLE 0.36 180; CHFFR_METRIC 380 ENGINE_RPM ENGINE_RPM 1 0; CHFFR_METRIC 804 ENGINE_TEMPERATURE ENGINE_TEMPERATURE 1 0";
|
||||
|
||||
@@ -200,7 +200,8 @@ BO_ 780 ACC_HUD: 8 ADAS
|
||||
SG_ ACC_PROBLEM : 37|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ ACC_ON : 52|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BOH_6 : 51|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ SET_TO_X3 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ IMPERIAL_UNIT : 55|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_TO_X1 : 56|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" XXX
|
||||
|
||||
@@ -265,6 +266,7 @@ BO_ 891 STALK_STATUS_2: 8 XXX
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
|
||||
VAL_ 399 STEER_STATUS 6 "tmp_fault" 5 "fault_1" 4 "no_torque_alert_2" 3 "low_speed_lockout" 2 "no_torque_alert_1" 0 "normal" ;
|
||||
|
||||
CM_ "honda_crv_ex_2017_can.dbc starts here"
|
||||
|
||||
|
||||
|
||||
@@ -200,7 +200,8 @@ BO_ 780 ACC_HUD: 8 ADAS
|
||||
SG_ ACC_PROBLEM : 37|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ ACC_ON : 52|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BOH_6 : 51|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ SET_TO_X3 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ IMPERIAL_UNIT : 55|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_TO_X1 : 56|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" XXX
|
||||
|
||||
@@ -265,6 +266,7 @@ BO_ 891 STALK_STATUS_2: 8 XXX
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
|
||||
VAL_ 399 STEER_STATUS 6 "tmp_fault" 5 "fault_1" 4 "no_torque_alert_2" 3 "low_speed_lockout" 2 "no_torque_alert_1" 0 "normal" ;
|
||||
|
||||
CM_ "honda_crv_hybrid_2019_can.dbc starts here"
|
||||
|
||||
|
||||
|
||||
@@ -164,14 +164,15 @@ BO_ 780 ACC_HUD: 8 ADAS
|
||||
SG_ FCM_PROBLEM : 34|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ RADAR_OBSTRUCTED : 33|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ ENABLE_MINI_CAR : 32|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X03 : 47|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_DISTANCE : 47|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_LEAD : 45|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_3 : 43|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_4 : 42|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_5 : 41|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CRUISE_CONTROL_LABEL : 40|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_DISTANCE_3 : 52|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X03_2 : 55|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ IMPERIAL_UNIT : 54|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01_2 : 55|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01 : 48|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" BDY
|
||||
|
||||
@@ -164,14 +164,15 @@ BO_ 780 ACC_HUD: 8 ADAS
|
||||
SG_ FCM_PROBLEM : 34|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ RADAR_OBSTRUCTED : 33|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ ENABLE_MINI_CAR : 32|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X03 : 47|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_DISTANCE : 47|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_LEAD : 45|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_3 : 43|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_4 : 42|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_5 : 41|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CRUISE_CONTROL_LABEL : 40|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_DISTANCE_3 : 52|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X03_2 : 55|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ IMPERIAL_UNIT : 54|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01_2 : 55|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01 : 48|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" BDY
|
||||
|
||||
@@ -200,7 +200,8 @@ BO_ 780 ACC_HUD: 8 ADAS
|
||||
SG_ ACC_PROBLEM : 37|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ ACC_ON : 52|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BOH_6 : 51|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ SET_TO_X3 : 55|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ IMPERIAL_UNIT : 55|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_TO_X1 : 56|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" XXX
|
||||
|
||||
@@ -265,6 +266,7 @@ BO_ 891 STALK_STATUS_2: 8 XXX
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
|
||||
|
||||
VAL_ 399 STEER_STATUS 6 "tmp_fault" 5 "fault_1" 4 "no_torque_alert_2" 3 "low_speed_lockout" 2 "no_torque_alert_1" 0 "normal" ;
|
||||
|
||||
CM_ "honda_insight_ex_2019_can.dbc starts here"
|
||||
|
||||
|
||||
|
||||
@@ -164,14 +164,15 @@ BO_ 780 ACC_HUD: 8 ADAS
|
||||
SG_ FCM_PROBLEM : 34|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ RADAR_OBSTRUCTED : 33|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ ENABLE_MINI_CAR : 32|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X03 : 47|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_DISTANCE : 47|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_LEAD : 45|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_3 : 43|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_4 : 42|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_5 : 41|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CRUISE_CONTROL_LABEL : 40|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_DISTANCE_3 : 52|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X03_2 : 55|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ IMPERIAL_UNIT : 54|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01_2 : 55|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01 : 48|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" BDY
|
||||
|
||||
@@ -150,14 +150,15 @@ BO_ 780 ACC_HUD: 8 ADAS
|
||||
SG_ FCM_PROBLEM : 34|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ RADAR_OBSTRUCTED : 33|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ ENABLE_MINI_CAR : 32|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X03 : 47|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_DISTANCE : 47|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_LEAD : 45|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_3 : 43|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_4 : 42|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_5 : 41|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CRUISE_CONTROL_LABEL : 40|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_DISTANCE_3 : 52|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X03_2 : 55|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ IMPERIAL_UNIT : 54|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01_2 : 55|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01 : 48|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" BDY
|
||||
@@ -276,6 +277,7 @@ BO_ 1302 ODOMETER: 8 XXX
|
||||
|
||||
|
||||
|
||||
CM_ "CHFFR_METRIC 342 STEER_ANGLE STEER_ANGLE 0.36 180; CHFFR_METRIC 380 ENGINE_RPM ENGINE_RPM 1 0; CHFFR_METRIC 804 ENGINE_TEMPERATURE ENGINE_TEMPERATURE 1 0";
|
||||
CM_ SG_ 490 LONG_ACCEL "wheel speed derivative, noisy and zero snapping";
|
||||
CM_ SG_ 773 PASS_AIRBAG_OFF "Might just be indicator light";
|
||||
CM_ SG_ 773 PASS_AIRBAG_ON "Might just be indicator light";
|
||||
@@ -295,4 +297,3 @@ VAL_ 401 GEAR 7 "L" 10 "S" 4 "D" 3 "N" 2 "R" 1 "P" ;
|
||||
VAL_ 422 CRUISE_BUTTONS 7 "tbd" 6 "tbd" 5 "tbd" 4 "accel_res" 3 "decel_set" 2 "cancel" 1 "main" 0 "none" ;
|
||||
VAL_ 422 LIGHTS_SETTING 3 "high_beam" 2 "low_beam" 1 "position" 0 "no_lights" ;
|
||||
VAL_ 422 CRUISE_SETTING 3 "distance_adj" 2 "tbd" 1 "lkas_button" 0 "none" ;
|
||||
CM_ "CHFFR_METRIC 342 STEER_ANGLE STEER_ANGLE 0.36 180; CHFFR_METRIC 380 ENGINE_RPM ENGINE_RPM 1 0; CHFFR_METRIC 804 ENGINE_TEMPERATURE ENGINE_TEMPERATURE 1 0";
|
||||
|
||||
@@ -164,14 +164,15 @@ BO_ 780 ACC_HUD: 8 ADAS
|
||||
SG_ FCM_PROBLEM : 34|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ RADAR_OBSTRUCTED : 33|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ ENABLE_MINI_CAR : 32|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X03 : 47|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_DISTANCE : 47|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_LEAD : 45|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_3 : 43|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_4 : 42|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_5 : 41|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CRUISE_CONTROL_LABEL : 40|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_DISTANCE_3 : 52|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X03_2 : 55|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ IMPERIAL_UNIT : 54|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01_2 : 55|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01 : 48|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" BDY
|
||||
|
||||
@@ -164,14 +164,15 @@ BO_ 780 ACC_HUD: 8 ADAS
|
||||
SG_ FCM_PROBLEM : 34|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ RADAR_OBSTRUCTED : 33|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ ENABLE_MINI_CAR : 32|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X03 : 47|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_DISTANCE : 47|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_LEAD : 45|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_3 : 43|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_4 : 42|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ BOH_5 : 41|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CRUISE_CONTROL_LABEL : 40|1@0+ (1,0) [0|3] "" BDY
|
||||
SG_ HUD_DISTANCE_3 : 52|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X03_2 : 55|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ IMPERIAL_UNIT : 54|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01_2 : 55|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ SET_ME_X01 : 48|1@0+ (1,0) [0|1] "" BDY
|
||||
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" BDY
|
||||
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" BDY
|
||||
|
||||
336
opendbc/lexus_gs300h_2017_pt_generated.dbc
Normal file
336
opendbc/lexus_gs300h_2017_pt_generated.dbc
Normal file
@@ -0,0 +1,336 @@
|
||||
CM_ "AUTOGENERATED FILE, DO NOT EDIT"
|
||||
|
||||
|
||||
CM_ "Imported file _comma.dbc starts here"
|
||||
BO_ 359 STEERING_IPAS_COMMA: 8 IPAS
|
||||
SG_ STATE : 7|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ ANGLE : 3|12@0- (1.5,0) [-510|510] "deg" XXX
|
||||
SG_ SET_ME_X10 : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ DIRECTION_CMD : 38|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X40 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
CM BO_ STEERING_IPAS_COMMA "Copy of msg 614 so we can do angle control while the Park Assist ECU is connected (Panda spoofs 614 with 359 on connector J70). Note that addresses 0x266 and 0x167 are checksum-invariant";
|
||||
|
||||
BO_ 512 GAS_COMMAND: 6 EON
|
||||
SG_ GAS_COMMAND : 7|16@0+ (0.159375,-75.555) [0|1] "" INTERCEPTOR
|
||||
SG_ GAS_COMMAND2 : 23|16@0+ (0.159375,-151.111) [0|1] "" INTERCEPTOR
|
||||
SG_ ENABLE : 39|1@0+ (1,0) [0|1] "" INTERCEPTOR
|
||||
SG_ COUNTER_PEDAL : 35|4@0+ (1,0) [0|15] "" INTERCEPTOR
|
||||
SG_ CHECKSUM_PEDAL : 47|8@0+ (1,0) [0|255] "" INTERCEPTOR
|
||||
|
||||
BO_ 513 GAS_SENSOR: 6 INTERCEPTOR
|
||||
SG_ INTERCEPTOR_GAS : 7|16@0+ (0.159375,-75.555) [0|1] "" EON
|
||||
SG_ INTERCEPTOR_GAS2 : 23|16@0+ (0.159375,-151.111) [0|1] "" EON
|
||||
SG_ STATE : 39|4@0+ (1,0) [0|15] "" EON
|
||||
SG_ COUNTER_PEDAL : 35|4@0+ (1,0) [0|15] "" EON
|
||||
SG_ CHECKSUM_PEDAL : 47|8@0+ (1,0) [0|255] "" EON
|
||||
|
||||
VAL_ 513 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND" 1 "FAULT_BAD_CHECKSUM" 0 "NO_FAULT" ;
|
||||
|
||||
|
||||
CM_ "Imported file _toyota_2017.dbc starts here"
|
||||
VERSION ""
|
||||
|
||||
|
||||
NS_ :
|
||||
NS_DESC_
|
||||
CM_
|
||||
BA_DEF_
|
||||
BA_
|
||||
VAL_
|
||||
CAT_DEF_
|
||||
CAT_
|
||||
FILTER
|
||||
BA_DEF_DEF_
|
||||
EV_DATA_
|
||||
ENVVAR_DATA_
|
||||
SGTYPE_
|
||||
SGTYPE_VAL_
|
||||
BA_DEF_SGTYPE_
|
||||
BA_SGTYPE_
|
||||
SIG_TYPE_REF_
|
||||
VAL_TABLE_
|
||||
SIG_GROUP_
|
||||
SIG_VALTYPE_
|
||||
SIGTYPE_VALTYPE_
|
||||
BO_TX_BU_
|
||||
BA_DEF_REL_
|
||||
BA_REL_
|
||||
BA_DEF_DEF_REL_
|
||||
BU_SG_REL_
|
||||
BU_EV_REL_
|
||||
BU_BO_REL_
|
||||
SG_MUL_VAL_
|
||||
|
||||
BS_:
|
||||
|
||||
BU_: XXX DSU HCU EPS IPAS
|
||||
|
||||
BO_ 36 KINEMATICS: 8 XXX
|
||||
SG_ ACCEL_Y : 33|10@0+ (1,-512) [0|65535] "" XXX
|
||||
SG_ YAW_RATE : 1|10@0+ (1,-512) [0|65535] "" XXX
|
||||
SG_ STEERING_TORQUE : 17|10@0+ (1,-512) [0|65535] "" XXX
|
||||
|
||||
BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
|
||||
SG_ STEER_ANGLE : 3|12@0- (1.5,0) [-500|500] "deg" XXX
|
||||
SG_ STEER_FRACTION : 39|4@0- (0.1,0) [-0.7|0.7] "deg" XXX
|
||||
SG_ STEER_RATE : 35|12@0- (1,0) [-2000|2000] "deg/s" XXX
|
||||
|
||||
BO_ 166 BRAKE: 8 XXX
|
||||
SG_ BRAKE_AMOUNT : 7|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ BRAKE_PEDAL : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 170 WHEEL_SPEEDS: 8 XXX
|
||||
SG_ WHEEL_SPEED_FR : 7|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
SG_ WHEEL_SPEED_FL : 23|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
SG_ WHEEL_SPEED_RR : 39|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
SG_ WHEEL_SPEED_RL : 55|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
|
||||
BO_ 180 SPEED: 8 XXX
|
||||
SG_ ENCODER : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SPEED : 47|16@0+ (0.01,0) [0|250] "kph" XXX
|
||||
|
||||
BO_ 353 DSU_SPEED: 8 XXX
|
||||
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX
|
||||
|
||||
BO_ 466 PCM_CRUISE: 8 XXX
|
||||
SG_ GAS_RELEASED : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CRUISE_ACTIVE : 5|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ STANDSTILL_ON : 12|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ ACCEL_NET : 23|16@0- (0.001,0) [-20|20] "m/s2" XXX
|
||||
SG_ CRUISE_STATE : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 467 PCM_CRUISE_2: 8 XXX
|
||||
SG_ MAIN_ON : 15|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ LOW_SPEED_LOCKOUT : 14|2@0+ (1,0) [0|3] "kph" XXX
|
||||
SG_ SET_SPEED : 23|8@0+ (1,0) [0|255] "kph" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 552 ACCELEROMETER: 8 XXX
|
||||
SG_ ACCEL_Z : 22|15@0- (1,0) [0|32767] "" XXX
|
||||
SG_ ACCEL_X : 6|15@0- (0.001,0) [-20|20] "m/s2" XXX
|
||||
|
||||
BO_ 560 BRAKE_MODULE2: 7 XXX
|
||||
SG_ BRAKE_PRESSED : 26|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 614 STEERING_IPAS: 8 IPAS
|
||||
SG_ STATE : 7|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ ANGLE : 3|12@0- (1.5,0) [-510|510] "deg" XXX
|
||||
SG_ SET_ME_X10 : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ DIRECTION_CMD : 38|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X40 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00_1 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 643 PRE_COLLISION: 8 XXX
|
||||
|
||||
BO_ 740 STEERING_LKA: 5 XXX
|
||||
SG_ LKA_STATE : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ STEER_REQUEST : 0|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ COUNTER : 6|6@0+ (1,0) [0|63] "" XXX
|
||||
SG_ SET_ME_1 : 7|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ STEER_TORQUE_CMD : 15|16@0- (1,0) [0|65535] "" XXX
|
||||
SG_ CHECKSUM : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 742 LEAD_INFO: 8 DSU
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" HCU
|
||||
SG_ LEAD_REL_SPEED : 23|12@0- (0.025,0) [-100|100] "m/s" HCU
|
||||
SG_ LEAD_LONG_DIST : 7|13@0+ (0.05,0) [0|300] "m" HCU
|
||||
|
||||
BO_ 835 ACC_CONTROL: 8 DSU
|
||||
SG_ ACCEL_CMD : 7|16@0- (0.001,0) [-20|20] "m/s2" HCU
|
||||
SG_ SET_ME_X01 : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ DISTANCE : 20|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ MINI_CAR : 21|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X3 : 19|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ SET_ME_1 : 30|1@0+ (1,0) [0|1] "" HCU
|
||||
SG_ RELEASE_STANDSTILL : 31|1@0+ (1,0) [0|1] "" HCU
|
||||
SG_ CANCEL_REQ : 24|1@0+ (1,0) [0|1] "" HCU
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 921 PCM_CRUISE_SM: 8 XXX
|
||||
SG_ MAIN_ON : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CRUISE_CONTROL_STATE : 11|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ DISTANCE_LINES : 14|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ UI_SET_SPEED : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 951 ESP_CONTROL: 8 ESP
|
||||
SG_ TC_DISABLED : 13|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1041 ACC_HUD: 8 DSU
|
||||
SG_ FCW : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X20 : 15|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X10 : 39|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X80 : 55|8@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1042 LKAS_HUD: 8 XXX
|
||||
SG_ BARRIERS : 1|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ RIGHT_LINE : 3|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ LEFT_LINE : 5|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X01 : 7|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X01_2 : 11|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ LDA_ALERT : 9|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ TWO_BEEPS : 12|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ ADJUSTING_CAMERA : 13|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ LDA_MALFUNCTION : 15|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REPEATED_BEEPS : 32|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X0C : 23|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X2C : 47|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X38 : 55|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X02 : 63|8@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1553 UI_SEETING: 8 XXX
|
||||
SG_ UNITS : 26|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 1556 STEERING_LEVERS: 8 XXX
|
||||
SG_ TURN_SIGNALS : 29|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 1568 SEATS_DOORS: 8 XXX
|
||||
SG_ SEATBELT_DRIVER_UNLATCHED : 62|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_FL : 45|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_RL : 42|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_RR : 43|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_FR : 44|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1570 LIGHT_STALK: 8 SCM
|
||||
SG_ AUTO_HIGH_BEAM : 37|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1161 RSA1: 8 FCM
|
||||
SG_ TSGN1 : 7|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNGRY1 : 12|3@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNHLT1 : 9|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SPDVAL1 : 23|8@0+ (1,0) [0|0] "kph" XXX
|
||||
SG_ SPLSGN1 : 31|4@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SPLSGN2 : 27|4@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGN2 : 39|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNGRY2 : 44|3@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNHLT2 : 41|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SPDVAL2 : 55|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ BZRRQ_P : 63|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ BZRRQ_A : 61|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SYNCID1 : 59|4@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1162 RSA2: 8 FCM
|
||||
SG_ TSGN3 : 7|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNGRY3 : 12|3@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNHLT3 : 9|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SPLSGN3 : 31|4@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SPLSGN4 : 27|4@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGN4 : 39|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNGRY4 : 44|3@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNHLT4 : 41|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ DPSGNREQ : 54|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SGNNUMP : 53|3@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SGNNUMA : 50|3@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SPDUNT : 63|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSRWMSG : 61|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SYNCID2 : 59|4@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1163 RSA3: 8 FCM
|
||||
SG_ TSREQPD : 7|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSRMSW : 6|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ OTSGNNTM : 5|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ NTLVLSPD : 3|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ OVSPNTM : 1|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ OVSPVALL : 11|4@0+ (1,-5) [0|0] "" XXX
|
||||
SG_ OVSPVALM : 19|4@0+ (1,-5) [0|0] "" XXX
|
||||
SG_ OVSPVALH : 27|4@0+ (1,-5) [0|0] "" XXX
|
||||
SG_ TSRSPU : 33|2@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
CM_ SG_ 36 ACCEL_Y "unit is tbd";
|
||||
CM_ SG_ 36 YAW_RATE "verify";
|
||||
CM_ SG_ 36 STEERING_TORQUE "does not seem the steer torque, tbd";
|
||||
CM_ SG_ 37 STEER_FRACTION "1/15th of the signal STEER_ANGLE, which is 1.5 deg; note that 0x8 is never set";
|
||||
CM_ SG_ 37 STEER_RATE "factor is tbd";
|
||||
CM_ SG_ 466 ACCEL_NET "net acceleration produced by the system, given ACCEL_CMD, road grade and other factors";
|
||||
CM_ SG_ 467 SET_SPEED "43 kph are shown as 28mph, so conversion isnt perfect";
|
||||
CM_ SG_ 467 LOW_SPEED_LOCKOUT "in low speed lockout, system would always disengage below 28mph";
|
||||
CM_ SG_ 560 BRAKE_PRESSED "another brake pressed?";
|
||||
CM_ SG_ 608 STEER_TORQUE_DRIVER "driver torque";
|
||||
CM_ SG_ 608 STEER_OVERRIDE "set when driver torque exceeds a certain value";
|
||||
CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in UI with user set unit";
|
||||
CM_ SG_ 951 BRAKE_LIGHTS_ACC "brake lights when ACC commands decel";
|
||||
CM_ SG_ 1042 SET_ME_1 "unclear what this is, but it's always 1 in drive traces";
|
||||
CM_ SG_ 1042 REPEATED_BEEPS "recommended for fcw and other important alerts";
|
||||
CM_ SG_ 1161 SPDVAL1 "Numbers 0-199 is displayed, 200-254 displays circle without number and 255 is for no limit.";
|
||||
CM_ SG_ 1161 SYNCID1 "counter from 1 to f at 1 Hz";
|
||||
CM_ SG_ 1161 SPDVAL2 "conditional speed value 70"
|
||||
CM_ SG_ 1162 SGNNUMP "1 if SPDVAL1 is set, otherwise 0";
|
||||
CM_ SG_ 1162 SYNCID2 "counter from 1 to f at 1 Hz";
|
||||
CM_ SG_ 1163 TSREQPD "always 1";
|
||||
CM_ SG_ 1163 TSRMSW "always 1";
|
||||
CM_ SG_ 1163 OTSGNNTM "always 3";
|
||||
CM_ SG_ 1163 NTLVLSPD "always 3";
|
||||
CM_ SG_ 1163 OVSPNTM "always 3";
|
||||
CM_ SG_ 1163 OVSPVALL "-5 at start then 2 after 2 seconds";
|
||||
CM_ SG_ 1163 OVSPVALM "-5 at start then 5 after 2 seconds";
|
||||
CM_ SG_ 1163 OVSPVALH "-5 at start then 10 after 2 seconds";
|
||||
CM_ SG_ 1163 TSRSPU "always 1";
|
||||
|
||||
VAL_ 466 CRUISE_STATE 8 "active" 7 "standstill" 1 "off";
|
||||
VAL_ 467 LOW_SPEED_LOCKOUT 2 "low speed locked" 1 "ok";
|
||||
VAL_ 614 STATE 3 "enabled" 1 "disabled";
|
||||
VAL_ 614 DIRECTION_CMD 3 "right" 2 "center" 1 "left";
|
||||
VAL_ 921 CRUISE_CONTROL_STATE 2 "disabled" 11 "hold" 10 "hold_waiting_user_cmd" 6 "enabled" 5 "faulted";
|
||||
VAL_ 1042 LDA_ALERT 3 "hold with continuous beep" 2 "LDA unavailable" 1 "hold" 0 "none";
|
||||
VAL_ 1042 BARRIERS 3 "both" 2 "right" 1 "left" 0 "none";
|
||||
VAL_ 1042 RIGHT_LINE 3 "orange" 2 "faded" 1 "solid" 0 "none";
|
||||
VAL_ 1042 LEFT_LINE 3 "orange" 2 "faded" 1 "solid" 0 "none";
|
||||
VAL_ 1553 UNITS 1 "km" 2 "miles";
|
||||
VAL_ 1556 TURN_SIGNALS 3 "none" 2 "right" 1 "left";
|
||||
VAL_ 1161 TSGN1 1 "speed sign" 0 "none";
|
||||
VAL_ 1161 TSGN2 1 "speed sign" 0 "none";
|
||||
VAL_ 1161 SPLSGN2 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highway" 17 "no highway" 18 "motorway" 19 "no motorway" 20 "in city" 21 "outside city" 22 "pedestrian area" 23 "no pedestrian area" 65 "no overtaking left" 66 "no overtaking right" 67 "overtaking allowed again" 129 "no entry";
|
||||
VAL_ 1162 SPLSGN3 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
|
||||
|
||||
CM_ "CHFFR_METRIC 37 STEER_ANGLE STEER_ANGLE 0.36 180";
|
||||
|
||||
CM_ "lexus_gs300h_2017_pt.dbc starts here"
|
||||
|
||||
|
||||
|
||||
BO_ 550 BRAKE_MODULE: 8 XXX
|
||||
SG_ BRAKE_PRESSURE : 0|9@0+ (1,0) [0|511] "" XXX
|
||||
SG_ BRAKE_POSITION : 16|9@0+ (1,0) [0|511] "" XXX
|
||||
SG_ BRAKE_PRESSED : 37|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 581 GAS_PEDAL: 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_DRIVER : 15|16@0- (1,0) [-32768|32767] "" XXX
|
||||
SG_ STEER_OVERRIDE : 0|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 610 EPS_STATUS: 5 EPS
|
||||
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ LKA_STATE : 31|7@0+ (1,0) [0|127] "" XXX
|
||||
SG_ TYPE : 24|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 956 GEAR_PACKET: 8 XXX
|
||||
SG_ GEAR : 13|6@0+ (1,0) [0|63] "" XXX
|
||||
|
||||
BO_ 1009 PCM_CRUISE_3: 8 XXX
|
||||
SG_ MAIN_ON : 13|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_SPEED : 23|8@0+ (1,0) [0|255] "mph" XXX
|
||||
SG_ CRUISE_STATE : 10|1@0+ (1,0) [0|15] "" XXX
|
||||
|
||||
CM_ SG_ 550 BRAKE_PRESSURE "seems prop to pedal force";
|
||||
CM_ SG_ 550 BRAKE_POSITION "seems proportional to pedal displacement, unclear the max value of 0x1c8";
|
||||
CM_ SG_ 581 GAS_PEDAL "it seems slightly filtered";
|
||||
CM_ SG_ 610 TYPE "seems 1 on Corolla, 0 on all others";
|
||||
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";
|
||||
@@ -125,7 +125,7 @@ BO_ 614 STEERING_IPAS: 8 IPAS
|
||||
SG_ SET_ME_X00 : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ DIRECTION_CMD : 38|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X40 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00_1 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 643 PRE_COLLISION: 8 XXX
|
||||
@@ -288,9 +288,9 @@ VAL_ 1553 UNITS 1 "km" 2 "miles";
|
||||
VAL_ 1556 TURN_SIGNALS 3 "none" 2 "right" 1 "left";
|
||||
VAL_ 1161 TSGN1 1 "speed sign" 0 "none";
|
||||
VAL_ 1161 TSGN2 1 "speed sign" 0 "none";
|
||||
VAL_ 1161 SPLSGN2 15 "conditional blank" 5 "rain" 0 "none";
|
||||
VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highway" 17 "no highway" 18 "motorway" 19 "no motorway" 20 "in city" 21 "outside city" 22 "pedestrian area" 23 "no pedestrian area" 65 "no overtaking left" 66 "no overtaking right" 67 "overtaking allowed again" 65 "no overtake" 129 "no entry";
|
||||
VAL_ 1162 SPLSGN3 15 "conditional blank" 5 "rain" 0 "none";
|
||||
VAL_ 1161 SPLSGN2 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highway" 17 "no highway" 18 "motorway" 19 "no motorway" 20 "in city" 21 "outside city" 22 "pedestrian area" 23 "no pedestrian area" 65 "no overtaking left" 66 "no overtaking right" 67 "overtaking allowed again" 129 "no entry";
|
||||
VAL_ 1162 SPLSGN3 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
|
||||
|
||||
CM_ "CHFFR_METRIC 37 STEER_ANGLE STEER_ANGLE 0.36 180";
|
||||
|
||||
@@ -15,16 +15,18 @@ BO_ 359 STEERING_IPAS_COMMA: 8 IPAS
|
||||
CM BO_ STEERING_IPAS_COMMA "Copy of msg 614 so we can do angle control while the Park Assist ECU is connected (Panda spoofs 614 with 359 on connector J70). Note that addresses 0x266 and 0x167 are checksum-invariant";
|
||||
|
||||
BO_ 512 GAS_COMMAND: 6 EON
|
||||
SG_ GAS_COMMAND : 7|16@0+ (0.0244140625,0) [0|1] "" INTERCEPTOR
|
||||
SG_ GAS_COMMAND2 : 23|16@0+ (0.0244140625,-11.962890625) [0|1] "" INTERCEPTOR
|
||||
SG_ GAS_COMMAND : 7|16@0+ (0.159375,-75.555) [0|1] "" INTERCEPTOR
|
||||
SG_ GAS_COMMAND2 : 23|16@0+ (0.159375,-151.111) [0|1] "" INTERCEPTOR
|
||||
SG_ ENABLE : 39|1@0+ (1,0) [0|1] "" INTERCEPTOR
|
||||
SG_ CHECKSUM : 47|8@0+ (1,0) [0|3] "" INTERCEPTOR
|
||||
SG_ COUNTER_PEDAL : 35|4@0+ (1,0) [0|15] "" INTERCEPTOR
|
||||
SG_ CHECKSUM_PEDAL : 47|8@0+ (1,0) [0|255] "" INTERCEPTOR
|
||||
|
||||
BO_ 513 GAS_SENSOR: 6 INTERCEPTOR
|
||||
SG_ INTERCEPTOR_GAS : 7|16@0+ (0.0244140625,0) [0|1] "" EON
|
||||
SG_ INTERCEPTOR_GAS2 : 23|16@0+ (0.0244140625,-11.962890625) [0|1] "" EON
|
||||
SG_ STATE : 39|8@0+ (1,0) [0|255] "" EON
|
||||
SG_ CHECKSUM : 47|8@0+ (1,0) [0|3] "" EON
|
||||
SG_ INTERCEPTOR_GAS : 7|16@0+ (0.159375,-75.555) [0|1] "" EON
|
||||
SG_ INTERCEPTOR_GAS2 : 23|16@0+ (0.159375,-151.111) [0|1] "" EON
|
||||
SG_ STATE : 39|4@0+ (1,0) [0|15] "" EON
|
||||
SG_ COUNTER_PEDAL : 35|4@0+ (1,0) [0|15] "" EON
|
||||
SG_ CHECKSUM_PEDAL : 47|8@0+ (1,0) [0|255] "" EON
|
||||
|
||||
VAL_ 513 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND" 1 "FAULT_BAD_CHECKSUM" 0 "NO_FAULT" ;
|
||||
|
||||
@@ -76,7 +78,7 @@ BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
|
||||
SG_ STEER_ANGLE : 3|12@0- (1.5,0) [-500|500] "deg" XXX
|
||||
SG_ STEER_FRACTION : 39|4@0- (0.1,0) [-0.7|0.7] "deg" XXX
|
||||
SG_ STEER_RATE : 35|12@0- (1,0) [-2000|2000] "deg/s" XXX
|
||||
|
||||
|
||||
BO_ 166 BRAKE: 8 XXX
|
||||
SG_ BRAKE_AMOUNT : 7|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ BRAKE_PEDAL : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
@@ -92,6 +94,9 @@ BO_ 180 SPEED: 8 XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SPEED : 47|16@0+ (0.01,0) [0|250] "kph" XXX
|
||||
|
||||
BO_ 353 DSU_SPEED: 8 XXX
|
||||
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX
|
||||
|
||||
BO_ 466 PCM_CRUISE: 8 XXX
|
||||
SG_ GAS_RELEASED : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CRUISE_ACTIVE : 5|1@0+ (1,0) [0|1] "" XXX
|
||||
@@ -120,7 +125,7 @@ BO_ 614 STEERING_IPAS: 8 IPAS
|
||||
SG_ SET_ME_X00 : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ DIRECTION_CMD : 38|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X40 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00_1 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 643 PRE_COLLISION: 8 XXX
|
||||
@@ -140,7 +145,10 @@ BO_ 742 LEAD_INFO: 8 DSU
|
||||
|
||||
BO_ 835 ACC_CONTROL: 8 DSU
|
||||
SG_ ACCEL_CMD : 7|16@0- (0.001,0) [-20|20] "m/s2" HCU
|
||||
SG_ SET_ME_X63 : 23|8@0+ (1,0) [0|255] "" HCU
|
||||
SG_ SET_ME_X01 : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ DISTANCE : 20|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ MINI_CAR : 21|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X3 : 19|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ SET_ME_1 : 30|1@0+ (1,0) [0|1] "" HCU
|
||||
SG_ RELEASE_STANDSTILL : 31|1@0+ (1,0) [0|1] "" HCU
|
||||
SG_ CANCEL_REQ : 24|1@0+ (1,0) [0|1] "" HCU
|
||||
@@ -180,7 +188,7 @@ BO_ 1042 LKAS_HUD: 8 XXX
|
||||
|
||||
BO_ 1553 UI_SEETING: 8 XXX
|
||||
SG_ UNITS : 26|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
|
||||
BO_ 1556 STEERING_LEVERS: 8 XXX
|
||||
SG_ TURN_SIGNALS : 29|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
@@ -224,7 +232,7 @@ BO_ 1162 RSA2: 8 FCM
|
||||
SG_ SPDUNT : 63|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSRWMSG : 61|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SYNCID2 : 59|4@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
|
||||
BO_ 1163 RSA3: 8 FCM
|
||||
SG_ TSREQPD : 7|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSRMSW : 6|1@0+ (1,0) [0|0] "" XXX
|
||||
@@ -274,15 +282,15 @@ VAL_ 614 DIRECTION_CMD 3 "right" 2 "center" 1 "left";
|
||||
VAL_ 921 CRUISE_CONTROL_STATE 2 "disabled" 11 "hold" 10 "hold_waiting_user_cmd" 6 "enabled" 5 "faulted";
|
||||
VAL_ 1042 LDA_ALERT 3 "hold with continuous beep" 2 "LDA unavailable" 1 "hold" 0 "none";
|
||||
VAL_ 1042 BARRIERS 3 "both" 2 "right" 1 "left" 0 "none";
|
||||
VAL_ 1042 RIGHT_LINE 3 "orange" 2 "double" 1 "solid" 0 "none";
|
||||
VAL_ 1042 LEFT_LINE 3 "orange" 2 "double" 1 "solid" 0 "none";
|
||||
VAL_ 1042 RIGHT_LINE 3 "orange" 2 "faded" 1 "solid" 0 "none";
|
||||
VAL_ 1042 LEFT_LINE 3 "orange" 2 "faded" 1 "solid" 0 "none";
|
||||
VAL_ 1553 UNITS 1 "km" 2 "miles";
|
||||
VAL_ 1556 TURN_SIGNALS 3 "none" 2 "right" 1 "left";
|
||||
VAL_ 1161 TSGN1 1 "speed sign" 0 "none";
|
||||
VAL_ 1161 TSGN2 1 "speed sign" 0 "none";
|
||||
VAL_ 1161 SPLSGN2 15 "conditional blank" 5 "rain" 0 "none";
|
||||
VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highway" 17 "no highway" 18 "motorway" 19 "no motorway" 20 "in city" 21 "outside city" 22 "pedestrian area" 23 "no pedestrian area" 65 "no overtaking left" 66 "no overtaking right" 67 "overtaking allowed again" 65 "no overtake" 129 "no entry";
|
||||
VAL_ 1162 SPLSGN3 15 "conditional blank" 5 "rain" 0 "none";
|
||||
VAL_ 1161 SPLSGN2 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highway" 17 "no highway" 18 "motorway" 19 "no motorway" 20 "in city" 21 "outside city" 22 "pedestrian area" 23 "no pedestrian area" 65 "no overtaking left" 66 "no overtaking right" 67 "overtaking allowed again" 129 "no entry";
|
||||
VAL_ 1162 SPLSGN3 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
|
||||
|
||||
CM_ "CHFFR_METRIC 37 STEER_ANGLE STEER_ANGLE 0.36 180";
|
||||
|
||||
335
opendbc/lexus_rx_350_2016_pt_generated.dbc
Normal file
335
opendbc/lexus_rx_350_2016_pt_generated.dbc
Normal file
@@ -0,0 +1,335 @@
|
||||
CM_ "AUTOGENERATED FILE, DO NOT EDIT"
|
||||
|
||||
|
||||
CM_ "Imported file _comma.dbc starts here"
|
||||
BO_ 359 STEERING_IPAS_COMMA: 8 IPAS
|
||||
SG_ STATE : 7|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ ANGLE : 3|12@0- (1.5,0) [-510|510] "deg" XXX
|
||||
SG_ SET_ME_X10 : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ DIRECTION_CMD : 38|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X40 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
CM BO_ STEERING_IPAS_COMMA "Copy of msg 614 so we can do angle control while the Park Assist ECU is connected (Panda spoofs 614 with 359 on connector J70). Note that addresses 0x266 and 0x167 are checksum-invariant";
|
||||
|
||||
BO_ 512 GAS_COMMAND: 6 EON
|
||||
SG_ GAS_COMMAND : 7|16@0+ (0.159375,-75.555) [0|1] "" INTERCEPTOR
|
||||
SG_ GAS_COMMAND2 : 23|16@0+ (0.159375,-151.111) [0|1] "" INTERCEPTOR
|
||||
SG_ ENABLE : 39|1@0+ (1,0) [0|1] "" INTERCEPTOR
|
||||
SG_ COUNTER_PEDAL : 35|4@0+ (1,0) [0|15] "" INTERCEPTOR
|
||||
SG_ CHECKSUM_PEDAL : 47|8@0+ (1,0) [0|255] "" INTERCEPTOR
|
||||
|
||||
BO_ 513 GAS_SENSOR: 6 INTERCEPTOR
|
||||
SG_ INTERCEPTOR_GAS : 7|16@0+ (0.159375,-75.555) [0|1] "" EON
|
||||
SG_ INTERCEPTOR_GAS2 : 23|16@0+ (0.159375,-151.111) [0|1] "" EON
|
||||
SG_ STATE : 39|4@0+ (1,0) [0|15] "" EON
|
||||
SG_ COUNTER_PEDAL : 35|4@0+ (1,0) [0|15] "" EON
|
||||
SG_ CHECKSUM_PEDAL : 47|8@0+ (1,0) [0|255] "" EON
|
||||
|
||||
VAL_ 513 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND" 1 "FAULT_BAD_CHECKSUM" 0 "NO_FAULT" ;
|
||||
|
||||
|
||||
CM_ "Imported file _toyota_2017.dbc starts here"
|
||||
VERSION ""
|
||||
|
||||
|
||||
NS_ :
|
||||
NS_DESC_
|
||||
CM_
|
||||
BA_DEF_
|
||||
BA_
|
||||
VAL_
|
||||
CAT_DEF_
|
||||
CAT_
|
||||
FILTER
|
||||
BA_DEF_DEF_
|
||||
EV_DATA_
|
||||
ENVVAR_DATA_
|
||||
SGTYPE_
|
||||
SGTYPE_VAL_
|
||||
BA_DEF_SGTYPE_
|
||||
BA_SGTYPE_
|
||||
SIG_TYPE_REF_
|
||||
VAL_TABLE_
|
||||
SIG_GROUP_
|
||||
SIG_VALTYPE_
|
||||
SIGTYPE_VALTYPE_
|
||||
BO_TX_BU_
|
||||
BA_DEF_REL_
|
||||
BA_REL_
|
||||
BA_DEF_DEF_REL_
|
||||
BU_SG_REL_
|
||||
BU_EV_REL_
|
||||
BU_BO_REL_
|
||||
SG_MUL_VAL_
|
||||
|
||||
BS_:
|
||||
|
||||
BU_: XXX DSU HCU EPS IPAS
|
||||
|
||||
BO_ 36 KINEMATICS: 8 XXX
|
||||
SG_ ACCEL_Y : 33|10@0+ (1,-512) [0|65535] "" XXX
|
||||
SG_ YAW_RATE : 1|10@0+ (1,-512) [0|65535] "" XXX
|
||||
SG_ STEERING_TORQUE : 17|10@0+ (1,-512) [0|65535] "" XXX
|
||||
|
||||
BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
|
||||
SG_ STEER_ANGLE : 3|12@0- (1.5,0) [-500|500] "deg" XXX
|
||||
SG_ STEER_FRACTION : 39|4@0- (0.1,0) [-0.7|0.7] "deg" XXX
|
||||
SG_ STEER_RATE : 35|12@0- (1,0) [-2000|2000] "deg/s" XXX
|
||||
|
||||
BO_ 166 BRAKE: 8 XXX
|
||||
SG_ BRAKE_AMOUNT : 7|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ BRAKE_PEDAL : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 170 WHEEL_SPEEDS: 8 XXX
|
||||
SG_ WHEEL_SPEED_FR : 7|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
SG_ WHEEL_SPEED_FL : 23|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
SG_ WHEEL_SPEED_RR : 39|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
SG_ WHEEL_SPEED_RL : 55|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
|
||||
BO_ 180 SPEED: 8 XXX
|
||||
SG_ ENCODER : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SPEED : 47|16@0+ (0.01,0) [0|250] "kph" XXX
|
||||
|
||||
BO_ 353 DSU_SPEED: 8 XXX
|
||||
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX
|
||||
|
||||
BO_ 466 PCM_CRUISE: 8 XXX
|
||||
SG_ GAS_RELEASED : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CRUISE_ACTIVE : 5|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ STANDSTILL_ON : 12|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ ACCEL_NET : 23|16@0- (0.001,0) [-20|20] "m/s2" XXX
|
||||
SG_ CRUISE_STATE : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 467 PCM_CRUISE_2: 8 XXX
|
||||
SG_ MAIN_ON : 15|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ LOW_SPEED_LOCKOUT : 14|2@0+ (1,0) [0|3] "kph" XXX
|
||||
SG_ SET_SPEED : 23|8@0+ (1,0) [0|255] "kph" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 552 ACCELEROMETER: 8 XXX
|
||||
SG_ ACCEL_Z : 22|15@0- (1,0) [0|32767] "" XXX
|
||||
SG_ ACCEL_X : 6|15@0- (0.001,0) [-20|20] "m/s2" XXX
|
||||
|
||||
BO_ 560 BRAKE_MODULE2: 7 XXX
|
||||
SG_ BRAKE_PRESSED : 26|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 614 STEERING_IPAS: 8 IPAS
|
||||
SG_ STATE : 7|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ ANGLE : 3|12@0- (1.5,0) [-510|510] "deg" XXX
|
||||
SG_ SET_ME_X10 : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ DIRECTION_CMD : 38|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X40 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00_1 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 643 PRE_COLLISION: 8 XXX
|
||||
|
||||
BO_ 740 STEERING_LKA: 5 XXX
|
||||
SG_ LKA_STATE : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ STEER_REQUEST : 0|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ COUNTER : 6|6@0+ (1,0) [0|63] "" XXX
|
||||
SG_ SET_ME_1 : 7|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ STEER_TORQUE_CMD : 15|16@0- (1,0) [0|65535] "" XXX
|
||||
SG_ CHECKSUM : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 742 LEAD_INFO: 8 DSU
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" HCU
|
||||
SG_ LEAD_REL_SPEED : 23|12@0- (0.025,0) [-100|100] "m/s" HCU
|
||||
SG_ LEAD_LONG_DIST : 7|13@0+ (0.05,0) [0|300] "m" HCU
|
||||
|
||||
BO_ 835 ACC_CONTROL: 8 DSU
|
||||
SG_ ACCEL_CMD : 7|16@0- (0.001,0) [-20|20] "m/s2" HCU
|
||||
SG_ SET_ME_X01 : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ DISTANCE : 20|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ MINI_CAR : 21|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X3 : 19|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ SET_ME_1 : 30|1@0+ (1,0) [0|1] "" HCU
|
||||
SG_ RELEASE_STANDSTILL : 31|1@0+ (1,0) [0|1] "" HCU
|
||||
SG_ CANCEL_REQ : 24|1@0+ (1,0) [0|1] "" HCU
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 921 PCM_CRUISE_SM: 8 XXX
|
||||
SG_ MAIN_ON : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CRUISE_CONTROL_STATE : 11|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ DISTANCE_LINES : 14|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ UI_SET_SPEED : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 951 ESP_CONTROL: 8 ESP
|
||||
SG_ TC_DISABLED : 13|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1041 ACC_HUD: 8 DSU
|
||||
SG_ FCW : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X20 : 15|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X10 : 39|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X80 : 55|8@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1042 LKAS_HUD: 8 XXX
|
||||
SG_ BARRIERS : 1|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ RIGHT_LINE : 3|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ LEFT_LINE : 5|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X01 : 7|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X01_2 : 11|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ LDA_ALERT : 9|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ TWO_BEEPS : 12|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ ADJUSTING_CAMERA : 13|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ LDA_MALFUNCTION : 15|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REPEATED_BEEPS : 32|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X0C : 23|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X2C : 47|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X38 : 55|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X02 : 63|8@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1553 UI_SEETING: 8 XXX
|
||||
SG_ UNITS : 26|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 1556 STEERING_LEVERS: 8 XXX
|
||||
SG_ TURN_SIGNALS : 29|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 1568 SEATS_DOORS: 8 XXX
|
||||
SG_ SEATBELT_DRIVER_UNLATCHED : 62|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_FL : 45|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_RL : 42|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_RR : 43|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_FR : 44|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1570 LIGHT_STALK: 8 SCM
|
||||
SG_ AUTO_HIGH_BEAM : 37|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1161 RSA1: 8 FCM
|
||||
SG_ TSGN1 : 7|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNGRY1 : 12|3@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNHLT1 : 9|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SPDVAL1 : 23|8@0+ (1,0) [0|0] "kph" XXX
|
||||
SG_ SPLSGN1 : 31|4@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SPLSGN2 : 27|4@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGN2 : 39|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNGRY2 : 44|3@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNHLT2 : 41|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SPDVAL2 : 55|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ BZRRQ_P : 63|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ BZRRQ_A : 61|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SYNCID1 : 59|4@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1162 RSA2: 8 FCM
|
||||
SG_ TSGN3 : 7|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNGRY3 : 12|3@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNHLT3 : 9|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SPLSGN3 : 31|4@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SPLSGN4 : 27|4@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGN4 : 39|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNGRY4 : 44|3@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNHLT4 : 41|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ DPSGNREQ : 54|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SGNNUMP : 53|3@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SGNNUMA : 50|3@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SPDUNT : 63|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSRWMSG : 61|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SYNCID2 : 59|4@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1163 RSA3: 8 FCM
|
||||
SG_ TSREQPD : 7|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSRMSW : 6|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ OTSGNNTM : 5|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ NTLVLSPD : 3|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ OVSPNTM : 1|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ OVSPVALL : 11|4@0+ (1,-5) [0|0] "" XXX
|
||||
SG_ OVSPVALM : 19|4@0+ (1,-5) [0|0] "" XXX
|
||||
SG_ OVSPVALH : 27|4@0+ (1,-5) [0|0] "" XXX
|
||||
SG_ TSRSPU : 33|2@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
CM_ SG_ 36 ACCEL_Y "unit is tbd";
|
||||
CM_ SG_ 36 YAW_RATE "verify";
|
||||
CM_ SG_ 36 STEERING_TORQUE "does not seem the steer torque, tbd";
|
||||
CM_ SG_ 37 STEER_FRACTION "1/15th of the signal STEER_ANGLE, which is 1.5 deg; note that 0x8 is never set";
|
||||
CM_ SG_ 37 STEER_RATE "factor is tbd";
|
||||
CM_ SG_ 466 ACCEL_NET "net acceleration produced by the system, given ACCEL_CMD, road grade and other factors";
|
||||
CM_ SG_ 467 SET_SPEED "43 kph are shown as 28mph, so conversion isnt perfect";
|
||||
CM_ SG_ 467 LOW_SPEED_LOCKOUT "in low speed lockout, system would always disengage below 28mph";
|
||||
CM_ SG_ 560 BRAKE_PRESSED "another brake pressed?";
|
||||
CM_ SG_ 608 STEER_TORQUE_DRIVER "driver torque";
|
||||
CM_ SG_ 608 STEER_OVERRIDE "set when driver torque exceeds a certain value";
|
||||
CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in UI with user set unit";
|
||||
CM_ SG_ 951 BRAKE_LIGHTS_ACC "brake lights when ACC commands decel";
|
||||
CM_ SG_ 1042 SET_ME_1 "unclear what this is, but it's always 1 in drive traces";
|
||||
CM_ SG_ 1042 REPEATED_BEEPS "recommended for fcw and other important alerts";
|
||||
CM_ SG_ 1161 SPDVAL1 "Numbers 0-199 is displayed, 200-254 displays circle without number and 255 is for no limit.";
|
||||
CM_ SG_ 1161 SYNCID1 "counter from 1 to f at 1 Hz";
|
||||
CM_ SG_ 1161 SPDVAL2 "conditional speed value 70"
|
||||
CM_ SG_ 1162 SGNNUMP "1 if SPDVAL1 is set, otherwise 0";
|
||||
CM_ SG_ 1162 SYNCID2 "counter from 1 to f at 1 Hz";
|
||||
CM_ SG_ 1163 TSREQPD "always 1";
|
||||
CM_ SG_ 1163 TSRMSW "always 1";
|
||||
CM_ SG_ 1163 OTSGNNTM "always 3";
|
||||
CM_ SG_ 1163 NTLVLSPD "always 3";
|
||||
CM_ SG_ 1163 OVSPNTM "always 3";
|
||||
CM_ SG_ 1163 OVSPVALL "-5 at start then 2 after 2 seconds";
|
||||
CM_ SG_ 1163 OVSPVALM "-5 at start then 5 after 2 seconds";
|
||||
CM_ SG_ 1163 OVSPVALH "-5 at start then 10 after 2 seconds";
|
||||
CM_ SG_ 1163 TSRSPU "always 1";
|
||||
|
||||
VAL_ 466 CRUISE_STATE 8 "active" 7 "standstill" 1 "off";
|
||||
VAL_ 467 LOW_SPEED_LOCKOUT 2 "low speed locked" 1 "ok";
|
||||
VAL_ 614 STATE 3 "enabled" 1 "disabled";
|
||||
VAL_ 614 DIRECTION_CMD 3 "right" 2 "center" 1 "left";
|
||||
VAL_ 921 CRUISE_CONTROL_STATE 2 "disabled" 11 "hold" 10 "hold_waiting_user_cmd" 6 "enabled" 5 "faulted";
|
||||
VAL_ 1042 LDA_ALERT 3 "hold with continuous beep" 2 "LDA unavailable" 1 "hold" 0 "none";
|
||||
VAL_ 1042 BARRIERS 3 "both" 2 "right" 1 "left" 0 "none";
|
||||
VAL_ 1042 RIGHT_LINE 3 "orange" 2 "faded" 1 "solid" 0 "none";
|
||||
VAL_ 1042 LEFT_LINE 3 "orange" 2 "faded" 1 "solid" 0 "none";
|
||||
VAL_ 1553 UNITS 1 "km" 2 "miles";
|
||||
VAL_ 1556 TURN_SIGNALS 3 "none" 2 "right" 1 "left";
|
||||
VAL_ 1161 TSGN1 1 "speed sign" 0 "none";
|
||||
VAL_ 1161 TSGN2 1 "speed sign" 0 "none";
|
||||
VAL_ 1161 SPLSGN2 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highway" 17 "no highway" 18 "motorway" 19 "no motorway" 20 "in city" 21 "outside city" 22 "pedestrian area" 23 "no pedestrian area" 65 "no overtaking left" 66 "no overtaking right" 67 "overtaking allowed again" 129 "no entry";
|
||||
VAL_ 1162 SPLSGN3 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
|
||||
|
||||
CM_ "CHFFR_METRIC 37 STEER_ANGLE STEER_ANGLE 0.36 180";
|
||||
|
||||
CM_ "lexus_rx_350_2016_pt.dbc starts here"
|
||||
|
||||
|
||||
|
||||
BO_ 550 BRAKE_MODULE: 8 XXX
|
||||
SG_ BRAKE_PRESSURE : 0|9@0+ (1,0) [0|511] "" XXX
|
||||
SG_ BRAKE_POSITION : 16|9@0+ (1,0) [0|511] "" XXX
|
||||
SG_ BRAKE_PRESSED : 37|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 608 STEER_TORQUE_SENSOR: 8 XXX
|
||||
SG_ STEER_TORQUE_EPS : 47|16@0- (0.73,0) [-20000|20000] "" XXX
|
||||
SG_ STEER_TORQUE_DRIVER : 15|16@0- (1,0) [-32768|32767] "" XXX
|
||||
SG_ STEER_OVERRIDE : 0|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 610 EPS_STATUS: 5 EPS
|
||||
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ LKA_STATE : 31|7@0+ (1,0) [0|127] "" XXX
|
||||
SG_ TYPE : 24|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 956 GEAR_PACKET: 8 XXX
|
||||
SG_ SPORT_ON : 2|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ GEAR : 13|6@0+ (1,0) [0|63] "" XXX
|
||||
SG_ ECON_ON : 40|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 705 GAS_PEDAL: 8 XXX
|
||||
SG_ GAS_PEDAL : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
|
||||
CM_ SG_ 550 BRAKE_PRESSURE "seems prop to pedal force";
|
||||
CM_ SG_ 550 BRAKE_POSITION "seems proportional to pedal displacement, unclear the max value of 0x1c8";
|
||||
CM_ SG_ 610 TYPE "seems 1 on Corolla, 0 on all others";
|
||||
VAL_ 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 SPORT_ON 0 "off" 1 "on" ;
|
||||
VAL_ 956 GEAR 0 "D" 1 "S" 8 "N" 16 "R" 32 "P" ;
|
||||
VAL_ 956 ECON_ON 0 "off" 1 "on" ;
|
||||
@@ -125,7 +125,7 @@ BO_ 614 STEERING_IPAS: 8 IPAS
|
||||
SG_ SET_ME_X00 : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ DIRECTION_CMD : 38|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X40 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00_1 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 643 PRE_COLLISION: 8 XXX
|
||||
@@ -288,9 +288,9 @@ VAL_ 1553 UNITS 1 "km" 2 "miles";
|
||||
VAL_ 1556 TURN_SIGNALS 3 "none" 2 "right" 1 "left";
|
||||
VAL_ 1161 TSGN1 1 "speed sign" 0 "none";
|
||||
VAL_ 1161 TSGN2 1 "speed sign" 0 "none";
|
||||
VAL_ 1161 SPLSGN2 15 "conditional blank" 5 "rain" 0 "none";
|
||||
VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highway" 17 "no highway" 18 "motorway" 19 "no motorway" 20 "in city" 21 "outside city" 22 "pedestrian area" 23 "no pedestrian area" 65 "no overtaking left" 66 "no overtaking right" 67 "overtaking allowed again" 65 "no overtake" 129 "no entry";
|
||||
VAL_ 1162 SPLSGN3 15 "conditional blank" 5 "rain" 0 "none";
|
||||
VAL_ 1161 SPLSGN2 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highway" 17 "no highway" 18 "motorway" 19 "no motorway" 20 "in city" 21 "outside city" 22 "pedestrian area" 23 "no pedestrian area" 65 "no overtaking left" 66 "no overtaking right" 67 "overtaking allowed again" 129 "no entry";
|
||||
VAL_ 1162 SPLSGN3 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
|
||||
|
||||
CM_ "CHFFR_METRIC 37 STEER_ANGLE STEER_ANGLE 0.36 180";
|
||||
|
||||
@@ -247,7 +247,7 @@ BO_ 1277 NEW_MSG_10: 8 XXX
|
||||
SG_ NEW_SIGNAL_2 : 15|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ counter : 7|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 1275 2017_5: 8 XXX
|
||||
BO_ 1275 MSG_2017_5: 8 XXX
|
||||
SG_ counter : 4|5@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 1274 NEW_MSG_12: 8 XXX
|
||||
@@ -565,23 +565,23 @@ BO_ 121 EPB: 8 XXX
|
||||
SG_ NEW_SIGNAL_11 : 45|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ EPB_ACTIVE : 29|1@0+ (1,0) [0|15] "" XXX
|
||||
|
||||
BO_ 1070 2017_1: 8 XXX
|
||||
BO_ 1070 MSG_2017_1: 8 XXX
|
||||
|
||||
BO_ 1183 2017_2: 8 XXX
|
||||
BO_ 1183 MSG_2017_2: 8 XXX
|
||||
|
||||
BO_ 1243 2017_3: 8 XXX
|
||||
BO_ 1243 MSG_2017_3: 8 XXX
|
||||
SG_ NEW_SIGNAL_1 : 7|64@0+ (1,0) [0|18446744073709552000] "" XXX
|
||||
|
||||
BO_ 1269 MSG_2017_4: 8 XXX
|
||||
SG_ NEW_SIGNAL_1 : 55|16@0+ (1,0) [0|18446744073709552000] "" XXX
|
||||
|
||||
BO_ 1178 2017_6: 8 XXX
|
||||
BO_ 1178 MSG_2017_6: 8 XXX
|
||||
SG_ NEW_SIGNAL_1 : 7|64@0+ (1,0) [0|18446744073709552000] "" XXX
|
||||
|
||||
BO_ 1179 2017_7: 8 XXX
|
||||
BO_ 1179 MSG_2017_7: 8 XXX
|
||||
SG_ NEW_SIGNAL_1 : 7|64@0+ (1,0) [0|18446744073709552000] "" XXX
|
||||
|
||||
BO_ 1435 2017_8: 8 XXX
|
||||
BO_ 1435 MSG_2017_8: 8 XXX
|
||||
|
||||
BO_ 253 NEW_MSG_7: 8 XXX
|
||||
SG_ NEW_SIGNAL_1 : 16|1@0+ (1,0) [0|65535] "" XXX
|
||||
|
||||
184
opendbc/nissan_2017.dbc
Normal file
184
opendbc/nissan_2017.dbc
Normal file
@@ -0,0 +1,184 @@
|
||||
VERSION ""
|
||||
|
||||
|
||||
NS_ :
|
||||
NS_DESC_
|
||||
CM_
|
||||
BA_DEF_
|
||||
BA_
|
||||
VAL_
|
||||
CAT_DEF_
|
||||
CAT_
|
||||
FILTER
|
||||
BA_DEF_DEF_
|
||||
EV_DATA_
|
||||
ENVVAR_DATA_
|
||||
SGTYPE_
|
||||
SGTYPE_VAL_
|
||||
BA_DEF_SGTYPE_
|
||||
BA_SGTYPE_
|
||||
SIG_TYPE_REF_
|
||||
VAL_TABLE_
|
||||
SIG_GROUP_
|
||||
SIG_VALTYPE_
|
||||
SIGTYPE_VALTYPE_
|
||||
BO_TX_BU_
|
||||
BA_DEF_REL_
|
||||
BA_REL_
|
||||
BA_DEF_DEF_REL_
|
||||
BU_SG_REL_
|
||||
BU_EV_REL_
|
||||
BU_BO_REL_
|
||||
SG_MUL_VAL_
|
||||
|
||||
BS_:
|
||||
|
||||
BU_: XXX
|
||||
|
||||
|
||||
BO_ 644 Speed_1: 8 XXX
|
||||
SG_ Speed_FR : 7|16@0+ (0.0118,0) [0|65535] "" XXX
|
||||
SG_ Speed_FL : 23|16@0+ (0.0118,0) [0|65535] "" XXX
|
||||
SG_ Speed_Vehicle : 39|16@0+ (0.0245,0) [0|65535] "" XXX
|
||||
|
||||
BO_ 645 WheelspeedRear: 8 XXX
|
||||
SG_ RR : 7|16@0+ (0.00555,0) [0|65535] "KPH" XXX
|
||||
SG_ RL : 23|16@0+ (0.00555,0) [0|65535] "KPH" XXX
|
||||
|
||||
BO_ 768 STEER_TORQUE: 8 XXX
|
||||
SG_ STEERING_TOURQUE : 0|7@1+ (1,0) [0|127] "" XXX
|
||||
|
||||
BO_ 459 Maybe_RegenBraking: 8 XXX
|
||||
|
||||
BO_ 372 Maybe_Gear_Selector: 8 XXX
|
||||
SG_ Counter : 32|4@1+ (1,0) [0|15] "" XXX
|
||||
|
||||
BO_ 374 Maybe_Motor_RPM_or_Speed: 8 XXX
|
||||
SG_ Counter : 48|4@1+ (1,0) [0|15] "" XXX
|
||||
|
||||
BO_ 460 Maybe_Brake_Related: 8 XXX
|
||||
|
||||
BO_ 2 SteeringWheel: 8 XXX
|
||||
SG_ Steering_RateChange : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ Always_07 : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ Steering_Angle : 0|16@1- (-0.1,0) [0|65535] "" XXX
|
||||
|
||||
BO_ 384 Maybe_PowerInfo: 8 XXX
|
||||
SG_ Unknown_Timer_PowerInfo : 48|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ EnginePower : 27|12@0- (1,0) [0|1] "" XXX
|
||||
SG_ RequestedAccel : 23|12@0- (1,0) [0|4294967295] "" XXX
|
||||
|
||||
BO_ 1107 Lights: 8 XXX
|
||||
SG_ RIGHT_BLINKER : 12|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ LEFT_BLINKER : 11|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ _HEADLIGHTS : 5|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 666 WheelspeedFront: 8 XXX
|
||||
SG_ _FL_WHEELSPEED : 39|16@0+ (0.01014,0) [0|65535] "" XXX
|
||||
SG_ FR : 7|16@0+ (0.00555,0) [0|65535] "KPH" XXX
|
||||
SG_ FL : 23|16@0+ (0.00555,0) [0|65535] "KPH" XXX
|
||||
|
||||
BO_ 398 NEW_MSG_2: 8 XXX
|
||||
|
||||
BO_ 389 NEW_MSG_3: 8 XXX
|
||||
SG_ NEW_SIGNAL_1 : 15|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ NEW_SIGNAL_2 : 22|6@0+ (1,0) [0|3] "" XXX
|
||||
SG_ NEW_SIGNAL_4 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ NEW_SIGNAL_5 : 55|4@0+ (1,0) [0|255] "" XXX
|
||||
SG_ NEW_SIGNAL_6 : 63|8@0+ (1,0) [0|127] "" XXX
|
||||
SG_ COUNTER : 48|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ NEW_SIGNAL_3 : 30|8@0- (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 397 NEW_MSG_4: 8 XXX
|
||||
SG_ NEW_SIGNAL_1 : 7|16@0+ (1,0) [0|3] "" XXX
|
||||
SG_ NEW_SIGNAL_2 : 23|16@0+ (1,0) [0|32767] "" XXX
|
||||
SG_ NEW_SIGNAL_3 : 39|16@0+ (1,0) [0|65535] "" XXX
|
||||
SG_ NEW_SIGNAL_4 : 55|16@0+ (1,0) [0|31] "" XXX
|
||||
|
||||
BO_ 658 NEW_MSG_5: 8 XXX
|
||||
SG_ NEW_SIGNAL_1 : 7|16@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 855 NEW_MSG_6: 8 XXX
|
||||
SG_ NEW_SIGNAL_1 : 7|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 773 NEW_MSG_7: 8 XXX
|
||||
SG_ NEW_SIGNAL_1 : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ NEW_SIGNAL_2 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 851 SPEED_RELATED: 8 XXX
|
||||
SG_ SPEED_RELATED : 7|16@0+ (0.01014,0) [0|65535] "" XXX
|
||||
|
||||
BO_ 386 Accelerator: 8 XXX
|
||||
SG_ Accelerator : 38|7@0+ (1,0) [0|127] "" XXX
|
||||
|
||||
BO_ 347 ACCELSOMETHING: 8 XXX
|
||||
SG_ PowerMaybe : 9|10@0+ (1,0) [0|1023] "" XXX
|
||||
SG_ ACCELERATOR2 : 6|11@0+ (1,-800) [0|65535] "" XXX
|
||||
|
||||
BO_ 346 ANOTHER_ACCEL: 8 XXX
|
||||
SG_ ANOTHERACCEL : 23|10@0+ (1,0) [0|1023] "" XXX
|
||||
SG_ Reverse_ACCEL : 25|10@0+ (1,0) [0|1023] "" XXX
|
||||
|
||||
BO_ 348 FULLRANGEACCEL: 8 XXX
|
||||
SG_ AccelFullRange : 47|10@0+ (1,0) [0|1023] "" XXX
|
||||
SG_ Accel : 26|11@0+ (1,0) [0|2047] "" XXX
|
||||
SG_ NEW_SIGNAL_1 : 7|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 566 ANOTHERFULLRANGEACCEL: 8 XXX
|
||||
SG_ ANOTHERFULLRANGEACCEL : 43|8@0+ (1,0) [0|1023] "" XXX
|
||||
SG_ RPMORTORQUE : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 523 Yetyetanotheraccel: 8 XXX
|
||||
SG_ ANOTHERREVERSEACCEL : 37|10@0+ (1,0) [0|1023] "" XXX
|
||||
SG_ yetyetanotheraccel : 31|10@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 779 ANOTHERRRFULLRANGEACCEL: 8 XXX
|
||||
SG_ ANOTHERRRFULLRANGEACCEL : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 1108 Doors: 8 XXX
|
||||
SG_ DOOR_CLOSED_RR : 40|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_RR : 41|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_CLOSED_RL : 42|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_RL : 43|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_CLOSED_FL : 44|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_FL : 45|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_CLOSED_FR : 46|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ DOOR_OPEN_FR : 47|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ BOOT_OPEN : 55|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 403 LKAS_OLD: 8 XXX
|
||||
SG_ Checksum : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ Angle_2 : 32|13@0+ (1,-4000) [0|63] "" XXX
|
||||
SG_ Counter : 48|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ Angle_1 : 10|13@0+ (0.12,-480) [0|65535] "" XXX
|
||||
SG_ Steering_Torque : 7|13@0+ (-1,4000) [0|65535] "" XXX
|
||||
SG_ Torque_Command : 29|13@0+ (1,-4000) [0|255] "" XXX
|
||||
|
||||
BO_ 412 NEW_MSG_9: 8 XXX
|
||||
SG_ NEW_SIGNAL_1 : 7|16@0+ (1,0) [0|65535] "" XXX
|
||||
SG_ NEW_SIGNAL_3 : 23|16@0+ (1,0) [0|65535] "" XXX
|
||||
SG_ NEW_SIGNAL_2 : 39|8@0+ (1,0) [0|3] "" XXX
|
||||
SG_ NEW_SIGNAL_4 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 361 LKAS: 8 XXX
|
||||
SG_ NEW_SIGNAL_4 : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_X80 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ LKA_Active : 52|1@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CRC : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_0x80_2 : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ Counter : 51|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ Des_Angle : 7|18@0+ (-0.01,1310) [0|255] "" XXX
|
||||
|
||||
BO_ 438 ProPilot: 8 XXX
|
||||
SG_ NEW_SIGNAL_2 : 11|4@0+ (1,0) [0|255] "" XXX
|
||||
SG_ NEW_SIGNAL_4 : 27|4@0+ (1,0) [0|255] "" XXX
|
||||
SG_ NEW_SIGNAL_8 : 63|8@0+ (1,0) [0|7] "" XXX
|
||||
SG_ Counter : 55|4@0+ (1,0) [0|255] "" XXX
|
||||
SG_ NEW_SIGNAL_6 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_3 : 32|2@1+ (1,0) [0|15] "" XXX
|
||||
SG_ NEW_SIGNAL_1 : 7|12@0- (1,0) [0|255] "" XXX
|
||||
SG_ NEW_SIGNAL_3 : 23|12@0- (-1,0) [0|255] "" XXX
|
||||
SG_ CRUISE_ON : 36|1@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CRUISE_ACTIVATED : 38|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ STEER_STATUS : 51|1@1+ (1,0) [0|3] "" XXX
|
||||
|
||||
@@ -48,7 +48,7 @@ BO_ 64 Throttle: 8 XXX
|
||||
SG_ NEW_SIGNAL_3 : 56|4@1+ (1,0) [0|255] "" XXX
|
||||
SG_ Engine_RPM : 16|12@1+ (1,0) [0|255] "" XXX
|
||||
SG_ Throttle_Cruise : 40|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ Throttle_Combo : 55|8@1+ (0.392157,0) [0|255] "" XXX
|
||||
SG_ Throttle_Combo : 55|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ Throttle_Pedal : 32|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
|
||||
@@ -70,12 +70,14 @@ BO_ 72 NEW_MSG_2: 8 XXX
|
||||
|
||||
BO_ 316 NEW_MSG_3: 8 XXX
|
||||
|
||||
BO_ 326 NEW_MSG_4: 8 XXX
|
||||
BO_ 326 Cruise_Buttons: 8 XXX
|
||||
SG_ Checksum : 0|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ Counter : 8|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ NEW_SIGNAL_1 : 16|12@1+ (1,0) [0|255] "" XXX
|
||||
SG_ NEW_SIGNAL_2 : 32|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ NEW_SIGNAL_3 : 40|2@1+ (1,0) [0|255] "" XXX
|
||||
SG_ Signal1 : 12|30@1+ (1,0) [0|1073741823] "" XXX
|
||||
SG_ Main : 42|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ set : 43|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ Resume : 44|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ Signal2 : 45|19@1+ (1,0) [0|524287] "" XXX
|
||||
|
||||
BO_ 315 G_Sensor: 8 XXX
|
||||
SG_ longitudinal : 63|8@0- (1,0) [0|255] "" XXX
|
||||
@@ -140,19 +142,10 @@ BO_ 544 ES_Brake: 8 XXX
|
||||
BO_ 545 ES_Distance: 8 XXX
|
||||
SG_ Checksum : 0|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ Counter : 8|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ Close_Distance : 40|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ Distance_Swap : 37|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ NEW_SIGNAL_5 : 39|1@1+ (1,0) [0|31] "" XXX
|
||||
SG_ NEW_SIGNAL_9 : 38|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ NEW_SIGNAL_4 : 34|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ Brake_Pedal : 33|1@1+ (1,0) [0|255] "" XXX
|
||||
SG_ NEW_SIGNAL_10 : 35|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ Throttle : 16|12@1+ (1,0) [0|65535] "" XXX
|
||||
SG_ NEW_SIGNAL_1 : 31|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ SET_1 : 12|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ ACC_ENABLE_BTN : 56|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ Car_Follow : 32|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ Brake : 36|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ Signal1 : 12|20@1+ (1,0) [0|15] "" XXX
|
||||
SG_ Signal2 : 32|24@1+ (1,0) [0|15] "" XXX
|
||||
SG_ Main : 56|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ Signal3 : 57|7@1+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 546 ES_Status: 8 XXX
|
||||
SG_ Checksum : 0|8@1+ (1,0) [0|255] "" XXX
|
||||
@@ -225,19 +218,24 @@ BO_ 802 ES_LKAS_State: 8 XXX
|
||||
SG_ Counter : 8|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ Keep_Hands_On_Wheel : 12|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ Empty_Box : 13|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ Signal1 : 14|3@1+ (1,0) [0|7] "" XXX
|
||||
SG_ LKAS_ACTIVE : 17|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ Signal2 : 18|5@1+ (1,0) [0|7] "" XXX
|
||||
SG_ Backward_Speed_Limit_Menu : 23|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ LKAS_ENABLE_3 : 24|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ Signal3 : 25|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ LKAS_ENABLE_2 : 26|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ NEW_SIGNAL_7 : 28|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ NEW_SIGNAL_2 : 30|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ Signal4 : 27|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ LKAS_Left_Line_Visible : 28|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ Signal6 : 29|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ LKAS_Right_Line_Visible : 30|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ Signal7 : 31|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ FCW_Cont_Beep : 32|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ FCW_Repeated_Beep : 33|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ Throttle_Management_Activated : 34|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ Traffic_light_Ahead : 35|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ Right_Depart : 36|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ NEW_SIGNAL_4 : 44|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ NEW_SIGNAL_5 : 56|2@1+ (1,0) [0|3] "" XXX
|
||||
SG_ Signal5 : 37|27@1+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 805 ES_NEW_MSG_22: 8 XXX
|
||||
SG_ Checksum : 0|8@1+ (1,0) [0|255] "" XXX
|
||||
@@ -327,10 +325,11 @@ BO_ 1658 NEW_MSG_39: 8 XXX
|
||||
SG_ NEW_SIGNAL_3 : 33|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ NEW_SIGNAL_4 : 31|1@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 1677 NEW_MSG_40: 8 XXX
|
||||
BO_ 1677 Dash_State: 8 XXX
|
||||
SG_ Checksum : 0|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ Counter : 8|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ NEW_SIGNAL_3 : 16|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ Units : 29|3@1+ (1,0) [0|7] "" XXX
|
||||
|
||||
BO_ 1743 NEW_MSG_41: 8 XXX
|
||||
SG_ Checksum : 0|8@1+ (1,0) [0|255] "" XXX
|
||||
@@ -361,3 +360,4 @@ CM_ SG_ 940 FOG_LIGHTS2 "yellow fog light in the dash";
|
||||
CM_ SG_ 940 Highbeam "01 = low beam, 11 = high beam";
|
||||
CM_ SG_ 805 NEW_SIGNAL_3 "always 3";
|
||||
CM_ SG_ 805 NEW_SIGNAL_4 "always 1";
|
||||
CM_ SG_ 1677 Units "1 = imperial, 6 = metric";
|
||||
|
||||
@@ -33,16 +33,16 @@ NS_ :
|
||||
|
||||
BS_:
|
||||
|
||||
BU_: XXX 0
|
||||
BU_: XXX
|
||||
|
||||
|
||||
BO_ 2 Steering: 8 XXX
|
||||
SG_ NEW_SIGNAL_1 : 31|4@0- (1,0) [0|65535] "" XXX
|
||||
SG_ NEW_SIGNAL_6 : 24|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ Counter : 25|3@1+ (1,0) [0|15] "" XXX
|
||||
SG_ Checksum : 32|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ NEW_SIGNAL_2 : 22|3@0+ (1,0) [0|7] "" XXX
|
||||
SG_ Steering_Angle : 7|16@0- (-0.1,-9) [-497|500] "degree" XXX
|
||||
SG_ NEW_SIGNAL_6 : 24|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ Steering_Angle : 7|16@0- (0.1,0) [-500|500] "degree" XXX
|
||||
|
||||
BO_ 208 G_Sensor: 8 XXX
|
||||
SG_ NEW_SIGNAL_3 : 32|8@1+ (1,0) [0|255] "" XXX
|
||||
@@ -52,10 +52,9 @@ BO_ 208 G_Sensor: 8 XXX
|
||||
SG_ _Longitudinal : 48|16@1- (0.000035,0) [0|255] "" XXX
|
||||
|
||||
BO_ 209 Brake_Pedal: 8 XXX
|
||||
SG_ NEW_SIGNAL_2 : 31|1@1+ (1,0) [0|255] "" XXX
|
||||
SG_ NEW_SIGNAL_3 : 56|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ NEW_SIGNAL_1 : 26|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ Brake_Pedal : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ NEW_SIGNAL_2 : 31|1@1+ (1,0) [0|255] "" XXX
|
||||
SG_ Speed : 0|16@1+ (0.05625,0) [0|255] "KPH" XXX
|
||||
|
||||
BO_ 210 Brake_2: 8 XXX
|
||||
@@ -76,7 +75,7 @@ BO_ 211 Brake_Type: 8 XXX
|
||||
SG_ Brake_Cruise_On : 42|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ Brake_Pedal_On : 46|1@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 212 WHEEL_SPEEDS: 8 XXX
|
||||
BO_ 212 Wheel_Speeds: 8 XXX
|
||||
SG_ FL : 0|16@1+ (0.0592,0) [2|255] "KPH" XXX
|
||||
SG_ FR : 16|16@1+ (0.0592,0) [0|255] "KPH" XXX
|
||||
SG_ RL : 32|16@1+ (0.0592,0) [0|255] "" XXX
|
||||
@@ -106,7 +105,7 @@ BO_ 321 undefined: 8 XXX
|
||||
SG_ Wheel_Torque : 16|12@1+ (1,0) [0|255] "" XXX
|
||||
SG_ Engine_Stop : 15|1@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 324 CruiseControl_2015: 8 XXX
|
||||
BO_ 324 CruiseControl: 8 XXX
|
||||
SG_ Cruise_On : 48|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ OnOffButton : 2|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_BUTTON : 3|1@0+ (1,0) [0|3] "" XXX
|
||||
@@ -117,8 +116,8 @@ BO_ 324 CruiseControl_2015: 8 XXX
|
||||
SG_ NEW_SIGNAL_2 : 8|1@0+ (1,0) [0|255] "" XXX
|
||||
SG_ Cruise_Activated : 49|1@0+ (1,0) [0|7] "" XXX
|
||||
SG_ Brake_Pedal_On : 51|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ Button : 13|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ NEW_SIGNAL_1 : 23|8@0+ (1,-124) [0|255] "" XXX
|
||||
SG_ Button : 13|1@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 328 Transmission: 8 XXX
|
||||
SG_ Counter : 11|4@0+ (1,0) [0|255] "" XXX
|
||||
@@ -165,6 +164,7 @@ BO_ 352 ES_Brake: 8 XXX
|
||||
SG_ Brake_Light : 20|1@0+ (1,0) [0|2047] "" XXX
|
||||
SG_ Cruise_Activated : 23|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ Brake_Pressure : 0|16@1+ (1,0) [0|255] "" XXX
|
||||
SG_ ES_Error : 21|1@0+ (1,0) [0|7] "" XXX
|
||||
|
||||
BO_ 353 ES_CruiseThrottle: 8 XXX
|
||||
SG_ Throttle_Cruise : 0|12@1+ (1,0) [0|255] "" XXX
|
||||
@@ -182,6 +182,7 @@ BO_ 353 ES_CruiseThrottle: 8 XXX
|
||||
SG_ NEW_SIGNAL_6_Blank : 23|1@0+ (1,0) [0|7] "" XXX
|
||||
SG_ DistanceSwap : 21|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ Brake_On : 20|1@0+ (1,0) [0|7] "" XXX
|
||||
SG_ ES_Error : 42|1@1+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 354 ES_RPM: 8 XXX
|
||||
SG_ Counter : 48|3@1+ (1,0) [0|7] "" XXX
|
||||
@@ -192,17 +193,14 @@ BO_ 354 ES_RPM: 8 XXX
|
||||
|
||||
BO_ 356 ES_LKAS: 8 XXX
|
||||
SG_ Checksum : 56|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ Counter : 0|3@1+ (1,0) [0|8] "" XXX
|
||||
SG_ Counter : 0|3@1+ (1,0) [0|7] "" XXX
|
||||
SG_ LKAS_Active : 24|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ LKAS_Command : 8|13@1- (-1,0) [-4096|4095] "" XXX
|
||||
SG_ LKAS_Command : 8|13@1- (-1,0) [-4096|4096] "" XXX
|
||||
|
||||
BO_ 358 ES_Status: 8 XXX
|
||||
BO_ 358 ES_DashStatus: 8 XXX
|
||||
SG_ Counter : 39|3@0+ (1,0) [0|7] "" XXX
|
||||
SG_ Cruise_On : 16|1@1+ (1,0) [0|7] "" XXX
|
||||
SG_ Cruise_Activated : 17|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ Obstacle_Distance : 48|4@1+ (1,0) [0|15] "" XXX
|
||||
SG_ Cruise_Off : 22|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ Saved_Speed : 24|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ Car_Follow : 46|1@1+ (1,0) [0|255] "" XXX
|
||||
SG_ Driver_Input : 20|1@0+ (1,0) [0|15] "" XXX
|
||||
SG_ WHEELS_MOVING_2015 : 19|1@1+ (1,0) [0|3] "" XXX
|
||||
@@ -211,24 +209,28 @@ BO_ 358 ES_Status: 8 XXX
|
||||
SG_ NEW_SIGNAL_5_Blank : 33|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ NEW_SIGNAL_4_Blank : 34|1@1+ (1,0) [0|7] "" XXX
|
||||
SG_ NEW_SIGNAL_1 : 35|1@0+ (1,0) [0|31] "" XXX
|
||||
SG_ Steep_Hill_Disengage : 44|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ ES_Error : 32|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ Cruise_Activated : 17|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ Cruise_On : 16|1@1+ (1,0) [0|7] "" XXX
|
||||
SG_ Disengage_Alert : 15|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ 3SecondDisengage : 13|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ Not_Ready_Startup : 0|3@1+ (1,0) [0|7] "" XXX
|
||||
SG_ Steep_Hill_Disengage : 44|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ Disengage_Alert : 15|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ Cruise_Set_Speed : 24|8@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 359 ES_LDW: 8 XXX
|
||||
SG_ 2Right_Depart : 50|1@1+ (1,0) [0|7] "" XXX
|
||||
SG_ 2All_Depart : 28|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ 3All_Depart : 52|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ Left_Depart_Front : 51|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ All_depart_2015 : 0|1@1+ (1,0) [0|255] "" XXX
|
||||
SG_ LKAS_Inactive_2017 : 36|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ LKAS_Steer_Active_2017 : 37|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ Right_Line_2017 : 24|1@1+ (1,0) [0|7] "" XXX
|
||||
SG_ Left_Line_2017 : 25|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ 1All_Depart : 31|1@0+ (1,0) [0|15] "" XXX
|
||||
SG_ 1Right_Depart_Front : 49|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ 1Right_Depart : 48|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ Sig2All_Depart : 28|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ Sig1All_Depart : 31|1@0+ (1,0) [0|15] "" XXX
|
||||
SG_ Sig1Right_Depart : 48|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ Sig1Right_Depart_Front : 49|1@1+ (1,0) [0|3] "" XXX
|
||||
SG_ Sig2Right_Depart : 50|1@1+ (1,0) [0|7] "" XXX
|
||||
SG_ Left_Depart_Front : 51|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ Sig3All_Depart : 52|1@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 392 Counter_0: 8 XXX
|
||||
SG_ Counter : 16|4@1+ (1,0) [0|15] "" XXX
|
||||
@@ -255,6 +257,7 @@ BO_ 642 Dashlights: 8 XXX
|
||||
SG_ NEW_SIGNAL_3 : 34|2@1+ (1,0) [0|3] "" XXX
|
||||
SG_ LEFT_BLINKER : 44|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ RIGHT_BLINKER : 45|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SEATBELT_FL : 40|1@1+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 644 NEW_MSG_8: 8 XXX
|
||||
SG_ Counter : 8|4@1+ (1,0) [0|15] "" XXX
|
||||
@@ -272,21 +275,23 @@ BO_ 880 Steer_Torque_2: 8 XXX
|
||||
SG_ Steer_Torque_Sensor : 32|8@1- (-1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 881 Steering_Torque: 8 XXX
|
||||
SG_ Steering_Motor_Flat : 0|8@1+ (1,0) [0|255] "" XXX
|
||||
SG_ Steer_Torque_Sensor : 39|8@0- (1,0) [0|255] "" XXX
|
||||
SG_ Steering_Angle : 40|16@1- (-0.026,0) [0|255] "" XXX
|
||||
SG_ Steering_Motor_LeftRight : 23|16@0- (-0.13,0) [0|255] "" XXX
|
||||
SG_ Steering_Motor_Flat : 0|10@1+ (32,0) [0|16500] "" XXX
|
||||
SG_ Steer_Torque_Output : 16|11@1- (-32,0) [-16500|16500] "" XXX
|
||||
SG_ Steer_Torque_Sensor : 29|11@1- (8,0) [-8500|-8500] "" XXX
|
||||
SG_ Steering_Angle : 40|16@1- (-0.026,0) [-600|600] "" XXX
|
||||
SG_ LKA_Lockout : 27|1@1+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 882 Counter: 8 XXX
|
||||
SG_ Counter : 15|4@0+ (1,0) [0|31] "" XXX
|
||||
SG_ Something : 16|2@1+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 884 DOORS_STATUS: 8 XXX
|
||||
BO_ 884 BodyInfo: 8 XXX
|
||||
SG_ DOOR_OPEN_FR : 24|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_FL : 25|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_RL : 26|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_RR : 27|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_Hatch : 28|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ _UNKNOWN : 2|3@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 886 undefined: 8 XXX
|
||||
|
||||
@@ -341,30 +346,27 @@ CM_ SG_ 320 Off_Throttle_2 "Less sensitive";
|
||||
CM_ SG_ 320 Throttle_Body_ "Throttle related";
|
||||
CM_ SG_ 328 Gear "15 = P, 14 = R, 0 = N, 1-6=gear";
|
||||
CM_ SG_ 328 Gear_2 "15 = P, 14 = R, 0 = N, 1-6=gear";
|
||||
CM_ SG_ 338 Wiper "0 off, 1 on";
|
||||
CM_ SG_ 353 NEW_SIGNAL_3_Blank "always 2";
|
||||
CM_ SG_ 353 NEW_SIGNAL_2_Blank "0";
|
||||
CM_ SG_ 353 NEW_SIGNAL_9 "flipped around quick engagement";
|
||||
CM_ SG_ 353 NEW_SIGNAL_6_Blank "always 1";
|
||||
CM_ SG_ 353 Brake_On "long activatedish";
|
||||
CM_ SG_ 354 RPM "20hz version of Transmission_Engine under Transmission";
|
||||
CM_ SG_ 358 Cruise_Activated "is 1 when cruise is able to go";
|
||||
CM_ SG_ 358 Car_Follow "front car detected";
|
||||
CM_ SG_ 358 3SecondDisengage "seatbelt disengage";
|
||||
CM_ SG_ 358 ES_Error "No engagement until restart";
|
||||
CM_ SG_ 358 Cruise_Activated "is 1 when cruise is able to go";
|
||||
CM_ SG_ 358 Disengage_Alert "seatbelt and steep hill disengage";
|
||||
CM_ SG_ 359 2All_Depart "Left and right depart";
|
||||
CM_ SG_ 359 Left_Depart_Front "warning after acceleration into car in front and left depart";
|
||||
CM_ SG_ 358 3SecondDisengage "seatbelt disengage";
|
||||
CM_ SG_ 359 All_depart_2015 "always 1 on 2017";
|
||||
CM_ SG_ 359 LKAS_Inactive_2017 "1 when not steering, 0 when lkas steering";
|
||||
CM_ SG_ 359 1All_Depart "Left and right depart";
|
||||
CM_ SG_ 359 1Right_Depart_Front "object in front, right depart, hill steep and seatbelt disengage alert ";
|
||||
CM_ SG_ 359 1Right_Depart "right depart, hill steep and seatbelt disengage";
|
||||
CM_ SG_ 359 Sig2All_Depart "Left and right depart";
|
||||
CM_ SG_ 359 Sig1All_Depart "Left and right depart";
|
||||
CM_ SG_ 359 Sig1Right_Depart "right depart, hill steep and seatbelt disengage";
|
||||
CM_ SG_ 359 Sig1Right_Depart_Front "object in front, right depart, hill steep and seatbelt disengage alert ";
|
||||
CM_ SG_ 359 Left_Depart_Front "warning after acceleration into car in front and left depart";
|
||||
CM_ SG_ 642 Counter "Affected by signals";
|
||||
CM_ SG_ 642 RIGHT_BLINKER "0 off, 2 right, 1 left";
|
||||
CM_ SG_ 880 Steering_Voltage_Flat "receives later than 371";
|
||||
CM_ SG_ 880 NEW_SIGNAL_1 "0 in 2017";
|
||||
CM_ SG_ 880 NEW_SIGNAL_2 "";
|
||||
CM_ SG_ 880 NEW_SIGNAL_4_2017 "1 in 2017";
|
||||
CM_ SG_ 880 NEW_SIGNAL_5_2017 "1 in 2017";
|
||||
CM_ SG_ 881 Steering_Motor_Flat "Possibly motor voltage";
|
||||
CM_ SG_ 881 Steering_Angle "Missing extra larger bits";
|
||||
|
||||
@@ -307,6 +307,8 @@ BO_ 840 GTW_status: 8 GTW
|
||||
|
||||
BO_ 840 GTW_status: 8 GTW
|
||||
SG_ GTW_accGoingDown : 6|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ GTW_accRailReq : 8|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ GTW_brakePressed : 1|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ GTW_driveGoingDown : 7|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ GTW_driveRailReq : 0|1@0+ (1,0) [0|1] "" NEO
|
||||
SG_ GTW_driverIsLeaving : 5|1@0+ (1,0) [0|1] "" NEO
|
||||
@@ -417,5 +419,3 @@ VAL_ 904 MCU_clusterReadyForDrive 0 "NO_SNA" 1 "YES" ;
|
||||
VAL_ 872 DI_immobilizerState 2 "AUTHENTICATING" 3 "DISARMED" 6 "FAULT" 4 "IDLE" 0 "INIT_SNA" 1 "REQUEST" 5 "RESET" ;
|
||||
VAL_ 872 DI_speedUnits 1 "KPH" 0 "MPH" ;
|
||||
VAL_ 872 DI_state 3 "ABORT" 4 "ENABLE" 2 "FAULT" 1 "STANDBY" 0 "UNAVAILABLE" ;
|
||||
VAL_ 872 DI_systemState 3 "ABORT" 4 "ENABLE" 2 "FAULT" 1 "STANDBY" 0 "UNAVAILABLE" ;
|
||||
VAL_ 872 DI_vehicleHoldState 2 "BLEND_IN" 4 "BLEND_OUT" 6 "FAULT" 7 "INIT" 5 "PARK" 1 "STANDBY" 3 "STANDSTILL" 0 "UNAVAILABLE" ;
|
||||
|
||||
1371
opendbc/tesla_radar.dbc
Normal file
1371
opendbc/tesla_radar.dbc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -125,7 +125,7 @@ BO_ 614 STEERING_IPAS: 8 IPAS
|
||||
SG_ SET_ME_X00 : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ DIRECTION_CMD : 38|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X40 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00_1 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 643 PRE_COLLISION: 8 XXX
|
||||
@@ -288,9 +288,9 @@ VAL_ 1553 UNITS 1 "km" 2 "miles";
|
||||
VAL_ 1556 TURN_SIGNALS 3 "none" 2 "right" 1 "left";
|
||||
VAL_ 1161 TSGN1 1 "speed sign" 0 "none";
|
||||
VAL_ 1161 TSGN2 1 "speed sign" 0 "none";
|
||||
VAL_ 1161 SPLSGN2 15 "conditional blank" 5 "rain" 0 "none";
|
||||
VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highway" 17 "no highway" 18 "motorway" 19 "no motorway" 20 "in city" 21 "outside city" 22 "pedestrian area" 23 "no pedestrian area" 65 "no overtaking left" 66 "no overtaking right" 67 "overtaking allowed again" 65 "no overtake" 129 "no entry";
|
||||
VAL_ 1162 SPLSGN3 15 "conditional blank" 5 "rain" 0 "none";
|
||||
VAL_ 1161 SPLSGN2 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highway" 17 "no highway" 18 "motorway" 19 "no motorway" 20 "in city" 21 "outside city" 22 "pedestrian area" 23 "no pedestrian area" 65 "no overtaking left" 66 "no overtaking right" 67 "overtaking allowed again" 129 "no entry";
|
||||
VAL_ 1162 SPLSGN3 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
|
||||
|
||||
CM_ "CHFFR_METRIC 37 STEER_ANGLE STEER_ANGLE 0.36 180";
|
||||
|
||||
@@ -125,7 +125,7 @@ BO_ 614 STEERING_IPAS: 8 IPAS
|
||||
SG_ SET_ME_X00 : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ DIRECTION_CMD : 38|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X40 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00_1 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 643 PRE_COLLISION: 8 XXX
|
||||
@@ -288,9 +288,9 @@ VAL_ 1553 UNITS 1 "km" 2 "miles";
|
||||
VAL_ 1556 TURN_SIGNALS 3 "none" 2 "right" 1 "left";
|
||||
VAL_ 1161 TSGN1 1 "speed sign" 0 "none";
|
||||
VAL_ 1161 TSGN2 1 "speed sign" 0 "none";
|
||||
VAL_ 1161 SPLSGN2 15 "conditional blank" 5 "rain" 0 "none";
|
||||
VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highway" 17 "no highway" 18 "motorway" 19 "no motorway" 20 "in city" 21 "outside city" 22 "pedestrian area" 23 "no pedestrian area" 65 "no overtaking left" 66 "no overtaking right" 67 "overtaking allowed again" 65 "no overtake" 129 "no entry";
|
||||
VAL_ 1162 SPLSGN3 15 "conditional blank" 5 "rain" 0 "none";
|
||||
VAL_ 1161 SPLSGN2 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highway" 17 "no highway" 18 "motorway" 19 "no motorway" 20 "in city" 21 "outside city" 22 "pedestrian area" 23 "no pedestrian area" 65 "no overtaking left" 66 "no overtaking right" 67 "overtaking allowed again" 129 "no entry";
|
||||
VAL_ 1162 SPLSGN3 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
|
||||
|
||||
CM_ "CHFFR_METRIC 37 STEER_ANGLE STEER_ANGLE 0.36 180";
|
||||
@@ -314,7 +314,7 @@ BO_ 581 GAS_PEDAL: 8 XXX
|
||||
SG_ GAS_PEDAL : 23|8@0+ (0.005,0) [0|1] "" XXX
|
||||
|
||||
BO_ 608 STEER_TORQUE_SENSOR: 8 XXX
|
||||
SG_ STEER_TORQUE_EPS : 47|16@0- (0.66,0) [-20000|20000] "" XXX
|
||||
SG_ STEER_TORQUE_EPS : 47|16@0- (0.73,0) [-20000|20000] "" XXX
|
||||
SG_ STEER_TORQUE_DRIVER : 15|16@0- (1,0) [-32768|32767] "" XXX
|
||||
SG_ STEER_OVERRIDE : 0|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
@@ -125,7 +125,7 @@ BO_ 614 STEERING_IPAS: 8 IPAS
|
||||
SG_ SET_ME_X00 : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ DIRECTION_CMD : 38|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X40 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00_1 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 643 PRE_COLLISION: 8 XXX
|
||||
@@ -288,9 +288,9 @@ VAL_ 1553 UNITS 1 "km" 2 "miles";
|
||||
VAL_ 1556 TURN_SIGNALS 3 "none" 2 "right" 1 "left";
|
||||
VAL_ 1161 TSGN1 1 "speed sign" 0 "none";
|
||||
VAL_ 1161 TSGN2 1 "speed sign" 0 "none";
|
||||
VAL_ 1161 SPLSGN2 15 "conditional blank" 5 "rain" 0 "none";
|
||||
VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highway" 17 "no highway" 18 "motorway" 19 "no motorway" 20 "in city" 21 "outside city" 22 "pedestrian area" 23 "no pedestrian area" 65 "no overtaking left" 66 "no overtaking right" 67 "overtaking allowed again" 65 "no overtake" 129 "no entry";
|
||||
VAL_ 1162 SPLSGN3 15 "conditional blank" 5 "rain" 0 "none";
|
||||
VAL_ 1161 SPLSGN2 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highway" 17 "no highway" 18 "motorway" 19 "no motorway" 20 "in city" 21 "outside city" 22 "pedestrian area" 23 "no pedestrian area" 65 "no overtaking left" 66 "no overtaking right" 67 "overtaking allowed again" 129 "no entry";
|
||||
VAL_ 1162 SPLSGN3 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
|
||||
|
||||
CM_ "CHFFR_METRIC 37 STEER_ANGLE STEER_ANGLE 0.36 180";
|
||||
@@ -321,6 +321,7 @@ BO_ 610 EPS_STATUS: 5 EPS
|
||||
|
||||
BO_ 956 GEAR_PACKET: 8 XXX
|
||||
SG_ GEAR : 13|6@0+ (1,0) [0|63] "" XXX
|
||||
SG_ SPORT_ON : 3|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
CM_ SG_ 548 BRAKE_PRESSURE "seems prop to pedal force";
|
||||
CM_ SG_ 548 BRAKE_POSITION "seems proportional to pedal displacement, unclear the max value of 0x1c8";
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user