Compare commits

..

1080 Commits

Author SHA1 Message Date
dragonpilot a382a28fda Merge branch 'devel-en' into devel-zht 2020-02-14 11:25:08 +10:00
dragonpilot 9ca8f9a047 Merge pull request #10 from dragonpilot-community/devel
dp 0.7.2 bug fixes
2020-02-14 11:19:18 +10:00
dragonpilot 89dfdd961f Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2020-02-14 11:13:29 +10:00
dragonpilot 9a7dbd0201 DragonCachedSource does not use utf8 2020-02-14 11:13:07 +10:00
Willem Melching d25c617595 Add Corolla Hybrid TSS2 eps firmware version 2020-02-11 13:55:47 -08:00
Willem Melching b5807aab22 Add engine FW version for Camry Hybrid 2020-02-11 13:54:11 -08:00
dragonpilot d04f4ffa31 force git command to run in /data/openpilot/ 2020-02-11 17:08:15 +10:00
dragonpilot 3e2a9e8136 * delete ish dbc
* car_helpers to catch EOFError exception
* dashcam to catch OSError exception
* dragonconf default to stock settings
2020-02-11 12:12:41 +10:00
ZwX1616 7827a7cdba fix not resetting on interaction (#1063) 2020-02-08 11:22:21 -08:00
dragonpilot 725947813f Merge branch 'devel-en' into devel-zht 2020-02-08 13:34:04 +10:00
dragonpilot e594bd740e Merge pull request #9 from dragonpilot-community/devel
dp 0.7.2
2020-02-08 13:18:47 +10:00
dragonpilot 5cd69cb553 Merge branch 'devel-staging' of https://github.com/commaai/openpilot into devel 2020-02-07 12:30:47 +10:00
dragonpilot e1380aa34a Merge branch 'devel' of https://github.com/dragonpilot-community/dragonpilot into devel 2020-02-07 11:54:45 +10:00
dragonpilot fb1a9ca010 dp v0.7.2 init update
* migrate to v0.7.2
* increase mini dev bar font size
* update APKs
   * system APKs updated to v0.7.2
   * autonavi updated to v4.5.0.600053
* use old updated
* Add missing auto start Aegis app option.
2020-02-07 11:42:48 +10:00
Vehicle Researcher 21f4245444 openpilot v0.7.2 release 2020-02-06 13:51:42 -08:00
Vehicle Researcher 305037fc1a Merge opendbc subtree 2020-02-06 13:51:38 -08:00
Vehicle Researcher 69df34bf0f Squashed 'opendbc/' changes from 5081966f..d68f8ff0
d68f8ff0 Clean up .gitignore
e82757b9 Add Lexus NX300H (#214)
745a2bb0 Removed non high voltage items. Added units.
fafd091a Added High Voltage Management to powertrain file.
15b6b316 Update subaru_global_2017.dbc
a12af19a Add steering error signal in subaru global
d411c175 correct max value
881c065d add electrical gear and fix driver torque
1bbac4b8 Add reference to CANdevStudio in README file
8f70ea01 Adds 2016 Honda CR-V Executive

git-subtree-dir: opendbc
git-subtree-split: d68f8ff0cd6bd00a4aa5b7b83efd4b1aa9916452
2020-02-06 13:51:38 -08:00
Vehicle Researcher 7a69c82d65 Merge panda subtree 2020-02-06 13:51:37 -08:00
Vehicle Researcher 4ea182a1b1 Squashed 'panda/' changes from 3b356216..73a60d5c
73a60d5c uds: clear rx buffer on drain
3b20804b uds: rx message buffering
d034f3e9 Added the option to turn on IR in power savings mode (#431)
82cafd10 Allow fan control in power saving (#429)
186d9dcb Fixed GMLAN interrupts when used in Tesla safety (#428)
f67ec28e Fix msg checks for non Honda and Toyota (#426)

git-subtree-dir: panda
git-subtree-split: 73a60d5c9c358e9d5c24aff2f605c3ab650fc74d
2020-02-06 13:51:37 -08:00
Vehicle Researcher 7119634b5b Merge cereal subtree 2020-02-06 13:51:36 -08:00
Vehicle Researcher 60d3364233 Squashed 'cereal/' changes from 01942b89..ab32956a
ab32956a Merge pull request #27 from commaai/ublox-hw-status
2e7f4b90 Added ublox hw status
23abef4f add networkType to thermal
3f01dcf0 fix bad naming
4999e620 unconfusing and accessible to all
8f9aa8fc add fingerprintSource to carParams
57940309 better put
06f8d15c standalone monitorstate (#23)
6eb1e368 qlog at model rate
c38fb572 LateralParams
0c45f20d add uncertainty event name

git-subtree-dir: cereal
git-subtree-split: ab32956aaf927ee6318bcf639e3a25eea72027a9
2020-02-06 13:51:36 -08:00
dragonpilot 1f1ecd595d update spinner logo 2020-02-06 22:57:48 +10:00
dragonpilot 14e89f4b5c spinner use dp logo 2020-02-06 22:57:35 +10:00
dragonpilot 4c37e7a399 increase mini dev bar font size 2020-02-06 22:56:47 +10:00
dragonpilot 2eeb228895 add back deprecated param 2020-02-05 17:34:06 +10:00
dragonpilot dfa6cbee83 fix duplicate ordinal number 2020-02-05 17:26:58 +10:00
dragonpilot 97f1811159 add support of fw based cache fp 2020-02-05 14:34:43 +10:00
dragonpilot 87a694ebcb Merge branch 'devel-staging' of https://github.com/commaai/openpilot into devel 2020-02-05 13:46:07 +10:00
Vehicle Researcher 43c07122e2 openpilot v0.7.2 release 2020-02-03 16:15:37 -08:00
Vehicle Researcher 684b70d40b Merge opendbc subtree 2020-02-03 16:15:31 -08:00
Vehicle Researcher ecb3136cb7 Squashed 'opendbc/' changes from 5081966f..745a2bb0
745a2bb0 Removed non high voltage items. Added units.
fafd091a Added High Voltage Management to powertrain file.
15b6b316 Update subaru_global_2017.dbc
a12af19a Add steering error signal in subaru global
d411c175 correct max value
881c065d add electrical gear and fix driver torque
1bbac4b8 Add reference to CANdevStudio in README file
8f70ea01 Adds 2016 Honda CR-V Executive

git-subtree-dir: opendbc
git-subtree-split: 745a2bb00dad694fb8fcacaea5aaa9207bef06a7
2020-02-03 16:15:31 -08:00
Vehicle Researcher 72c815acef Merge panda subtree 2020-02-03 16:15:30 -08:00
Vehicle Researcher f5a2358cf5 Squashed 'panda/' changes from 3b356216..d034f3e9
d034f3e9 Added the option to turn on IR in power savings mode (#431)
82cafd10 Allow fan control in power saving (#429)
186d9dcb Fixed GMLAN interrupts when used in Tesla safety (#428)
f67ec28e Fix msg checks for non Honda and Toyota (#426)

git-subtree-dir: panda
git-subtree-split: d034f3e9c08130f7c933525af98e2c4ccb14b7c4
2020-02-03 16:15:30 -08:00
Vehicle Researcher 06bfe01802 Merge cereal subtree 2020-02-03 16:15:29 -08:00
Vehicle Researcher b160847119 Squashed 'cereal/' changes from 01942b89..23abef4f
23abef4f add networkType to thermal
3f01dcf0 fix bad naming
4999e620 unconfusing and accessible to all
8f9aa8fc add fingerprintSource to carParams
57940309 better put
06f8d15c standalone monitorstate (#23)
6eb1e368 qlog at model rate
c38fb572 LateralParams
0c45f20d add uncertainty event name

git-subtree-dir: cereal
git-subtree-split: 23abef4fdb18bc2b06281f9937ed3e7fc31e5c37
2020-02-03 16:15:29 -08:00
dragonpilot 50ecefc689 Hyundai to support 'Enable Lateral Control', 'Allow Gas', 'Enable Steering On Signal' features. 2020-02-03 14:36:28 +10:00
dragonpilot 322cbf930d re-enable allow gas, commented out somehow 2020-01-31 17:35:28 +10:00
dragonpilot 236e261f64 Merge branch 'devel-zht' of https://github.com/dragonpilot-community/dragonpilot into devel-zht 2020-01-31 17:30:46 +10:00
dragonpilot d6f6aa0049 keep chinese fonts 2020-01-31 17:23:29 +10:00
dragonpilot f188c6188f Merge branch 'devel-en' into devel-zht 2020-01-31 17:22:32 +10:00
dragonpilot adc4f36962 remove temp/battery level display to fix black/freeze screen. 2020-01-31 17:18:40 +10:00
dragonpilot 129a450fc3 Merge branch 'devel-en' into devel-zht 2020-01-29 22:04:33 +10:00
dragonpilot 794d0c06e7 fix temp/battery display issue 2020-01-29 21:55:12 +10:00
dragonpilot 02136e7ef3 Merge branch 'devel-en' into devel-zht 2020-01-23 15:08:31 +10:00
dragonpilot 599510e7dc add battery level and temp to driving ui. 2020-01-23 14:56:07 +10:00
dragonpilot 9d945bded8 fixed issues in appd that cause offroad to crash. 2020-01-23 14:55:30 +10:00
dragonpilot 2ebed15fcf fix no keyboard issue in full screen app (waze) 2020-01-22 15:05:59 +10:00
dragonpilot b993595e81 fix display issue when opening full screen apps. 2020-01-22 15:04:55 +10:00
dragonpilot 6fec46efb0 add steer ratio learner toggle 2020-01-22 15:03:38 +10:00
dragonpilot 59e91b8774 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2020-01-22 14:31:29 +10:00
Willem Melching 1e1de64a1e update athenad.py 2020-01-21 12:18:16 -08:00
Willem Melching 67ab1c5b2e update common/android.py 2020-01-21 11:52:33 -08:00
dragonpilot fcc8ab650f Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2020-01-21 14:12:40 +10:00
Willem Melching 460a8e3189 catch exception in uploader.py 2020-01-20 11:30:04 -08:00
Willem Melching 354d14515f update frame apk 2020-01-19 16:06:26 -08:00
andyh2 5c359f93ac apk lib: Grant offroad access to TelephonyManager 2020-01-19 15:17:12 -08:00
Willem Melching f60fe79999 update offroad apk: fix pairing 2020-01-19 14:00:39 -08:00
Willem Melching 21572ce67b Panda signature needs to be bytes 2020-01-19 09:42:10 -08:00
dragonpilot f47eb76c43 add translations 2020-01-19 21:47:20 +10:00
dragonpilot 87b36e8dd8 Merge branch 'devel-en' into devel-zht 2020-01-19 21:03:15 +10:00
dragonpilot b11f2770d6 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2020-01-19 20:41:39 +10:00
dragonpilot 5dd8ddd14f simplify alc logic 2020-01-19 20:29:24 +10:00
Willem Melching 8f62890de4 hotfix panda#426 2020-01-18 13:39:47 -08:00
dragonpilot 227a616db9 remove hotspot monkey script 2020-01-18 22:31:55 +10:00
dragonpilot ba77eccaf1 fix migration issue 2020-01-18 22:29:59 +10:00
dragonpilot b539f65a78 use pkill instead pm to close apps 2020-01-18 18:23:42 +10:00
dragonpilot 8ed17d2934 update apks to 0.7.1 version 2020-01-18 18:02:06 +10:00
dragonpilot 65ad81d805 fixing 0.7.1 merge conflicts 2020-01-17 22:32:21 +10:00
dragonpilot 97ee7bc139 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2020-01-17 22:31:23 +10:00
Willem Melching adf25bcb5e Merge pull request #949 from commaai/nightly
openpilot v0.7.1
2020-01-16 16:42:43 -08:00
Willem Melching 7c25bb6950 registration: send up both imeis 2020-01-16 11:43:09 -08:00
Vehicle Researcher 8da8b6135c openpilot v0.7.1 release 2020-01-15 14:05:04 -08:00
Vehicle Researcher 77e450db57 Squashed 'opendbc/' changes from 4f82d01e..5081966f
5081966f One more fix
fa5dc680 Fix honda dbc files after steer torque addition
e4dfb2fa update honda steering signals (#208)
53fc4487 added generator test (#207)
cb27d6e3 Honda Nidec: add new ACC_HUD signals to all other cars other than the CIVIC
6e6779f9 build on mac AND linux, also gotta not use these python files
79dbfc1a build on mac

git-subtree-dir: opendbc
git-subtree-split: 5081966f106e4ed385d756220cfd3dc502e737d9
2020-01-15 14:04:44 -08:00
Vehicle Researcher 25d18afad5 Merge opendbc subtree 2020-01-15 14:04:44 -08:00
Vehicle Researcher b0b7a768f0 Squashed 'panda/' content from commit 3b356216
git-subtree-dir: panda
git-subtree-split: 3b35621671aaa6de3fc66d85d30e4208a77e2489
2020-01-15 14:04:42 -08:00
Vehicle Researcher af301ad7b5 Merge commit 'b0b7a768f00d08fa30d7463efd0d05fcd5490088' as 'panda' 2020-01-15 14:04:42 -08:00
Vehicle Researcher ab415aa5fa Remove old panda subtree 2020-01-15 14:04:40 -08:00
Vehicle Researcher 9504037aa7 Squashed 'cereal/' changes from b8382bbb..01942b89
01942b89 add TODO
b74a456a don't hardcode the lists
ed5a4bf5 add face stds
396a2bb5 add can error counter to controlsState
c6b5c73b Switch default to msgq (#21)
a457ffa0 Fix indentation in readme.md
a1fc8c75 explicitly mention Python for syntax colouring (#20)
19e23931 Fix expected for cameraOdometry and liveCalibration
e7d2f978 Add radar comm issue error
db64cd43 Reserve safety #21 for VAG PQ35/PQ46/NMS (#19)
79d638d5 separate honda safety models between Bosch Giraffe and Bosch Nidec
2614a650 better name
b6b84cda add longitudinal
78f5934a Add canRxErrs to health
67588993 qlog liveCalibration
df80b870 add more stuff to fw log in CarParams
a87805ad fix doxs
4746b208 got doxed
21cf3f55 build on mac
31ac47c2 Add carUnrecognized event

git-subtree-dir: cereal
git-subtree-split: 01942b890d7acf19aecc09432fe5048ba21c0fc9
2020-01-15 14:04:38 -08:00
Vehicle Researcher 0440535f64 Merge cereal subtree 2020-01-15 14:04:38 -08:00
dragonpilot 6216c00a88 Merge branch 'devel-en' into devel-zht 2020-01-14 15:39:21 +10:00
dragonpilot f4aa4ab456 add ability to turn on hotspot on boot. 2020-01-14 15:29:00 +10:00
dragonpilot b4e991d714 refactor appd 2020-01-14 14:17:32 +10:00
dragonpilot 2260169379 Merge branch 'devel-en' into devel-zht 2020-01-08 15:06:00 +10:00
dragonpilot 27c2d13cb2 add DragonBTG mode 2020-01-08 15:05:31 +10:00
dragonpilot 5a1b15cfad Merge branch 'devel-en' into devel-zht 2020-01-06 13:15:40 +10:00
dragonpilot 7001278d0e add support to 2018 Lexus RX300 China ver 2020-01-06 13:15:08 +10:00
dragonpilot 028b852eea Merge branch 'devel-en' into devel-zht 2019-12-31 18:13:17 +10:00
dragonpilot a6a54b7196 fix issue that may install apks every time 2019-12-31 18:11:46 +10:00
Rick Lan f93e76e360 Merge branch 'devel-en' into devel-zht 2019-12-29 22:16:12 +10:00
Rick Lan 178db47eb9 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-12-29 21:17:25 +10:00
Rick Lan fb9373f5c9 Move ALCs min speed / timer to variables. 2019-12-29 21:13:22 +10:00
rbiasini a2ae18d1db Honda fwd fixes (#5)
- fix chime forwarding
- forward radar hud msg from stock
- no EON chime during stock fcw
2019-12-25 21:38:00 -08:00
dragonpilot 8a0c5fbb77 Merge branch 'devel-en' into devel-zht 2019-12-18 14:42:31 +10:00
dragonpilot feff825283 increase min speed to use assist lc / auto lc 2019-12-18 14:34:12 +10:00
dragonpilot 78d7dedbde remove 2017 Civic Hatchback LX fingerprint because it will cause issue with others. 2019-12-18 14:30:55 +10:00
dragonpilot 6ff353469c Merge branch 'devel-en' into devel-zht 2019-12-18 11:57:29 +10:00
dragonpilot 4959f95dbd update auto_lc logic, fix incorrect auto_lc alert. 2019-12-18 11:57:11 +10:00
dragonpilot bd1ce8d003 update translation 2019-12-17 12:55:07 +10:00
dragonpilot 2bf3489e96 Merge branch 'devel-en' into devel-zht 2019-12-17 12:54:34 +10:00
Riccardo 8f78b61a47 README update with FCA harness support 2019-12-16 18:33:21 -08:00
dragonpilot 542fef8a5a auto lane change send alerts 2019-12-17 11:02:36 +10:00
dragonpilot 5af951b240 update translation 2019-12-17 10:47:12 +10:00
dragonpilot 1b7e77c344 Merge branch 'devel-en' into devel-zht 2019-12-17 10:40:30 +10:00
dragonpilot f74a810456 Merge pull request #8 from eFiniLan/dp-devel-en
Auto LC
2019-12-17 10:06:22 +10:00
dragonpilot 5ff77e4500 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-12-17 10:03:28 +10:00
dragonpilot 17cdb7e476 fix langauge issue 2019-12-17 10:02:02 +10:00
rbiasini 69fb8b312f Honda Nidec: fix missing signals from dbc files (#919) 2019-12-16 20:27:01 +01:00
Rick Lan b98bbcd72f update apks, fix up ALC logic 2019-12-17 01:18:45 +10:00
dragonpilot 30446d0c74 migrate to 0.7 2019-12-16 17:13:44 +10:00
dragonpilot 4da1d8bf9d Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-12-16 11:23:05 +10:00
Willem Melching e0d7a55eab add common/kalman/.gitignore 2019-12-14 12:47:28 -08:00
Riccardo a4b4513149 Allow more time for snapshots and increase alert priority for disallowed community feature 2019-12-14 10:36:39 -08:00
Vehicle Researcher c025b96e8a openpilot v0.7 release 2019-12-13 13:03:08 -08:00
Vehicle Researcher 683b6151ce Squashed 'opendbc/' changes from c0eba096..4f82d01e
4f82d01e gitignore
5cb83454 Honda FCM: diagnostic signals
d309cdce Added linter to opendbc (#203)
d452706f add requirements.txt
ec3b4595 deterministic dependency order
a265d351 Azure pipelines ci (#202)
bce9a2e1 packer depends on libdbc
5d5fdd6a no more python version of libdbc, everything through cython
541705bf move CANDefine to parser code
da25c52a add test for can define
0ba7926b unify can packer and parser
25d88009 consistent naming
a5c640a5 fix linter
be210fef remove obsolete make file
ffd9dca7 opendbc needs cereal
b559f63d remove more make
d0929496 seems to work now
41e80836 don't make
3254d1fc think scons works
eb78f6aa scons sort of working
0ef1e35d fix gitignore
e155e017 Can migration (#199)
3eded83a Honda: correct steering torque sensor sign to be consistent with standard convention (left+)
32f70e2f Fix outback endianness consistency (#196)
a7da471f Update subaru_outback_2015_eyesight.dbc (#195)

git-subtree-dir: opendbc
git-subtree-split: 4f82d01ebc78109888954d9807d320e3c27896fd
2019-12-13 13:02:48 -08:00
Vehicle Researcher 261fb00e11 Merge opendbc subtree 2019-12-13 13:02:48 -08:00
Vehicle Researcher df875819f5 Merge panda subtree 2019-12-13 13:02:46 -08:00
Vehicle Researcher bc7b9b38ae Squashed 'panda/' changes from 256d274e..a648ccae
a648ccae Add os import
042562dd Extracted wifi connect from test helpers
ac0fd5dd query fw versions example - use extended diagnostic session
4e9d788a Remove not-needed cadillac-init
f0a5d154 typo
c093286b Add bootkick after re-enabling phone power (#401)
eadb0dbb security upgrades (#397)
7c13bec0 Command to get signature (#399)
dad439a4 static assert on size of health packet (#398)
da9da466 Fix VERSION
df4159c8 Revert "Revert "Register readback on most modules. Still need to convert the other ones (#396)""
56ec2150 Revert "Register readback on most modules. Still need to convert the other ones (#396)"
893e4861 Register readback on most modules. Still need to convert the other ones (#396)
6bbae7be VW safety: allow cancel spam on both buses to be compatible with camera and gateway integration
d5f7a287 bump panda
1bcc351f ignition_can: set it to False after 2s of not seeing CAN msgs
96137f1a VW can based ignition not needed. it has ignition line at camera as well.
1b004a18 Same flake8 version as the one in openpilot
e82ba5f2 Same pylint version as the one in openpilot
656f99b0 Interrupt refactor (NVIC_SM_1: #334) and Fault handling (#377) (PR #373)
000282e5 Fix can_logger.py to run correctly on python3 (#392)
7f9b4a59 Fix USB device enumeration on Windows 8.1 and Windows 10 (#393)
dec565c7 Update Misra test coverage, which now includes rule 2.7
fb6bc3ba Fix Misra
878dd00a solve race condition is relay_malfunction right after changing the relay status by adding a counter
2d4cb05c add a safety mode counter
a6797a21 Implement USB power mode on uno
670f90cc Merge branch 'master' of github.com:commaai/panda
ca39a5d8 Added faults integer to health packet
e1c34a1a Panda Jungle testing (#394)
2a093a39 Added heartbeat to echo test
22464356 Fixed health struct size. We should really get an automated test for this
f458d67a Add uptime counter to the health packet (#391)
16624811 enable CAN transcievers outside the set_safety_mode function, which is not related
a7c98744 bump panda ver
1192d934 Power saving refactor (#389)
d58d08fb Fix Misra 17.8: can't mod function params
bc685ac9 Minor indent
a54b86c4 Failure of set_safety_mode falls back to SILENT. Failure to set silent results in hanging
597436d3 NOOUTPUT safety mode is now SILENT. NOOUTPUT still exists but keeps C… (#388)
d229f8dc ESP forced off in EON build. this prevents ESP to be turned on when e… (#387)
8a044b34 forgot Hyundai: now also using make_msg
4f9c8796 remove abunch of lines from safety regression tests by using common make_msg function
fb814143 mispelled word
57f5ef8c Fix misra: addr can't be more than 29 bits anyway
68ff5012 typo
d5c772b0 Fixe Toyota message white-list
48197a92 Better masking for ELM mode
b8fe78c3 VW is also tested for safety replay
212d336b Safety Chrysler: Added cancel spam button check
d44b5621 fix print in example
02d579a5 functional addr handling
6249a183 tx_hook shall have a white-list of messages (#381)
8138fc14 uds: handle function addrs and fw version query example
6626a542 Fixed python health api
b9b79e8b uds zero second timeout
e0de1a4f define ALLOW_DEBUG in safety tests
86dec4b8 Safety modes that violate ISO26262 requirements are not compiled in RELEASE build
e74ed936 safety tests a bit more simplified
2027765b relay malfunction test centralized
8af1a01a clean up safety tests
e8f7a3b2 upd panda
cfcce8f0 WIP: Relay malfunction (#384)
69d9d610 No tabs in mazda safety
a86418c1 insignificant changes
f239b996 single addr was better
d063a188 Hyundai safety: re-enable button spam safety check
4d1edc06 skip tx_hook if a message is forwarded (#379)
df2ff045 bump version
168461d5 added fault state to health packet
b3e1a133 uds: better debug prints
68c39fb3 uds: no need for threads if you always drain rx
91b7c5bb bump Panda Ver
26cb4dc4 Fixed pylint error
32725cc3 Fixed misra compliance
e33b4bea Added echo script
312ba62d minor comment cleanupo
e90897a8 Fix board detection on white
0e72c183 always stop executing if safety mode fails to be set (suggested by jyoung8607)
e8d7ed1d Rename function name to not confuse safety_set_mode and set_safety_mode
ff86db65 improve uds message processing
512ab3f2 except Exception
37ce507a py3 all
bac4d854 dos and python3
501db8d1 uds drain before send and use has_obd()
f2cbec16 Added has_obd() to python library
48e5b182 Add SDK downloading to the build step (#314)
e0762c2e Add Python & USB API for controlling phone power (#313)
ba9fb69f New health packet struct also in the python libs

git-subtree-dir: panda
git-subtree-split: a648ccae4b3661ca6de7a4ac199cc44a41442b74
2019-12-13 13:02:46 -08:00
Vehicle Researcher e3b21173a5 Squashed 'cereal/' changes from 90e48c54..b8382bbb
b8382bbb steerLimitTimer should be car dependent
9a229687 add pa0 temp to ThermalData
f6f0f60e Add stock Fcw to carState
b608683f no l/r distinction for LDW
555f48d6 Add ldw alert
8e8b4a4a Remove plusFrame socket in favor of UiLayoutState
3410325c log stock AEB events
2219f2bd Add warning about not using cython version of sec_since_boot
8f1a5122 for legacy-testing reasons, better to define the used percent instead of avail
e86d9545 adding low memory event
ad238340 remove TODO
d0962b34 log mem available and cpu perc in thermald
3b753be9 Implement error handling and exceptions (#18)
a7d5bb76 add explicit dependencies on services.h
1ba64677 fix linter
c7d215b6 Added communityFeatureDisallowed event
492140a5 Added communityFeature bit detection to CarParams
266a5fed log Panda fault types
347a8661 Switch from polling on FIFOs to signal (#12)
e25bba77 no need to double build the objects
fe43a994 20Hz for radar time step is very standard
2aabf1ee Added radar time step to car params
e8ae9086 Generate capnp for java
57126a23 cereal_shared
da655cd3 Add uptime to health
f6a8e394 add test with multiple subscribers
84b3af53 comment out the debugging
4b9c942a added power save state to health packet
66be3708 run python unittest in ci
52c6db87 Run scons in CI (#14)
9414615b do need it, but only for arm
2856c37c remove gnustl_shared
7f05ee64 fix apks
e3a6bded Revert "no more makefiles"
487fbd06 don't rely on BASEDIR, and add zmq library
223e37a5 no more makefiles
da2ed115 don't link the wrong one
fe9fe2a2 scons builds the python lib now
2f81135e err, it can't build services.h
57b03f8b now we shouldn't need that yaml crap everywhere
f8e53277 bridge builds with services.h
2b0cb608 noOutput safety mode is now called silent
83880d51 add msgq tests
bcad1848 msgq: dont block when fifo does not exists
b4b26782 Default to zmq
473e2912 fix compilation in docker
30aaaddc msgq: try again when no timeout on poll but also no message
c4f2ad53 msgq: make sure read_fifos is initalized so we dont close random fds
4e513a85 msgq: dont clean up uninitialized sockerts
c008b630 also remove the fifo from disk
ef64eb27 MSGQ stability improvements when opening and closing lots of queues
e147abcc Revert "Revert "deprecate irpwr""
932dc32e Revert "deprecate irpwr"
a6844150 disengage
ec27e18c capnpc also generated the header files
ee52ab9e deprecate irpwr
301c74c8 Merge branch 'master' of github.com:commaai/cereal
6da7d55a add front frame
a5944eb4 add conflate parameter for SubSocket::create
ca8df170 Add fault status to health
ef4ded06 add conflate support in SubSocket constructor
7fd314af update scons build file
93d814e4 add saturated flags to indi and lqr logs
50302fee add steeringRateLimited to car.capnp
05e3513d add msgq readme
a6759a95 faster make
94b73778 Add struct to log FW version
64ce0b5f add scons build
dc9ad18a add debug print statement on SIGINT
4a612698 Merge pull request #10 from commaai/msgq
4873449a use recv one or none after poll
a054864b default to msgq
fbc4a4cf oops bad number
5067cf4c add meta
cbd02865 fix export prefix and make shared library world readable
c2730541 add c exports for jni usage
e77f41ef zmq already sets the errno correctly
3196cf69 Fix service list path in bridge
d35515a2 add all msgq files, but dont use as default
a68a38fa Don't delete context from python side only
bd46c225 Revert "zmq_ctx_term is blocking"
a1fc26b8 zmq_ctx_term is blocking
09021820 remote address support
21a35361 only delete subsocket when created by same object
34df7351 remove extra underscore from __dealloc__
c8748f86 fix internal refs
79b2fbf7 fixups
23ad2563 import messaging and services

git-subtree-dir: cereal
git-subtree-split: b8382bbb2b8156f2f1d7e1c1b42b46c54d85761f
2019-12-13 13:02:45 -08:00
Vehicle Researcher 391eb0b74b Merge cereal subtree 2019-12-13 13:02:45 -08:00
rbiasini 7be62e781d Update README.md and SAFETY.md (#907)
* Update README.md and SAFETY.md
2019-12-10 19:36:06 -08:00
dragonpilot 800a4a137c Merge branch 'devel-unsupported-cars' into devel-en 2019-12-10 16:26:15 +10:00
dragonpilot d170a9a78a remove duplicated fp 2019-12-10 16:25:36 +10:00
dragonpilot c9bb9a9929 Merge branch 'devel-unsupported-cars' into devel-en 2019-12-10 16:24:46 +10:00
dragonpilot 3e8f177745 add 2 more fingerprints from shell 2019-12-10 16:24:21 +10:00
dragonpilot fc88fa63c2 Merge branch 'devel-unsupported-cars' into devel-en 2019-12-10 16:12:25 +10:00
dragonpilot d8e166f7d9 add 17' Civic Hatchback LX fingerprint from CFranHonda 2019-12-10 16:12:05 +10:00
dragonpilot 78b7dc0606 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-12-10 16:08:43 +10:00
dragonpilot 53f369d68c Merge branch 'devel-en' into devel-zht 2019-12-10 11:41:51 +10:00
dragonpilot 9bfb70bf0c add waze mode 2019-12-10 11:24:49 +10:00
Arne Schwarck 02c4ade948 Battery protection (#888)
* Battery protection

If your car battery voltage is lower than 0% switch off charging to stop the Eon from damaging the 12v car battery. Leaving you with a car that can not start but has a fully charged eon ;-)

* add rbiasini comment && !ignition

* Update Offroad_ChargeDisabled with voltage low

* simplify alert

* non-temporal hysteresis from @rbiasini

And up the start charge limit to 12v. i.e. 50% car battery voltage

* once battery power recovers to 11.500 volts charge

This leaves 1v inbetween for any fluctuations that could occur.

* fix indent

* Fix indent of whole block

It looks like sometimes when you copy and paste into the github web interface some white spacing gets added or removed. BE AWARE!
2019-12-04 11:46:39 -08:00
dragonpilot e70b8e80ba add china 2019 corolla 2019-11-28 14:38:12 +10:00
dragonpilot 10aa84a2a4 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-11-28 14:37:24 +10:00
dragonpilot 65adf79be6 add ability to disable steering ratio learner 2019-11-27 10:09:41 +10:00
Shane Smiskol 84ef9d50b7 Fix typo (#891) 2019-11-25 21:40:51 -08:00
dragonpilot c79b166009 Merge branch 'devel-en' into devel-zht 2019-11-21 09:23:19 +10:00
dragonpilot 574518f163 update APK, allow use of lead car moving alert without enable OP 2019-11-21 09:21:58 +10:00
dragonpilot 8d2c063345 Merge branch 'devel-en' into devel-zht 2019-11-19 16:04:18 +10:00
dragonpilot ea93808331 update APK 2019-11-19 16:03:42 +10:00
dragonpilot 34ddbd59ba Merge branch 'devel-en' into devel-zht 2019-11-19 10:12:38 +10:00
dragonpilot b06266f922 update APK 2019-11-19 10:10:00 +10:00
dragonpilot 16bcfbd359 Merge branch 'devel-en' into devel-zht 2019-11-18 08:02:34 +10:00
dragonpilot 33d7a6d045 update APK 2019-11-18 08:02:07 +10:00
dragonpilot 266fa89ade bug fix 2019-11-15 18:28:59 +10:00
dragonpilot f52ea2b035 bug fix 2019-11-15 18:28:24 +10:00
dragonpilot 8ff951e64c Merge branch 'devel-en' into devel-zht 2019-11-15 16:17:44 +10:00
dragonpilot f04279a147 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-11-15 09:25:54 +10:00
dragonpilot 4b28d659bb Merge branch 'devel-en' into devel-zht 2019-11-15 09:11:54 +10:00
dragonpilot 5db0c82411 update batt ctrl logic, update APK 2019-11-15 09:10:53 +10:00
Willem Melching 812f93a5a5 Update driving model (#880) 2019-11-14 13:51:35 -08:00
dragonpilot 115e5c346d Merge branch 'devel-en' into devel-zht 2019-11-13 13:19:26 +10:00
dragonpilot eac595fc85 update APK 2019-11-13 13:13:07 +10:00
dragonpilot 5bf6471944 only check hw type once in thermald automatically 2019-11-13 11:35:10 +10:00
Jason Young 1e1065874b Fixes for various merge and refactoring fallout, typo fixes. (#878)
* Fixes for various merge and refactoring fallout, typo fixes.

* Tab->Spaces
2019-11-12 17:19:34 -08:00
dragonpilot f76785b521 more translations 2019-11-12 13:34:02 +10:00
dragonpilot 00e065dc49 Merge branch 'devel-en' into devel-zht 2019-11-12 12:40:31 +10:00
dragonpilot ed03d69604 add dragon_is_eon param 2019-11-12 11:00:19 +10:00
dragonpilot 4ce1507068 Merge branch 'devel-en' into devel-zht 2019-11-11 10:49:01 +10:00
dragonpilot a334a1353d Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-11-11 10:48:03 +10:00
dragonpilot 68670e0c48 update APKs, add lead car detected alert 2019-11-11 10:16:43 +10:00
Alex Wang d4eb5a6eaf Add fingerprint (#875) 2019-11-08 23:34:19 -08:00
Willem Melching 3f4695de53 Make DBC preprocessing deterministic 2019-11-08 17:26:48 -08:00
Willem Melching d20896ced5 Make visiond compile on pc (#874) 2019-11-08 12:49:30 -08:00
dragonpilot c4ccb435c6 Merge branch 'devel-en' into devel-zht 2019-11-08 13:11:09 +10:00
dragonpilot f4e9e339f2 fix GSH issue 2019-11-08 13:10:44 +10:00
Willem Melching a649732568 Fix unicode bug in DoUninstall reading 2019-11-07 13:53:42 -08:00
Willem Melching 3c6d8846ac Fix fan control when not plugged into panda 2019-11-07 11:28:35 -08:00
dragonpilot cb72090236 Merge branch 'devel-en' into devel-zht 2019-11-07 14:21:15 +10:00
dragonpilot c7e52af67d update APK 2019-11-07 11:53:09 +10:00
dragonpilot 26d6163bb0 Merge branch 'devel-en' into devel-zht 2019-11-07 11:43:04 +10:00
dragonpilot c293bc4a36 update APK 2019-11-07 11:42:17 +10:00
dragonpilot 0edc838459 Merge branch 'devel-en' into devel-zht 2019-11-06 16:45:16 +10:00
dragonpilot c375fcc8c6 Add mock radar for Bosch https://github.com/kegman/openpilot/commit/53c945c5cd6716e3953a9baae1431c9a8d984e83 2019-11-06 16:44:43 +10:00
dragonpilot 57bb12e61e Merge branch 'devel-en' into devel-zht 2019-11-06 16:34:42 +10:00
dragonpilot b2e5aac1f3 fix appd/dashcamd error due to changes in messaging 2019-11-06 16:34:14 +10:00
dragonpilot af25dcccfd Merge branch 'devel-en' into devel-zht 2019-11-06 15:22:12 +10:00
dragonpilot cb3af07e47 disable update prompt 2019-11-06 15:21:46 +10:00
dragonpilot 9add4a7217 disable force update 2019-11-06 15:20:57 +10:00
dragonpilot 2742fab6aa Merge branch 'devel-en' into devel-zht 2019-11-06 14:58:13 +10:00
dragonpilot e14c6757d8 add tw.com.ainvest.outpack to android_packages 2019-11-06 14:57:47 +10:00
dragonpilot 0be06a3fec Merge branch 'devel-en' into devel-zht 2019-11-06 14:52:03 +10:00
dragonpilot 667f4abccb delete signed firmware 2019-11-06 14:50:53 +10:00
dragonpilot b0fcfe4069 update APK 2019-11-06 12:25:39 +10:00
dragonpilot 4576e32f43 Merge branch 'devel-unsupported-cars' into devel-en 2019-11-06 12:15:05 +10:00
dragonpilot 599458f768 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-11-06 12:00:30 +10:00
dragonpilot 2069ee8ee6 fix GSH issue, ISH use better steer angle sensor 2019-11-06 11:57:08 +10:00
dragonpilot f9b8ee8cfa Merge branch 'devel-en' into devel-zht 2019-11-05 14:42:00 +10:00
dragonpilot 9062391a9c Merge branch 'devel-unsupported-cars' into devel-en 2019-11-05 13:44:57 +10:00
Riccardo 29642139f0 Decrease build time for dbc files 2019-11-04 19:23:02 -08:00
dragonpilot 6f7bf752cd add 2017 Lexus GS450H 2019-11-05 12:08:24 +10:00
Vehicle Researcher d7f0b402a8 openpilot v0.6.6 release 2019-11-04 15:13:52 -08:00
dragonpilot 2cc099bcec Merge branch 'devel-en' into devel-zht 2019-11-04 16:44:24 +10:00
dragonpilot 450e6001a7 add aegis speed camera app 2019-11-04 16:43:40 +10:00
dragonpilot 113a6fbfdf Merge branch 'devel-en' into devel-zht 2019-11-01 13:39:31 +10:00
dragonpilot 92c4111bdd update APK 2019-11-01 13:39:11 +10:00
dragonpilot 79733afb64 Merge branch 'devel-en' into devel-zht 2019-11-01 13:36:34 +10:00
dragonpilot 2c11113671 remove miui fonts to reduce package size 2019-11-01 13:34:28 +10:00
dragonpilot c4fe51dc57 Merge branch 'devel-en' into devel-zht 2019-11-01 11:12:13 +10:00
dragonpilot 5e341385cb update offroad to multilangual version 2019-11-01 11:10:54 +10:00
Vehicle Researcher 67c4121f62 Squashed 'opendbc/' changes from f3b573559..c0eba096b
c0eba096b remove obsolete Subaru dbc file
f7bce9ee0 Fixes to vw dbc
adb672657 Added VW comment about ignition bit
c51631617 Fixes and new message for VW MQB, fix for Accord Touring (#193)
a09bf725e fixed to luxgen dbc file
f00f6289a Create luxgen_s5_2014.dbc (#101)
024612b20 Fix steer angle factor for toyota
7311ee70e Lexus is adjustment (#192)
f04ce577e Updates for Volkswagen support (#191)

git-subtree-dir: opendbc
git-subtree-split: c0eba096bc74033ea54abfd56406b5af3108727c
2019-10-31 17:02:32 -07:00
Vehicle Researcher b4f4b92ecf Merge opendbc subtree 2019-10-31 17:02:32 -07:00
Vehicle Researcher 22023ebd58 Squashed 'panda/' changes from 30c7ca8a5..256d274e7
256d274e7 Fix Mac installation instruction per: https://github.com/commaai/panda/pull/308/files
bfd8ff1b1 Update cppcheck commit with more coverage
b143a1cf9 Fixed Misra complaint
606f1d913 Fixed RTC on non-uno boards, second try. Cannot work when there is no xtal.
933c75770 Fix RTC on non-uno boards (#311)
48d0d0c78 VW button spam: fix safety and add tests (#306)
6cccf969a Fan and IR at 0 when in power savings mode (#309)
05373282a board get_sdk scripts were left on python2
de18a7ef1 bump version after uno merge
1965817d3 Changed default values for testing
a12a148d5 Uno (#274)
7d29dc5a2 bump panda version. We really need a better way
40075321d VW: stricter limits to comply with comma safety policy
e2e2be92c add safety mode to health packet
101238c7f turned on VW ignition based CAN logic
a0d8d5dae fix misra 5.3: check_ignition is intended as check_started and can't be used twice
ea636de61 made check_ignition function to both look at ignition_line and ignition_can
1102e6965 make ignition logic common for all cars (#303)
3a110c6f6 bump version after CMSIS core upgrade
55dfa5230 Update core to CMSIS 5.6 release  (#251)
ee864907c fix linter 2
f410b110d fix linter
55957d6e4 proper python3 exception inheritance
6ba0f47b5 fix linter errors
5c49fe050 Merge pull request #145 from gregjhogan/uds
0f361999b timeout is float
396d6aad5 safety_replay only installs few extra requirements
25af7d301 Misra also need python 3 env
7434c5ce2 centralize requirements for tests
a0c37c70a coverage not needed in linter reqs
fce38a91d Linter python (#299)
62e2f5caa update cppcheck commit
711810d2f more uds debug
4454e3a6b better CAN comm abstraction
6b1f28f57 fix more encoding and some bytes cleanup (#300)
43adad311 fix WARNING_INDICATOR_REQUESTED name
9c857da37 0x
b64d6fa5d typing
768fdf7e1 bytes() > chr().encode()
1be15ea93 custom errors from thread
68da8315f more python3
eb358e81c uds lib example
4f288586d updates for python3
932745f62 support tx flow control for chunked messages
b1c371292 add timeout param
cdf2f626b bug fixes
b1a319577 fix rx message filtering bug
80fb6a6fa convert uds lib to class
59cd2b47f handle separation time in microseconds
4429600d8 fix separation time parsing
c641e66f7 fix typo
48b8dcc6f fix flow control delay scale
78f413d88 flow control delay
33a5167d9 bug fixes
8ee89a091 multi-frame tx
5e89a9c72 clear rx buffer and numeric error ids
966230063 fix remaining size calculation
01ef1fae3 zero pad messages before sending
1ddc9735d uds can communication
dca176e71 syntax errors
95be4811e SERVICE_TYPE enum
98e73b51d more UDS message type implementation
c1c5b0356 uds lib
162f4853d fix chr to bytes conversions (#298)
4972376de Update VW regression test to follow Comma safety index refactoring (#296)
f9053f5df more Python 3 fixes, attempting to fix jenkins wifi regresison test (#295)
2f9e07628 Panda safety code for Volkswagen, Audi, SEAT, and Škoda (#293)

git-subtree-dir: panda
git-subtree-split: 256d274e760ce00d4e5ff5e0d9b86d0fb5924568
2019-10-31 17:02:31 -07:00
Vehicle Researcher 97a289e6a9 Merge panda subtree 2019-10-31 17:02:31 -07:00
Vehicle Researcher 047924cb35 Squashed 'cereal/' changes from 3d90c7877..90e48c549
90e48c549 add ir pwr field
101facee1 added safety model to health packet
fe09e4c07 distinguish between ignition_line and ignition_can

git-subtree-dir: cereal
git-subtree-split: 90e48c549c505383a7242cfddd32984cd5c268b8
2019-10-31 17:02:27 -07:00
Vehicle Researcher 38e7d54d5d Merge cereal subtree 2019-10-31 17:02:27 -07:00
dragonpilot 53b466b496 Merge branch 'devel-en' into devel-zht 2019-10-31 11:25:46 +10:00
dragonpilot 4adf4d138e Merge branch 'devel-unsupported-cars' into devel-en 2019-10-31 11:24:09 +10:00
dragonpilot 995af1de45 fix merge conflict 2019-10-31 11:23:50 +10:00
dragonpilot 399cdf4e4a Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-31 11:22:02 +10:00
Riccardo fe0ed57f45 Update README with now supported Subaru Harness 2019-10-30 15:15:05 -07:00
Ted Slesinski affe1c3d2c Adds 2019 Lexus ES (non hybrid) (#866)
* Adds 2019 Lexus ES (non hybrid)

* Updated test route
2019-10-30 10:38:10 -07:00
dragonpilot 22c1f205e1 Merge branch 'devel-en' into devel-zht 2019-10-30 11:56:35 +10:00
dragonpilot 8a816ea8e1 update carcontroller.py for honda 2019-10-30 11:56:17 +10:00
dragonpilot f14a1b4793 update carcontroller.py for honda 2019-10-30 10:59:44 +10:00
dragonpilot cb7fd242f7 Merge branch 'devel-en' into devel-zht 2019-10-30 10:37:56 +10:00
dragonpilot b2c0070a7b update safety_honda 2019-10-30 10:37:32 +10:00
dragonpilot 4861cc2987 Merge branch 'devel-en' into devel-zht 2019-10-30 09:32:16 +10:00
dragonpilot a2d6b0241f fix allow_gas for honda and slightly adjust lead car moving alert value 2019-10-30 09:31:51 +10:00
xBJx 98d2907a35 Added fingerprint from Sienna XLE AWD (#848)
* Added fingerprint from Sienna XLE AWD

* Update driver_monitor.py

* Update driver_monitor.py

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

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

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

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

git-subtree-dir: cereal
git-subtree-split: 3d90c7877f9ef9269735b074c0cb23f5eb6d2b47
2019-10-09 18:31:55 +00:00
Vehicle Researcher d17745fb5e Merge cereal subtree 2019-10-09 18:31:55 +00:00
dragonpilot 02eafeafeb Merge branch 'devel-en' into devel-zht 2019-10-09 14:46:52 +10:00
dragonpilot 3a006aa99e Merge branch 'devel-unsupported-cars' into devel-en 2019-10-09 14:46:13 +10:00
dragonpilot e8084fd9dd Revert "Move Max's FP to TSS RAV4H instead of TSS2 variant"
This reverts commit 236a05f2ad.
2019-10-09 14:45:13 +10:00
dragonpilot e5281a98fa Add warning when LatCtrl is off 2019-10-09 14:43:24 +10:00
dragonpilot 722aea251a Merge branch 'devel-en' into devel-zht 2019-10-08 14:44:05 +10:00
dragonpilot 99fdd691a3 Add branch switch tool 2019-10-08 14:43:12 +10:00
dragonpilot b5e026e44b Update APK 2019-10-08 11:27:10 +10:00
dragonpilot c6c10d67ae Merge branch 'devel-en' into devel-zht 2019-10-08 11:27:03 +10:00
dragonpilot 037727cd62 Update APK 2019-10-08 10:49:49 +10:00
dragonpilot d22759f0c8 Merge branch 'devel-en' into devel-zht 2019-10-08 10:26:18 +10:00
dragonpilot 22b5eb0e06 Merge branch 'devel-unsupported-cars' into devel-en 2019-10-08 10:25:37 +10:00
dragonpilot 236a05f2ad Move Max's FP to TSS RAV4H instead of TSS2 variant 2019-10-08 10:25:11 +10:00
dragonpilot 8ef944eceb Merge branch 'devel-unsupported-cars' of https://github.com/dragonpilot-community/dragonpilot into devel-unsupported-cars 2019-10-08 10:24:08 +10:00
dragonpilot 01e62f49dc Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-08 10:23:31 +10:00
dragonpilot 632ee00a94 Merge branch 'devel-en' into devel-zht 2019-10-07 21:12:50 +10:00
dragonpilot 5c4701d035 Remove checks = [] from devel-unsupported-cars branch 2019-10-07 21:11:20 +10:00
dragonpilot 38ce7dae51 Merge branch 'devel-unsupported-cars' into devel-en 2019-10-07 21:10:21 +10:00
dragonpilot 7d8ba56cda Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-07 21:09:11 +10:00
dragonpilot 9c7e8aa391 move new rav4h fp to tss2 2019-10-07 21:06:11 +10:00
dragonpilot ca1903a3c0 Add Taiwan RAV4H FP 2019-10-06 21:44:50 +10:00
dragonpilot d20b63c909 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-10-06 20:16:21 +10:00
dragonpilot ef4b2d32d2 Remove zorrobyte's curvature learner, it decreases turning ability 2019-10-06 20:15:21 +10:00
Chris Souers 1bc51d6b47 Add 2018 Civic Hatchback 1.0l CVT (European) support (#823)
* Add 2018 Civic Hatchback 1.0l CVT support

test_fingerprints returns fine
2019-10-03 14:18:30 -07:00
dragonpilot d86555d52f Merge branch 'devel-en' into devel-zht 2019-10-01 12:18:46 +10:00
dragonpilot f875296a4a Merge branch 'devel-unsupported-cars' into devel-en 2019-10-01 12:16:40 +10:00
dragonpilot fbb5860e9f Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-01 12:16:20 +10:00
dragonpilot 2074e530e0 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-10-01 12:15:16 +10:00
illumiN8i 6edc36181a Add 2020 Corolla XSE AFS option (#821)
Frank McTank on Discord has XSE with Connectivity Package with Adaptive Front Lighting System option
2019-09-30 13:39:27 -07:00
Kishan Karunaratne a0b41e6cf9 Update thermald to set ignition_seen back to False if Panda disconnected (#820) 2019-09-30 13:06:38 -07:00
dragonpilot 7a04ebe2da Merge branch 'devel-en' into devel-zht 2019-09-30 12:47:37 +10:00
dragonpilot d1923f7dc6 Fix missing curvature_factor val 2019-09-30 12:47:25 +10:00
dragonpilot f8677eb260 Merge branch 'devel-en' into devel-zht 2019-09-30 11:45:02 +10:00
dragonpilot 03589f71e5 re-activate curvature learner and upgrade it to v4 2019-09-30 11:44:20 +10:00
dragonpilot b47ca2543e ISH to use better steer angle sensor 2019-09-30 11:42:06 +10:00
dragonpilot d4ae6d93d6 Merge branch 'devel-en' into devel-zht 2019-09-28 16:37:04 +10:00
dragonpilot 5a8bff7f56 Disable curvature learner 2019-09-28 16:36:39 +10:00
dragonpilot 701bdf0b4a ISH to use better angle sensor 2019-09-28 16:35:04 +10:00
dragonpilot 43814ab9aa Merge branch 'devel-en' into devel-zht 2019-09-27 15:12:08 +10:00
dragonpilot c1c40321b6 Add zorrobyte's curvature learner 2019-09-27 15:11:29 +10:00
dragonpilot f165fed722 Add ability to toggle driver monitoring 2019-09-27 15:03:22 +10:00
dragonpilot 145319bcd3 disable cut steering for 2s after fault 2019-09-27 14:46:12 +10:00
dragonpilot c7b9d28232 Make steering wheel transparent 2019-09-27 14:32:35 +10:00
dragonpilot 0568abd542 Merge branch 'devel-en' into devel-zht 2019-09-26 16:59:50 +10:00
dragonpilot 2e73e55e97 Better way to fix loggerd crash issue 2019-09-26 16:59:09 +10:00
dragonpilot ce67df2e3c Merge branch 'devel-en' into devel-zht 2019-09-26 16:51:15 +10:00
dragonpilot 2e0dc8cdc0 fix boot issue if DragonEnableLogger is disabled 2019-09-26 16:50:41 +10:00
dragonpilot de8cabf0f0 Update APK 2019-09-25 10:54:34 +10:00
dragonpilot a18b37863c Update APK 2019-09-25 10:43:36 +10:00
dragonpilot 18a4819add Merge branch 'devel-en' into devel-zht 2019-09-25 10:43:22 +10:00
dragonpilot 26b063f60f Update APK 2019-09-25 10:29:33 +10:00
dragonpilot 0ebdd0731f Add blinker ui/param 2019-09-24 16:29:50 +10:00
dragonpilot 6573a67742 Make steering wheel transparent 2019-09-24 16:21:30 +10:00
dragonpilot 32adcf1591 Add params to turn on/off ui lead/path/lane 2019-09-24 14:56:14 +10:00
dragonpilot 7b7be6975a Reduce var checking to 5 secs 2019-09-23 14:52:57 +10:00
dragonpilot 51570f7ff8 Merge branch 'devel-en' into devel-zht 2019-09-23 14:44:47 +10:00
dragonpilot 377038642c Move ip mod back to it's old location 2019-09-23 14:44:16 +10:00
dragonpilot 986e4c6f79 Update APK 2019-09-23 14:22:38 +10:00
dragonpilot bfa05df92f Merge branch 'devel-en' into devel-zht 2019-09-23 14:22:31 +10:00
dragonpilot dc76fb165e Update APK 2019-09-23 14:12:02 +10:00
dragonpilot 7219bd535a update APK 2019-09-23 13:43:03 +10:00
dragonpilot 4168703dc5 Merge branch 'devel-en' into devel-zht 2019-09-23 13:42:45 +10:00
dragonpilot 951b5c695a Add toyota lane departure warning toggle 2019-09-23 13:34:31 +10:00
dragonpilot 01542c4a19 Fix charging ctrl logic 2019-09-23 13:23:40 +10:00
dragonpilot e487aaba64 Merge branch 'devel-en' into devel-zht 2019-09-23 12:39:08 +10:00
dragonpilot b88362d508 Merge branch 'devel-unsupported-cars' into devel-en 2019-09-23 12:36:16 +10:00
dragonpilot 2463873b14 Add Taiwan Prius 4.5 FP, by Lin Hsin Hung 2019-09-23 12:35:44 +10:00
dragonpilot 39d527fa5b Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-09-23 12:30:45 +10:00
dragonpilot 7bfdd09dc1 Fix battery ctrl logic 2019-09-23 12:29:51 +10:00
dragonpilot 3c1f1fb9a1 update APK 2019-09-20 15:55:46 +10:00
dragonpilot bdf0964615 Merge branch 'devel-en' into devel-zht 2019-09-20 15:55:30 +10:00
dragonpilot 8a392c7c2e Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-09-20 15:50:21 +10:00
dragonpilot da8706ec07 Add charging control 2019-09-20 15:49:58 +10:00
dragonpilot c60744f903 Merge branch 'devel-en' into devel-zht 2019-09-20 15:25:27 +10:00
dragonpilot 066d88e754 Create a new service to handle greypanda gps mode 2019-09-20 15:24:33 +10:00
dragonpilot 35bf4794b1 Revert "create a new service to handle greygps mode"
This reverts commit 70b7f21c8d.
2019-09-20 15:22:56 +10:00
dragonpilot 70b7f21c8d create a new service to handle greygps mode 2019-09-20 15:20:47 +10:00
illumiN8i 47e87baa60 2020 Toyota Prius Prime Limited (#813)
* 2020 Prius Prime Limited

Fingerprint for 2020 Prius Prime Limited from garglo. 86a0adcb192c9424

* Update README.md

2020 supported
2019-09-19 12:08:23 -07:00
dragonpilot 472f9ed7b8 Merge branch 'devel-en' into devel-zht 2019-09-19 16:40:23 +10:00
dragonpilot 36924194ad Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-09-19 16:39:35 +10:00
dragonpilot 99149ebfb1 Remove greypanda mode GPS signal adjustment 2019-09-19 16:39:23 +10:00
Willem Melching 5cfc0be5cb Add spinner source files (#812) 2019-09-17 12:47:30 -07:00
Riccardo 41d0a8957a Mistakenly removed Honda Fit support from README.md 2019-09-17 11:15:34 -07:00
dragonpilot 2fc7817831 Update APK 2019-09-17 16:23:48 +10:00
dragonpilot cb25bbd96a Merge branch 'devel-en' into devel-zht 2019-09-17 12:42:20 +10:00
dragonpilot 67d3494b30 Merge branch 'devel-unsupported-cars' into devel-en 2019-09-16 14:17:22 +10:00
dragonpilot 881178d542 Merge branch 'devel-unsupported-cars' of https://github.com/dragonpilot-community/dragonpilot into devel-unsupported-cars 2019-09-16 14:16:04 +10:00
dragonpilot 0042b3d64e Taiwan CT200h FP from CloudJ, CT200h port from thomaspich 2019-09-16 14:14:53 +10:00
dragonpilot cd87c50753 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-09-16 13:56:56 +10:00
dragonpilot 51c1801f22 Merge branch 'devel-en' into devel-zht 2019-09-14 18:21:00 +10:00
dragonpilot 35666b24f3 Fix incorrect light_stalk assignment 2019-09-14 18:16:45 +10:00
dragonpilot 259e6ecf49 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-09-14 18:15:41 +10:00
Willem Melching 58f376002e Revert dPoly computation to 0.6.3 behavior (#809)
* Revert dPoly computation to 0.6.3 behavior

* update test reference
2019-09-13 17:01:54 -07:00
dragonpilot ebf7f3bd8a Merge branch 'devel-en' into devel-zht 2019-09-13 23:14:14 +10:00
dragonpilot eb3cd1efc5 Fix ISH error 2019-09-13 22:31:20 +10:00
dragonpilot f4a979d316 Merge branch 'devel-en' into devel-zht 2019-09-13 16:34:33 +10:00
dragonpilot 284fe1f2b1 kernel call optimization 2019-09-13 16:34:18 +10:00
dragonpilot f65c9b478a Update APK 2019-09-13 15:48:03 +10:00
dragonpilot c5a7eeea99 TC tranlsation 2019-09-13 15:47:45 +10:00
dragonpilot 86d781f893 Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-09-13 15:44:23 +10:00
dragonpilot baf9ab37c2 Update APK 2019-09-13 15:04:24 +10:00
dragonpilot 82160eb2e4 update UI to adapt dragon_driving_ui switch 2019-09-13 14:50:11 +10:00
dragonpilot f4546ba8d4 Add missing init value 2019-09-13 13:02:10 +10:00
dragonpilot 2509a1e753 Add ability to display/hide speed in UI 2019-09-13 12:58:09 +10:00
dragonpilot 71886e2be6 Update APK 2019-09-13 12:50:48 +10:00
dragonpilot 10d3b8aa90 Still allow header to be displayed when dragon_driving_ui is disabled 2019-09-13 12:48:39 +10:00
dragonpilot 0441cf139c Update logic so if DragonSteeringMonitorTimer set to <= 0, it will disable steering monitor by increase the value to 86400 (a day) 2019-09-13 12:35:50 +10:00
dragonpilot 4eb316c291 Update APK 2019-09-13 12:34:39 +10:00
dragonpilot a75abd788b Add ability to disable steering limit alert 2019-09-13 11:51:58 +10:00
dragonpilot 436640c108 Update shutdownd logic - reported by loveloveses@wechat 2019-09-13 11:31:48 +10:00
dragonpilot 11d6583b62 clean up and fix a couple errors that stop honda cars running 2019-09-13 10:05:11 +10:00
dragonpilot a71307229f Fix ISH light_stalk message location 2019-09-13 09:15:23 +10:00
dragonpilot b318162e6a Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en 2019-09-12 23:02:02 +10:00
dragonpilot 3826cf23d2 Merge branch 'devel-unsupported-cars' into devel-en 2019-09-12 22:59:57 +10:00
dragonpilot 8a6dfb05ab Add back Shell's odyssey 2019-09-12 22:58:43 +10:00
Comma Device d3becbacdd ish confirmed working 2019-09-12 21:51:53 +10:00
dragonpilot 7700b6aa59 supercharge ish 2019-09-12 16:19:05 +10:00
dragonpilot 634ee8746a Merge branch 'devel-unsupported-cars' into devel-en 2019-09-12 16:14:32 +10:00
dragonpilot 8a2b649f22 Add ISH into interface.py 2019-09-12 16:13:56 +10:00
dragonpilot a5c9f571ce Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en 2019-09-12 15:54:16 +10:00
dragonpilot cd00c32dbc Fix up driver_monitor mod so change requires restart (less query to kernel) 2019-09-12 15:54:07 +10:00
dragonpilot f5113edc50 Fix up driver_monitor mod so change requires restart (less query to kernel) 2019-09-12 15:48:56 +10:00
dragonpilot a65f57fac5 Merge branch 'devel-unsupported-cars' into devel-en 2019-09-12 15:32:57 +10:00
dragonpilot 995cd1aa65 Keep ISH dbc for future reference 2019-09-12 15:32:34 +10:00
dragonpilot dd9e649296 Merge branch 'devel-unsupported-cars' into devel-en 2019-09-12 15:27:07 +10:00
dragonpilot 5e7cb5de3c Update 2017 Lexus IS300h port 2019-09-12 15:26:41 +10:00
dragonpilot afb5d372fd Fix up dragon_enable_driver_safety_check mod 2019-09-12 11:43:09 +10:00
dragonpilot ee28ef1ae4 Remove matched fingerprint logs 2019-09-11 16:20:37 +10:00
dragonpilot e7b2a98fe3 Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en 2019-09-11 16:14:19 +10:00
dragonpilot 6813559bbe Fix local variable "dragon_lat_control" error 2019-09-11 16:13:30 +10:00
dragonpilot 33926ee432 Fix local variable error 2019-09-11 16:12:55 +10:00
dragonpilot 04fd1f4e6c DP spinner 2019-09-11 12:21:34 +10:00
dragonpilot ebfd786af0 Add unsupported cars 2019-09-11 12:00:09 +10:00
dragonpilot 9c7ae433ec use put_nonblocking instead of params.put 2019-09-11 11:46:31 +10:00
dragonpilot 10cd4c0bd2 更新APK 2019-09-11 11:25:19 +10:00
dragonpilot 7e8618dc9d Merge branch 'devel-unsupported-cars' into devel-en 2019-09-11 11:17:03 +10:00
dragonpilot c68503d8a1 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars
# Conflicts:
#	opendbc/generator/toyota/lexus_is_hybrid_2017_pt.dbc
#	opendbc/lexus_is_hybrid_2017_pt_generated.dbc
#	selfdrive/car/toyota/carstate.py
#	selfdrive/car/toyota/interface.py
#	selfdrive/car/toyota/values.py
2019-09-11 11:16:41 +10:00
dragonpilot 14b0c9427d Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
#	cereal/car.capnp
#	opendbc/generator/toyota/lexus_is_hybrid_2017_pt.dbc
#	opendbc/lexus_is_hybrid_2017_pt_generated.dbc
#	panda/board/safety/safety_honda.h
#	selfdrive/car/car_helpers.py
#	selfdrive/car/honda/values.py
#	selfdrive/car/toyota/carstate.py
#	selfdrive/car/toyota/interface.py
#	selfdrive/car/toyota/values.py
#	selfdrive/controls/lib/driver_monitor.py
#	selfdrive/controls/lib/lane_planner.py
#	selfdrive/locationd/paramsd.cc
#	selfdrive/ui/ui.c
2019-09-11 11:08:35 +10:00
Willem Melching b0563a5968 Driver monitoring fix when face is visible briefly during nighttime (#806) 2019-09-10 17:35:40 -07:00
dragonpilot 44fc1767fd Add ability to disable driving UI 2019-09-11 10:33:52 +10:00
Vehicle Researcher 61229779e4 openpilot v0.6.4 release 2019-09-09 23:03:02 +00:00
Vehicle Researcher d2b3ed0ec7 Squashed 'opendbc/' changes from 18321a294..684e28a7a
684e28a7a honda bosch longitudinal (#185)
cf9e14f6f Fix torque signal and add new CAN msgs (#181)
f55a7efa8 Parking Assist Messages (#183)
bfe982e65 Add FCA11 & SCC14 (#184)
3bfb39a96 Fix Spelling (#180)
7bb1e3351 honda nidec AEB values
54d130e42 generated odyssey extreme
72dd1715f run generator
45a5bc277 merge lexus IS and SI hybrid
8817a75b2 use generator for honda odyssey extreme
d8c80d0e7 restore original toyota ref
0a97bc7f5 more honda bosch AEB signals
beeaecf79 bosch AEB signals
7d309ec59 Add Subaru global transmission msg with gear values (#168)
7a25a5a08 Add DBC for JDM Honda Fit Hybrid 2018 (#178)
a7e6c465a Updates and new signals (#177)

git-subtree-dir: opendbc
git-subtree-split: 684e28a7a8eccb27886bae16f45e59cc6f6e3553
2019-09-09 23:00:24 +00:00
Vehicle Researcher af4f9f1f31 Merge opendbc subtree 2019-09-09 23:00:24 +00:00
Vehicle Researcher 876256a268 Squashed 'panda/' changes from 8843af7de..9881e6118
9881e6118 Panda for Mazda (#165)
9a15d2f5b fix version newline
a8ed7d219 add subaru outback/legacy to subaru safety (#259)
bdeb1c953 mazda is #12
14ea4d2e0 merge safety gm in a single file
bf1ef875e Add GM passive safety mode (#266)
c131fffae fix canflash for pedal (#267)
3397b1527 only allow bootloader entry on debug builds
d68356b92 Honda Nidec: fwd stock AEB (#257)
6f532c6d5 Black panda Jenkins (#256)
d68508c79 Gpio race condition fix (#263)
d69d05fc0 Fixed pedal not initializing (#262)
36067e01c Honda safety: fixed incorrect brake decoding. Due to the specific limit of 255, this change does not affect the safety behavior

git-subtree-dir: panda
git-subtree-split: 9881e61184ad0417e9e080767f09585a9c777621
2019-09-09 23:00:23 +00:00
Vehicle Researcher 4dc51cfea6 Merge panda subtree 2019-09-09 23:00:23 +00:00
Vehicle Researcher f274a8e3b0 Merge cereal subtree 2019-09-09 23:00:20 +00:00
Vehicle Researcher df46400d6d Squashed 'cereal/' changes from bb94ed98a..ea14abe4b
ea14abe4b add gm passive safety model
78d3e3123 allow to specify a passive safety model in CarParams
8a4f891b6 Add lane change events
44ee5a949 Add lane change states to pathPlan
39e31397a Add dashcamOnly flag
32685f4b2 angleModelBias is deprecated
be719979c move desire to pathplan
82cd0ed1b add desire to controlsState
5b40840a6 add lqr output to LQRState
5a5b9ac28 addtimes

git-subtree-dir: cereal
git-subtree-split: ea14abe4bd57563b8a15419ec0bc1c1de711063f
2019-09-09 23:00:19 +00:00
dragonpilot 296daec59a Merge branch 'devel-en' into devel-zht 2019-09-09 14:25:38 +10:00
dragonpilot 97ed349d04 Fix GreyPandaMode logic 2019-09-09 14:25:07 +10:00
dragonpilot 9a1ceeb0e8 Merge branch 'devel-en' into devel-zht 2019-09-09 14:18:23 +10:00
dragonpilot 9affab1f27 Add DragonGreyPandaMode logic 2019-09-09 14:17:24 +10:00
dragonpilot 8934720785 更新APK 2019-09-09 13:07:46 +10:00
dragonpilot af1d476c50 Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.frame.apk
#	apk/ai.comma.plus.offroad.apk
2019-09-09 13:04:32 +10:00
dragonpilot b14f39b2c8 更新APK 2019-09-09 12:56:48 +10:00
dragonpilot 4b806911ad Merge branch 'devel-en' into devel-zht 2019-09-05 15:33:50 +10:00
dragonpilot 69780971aa 加入 GreyPandaMode 2019-09-05 15:33:12 +10:00
dragonpilot 2f49572d72 Merge branch 'devel-en' into devel-zht 2019-09-05 11:16:41 +10:00
dragonpilot 0105342caf Merge branch 'devel-unsupported-cars' into devel-en
# Conflicts:
#	selfdrive/car/honda/values.py
2019-09-05 11:16:11 +10:00
dragonpilot 8c442ec989 加入 Honda Accord Hybrid China 2019-09-05 11:15:07 +10:00
dragonpilot c29f96069e Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-09-05 11:12:00 +10:00
dragonpilot 781c392a22 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-09-05 11:11:39 +10:00
dragonpilot 23f142bcf0 加入 Honda Inspire Hybrid 2019-09-05 11:09:38 +10:00
heitikender da42760e55 Update values.py (#797)
changed Lexus ES DBC scheme to hybrid_tss2, since this is the correct one. Tested on car, works.
2019-09-04 13:38:52 -07:00
dragonpilot 4f0061d71c Merge branch 'devel-en' into devel-zht 2019-09-04 15:38:09 +10:00
dragonpilot fd86f04e82 打開 GPS 高精確度定位模式 2019-09-04 15:37:40 +10:00
dragonpilot 95aca22809 打開 GPS 高精確度定位模式 2019-09-04 15:37:03 +10:00
dragonpilot f5a9a08863 Merge branch 'devel-en' into devel-zht 2019-09-04 14:40:52 +10:00
dragonpilot df85e66a6d Merge branch 'devel-unsupported-cars' into devel-en 2019-09-04 14:40:13 +10:00
dragonpilot 49eec4cab3 加入 2019 Taiwan Altis Hybrid (需確認) 2019-09-04 14:39:52 +10:00
dragonpilot f2648fd12f Merge branch 'devel-unsupported-cars' into devel-en 2019-09-04 14:28:51 +10:00
dragonpilot d50811859a use PR values 2019-09-04 14:28:14 +10:00
dragonpilot c1f03ce883 restore files deleted accidentally 2019-09-04 14:26:39 +10:00
dragonpilot 7ce952e165 Merge branch 'devel-lexus-ish-ave30r' of https://github.com/efinilan/openpilot into devel-unsupported-cars
# Conflicts:
#	selfdrive/car/toyota/values.py
2019-09-04 14:22:11 +10:00
dragonpilot d1e95be073 Merge branch 'devel-unsupported-cars' into devel-en 2019-09-04 14:17:59 +10:00
dragonpilot 04a7dd2633 加入台灣 2019 Altis 指紋 2019-09-04 14:16:56 +10:00
dragonpilot 6168ce1ef9 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-09-04 14:09:33 +10:00
dragonpilot 466dce4090 Merge branch 'devel-en' into devel-zht 2019-09-04 12:26:16 +10:00
dragonpilot 836a836f0d Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-09-04 12:23:21 +10:00
dragonpilot 227578ef15 Merge branch 'devel-en' into devel-zht 2019-09-02 15:35:30 +10:00
dragonpilot 50d5e988e8 increase sensor_data_age and posenet_invalid_count in paramsd.cc to reduce errors (perhaps caused by additional loads?) 2019-09-02 15:35:01 +10:00
dragonpilot 29d10aed97 Merge branch 'devel-en' into devel-zht 2019-09-02 14:46:19 +10:00
dragonpilot f5a7e06770 修正 logic 2019-09-02 14:45:25 +10:00
dragonpilot c2d2780772 Merge branch 'devel-en' into devel-zht 2019-09-02 13:24:50 +10:00
dragonpilot f6322f0262 加入延遲開啟/關閉 APP 2019-09-02 13:24:07 +10:00
dragonpilot 6045192107 更新APK 2019-09-02 12:02:45 +10:00
dragonpilot b617372907 更新APK 2019-09-02 11:53:05 +10:00
dragonpilot 67a595e321 Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.frame.apk
2019-09-02 11:52:01 +10:00
dragonpilot 91be9e9fa9 顯示WIFI IP 位置 2019-09-02 11:47:57 +10:00
dragonpilot e1509808ac Merge branch 'devel-en' into devel-zht 2019-08-30 17:20:20 +10:00
dragonpilot 49c488a79e 優化 2019-08-30 17:20:07 +10:00
dragonpilot c21334cb95 更新APK 2019-08-30 15:33:02 +10:00
dragonpilot 2dc8bd5655 Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-08-30 15:25:20 +10:00
dragonpilot 34b85671d1 Revert "加入電池充電保護"
This reverts commit 4151d152
2019-08-30 15:17:45 +10:00
dragonpilot be5366787b Revert "更新APK"
This reverts commit 80a88170
2019-08-30 15:17:34 +10:00
dragonpilot 4ac4dd57e9 Revert "修正"
This reverts commit 80e24f20
2019-08-30 15:17:27 +10:00
dragonpilot 3b66e6a9c4 Revert "update logic"
This reverts commit d45a88d5
2019-08-30 15:17:17 +10:00
dragonpilot cfe34284a4 Merge branch 'devel-en' into devel-zht 2019-08-30 14:14:32 +10:00
dragonpilot d45a88d5cd update logic 2019-08-30 14:13:52 +10:00
dragonpilot eebf70fd59 Merge branch 'devel-en' into devel-zht 2019-08-30 13:57:18 +10:00
dragonpilot 80e24f2051 修正 2019-08-30 13:56:36 +10:00
dragonpilot be2bf61420 更新APK 2019-08-30 13:48:05 +10:00
dragonpilot d7a5fb0c65 Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-08-30 13:41:48 +10:00
dragonpilot 80a8817048 更新APK 2019-08-30 13:35:34 +10:00
dragonpilot 4151d1526e 加入電池充電保護 2019-08-30 13:24:07 +10:00
dragonpilot 55dad14711 更新APK 2019-08-30 12:44:26 +10:00
dragonpilot 6f47f3c4d6 Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-08-30 12:06:50 +10:00
dragonpilot 0de789a7cb 更新APK 2019-08-30 12:01:17 +10:00
dragonpilot 38ab273163 優化服務 2019-08-30 12:00:36 +10:00
Ted Slesinski f6531a9d08 Update README.md (#795)
Honda Fit can be removed from community-maintained branches now.
2019-08-28 12:51:31 -07:00
dragonpilot 0f571e8a4e 更新APK 2019-08-28 16:19:35 +10:00
dragonpilot 234ddbebaf 更新APK 2019-08-28 16:15:37 +10:00
dragonpilot 6f6c96735a Merge branch 'devel-en' into devel-zht 2019-08-28 16:08:36 +10:00
dragonpilot 9567d75d1c 修正錯誤 2019-08-28 16:08:21 +10:00
dragonpilot 691bb95a77 Merge branch 'devel-en' into devel-zht 2019-08-28 16:05:04 +10:00
dragonpilot bb182edec0 修正錯誤 2019-08-28 16:04:49 +10:00
dragonpilot ac45050c4a Merge branch 'devel-en' into devel-zht 2019-08-28 11:24:21 +10:00
dragonpilot 6d76ef3ef0 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-08-28 11:15:42 +10:00
dragonpilot 4365be9056 Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en
# Conflicts:
#	selfdrive/ui/ui.c
2019-08-28 11:15:33 +10:00
dragonpilot fd731f1f27 Merge branch 'devel-en' into devel-zht 2019-08-28 11:11:08 +10:00
dragonpilot b5c5e04d4b 修改音量調整 logic 2019-08-28 11:10:47 +10:00
dragonpilot f61add3913 修改音量調整 logic 2019-08-28 09:50:16 +10:00
Ted Slesinski c73464f67f Adds 2018 Honda Fit support (#266)
* Fit rebased on latest devel

* Added new objects for fit to values.py

* Update readme

* Updated formatting of fingerprint to match others

* Update cargo variable

Co-Authored-By: Pramuditha Aravinda <pramudithaa@zone24x7.com>

* Added tire stiffness, renamed PID kp/ki variables

Co-Authored-By: Pramuditha Aravinda <pramudithaa@zone24x7.com>

* Renamed longitudinal KpBP

Co-Authored-By: Pramuditha Aravinda <pramudithaa@zone24x7.com>

* Renamed longitudinal kpV

Co-Authored-By: Pramuditha Aravinda <pramudithaa@zone24x7.com>

* Renamed longitudinal KiBP variable

Co-Authored-By: Pramuditha Aravinda <pramudithaa@zone24x7.com>

* Renamed longitudinal KiV

Co-Authored-By: Pramuditha Aravinda <pramudithaa@zone24x7.com>

* Set more realistic value for tire stiffness

* CR-V Hybrid doc duplicate
2019-08-27 15:19:25 -07:00
dragonpilot 8af6ddcd8b Merge branch 'devel-en' into devel-zht 2019-08-27 17:25:05 +10:00
dragonpilot 9050903cee 修正錯誤 2019-08-27 17:24:48 +10:00
dragonpilot a5e2f3cc22 Merge branch 'devel-en' into devel-zht 2019-08-27 17:22:03 +10:00
dragonpilot 85bc608675 修正錯誤 2019-08-27 17:21:45 +10:00
dragonpilot fa8e44d0b2 更新APK 2019-08-27 17:18:53 +10:00
dragonpilot 651f994d6a Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-08-27 17:17:12 +10:00
dragonpilot 2ccdc68ca9 加入可調警示音量 2019-08-27 17:13:12 +10:00
dragonpilot 9c8a03ecfb 更新APK 2019-08-27 13:44:50 +10:00
dragonpilot 66cac800cb Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-08-27 13:00:20 +10:00
dragonpilot 24ca97d828 自動關機改為可調時長 2019-08-27 11:49:00 +10:00
Rick Lan 751aa5cf7e Adjust SafetyParam to 100 as it can do 130 2019-08-26 13:47:02 +10:00
Rick Lan e05df8f0fc Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r
# Conflicts:
#	selfdrive/car/toyota/carstate.py
#	selfdrive/car/toyota/interface.py
#	selfdrive/car/toyota/values.py
2019-08-26 13:42:00 +10:00
dragonpilot 5c059504ed Revert "Add support to 2017 Lexus is300h (AVE30R)"
This reverts commit c187ea59
2019-08-26 13:34:46 +10:00
dragonpilot c187ea5986 Add support to 2017 Lexus is300h (AVE30R) 2019-08-26 13:33:30 +10:00
wocsor 4d5d709bea Update Readme - Avalon and Sienna are now supported (#789)
and 2020 CorollaH and 2020Rav4H are on the way with VINPrinting!
2019-08-22 08:49:38 -07:00
dragonpilot ec691a586a Merge branch 'devel-en' into devel-zht 2019-08-23 01:25:50 +10:00
dragonpilot 9833c901e6 permission 2019-08-23 01:25:31 +10:00
dragonpilot f738ce6ec9 Merge branch 'devel-en' into devel-zht 2019-08-23 01:22:36 +10:00
dragonpilot 194081b0f1 修正 appd 2019-08-23 01:22:18 +10:00
dragonpilot dea170368e Merge branch 'devel-en' into devel-zht 2019-08-23 01:10:22 +10:00
dragonpilot 5af0f2748c 修正permission 2019-08-23 01:10:07 +10:00
dragonpilot 88558aa7a5 Merge branch 'devel-en' into devel-zht 2019-08-23 01:00:15 +10:00
dragonpilot 29d25df7a6 優化appd 2019-08-23 00:59:57 +10:00
dragonpilot bb535e797e Merge branch 'devel-en' into devel-zht 2019-08-23 00:56:04 +10:00
dragonpilot ca0fd6fe8a 優化appd 2019-08-23 00:55:49 +10:00
dragonpilot b01aa70635 優化appd 2019-08-23 00:54:47 +10:00
dragonpilot 7d86e2adef 更新APK 2019-08-23 00:49:21 +10:00
dragonpilot 05fa8a5eda Merge branch 'devel-en' into devel-zht 2019-08-23 00:49:09 +10:00
dragonpilot 151e45c9cd 更新APK 2019-08-23 00:36:55 +10:00
dragonpilot db4ef15bed Merge branch 'devel-en' into devel-zht 2019-08-22 18:06:04 +10:00
dragonpilot 33ff1c9783 調整camera_offset 單位 2019-08-22 18:05:16 +10:00
dragonpilot 6365dbb34d 更新APK 2019-08-22 16:36:02 +10:00
dragonpilot 854e662c57 Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-08-22 16:34:05 +10:00
dragonpilot c7c29cac6f 加入調整相機偏移距離 2019-08-22 16:25:23 +10:00
dragonpilot bd5db31b6a 更新APK 2019-08-22 16:06:33 +10:00
dragonpilot 20e8d61f0c Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-08-22 16:03:36 +10:00
dragonpilot f6d402c1e7 更新APK 2019-08-22 15:56:00 +10:00
dragonpilot 77460d8e7f Merge branch 'devel-en' into devel-zht 2019-08-22 00:12:28 +10:00
dragonpilot 96041f0dbe 調整appd logic 2019-08-21 23:57:29 +10:00
dragonpilot c1cf70fd3a 調整appd logic 2019-08-21 23:30:53 +10:00
dragonpilot b2ef7ff80c 更新APK 2019-08-21 17:59:35 +10:00
dragonpilot 01319c0251 Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-08-21 17:54:03 +10:00
dragonpilot 9fc0107636 更新3rd Party APP 管理 2019-08-21 17:42:40 +10:00
dragonpilot 0e249e2bed Merge branch 'devel-en' into devel-zht 2019-08-21 13:01:51 +10:00
dragonpilot e3a19a2458 讓第三方APK 不要每次開機都重新安裝 2019-08-21 13:01:27 +10:00
dragonpilot d2a0782e1b 更新APK 2019-08-21 12:44:25 +10:00
dragonpilot aa14e182af Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-08-21 12:37:33 +10:00
dragonpilot 001f45b3a9 更新APK 2019-08-21 12:35:38 +10:00
dragonpilot 472f55faa8 車子啟動後強迫關閉 mixplorer 2019-08-21 12:32:42 +10:00
dragonpilot 4315386cfe 加入 mixplorer 2019-08-21 12:18:17 +10:00
dragonpilot 0a3a86637b Merge branch 'devel-en' into devel-zht 2019-08-20 16:21:34 +10:00
dragonpilot 00caf953fa 修正DragonSteeringMonitorTimer 錯誤 2019-08-20 16:21:17 +10:00
dragonpilot 03d8cf087b Merge branch 'devel-en' into devel-zht 2019-08-20 15:56:30 +10:00
dragonpilot 7fd9e33cb4 修正DragonSteeringMonitorTimer 錯誤 2019-08-20 15:56:06 +10:00
dragonpilot 1b09ac739e Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en 2019-08-20 15:53:51 +10:00
dragonpilot 48c0937081 更新APK 2019-08-20 13:27:44 +10:00
dragonpilot 982b635653 Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-08-20 12:47:19 +10:00
dragonpilot 252c0fd86d 加入可設定的 steering monitor timer 2019-08-20 12:46:07 +10:00
dragonpilot f4e4ae6508 駕駛監控改至30 分鐘 2019-08-19 21:30:42 +10:00
dragonpilot 3712ca6273 Merge branch 'devel-en' into devel-zht 2019-08-19 16:50:30 +10:00
dragonpilot cc203dc17e 阻止tomtom/autonavi 過熱時使用 2019-08-19 16:45:12 +10:00
dragonpilot 4c5ad29782 Merge branch 'devel-en' into devel-zht 2019-08-19 15:26:31 +10:00
dragonpilot 2765a7fadc 讓tomtom/autonavi 在起動時自動啟動,熄火時自動關閉 2019-08-19 15:26:21 +10:00
dragonpilot 3d9596716b 讓tomtom/autonavi 在起動時自動啟動,熄火時自動關閉 2019-08-19 15:18:53 +10:00
dragonpilot c66b57daff Merge branch 'devel-en' into devel-zht 2019-08-19 14:26:52 +10:00
dragonpilot be9736c796 修正 honda lat ctrl 關閉時會 trigger steerSaturated 錯誤 2019-08-19 14:26:03 +10:00
dragonpilot 8f8879eaac Merge branch 'devel-en' into devel-zht 2019-08-19 12:49:31 +10:00
dragonpilot 59686c07db semibold 字型改 medium 2019-08-19 12:48:49 +10:00
dragonpilot 8ec9cdf607 semibold 字型改 medium 2019-08-19 12:48:32 +10:00
dragonpilot c3f6af77ee semibold 字型改 medium 2019-08-19 12:45:12 +10:00
dragonpilot 652e1955b0 Merge branch 'devel-en' into devel-zht 2019-08-19 12:26:20 +10:00
dragonpilot 4bed6f6bfc 把loading dragonpilot 改成網址 2019-08-19 12:25:34 +10:00
dragonpilot 611172df48 Merge branch 'devel-en' into devel-zht 2019-08-19 12:12:24 +10:00
dragonpilot 7eb487ae30 revert 刪除字型 2019-08-19 12:11:38 +10:00
dragonpilot b6a00be9f1 UI 移除MIUI 字型 2019-08-19 12:09:39 +10:00
dragonpilot 4969ff7fbb 更新APK 2019-08-19 11:57:12 +10:00
dragonpilot 66c08fb446 Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.frame.apk
#	apk/ai.comma.plus.offroad.apk
2019-08-19 11:55:08 +10:00
dragonpilot 868078fe36 更新APK 2019-08-19 11:49:48 +10:00
dragonpilot 043ed96294 spinner 改用 dp 圖示 2019-08-19 11:20:47 +10:00
dragonpilot dcc18e4e7c Merge branch 'devel-en' into devel-zht 2019-08-19 10:31:25 +10:00
dragonpilot 7b9a314093 關閉 tooDistracted 錯誤,以防 dp 無法啟動 2019-08-19 10:30:03 +10:00
dragonpilot bc8b6e7e6f Merge branch 'devel-en' into devel-zht 2019-08-15 17:16:52 +10:00
dragonpilot 4221d3b985 行車介面改用NotoSansCJK 字型 2019-08-15 17:15:51 +10:00
dragonpilot 05a3af4c39 更新APK 2019-08-15 16:43:39 +10:00
dragonpilot 62d499219a 介面翻譯 2019-08-15 16:15:34 +10:00
dragonpilot 73d345cd24 BBUI 轉向顯示至小數點第一位 2019-08-15 15:55:00 +10:00
dragonpilot 37d788449e Merge branch 'devel-en' into devel-zht 2019-08-15 15:38:39 +10:00
dragonpilot bb9e4cb7c2 加入 persist.sys.local 設置 2019-08-15 15:37:39 +10:00
dragonpilot 2b746aa134 更新預設語系 2019-08-15 15:16:50 +10:00
dragonpilot 9a03511d2a Merge branch 'devel-en' into devel-zht 2019-08-15 15:16:27 +10:00
dragonpilot 9865597b4a 每次開機後都會把 locale 設定成指定的語系 2019-08-15 15:15:09 +10:00
dragonpilot b0c7a50b06 Merge branch 'devel-en' into devel-zht 2019-08-14 14:00:19 +10:00
dragonpilot 6c167f5ef9 Revert "加入特斯拉音效"
This reverts commit 5772b681
2019-08-14 13:57:54 +10:00
dragonpilot 31c65fa5e8 更新APK 2019-08-14 12:10:32 +10:00
dragonpilot a60dbb32df Merge branch 'devel-en' into devel-zht
# Conflicts:
#	selfdrive/manager.py
2019-08-14 12:07:30 +10:00
dragonpilot c18067d705 修正開機啟動 autonavi 的錯誤 2019-08-14 12:06:42 +10:00
dragonpilot a5dc451697 在 frame 之後再開啟 tomtom/autonavi 2019-08-14 12:03:45 +10:00
dragonpilot 0ac693c74c 在 frame 之後再開啟 tomtom/autonavi 2019-08-14 12:01:00 +10:00
dragonpilot 321271c510 Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-08-14 11:54:57 +10:00
dragonpilot cdfb4101be 加入開機啟動TOMTOM/AUTONAVI 功能 2019-08-14 11:53:59 +10:00
dragonpilot 0dc8b03f07 關閉 updated 2019-08-14 11:14:59 +10:00
dragonpilot f25ee81a81 Merge branch 'devel-en' into devel-zht 2019-08-14 11:01:50 +10:00
dragonpilot 504f43ea4b 延遲 params check 至3秒以減少 kernel calls 2019-08-14 10:31:51 +10:00
dragonpilot d0deb8d9d2 調整 DragonEnableDriverSafetyCheck Logic 2019-08-14 10:28:58 +10:00
dragonpilot 5772b681d0 加入特斯拉音效 2019-08-14 10:26:50 +10:00
dragonpilot d232f16e07 更新APK 2019-08-13 17:09:32 +10:00
dragonpilot 2675651ca8 Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-08-13 17:07:05 +10:00
dragonpilot 5f394317b5 更新APK 2019-08-13 16:56:26 +10:00
dragonpilot 5b296967eb Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
#	cereal/car.capnp
#	selfdrive/car/honda/carcontroller.py
#	selfdrive/car/honda/hondacan.py
#	selfdrive/car/toyota/carcontroller.py
#	selfdrive/controls/lib/driver_monitor.py
#	selfdrive/controls/lib/model_parser.py
#	selfdrive/ui/ui.c
2019-08-13 14:15:05 +10:00
Vehicle Researcher d5f9caa82d openpilot v0.6.3 release 2019-08-13 01:36:45 +00:00
Vehicle Researcher cb0ee932c4 Squashed 'opendbc/' changes from 7684440b..18321a29
18321a29 toyota DSU cruise message
fa22ebff better VIN msg name
3bf82da1 VIN signal for toyota
5b466dbc Forgot to run generator
01321106 Reverse engineer AEB in Honda
ca71b77a rename
c9cf65d3 toyota pre collision
3835d30d reference toyota DBC
255c16bd Lexus CT200 needed one more run of generator
d6c8eca8 Add Lexus CT200h 2018 (#176)
5d46c294 toyota pre-collision signals
65ace376 fix typo
18968ce0 pre-collision signals
9b8ae163 add another toyota cancel request signal
a956deec Correct Message ID on LKAS11 (#172)
bce0ec6b typo
a452ac3b Toyota: added 0x283 message description for PRE_COLLISION msg. Data from https://ioactive.com/pdfs/IOActive_Adventures_in_Automotive_Networks_and_Control_Units.pdf

git-subtree-dir: opendbc
git-subtree-split: 18321a2946f0567ea368b543f4fec44a863a7d6e
2019-08-13 01:34:24 +00:00
Vehicle Researcher 6a61788682 Merge opendbc subtree 2019-08-13 01:34:24 +00:00
Vehicle Researcher 9955b3c806 Squashed 'panda/' changes from 519e39e4..8843af7d
8843af7d bump panda version
6da979e0 remove chffr link

git-subtree-dir: panda
git-subtree-split: 8843af7de9b39c430147dd08b79dd33ea2879a93
2019-08-13 01:34:23 +00:00
Vehicle Researcher ead59a5a61 Merge panda subtree 2019-08-13 01:34:23 +00:00
Vehicle Researcher a1ec1c089e Squashed 'cereal/' changes from 748002c1..bb94ed98
bb94ed98 add eps torque to carstate
291319a6 add soundsUnavailable event
9b0b0ee4 add blink msg
072b2e21 use enum for alert sounds

git-subtree-dir: cereal
git-subtree-split: bb94ed98ac9cb5c3448117e28b4fea000e8225ee
2019-08-13 01:34:22 +00:00
Vehicle Researcher a1f069c6d8 Merge cereal subtree 2019-08-13 01:34:22 +00:00
dragonpilot aea6d53eaf 更新APK 2019-08-12 23:20:11 +10:00
dragonpilot e0cbd452a0 fix conflict 2019-08-12 23:17:26 +10:00
dragonpilot 6d8174e89f 更新 APK 2019-08-12 22:58:08 +10:00
dragonpilot f4946a9e9d 加入導航 2019-08-12 22:00:05 +10:00
dragonpilot 4c3b24fcda Merge branch 'devel-en' into devel-zht 2019-08-11 02:08:13 +10:00
dragonpilot fd79368f3b Merge branch 'devel-en' into devel-en-unsupported-cars 2019-08-11 02:01:13 +10:00
dragonpilot d2cfd239d5 加入新的指紋 2019-08-11 01:58:11 +10:00
dragonpilot fb3e0969cc Merge branch 'devel-en' into devel-zht
# Conflicts:
#	selfdrive/car/car_helpers.py
2019-08-06 15:46:48 +10:00
dragonpilot 2861467183 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-08-06 15:43:06 +10:00
Dragonpilot d478d6a931 回傳指紋到 sentry.io 2019-08-02 09:18:07 +10:00
Dragonpilot dc77655e2a 修改指紋暫存 logic 2019-08-02 09:17:14 +10:00
Dragonpilot 15ebf13cf1 更新指紋暫存 logic, 寄指紋至 sentry 2019-08-02 09:11:01 +10:00
Dragonpilot 71e9076e50 Merge branch 'devel-en' into devel-zht 2019-08-02 08:54:11 +10:00
Dragonpilot f5d88c5813 嘗試更新指紋暫存 2019-08-02 08:53:24 +10:00
Riccardo 095ef5f9f6 Revert "Revert "Update hyundaican for Correct Message ID on LKAS11 (#746)" (#775)"
This reverts commit d5242c5b82.
2019-08-01 12:44:41 -07:00
TK211X fd71fe698c Correct Message ID on LKAS11 under Openpilot .dbc (#747)
https://github.com/commaai/opendbc/pull/172
2019-08-01 12:43:49 -07:00
rbiasini d5242c5b82 Revert "Update hyundaican for Correct Message ID on LKAS11 (#746)" (#775)
This reverts commit 1f1893a170.
2019-08-01 12:35:24 -07:00
TK211X 1f1893a170 Update hyundaican for Correct Message ID on LKAS11 (#746)
This is the only trace of CF_Lkas_Icon found under /car/hyundai relative to open .dbc

https://github.com/commaai/opendbc/pull/172
2019-08-01 12:34:19 -07:00
Dragonpilot 639a914846 修正翻譯 2019-08-01 16:20:08 +10:00
Dragonpilot cff8a98850 更新 APK 2019-08-01 12:07:27 +10:00
Dragonpilot 999d157c75 更新 APK 2019-08-01 11:58:12 +10:00
Dragonpilot 9f414becd1 Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-08-01 11:46:08 +10:00
Dragonpilot 043d2e9f36 Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en 2019-08-01 11:30:03 +10:00
Dragonpilot 3f78957ccc 更新 APK 2019-08-01 11:29:38 +10:00
Dragonpilot 8bcb9331fd 加入 UI 設定 2019-08-01 11:28:59 +10:00
Willem Melching 5808958fb2 Fix timeout in longitudinal test (#772)
* Fix timeout in longitudinal test
2019-07-31 18:17:19 -07:00
Dragonpilot af3234f1d7 加回指紋暫存 2019-08-01 09:25:46 +10:00
Dragonpilot e2ff61da9b Revert "移除指紋暫存"
This reverts commit 11229fc9c0.

Conflicts:
	apk/ai.comma.plus.offroad.apk
2019-08-01 09:14:19 +10:00
dragonpilot 634de04d23 Merge branch 'devel-en' into devel-zht 2019-07-31 23:22:46 +10:00
dragonpilot 80e87ee0ae dragon_toyota_stock_dsu 模式下只在適當的情況下 pcm_acc_active 才設成 True 2019-07-31 22:34:29 +10:00
dragonpilot bcb3f6077c 原廠 LKAS 只在關閉下觸發,不然會有 steering error 2019-07-31 22:31:52 +10:00
Dragonpilot b69089883f 更新 APK 2019-07-31 15:52:43 +10:00
Dragonpilot 2474cd56cc Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-07-31 15:51:10 +10:00
Dragonpilot 87679a75b8 更新 APK 2019-07-31 15:44:27 +10:00
Dragonpilot c6c41f1a29 加入 Lat 控制開關,Toyota/Lexus 原廠 LKAS 模式 2019-07-31 15:27:16 +10:00
Dragonpilot cf62e14547 更新 APK 2019-07-31 11:37:44 +10:00
Dragonpilot 261428ec98 Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-07-31 11:33:05 +10:00
Dragonpilot 5d57078474 更新 APK 2019-07-31 11:25:35 +10:00
Dragonpilot 11229fc9c0 移除指紋暫存 2019-07-31 11:25:15 +10:00
Dragonpilot 1727b59882 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
#	selfdrive/car/car_helpers.py
2019-07-31 11:02:42 +10:00
Vehicle Researcher e90c41c576 openpilot v0.6.2 release 2019-07-30 02:27:48 +00:00
Vehicle Researcher f448d357e0 Squashed 'opendbc/' changes from e1955ba06..7684440b1
7684440b1 chrysler: increase size of ACCEL_134 (#174)

git-subtree-dir: opendbc
git-subtree-split: 7684440b14253f03b7420c4b24da5fbdeb0b9954
2019-07-30 02:25:29 +00:00
Vehicle Researcher aa1b61eb8e Merge opendbc subtree 2019-07-30 02:25:29 +00:00
Vehicle Researcher 30bb73d527 Squashed 'panda/' changes from 45d0d286f..519e39e49
519e39e49 Changed heartbeat timeout to be 2 seconds on no ignition
996dc4049 Added heartbeat to black loopback testing
79b44cb7e bump version
59f581317 Black (#254)
096486693 no need to store safety only misra output anymore

git-subtree-dir: panda
git-subtree-split: 519e39e494c0b3dd0cf38581302788b779a03c7b
2019-07-30 02:25:28 +00:00
Vehicle Researcher 98cd6147c3 Merge panda subtree 2019-07-30 02:25:28 +00:00
Vehicle Researcher d22636b194 Merge cereal subtree 2019-07-30 02:25:27 +00:00
Vehicle Researcher 4808de10d6 Squashed 'cereal/' changes from 4ea03bacb..748002c19
748002c19 angle calib desc
27db4a74e add camera rpy angle msg
a71c4fa7f deprecate old dm model output
6c6ab965f remove hwType from ThermalData. Decided to have health at higher freq instead. This will make last 24H of collected data unreadable. Sorry.
f27249ea9 Add fields for LQR lateral control
654860c8b add decelForModel
995b558d4 add longitudinal plan source
222f2de17 add eye stuff
eebf268ea hasGps is a better name than hasGpsAntenna
12da45fda Blackpanda (#4)

git-subtree-dir: cereal
git-subtree-split: 748002c1900700a3df93edf26071510225038ee6
2019-07-30 02:25:26 +00:00
Chris Souers a440425ef8 Update README.md (#766) 2019-07-29 15:06:34 -07:00
Dragonpilot 5ecacfd879 Merge branch 'devel-en' into devel-zht 2019-07-29 15:05:00 +10:00
Dragonpilot 0ecaf72ed4 優化 params.get 讀取次數,最快每秒讀一次 2019-07-29 15:03:53 +10:00
Dragonpilot 2f6e0a59fd Merge branch 'devel-en' into devel-zht 2019-07-29 14:09:58 +10:00
Dragonpilot 3300143b1b fix logic 2019-07-29 14:09:39 +10:00
Dragonpilot e95ae50ab5 更新 APK 2019-07-29 14:05:05 +10:00
Dragonpilot b745bf1e5a Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-07-29 14:03:43 +10:00
Dragonpilot 902413200a 更新 APK 2019-07-29 13:57:30 +10:00
Dragonpilot ce57ac073b 加入 Toyota/Lexus 原廠 DSU 模式 2019-07-29 13:26:30 +10:00
Dragonpilot 8451eebe96 Merge branch 'devel-en' into devel-zht 2019-07-29 10:40:04 +10:00
Dragonpilot 91bf49bdd4 Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en 2019-07-29 10:39:19 +10:00
Dragonpilot 017cbbfa51 更新 crash.py 讓它能回傳更多訊息 2019-07-29 10:39:06 +10:00
dragonpilot 4f8b6f7b84 Merge branch 'devel-en' into devel-zht 2019-07-28 10:23:09 +10:00
dragonpilot 8773fbf7d9 Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en 2019-07-28 10:22:20 +10:00
Rick Lan 8d4ff30c60 comment out unused var (causing panda flash error?) 2019-07-28 10:17:31 +10:00
Dragonpilot cb47382c9d 更新 APK 2019-07-26 15:27:27 +10:00
Dragonpilot c60e002440 更新 APK 2019-07-26 15:15:43 +10:00
Dragonpilot d727aea5ad Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-07-26 15:02:44 +10:00
Dragonpilot be2ba93ca0 更新 APK 2019-07-26 15:02:00 +10:00
Dragonpilot 48425a1fc1 更新變數名 2019-07-26 14:50:45 +10:00
Dragonpilot 851a5b2f44 Merge branch 'devel-en' into devel-zht 2019-07-26 12:03:47 +10:00
Dragonpilot 84c8790192 Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en 2019-07-26 12:01:48 +10:00
Dragonpilot 25681a31e5 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-07-26 12:01:06 +10:00
Gernby 61bbb52172 Remove offset from curvature (#761) 2019-07-25 15:00:50 -07:00
dragonpilot 0a208866ce 更新 APK 2019-07-25 22:24:48 +10:00
dragonpilot 0c26ac0da7 Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-07-25 22:23:34 +10:00
dragonpilot c9270bfa2f 更新 APK 2019-07-25 22:22:06 +10:00
dragonpilot 0a7d2f4343 更新 APK 2019-07-25 21:59:11 +10:00
dragonpilot dc6107dac3 Merge pull request #7 from eFiniLan/dp-bbui
加入 BBUI
2019-07-25 21:40:59 +10:00
Rick Lan 5eacdcee9d Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into dp-bbui
# Conflicts:
#	common/params.py
#	selfdrive/dragonpilot/dragonconf/__init__.py
2019-07-25 21:13:59 +10:00
Rick Lan 978839a861 finalise BBUI 2019-07-25 21:03:47 +10:00
Rick Lan fbc243aa94 bbui mod 2019-07-25 17:27:58 +10:00
Arne Schwarck cf5c4aeacb self.poller not used (#759)
I do not see the need for zmq and the poller being initialized and not used.
2019-07-24 11:45:53 -07:00
dragonpilot 2d40ccfc16 Merge branch 'devel-en' into devel-zht 2019-07-24 00:29:50 +10:00
dragonpilot 194d4d7f71 Make it always write new cache fp 2019-07-24 00:28:31 +10:00
Dragonpilot 1b06be660b Merge branch 'devel-en' into devel-zht 2019-07-23 15:52:25 +10:00
Dragonpilot 5b596aec6f 加入 DragonAllowGas 功能 2019-07-23 15:51:45 +10:00
Dragonpilot 8d5403b26a Merge branch 'devel-en' into devel-zht 2019-07-23 15:41:11 +10:00
Dragonpilot 09533fee0c 加入 DragonAllowGas 功能 2019-07-23 15:40:30 +10:00
Dragonpilot 1150937f33 更新 APK 2019-07-23 12:32:56 +10:00
Dragonpilot 94d9ea0863 Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-07-23 12:31:20 +10:00
Dragonpilot 6ee6161d23 取消自動更新 2019-07-23 12:10:46 +10:00
Dragonpilot 4e16a1454d 更新 APK 2019-07-23 12:07:34 +10:00
Dragonpilot 3ad47fb1d0 更新 APK 2019-07-23 11:18:27 +10:00
Dragonpilot 6bad4f56f7 Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-07-23 11:06:32 +10:00
Dragonpilot d0bdd513cd 更新 APK 2019-07-23 10:56:10 +10:00
Dragonpilot 54b920eb79 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
#	cereal/car.capnp
#	selfdrive/car/car_helpers.py
#	selfdrive/car/toyota/interface.py
#	selfdrive/controls/lib/driver_monitor.py
#	selfdrive/manager.py
2019-07-23 10:55:28 +10:00
Vehicle Researcher 94053536b4 openpilot v0.6.1 release 2019-07-22 19:17:47 +00:00
Vehicle Researcher b539ae3e2d Squashed 'opendbc/' changes from 38650f842..e1955ba06
e1955ba06 Nissan: Added nissan_2017.dbc (#173)
c89eb71df properly generate Lexus 350 dbc file
d08059c77 Lexus RX 350 DBC (#170)

git-subtree-dir: opendbc
git-subtree-split: e1955ba06e3308dbbfb4bcda78d0e6495bc9ff7e
2019-07-22 19:15:28 +00:00
Vehicle Researcher cd98235644 Merge opendbc subtree 2019-07-22 19:15:28 +00:00
Vehicle Researcher 1ff59baea7 Squashed 'panda/' changes from ae816c104..45d0d286f
45d0d286f remove whitespace (#255)
e49d0dbbd Pedal: use avg between tracks (#253)
c597dcc89 VERSION update after health packet changes and minor misra test change
01072bec0 Misra 11.x: pointer usage. (#250)
fd68c26ab Propagate can_push errors (#249)
ce1daf206 Misra check only done for EON config
70d4fd7f6 cleanup docker container on failure
04756a037 Turning back Misra check: unvoluntarily change
fcb1208e1 fix weird code in USB_ReadPacket
b983cc8fe Re-wrote test_misra.sh
0b1920636 Misra 17.7: The value returned by a function having non-void return type shall be used. We should hang on initial failed safety_set_mode
06ee8bd2d Ignore Misra 5.4 until cppcheck bug (?) is fixed
4be858224 Update cppcheck commit and pass predefined params to avoid impossible combinations of configs
f45dd04c6 cppcheck: ignore redundantAssignment and selfAssignment for registers in llcan.h
9ce631155 Misra 12.1 (operator order) and 10.4 (incompatible essential types) fixes, arised after properly checking UID_BASE config
1cd34e564 Explicitly set the define and undefine for unknown configs in misra checks
5a024999d remove esp flash from run_automated_tests.sh
23e3684d7 Cppcheck unused functions (#247)
c97d60be6 Removed bad language
b031480a7 Missed adding Dockerfile
91ff6bb21 Run language checker in CI
205ec342a Improved language checker
f7bbab072 Language checker test
d9d0a62f2 Misra 5.5: missed this change from previous PR
85fa3c02a Misra 5.5: Identifiers shall be distinct from macro names (#246)
190d604a0 Pedal: 2 minor fixes to Misra 15.7 (else needed) and 17.7 (non-void output must be used)
8ea01ff12 Pedal: no built-in functions to avoid puts and putc re-definitions
1f40d1e6a Misra pedal (#245)
a4554e3e6 Ignore advisory Misra 19.2: the union keyword should not be used
e6dc4172b Minor indent error
247e128b4 Fix strict compiler on bootstub build
ba6856921 Removed build strict test and enabled -Werror flag
da11f0fa0 safety replay: update openpilot-tools after logreader fix
fc8b9e49b Cppcheck: also check pedal
f7bd2c2f3 Misra 10.4: fix last 2 violations (#242)
9be5fdead finished misra 17.8 (#241)
3c3aba3db Misra 10.4: Both operands of an operator in which the usual arithmetic conversions are performed shall have the same essential type category (#240)
f2a3a177b Misra 15_7: fix what seems to be a false positive of cppcheck
812ace538 Misra 15_7: if … else if constructs should be terminated with an else clause (#230)
79e9735ae rename 5_wifi_udp.py
3c3ff0c03 Update Jenkinsfile (#239)
1bd928437 Misra 17.7: the value returned by a function having non-void return shall be used (#237)
18c9e88bc Merge pull request #238 from commaai/misra_17_8
7ac321de4 Merge pull request #235 from commaai/memxxx
004e543cc Jenkins: run EON test first
4bff28620 Merge branch 'memxxx' of github.com:commaai/panda into memxxx
7cd80de23 typo
385e33b32 12.1 regression
955842bae WIP
ea908cbb7 10_1 violations: Operands shall not be of an inappropriate essential type (#233)
fa3303805 Fix Misra 5.3: An identifier declared in an inner scope shall not hide an identifier declared in an outer scope (#236)
ebfe1c512 Merge branch 'master' of github.com:commaai/panda into memxxx
8c11470ef Fix EON test case
64e18e841 fix inverted logic to differentiate between dev and EON panda builds
36755a0fd Merge branch 'master' of github.com:commaai/panda into memxxx
e2981d612 skip wifi tests for EON panda build
db2eec98c Merge branch 'master' of github.com:commaai/panda into memxxx
11257e79a Ignore test 5_wifi_udp.py_ignore: too unreliable for now
6973c2a81 fix wifi tests
cf6985ad1 memxxx function changes to be Misra compliant
3a6cd2930 wifi threshold perc back to 20%. Problem wasn't this.
d92a03528 faster docker build for safety replay
3e9469b3e Fixing tests after min->MIN  change
ecb9b6c01 Revert "Misra 10 1: Operands shall not be of an inappropriate essential type (#232)"
8732e4faf Misra 10 1: Operands shall not be of an inappropriate essential type (#232)

git-subtree-dir: panda
git-subtree-split: 45d0d286f4b5c893590a98ec1438b8a143b9605d
2019-07-22 19:15:27 +00:00
Vehicle Researcher c8b4633cd1 Merge panda subtree 2019-07-22 19:15:27 +00:00
Vehicle Researcher 813d5b9982 Squashed 'cereal/' changes from 9f2076eef..4ea03bacb
4ea03bacb add speed
2198ad240 add alert for invalid posenet
9c18b3b21 rename to posenetValid
42669a812 add posenet debug fields to LiveParameters
852846f17 add whether point is detected by radar
1684698e5 add model prob
fb87dba0b added HW type to support various panda versions
820bf7b4c added tooDistracted event
1105dc1e8 different name
45c424989 add second model lead
f8c557fa3 Log can errors from panda
04f105a22 back
ff9332035 add lead stuff

git-subtree-dir: cereal
git-subtree-split: 4ea03bacbfad1f086caa458de7788771b0c7c515
2019-07-22 19:15:25 +00:00
Vehicle Researcher 53413fa019 Merge cereal subtree 2019-07-22 19:15:25 +00:00
Dragonpilot c041b0068c Merge branch 'devel-en' into devel-zht 2019-07-22 16:38:03 +10:00
Dragonpilot e453e79bc8 fix missing variables 2019-07-22 16:37:41 +10:00
Dragonpilot d4bf69422c 更新 APK 2019-07-22 16:33:35 +10:00
Dragonpilot e9c2249a81 Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-07-22 16:31:20 +10:00
Dragonpilot b02e848395 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-07-22 16:10:24 +10:00
Dragonpilot ed9d5615ba 更新 APK 2019-07-22 16:10:06 +10:00
Dragonpilot 8264fd8b93 Merge branch 'devel-disable-uploader' into devel-en 2019-07-22 15:39:01 +10:00
Dragonpilot 532e7710f3 加入取消上傳comma ai記錄功能 2019-07-22 15:28:43 +10:00
rbiasini 63da1abe2c Use standard steer angle sensor in DSU-less pre-TSS2 Toyota. (#751) 2019-07-20 23:21:50 -07:00
Dragonpilot 62bd6cee67 Revert "把accordh 的指紋往上移"
This reverts commit e8af5d6364.
2019-07-16 15:43:35 +10:00
Dragonpilot 63fa61ecd7 Merge branch 'devel-en' into devel-zht 2019-07-16 15:25:48 +10:00
Dragonpilot e8af5d6364 把accordh 的指紋往上移 2019-07-16 15:22:52 +10:00
Dragonpilot 386ec39885 更新 ACCORDH 指紋,支援 2019 版 2019-07-16 14:28:20 +10:00
Dragonpilot 39808e3627 Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-07-16 11:35:22 +10:00
Dragonpilot 2a99c660c3 移除 safeguardd 服務 2019-07-16 11:26:59 +10:00
ErichMoraga be28530ee4 Added 2019 Toyota Highlander (#739)
Tested latest commit on ICE version, and it worked flawlessly out of box.  Fantastic experience.
2019-07-15 09:55:51 -07:00
Dragonpilot ff717ae03e 更新 APK 2019-07-15 11:47:02 +10:00
Dragonpilot 15cb2f05c7 更新 APK 2019-07-15 11:42:24 +10:00
Dragonpilot 8bb3420b92 更新 APK 2019-07-15 11:37:47 +10:00
Dragonpilot 6365c3b17c Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-07-15 11:36:56 +10:00
Dragonpilot 3595162d1a Merge branch 'devel-en' of https://github.com/dragonpilot/dragonpilot-dev into devel-en
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-07-15 11:18:37 +10:00
Dragonpilot 8e97f70b92 更新 APK 2019-07-15 11:17:23 +10:00
dragonpilot 8dd8f08d10 Merge branch 'devel-en' into devel-zht 2019-07-13 22:47:36 +10:00
dragonpilot a9a35894ad 加入 pickle.loads 讀取暫存資料 2019-07-13 22:45:34 +10:00
dragonpilot 8d637c8e33 Merge branch 'devel-en' into devel-zht 2019-07-13 22:38:34 +10:00
dragonpilot c3a1a438d8 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en
# Conflicts:
#	selfdrive/controls/lib/model_parser.py
2019-07-13 22:37:57 +10:00
Riccardo 13bdfcdd95 Improve Toyota Highlander tuning from https://github.com/commaai/openpilot/pull/690 2019-07-12 19:24:35 -07:00
eFini 9675794969 add loggered, gpsd, sensord to gitignore (#735) 2019-07-12 11:02:23 -07:00
Gernby 151a504507 Fix lane centering with single lane line (#737) 2019-07-12 10:55:34 -07:00
dragonpilot 9f75a6b5a6 Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-07-12 21:13:04 +10:00
dragonpilot 99da7077ab 更新APK 2019-07-12 20:56:17 +10:00
dragonpilot 221e383f11 Merge branch 'devel-en' into devel-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-07-12 20:24:30 +10:00
dragonpilot 3d941253a5 修正暫存指紋錯誤 2019-07-12 20:22:23 +10:00
eFini 03e764bcb3 fix spacing in toyota/carstate.py (#736) 2019-07-11 21:22:02 -07:00
Dragonpilot 0d41146fa8 更新 APK 2019-07-12 13:54:24 +10:00
Dragonpilot 6b09953b09 更新 APK 2019-07-12 13:50:57 +10:00
Dragonpilot 255c58f6ba 更新 APK 2019-07-12 13:35:23 +10:00
Dragonpilot 3fed5bfaf3 Merge branch 'dragonpilot-dev-en' into dragonpilot-dev-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-07-12 13:35:12 +10:00
Dragonpilot 7f04682b4c 更新 APK 2019-07-12 13:22:59 +10:00
Dragonpilot 3543d4948c 更新 APK 2019-07-12 12:09:51 +10:00
Dragonpilot 33b1bb50c1 Merge branch 'dragonpilot-dev-en' into dragonpilot-dev-zht 2019-07-12 12:08:48 +10:00
Dragonpilot a6545b1604 方向燈取消方向盤控制開啟時顯示提示訊息 2019-07-12 12:08:16 +10:00
Dragonpilot 42093dadd1 翻譯 2019-07-12 12:03:46 +10:00
Dragonpilot 18eee85ff1 Merge branch 'dragonpilot-dev-en' of https://github.com/dragonpilot/dragonpilot-dev into dragonpilot-dev-zht 2019-07-12 12:01:45 +10:00
dragonpilot 2db4cb0e8c Merge pull request #5 from eFiniLan/dragonpilot-cache-fp
加入暫存指紋功能
2019-07-12 09:47:38 +10:00
dragonpilot 26d0b8d4ee Merge pull request #4 from eFiniLan/dragonpilot-dev-lkmod
加入 honda 的 Lane Keeping 模式開關
2019-07-12 09:47:07 +10:00
Rick Lan 323660961f 更新參數名 2019-07-12 09:35:05 +10:00
Rick Lan 88966b488a 將數值分開儲存 2019-07-12 09:16:49 +10:00
Rick Lan 41fc9c55a0 use pickle instead of repr 2019-07-11 16:30:06 +10:00
Rick Lan 8c2b3d5e37 Merge branch 'dragonpilot-dev-en' of https://github.com/dragonpilot/dragonpilot into dragonpilot-cache-fp
# Conflicts:
#	common/params.py
#	selfdrive/dragonpilot/dragonconf/__init__.py
2019-07-11 16:28:52 +10:00
Rick Lan 22fc7e9dae make car fingerprint cacheable 2019-07-11 15:40:12 +10:00
Rick Lan 9f53e446d9 remove unnecessary changes 2019-07-11 11:21:46 +10:00
Dragonpilot 938b1aa189 Merge branch 'dragonpilot-dev-en' into dragonpilot-dev-zht 2019-07-11 10:58:17 +10:00
Dragonpilot 7e0ba31ceb Merge branch 'devel' into dragonpilot-dev-en 2019-07-11 10:52:24 +10:00
Rick Lan fe46b24be5 add alerts for lkmode 2019-07-11 10:16:46 +10:00
Rick Lan a9e94ef9bb add alerts for lkmode 2019-07-11 10:11:16 +10:00
Rick Lan c9db3ef937 Merge branch 'dragonpilot-dev' of https://github.com/dragonpilot/dragonpilot into dragonpilot-dev-lkmod 2019-07-11 09:35:00 +10:00
Rick Lan 9a3dc91b35 修正打方向燈取消方向盤控制結束後產生的錯誤 2019-07-11 09:14:26 +10:00
Rick Lan f362771af3 更新 APK 2019-07-10 16:38:57 +10:00
Rick Lan 7251ea4ac6 Merge branch 'dragonpilot-dev' into dragonpilot-dev-zht
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-07-10 16:32:38 +10:00
Rick Lan c5e71d2f37 更新 APK 2019-07-10 16:26:35 +10:00
Rick Lan 61ce864e28 修正Noctua模式 2019-07-10 15:26:14 +10:00
Rick Lan 36d0a70b69 修正Noctua模式 2019-07-10 15:22:25 +10:00
Rick Lan 20a2007d10 加入Noctua模式 2019-07-10 15:11:09 +10:00
Rick Lan 64701acb68 修正關閉記錄功能 2019-07-10 14:10:53 +10:00
Rick Lan 17922bd096 加入關閉記錄選項 2019-07-10 11:25:44 +10:00
Rick Lan f85055a19c fix issue after merge 2019-07-10 09:59:51 +10:00
Rick Lan 28ebecdbc5 update to 0.6 2019-07-10 09:51:52 +10:00
Nick Brown 16eb74250c 2019 Rav4 Limited AWD (#732)
* Fingerprint

* Merge Limited and XLE fingerprint because they're the same
2019-07-08 17:02:59 -07:00
dekerr 4a48ef8dbc Refactor default Civic params (#720)
* move civic params out

* fix variable name

* simplify ford scaling

* cleanup

* remove import dependency

* requested changes

* keep hyundai
2019-07-08 16:59:32 -07:00
Rick Lan 5eda5fc81b lkmod from honda 2019-07-04 15:02:27 +10:00
Rick Lan 7bc86efee9 調整空格 2019-07-04 14:09:44 +10:00
Rick Lan d60e071fa9 加入更多的錯誤訊息 2019-07-04 14:08:20 +10:00
Rick Lan b70289ce15 加入 commIssueNoEntry 錯誤訊息 2019-07-04 14:00:13 +10:00
Willem Melching 76ab558ca6 Fix run_docker_tests.sh (#730) 2019-07-03 15:53:49 -07:00
Willem Melching 60a20537c5 Make build deterministic and do not rebuild on release2 (#729)
* sort dbc files to make linking deterministic

* touch all files on release2 checkout to prevent rebuild
2019-07-03 12:25:35 -07:00
Rick Lan 71e65750d1 Merge branch 'dragonpilot-dev' of https://github.com/dragonpilot/dragonpilot into dragonpilot-dev 2019-07-03 15:21:35 +10:00
dragonpilot be8cc7c15f Merge pull request #2 from eFiniLan/dragonpilot-dev-zht
加入繁體中文翻譯
2019-07-03 15:12:19 +10:00
Rick Lan 589abe5519 Merge branch 'dragonpilot-dev' of https://github.com/dragonpilot/dragonpilot into dragonpilot-dev-zht 2019-07-03 15:10:46 +10:00
Rick Lan be622c7932 加入繁體中文翻譯 2019-07-03 14:54:41 +10:00
dragonpilot 2ce741275b Merge pull request #1 from eFiniLan/dragonpilot-dev
Dragonpilot 客制功能
2019-07-03 14:04:24 +10:00
Rick Lan 8cb09e1329 啟動畫面文字改為 dragonpilot 2019-07-03 13:50:00 +10:00
Rick Lan 17f21c5b6f Revert "啟動畫面文字改成 dragonpilot"
This reverts commit 0992311f
2019-07-03 13:49:18 +10:00
Rick Lan 0992311f83 啟動畫面文字改成 dragonpilot 2019-07-03 13:48:32 +10:00
Rick Lan a42fea2041 調整UI 顯示 N/A 時使用的字數 2019-07-03 13:44:07 +10:00
Rick Lan 4aaf4f437b 加入 dragonpilot offroad apk 2019-07-03 13:41:43 +10:00
Rick Lan 610bb58845 修正錯誤 2019-07-03 13:35:08 +10:00
Rick Lan 4c77b9162e 當轉向燈暫停方向控制功能開啟時,我們在方向燈關閉後一秒取回控制 2019-07-03 13:27:37 +10:00
Rick Lan cd096d1c2e Merge branch 'dragonpilot-dev' of https://github.com/eFiniLan/openpilot into dragonpilot-dev 2019-07-03 12:43:21 +10:00
Rick Lan 11a7b2d9bf 修正 dashcamd 和 safetyguard 邏輯 2019-07-03 12:41:53 +10:00
Riccardo be020bdedb Chrysler Pacifica 2018 Hybrid: fix fingerprint 2019-07-02 15:24:51 -07:00
Riccardo 1e77f2482c Chrysler Pacifica 2018 Hybrid: add fingerprint 2019-07-02 11:45:24 -07:00
Rick Lan 7fa09edc03 修正 dashcamd 和 safeguardd 無法啟動的錯誤 2019-07-02 22:50:24 +10:00
Rick Lan 13ae651f46 更改 safetycheck 預設值 2019-07-02 16:25:46 +10:00
Rick Lan c345bb1d8f dragonconf 改至 apk 2019-07-02 16:19:22 +10:00
Rick Lan a2b00731cb 修正參數名,將自動關機設定單位換成分鐘,修正dragonconf logic 2019-07-02 16:17:01 +10:00
Rick Lan d36b78e273 重新命名變數,apk 不支援 underscore 2019-07-02 12:57:22 +10:00
Rick Lan 6ab7c27d9b remove unneeded changes 2019-07-02 11:21:56 +10:00
Rick Lan a90c3bc8be remove unneeded changes 2019-07-02 11:18:21 +10:00
Rick Lan 8b3c922cf0 remove unneeded changes 2019-07-02 11:15:51 +10:00
Rick Lan d460e0e735 revert safety_toyota.h change 2019-07-02 11:11:37 +10:00
Rick Lan a52b947ce2 移除油門不取消 OP 選項 2019-07-02 11:04:36 +10:00
Rick Lan c75137b262 Merge branch 'devel' of https://github.com/commaai/openpilot into dragonpilot-dev
# Conflicts:
#	panda/board/safety/safety_toyota.h
#	selfdrive/car/honda/interface.py
#	selfdrive/controls/lib/model_parser.py
#	selfdrive/ui/ui.c
2019-07-02 10:13:33 +10:00
Rick Lan 6fd3f9bad8 修正 toyota d_allowGasOnOP,移除 panda 檢測 gas/brake 2019-07-02 10:02:52 +10:00
George Hotz d8da18ed54 Merge pull request #716 from dekerr/readme
Update README
2019-07-01 14:15:34 -07:00
Willem Melching 6abd80f116 Exclude tools from linter (#718)
* exclude tools from linter

* Exclude tools from pylint too
2019-07-01 13:14:16 -07:00
Willem Melching f4b258a082 Install fastcluster in CI for controls tests 2019-07-01 12:16:16 -07:00
Vehicle Researcher 8a9ed94f5f openpilot v0.6 release 2019-06-28 21:11:30 +00:00
Vehicle Researcher ae44a57565 Merge pyextra subtree 2019-06-28 21:09:14 +00:00
Vehicle Researcher 78e4e4ea23 Squashed 'pyextra/' changes from 4348db7e8..d54ef825d
d54ef825d Merge pull request #1 from commaai/new-usr
e3e0520e4 put back logentries and overpy
c3ad0b3dd remove everything

git-subtree-dir: pyextra
git-subtree-split: d54ef825db8d96de8c960ac57a33ac11fa7728bf
2019-06-28 21:09:14 +00:00
Vehicle Researcher 1c6164e11c Squashed 'opendbc/' changes from 34bd4c4dc..38650f842
38650f842 Toyota: STEERING_LTA actually has an angle interface
a0394d4a7 Toyota LTA: back to unit factor
0a03d0889 Honda: fix China model. Toyota: add STEERING_LTA message for nodsu cars
f1c17ae92 Toyota dsu-less: more precise steering angle conversion
0e94a296f Toyota: better pt dbc file naming for all dsuless cars
9199a5582 Toyota: better name for adas bdc files
f5ddc1c38 Toyota DSU-less: added better measurement of steer angle
c60b91ff6 Toyota Camry: using the same conversion factor for STEER_TORQUE_EPS as in the CHR

git-subtree-dir: opendbc
git-subtree-split: 38650f842ba919b1cf67bde601052fed38003a89
2019-06-28 21:09:13 +00:00
Vehicle Researcher b93f77ea0e Merge opendbc subtree 2019-06-28 21:09:13 +00:00
Vehicle Researcher dba8e01e54 Squashed 'panda/' content from commit ae816c104
git-subtree-dir: panda
git-subtree-split: ae816c104a99a8cd4d508ccd6abdc7b93053529c
2019-06-28 21:09:12 +00:00
Vehicle Researcher 983120bfed Merge commit 'dba8e01e540f8b6b231be082ee6d36304aa1997d' as 'panda' 2019-06-28 21:09:12 +00:00
Vehicle Researcher 27803e787b Remove old panda subtree 2019-06-28 21:09:11 +00:00
Vehicle Researcher 24e096d9f0 Squashed 'cereal/' content from commit 9f2076eef
git-subtree-dir: cereal
git-subtree-split: 9f2076eefd6f71c9b640d26d29ed33a6bbcbf4ca
2019-06-28 21:09:10 +00:00
Vehicle Researcher 6651d50c81 Merge commit '24e096d9f0f424c22b616b43957a5fd310f4ee83' as 'cereal' 2019-06-28 21:09:10 +00:00
Vehicle Researcher f64c4df8c8 Remove old cereal subtree 2019-06-28 21:09:09 +00:00
Rick Lan 00c48f0ba3 將 dragonconf 移至系統的 params, 方便將來移植到 APK 2019-06-28 15:22:34 +10:00
Rick Lan f78b6fdd17 加入油門不取消 OP 選項 2019-06-27 15:11:18 +10:00
Rick Lan 7c537ee201 加入轉向燈暫時取消 OP 方向盤控制選項 2019-06-27 15:11:18 +10:00
Rick Lan e2d77db22a 加入 minimal UI 2019-06-27 15:11:18 +10:00
Rick Lan bf5e361b26 加入斷電自動關機功能 2019-06-27 15:11:18 +10:00
Rick Lan a7ad4488b9 加入安全檢測功能 (提示駕駛以防止 OP 在使用中突然斷開 USB) 2019-06-27 15:11:18 +10:00
Rick Lan f7fbcfe59d 加入 mediaplayer (播放音效) 2019-06-27 15:11:18 +10:00
Rick Lan 1efed2ed00 加入完全取消駕駛監控選項 2019-06-27 15:11:18 +10:00
Rick Lan 15c43ad722 調降模型路寬至 3.5m 2019-06-27 13:33:15 +10:00
Rick Lan 5fcbfcc359 加入 dashcam (行車記錄) 2019-06-27 13:30:33 +10:00
Rick Lan 672d80735f 加入 dragonconf 讀取 /data/dragonpilot.json 設定 2019-06-27 13:27:58 +10:00
Rick Lan 2f5e35035d 讓 UI 能夠顯示中文 2019-06-27 12:00:52 +10:00
Rick Lan 1aafc5b0ef 自動安裝中文字型 2019-06-27 11:56:49 +10:00
Rick Lan 9f66b533e2 修改 sentry.io 相關程式碼
* 提供更多的資訊
* 將錯誤轉發至 dragonpilot 帳號
2019-06-27 11:36:32 +10:00
dekerr 1883bd6135 remove 17 odyssey 2019-06-26 15:20:11 -04:00
eFini 1ba6b0004d Updating existing fingerprint to support both China 2017 & 2019 CRV-H (#689)
* Fingerprint works on both China 2017 & 2019 CRV-H

* update readme
2019-06-25 14:15:38 -07:00
TrackZero 68b86c7ca8 Added fingerprint for 2019 Toyota Prius LE (#694)
* Adding fingerprint for 2019 Prius LE
2019-06-25 14:04:39 -07:00
Rick Lan 65a8f13d98 Merge branch 'devel' of https://github.com/eFiniLan/openpilot into devel-lexus-ish-ave30r 2019-06-25 13:44:06 +10:00
Rick Lan 9a4eb3e0b0 Merge branch 'devel' of https://github.com/eFiniLan/openpilot into devel-lexus-ish-ave30r 2019-06-25 13:42:38 +10:00
Rick Lan 3148499f69 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-06-24 16:24:32 +10:00
dekerr 36881b6410 update vals (#705) 2019-06-20 12:22:30 -07:00
Willem Melching fe7e5cf5df Deterministic boardd build (#702) 2019-06-17 15:23:03 -07:00
rbiasini d8b1588937 Reconcile panda pedal cancel logic for Toyota with controls (#698) 2019-06-13 17:51:12 -07:00
rbiasini a2f4d6b5ad Subaru re-added to the list of supported cars with with DIY giraffe (#691)
* Subaru re-added to the list of supported cars with with DIY giraffe

* Minor line break fixes
2019-06-07 18:09:29 -07:00
George Hotz 16d0c4a3e7 Merge pull request #679 from njbrown09/entunehotspot
Add Toyota Entune Wifi hotspot to hotspot check.
2019-06-06 23:11:43 -07:00
Rick Lan dca99bea38 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-06-07 08:11:31 +10:00
Rick Lan 392cf59937 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-06-07 08:10:39 +10:00
Rick Lan 0bf4dbc3b0 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-06-05 16:31:13 +10:00
Nick Brown c0a3e48d94 Detect toyota connected car wifi as a hotspot and not a normal home wifi network. 2019-06-02 00:18:00 -04:00
Rick Lan 0a94454812 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-05-22 20:01:38 +10:00
Rick Lan 2a698bf73e Fix values.py 2019-05-22 10:09:01 +10:00
Rick Lan 64e6706a0b Update variable name 2019-05-22 10:07:31 +10:00
Rick Lan 18e80ea755 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r
# Conflicts:
#	selfdrive/car/toyota/interface.py
#	selfdrive/car/toyota/values.py
2019-05-21 10:30:42 +10:00
Rick Lan af7e33bae8 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-05-21 10:16:31 +10:00
Rick Lan 484fa1ac63 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-05-17 22:11:58 +10:00
Rick Lan 603af161fd Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-05-16 15:05:10 +10:00
Rick Lan 42906ef1ae Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-05-14 12:30:46 +10:00
Rick Lan c9a9d8bd97 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-05-07 10:39:21 +10:00
Rick Lan 91f0b5c6cd revert unneeded change 2019-05-04 11:40:41 +10:00
Rick Lan e0eccb87b5 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-05-04 11:36:50 +10:00
Rick Lan 5b8976af61 * change steering torque to 1600 2019-04-24 21:59:03 +10:00
Rick Lan a7cf5c2cbb Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-04-10 10:40:31 +10:00
Rick Lan 5fe6367d08 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-04-03 14:08:39 +10:00
Rick Lan 99ba8c8cc8 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-03-27 09:02:39 +10:00
Rick Lan 88213d0cfd Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-03-27 09:01:26 +10:00
Rick Lan 66f2a6fe01 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-03-20 10:18:51 +10:00
Rick Lan 365f3bd4dc Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-03-15 11:41:20 +10:00
Rick Lan a85488fbb8 move dbc files PR to opendbc repo. 2019-03-12 11:21:43 +10:00
Rick Lan c5933c9d8d fix symbol issue on checks array 2019-03-12 11:09:23 +10:00
Rick Lan de0ea4820c Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-03-06 14:56:51 +10:00
Rick Lan 26e60a6b4b Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-03-04 09:57:44 +10:00
Rick Lan e7d4197a08 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-02-27 13:58:59 +10:00
Rick Lan 0db8d26c12 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-02-27 12:57:17 +10:00
Rick Lan 26c583b5c4 Merge branch 'devel-lexus-ish-ave30r' of https://github.com/eFiniLan/openpilot into devel-lexus-ish-ave30r
# Conflicts:
#	selfdrive/car/toyota/carstate.py
2019-02-22 16:13:27 +10:00
Rick Lan 181dba4514 * refactor carstate 2019-02-22 16:12:38 +10:00
Rick Lan 5f5698900c * refactor carstate 2019-02-22 16:08:33 +10:00
Rick Lan 1d0dc50f98 update safetyParam to 66 2019-02-22 12:40:36 +10:00
Rick Lan 2890a4ede8 add stop_and_go and update retParam value 2019-02-21 23:35:32 +10:00
Rick Lan 882eaf15bf Remove invalid signals/checks 2019-02-21 22:14:08 +10:00
Rick Lan 6fba167ef9 remove duplicated definition 2019-02-21 20:15:45 +10:00
Rick Lan 65b8466f22 Update dbc 2019-02-21 19:57:54 +10:00
Rick Lan 9c3ec2fd2d Merge branch 'devel' of https://github.com/eFiniLan/openpilot into devel-lexus-ish-ave30r 2019-02-21 16:46:29 +10:00
Rick Lan a1d96b4d8a fix indentation 2019-02-21 16:38:48 +10:00
Rick Lan 57bca3c658 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r
# Conflicts:
#	selfdrive/car/toyota/interface.py
2019-02-21 16:36:17 +10:00
Rick Lan 40422ea5d6 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-02-21 16:14:15 +10:00
Rick Lan 7017f8ebf0 apply quillford's value again 2019-02-17 12:36:49 +10:00
Rick Lan 19660515b5 Revert "remove unnecessary changes in carstate.py"
This reverts commit b9cf00f4ce.
2019-02-17 12:36:11 +10:00
Rick Lan d1fe6a9667 getting error from last change, revert a couple back. 2019-02-17 10:46:07 +10:00
Rick Lan c227f977e6 apply quillford's KpV and KiV value. 2019-02-17 10:30:38 +10:00
Rick Lan b9cf00f4ce remove unnecessary changes in carstate.py 2019-02-17 10:28:20 +10:00
Rick Lan d192b4fa8f Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-02-15 15:00:34 +10:00
Rick Lan f760fa00ae Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-02-15 14:59:28 +10:00
Rick Lan 83cbf29588 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-02-07 12:11:55 +10:00
Rick Lan 022b058bc5 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-02-07 12:10:23 +10:00
Rick Lan f789be8485 * add matched canbus message descriptions from 2017_toyota_master.dbc 2019-02-05 15:52:17 +10:00
Rick Lan 8310b01530 update dbc file add a couple more definitions 2019-02-01 16:44:59 +10:00
Rick Lan d2f755286c Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-01-30 16:20:19 +10:00
Rick Lan 8fbcaf423e Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-01-30 16:18:35 +10:00
Rick Lan 6ff384ba3f Update dbc file to support mini car and left/right line indicator on display 2019-01-25 12:28:04 +10:00
Rick Lan 9e2be16440 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-01-25 12:07:38 +10:00
Rick Lan 5dfc758d33 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-01-25 11:51:16 +10:00
Rick Lan 14894b4b66 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-12-17 17:11:43 +10:00
Rick Lan fdccc48bf7 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-12-17 17:10:45 +10:00
Rick Lan 8e491aaf58 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-12-14 10:42:46 +10:00
Rick Lan c46d931f40 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-12-14 10:25:05 +10:00
Rick Lan 6c3468b02f Move ave30r related changes to only this branch 2018-12-12 11:52:31 +10:00
Rick Lan d398ba2c62 Merge branch 'devel' of https://github.com/EternityLan/openpilot into devel-lexus-ish-ave30r 2018-12-12 11:51:16 +10:00
Rick Lan 8e346aa668 revert changes. 2018-12-12 11:50:06 +10:00
Rick Lan 989f3c5ecc Merge branch 'devel' of https://github.com/EternityLan/openpilot into devel 2018-12-12 11:47:37 +10:00
Rick Lan 5806c90a3e revert devel back to stock devel 2018-12-12 11:47:31 +10:00
Rick Lan 2c081208eb revert devel back to stock devel 2018-12-12 11:45:51 +10:00
Rick Lan ef64a1bf5f Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-12-11 18:39:00 +10:00
Rick Lan 278ce557da Merge branch 'devel' of https://github.com/EternityLan/openpilot into devel 2018-12-11 18:36:40 +10:00
Rick Lan 5ff4ff176b Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-12-05 12:54:42 +10:00
Rick Lan 87b02db857 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-23 11:03:32 +10:00
Rick Lan c0929d6954 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-21 15:38:07 +10:00
Rick Lan 8ca37f5d44 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-20 16:02:26 +10:00
Rick Lan f43e347fbf revert if else statement so it doesn't cause error. 2018-11-19 21:10:50 +10:00
Rick Lan 32003bd048 remove else statements 2018-11-19 12:27:34 +10:00
Rick Lan a326b4b4cd Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-19 12:19:56 +10:00
Rick Lan bf1368b4cf ignore standstill in lexus ish 2018-11-19 12:19:27 +10:00
Rick Lan c3d5b9d62e fix dbc to adapt 0.5.6 2018-11-18 15:55:06 +10:00
Rick Lan d5916b92d5 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-18 14:13:32 +10:00
Rick Lan 91dd484c27 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-16 09:06:10 +10:00
Rick Lan bfaf9e6f66 use downloaded file 2018-11-12 16:06:12 +10:00
Rick Lan 30eb131980 more changes 2018-11-12 16:05:26 +10:00
Rick Lan 24d0084938 remove changes 2018-11-12 16:04:42 +10:00
Rick Lan a7cadcc390 fix 2018-11-12 16:03:55 +10:00
Rick Lan 8cfdc1cbc2 revert changes 2018-11-12 15:55:01 +10:00
Rick Lan 88dd52414f removed all customd stuff 2018-11-12 15:51:55 +10:00
Rick Lan 0b21c835a4 some minor code update. 2018-11-12 15:44:33 +10:00
Rick Lan 81f3709a9f Use os.system instead of subprocess. 2018-11-12 13:10:16 +10:00
Rick Lan f6214eb932 * init -- customd 2018-11-12 11:51:53 +10:00
Rick Lan de3e265b36 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-09 15:31:44 +10:00
Rick Lan 3239f78e69 Merge branch 'devel' of https://github.com/EternityLan/openpilot into devel 2018-11-09 13:35:53 +10:00
Rick Lan d27257bbbb more changes for removing lexus specific safety. 2018-11-09 13:35:39 +10:00
Rick Lan 4631a7e81f more changes for removing lexus specific safety. 2018-11-09 13:34:36 +10:00
Rick Lan 53f2722a3d Cruise state on lexus and toyota are both in 0:1D2 @ 0x20, so we can mergee lexus specific safety check with toyota. 2018-11-09 13:31:33 +10:00
Rick Lan 0d62ee7598 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-09 09:59:36 +10:00
Rick Lan 1efeded724 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-07 16:56:35 +10:00
Rick Lan 29aaade7ab added missing line break 2018-10-31 12:44:21 +10:00
Rick Lan f7f91aec22 Merge branch 'devel' of https://github.com/commaai/openpilot into devel
# Conflicts:
#	selfdrive/boardd/boardd.cc
2018-10-31 12:41:16 +10:00
Rick Lan 1d4c811611 min enable speed set to -1. 2018-10-29 08:54:27 +10:00
Rick Lan 421fe728f1 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-10-26 10:57:45 +10:00
Rick Lan 9683bccaf6 * revert unnecessary changes 2018-10-26 10:24:57 +10:00
Rick Lan 666826198f * added missing values in checks[] 2018-10-26 10:23:39 +10:00
Rick Lan fcbb07b1a0 * clean up changes, rename PCM_CRUISE_LEXUS_ISH in dbc to PCM_CRUISE_2 to reduce changes required in carstate.py 2018-10-26 10:19:49 +10:00
Rick Lan 9e067e91ee making sure every SAFETY_LEXUS_ISH defined as 9 2018-10-24 10:12:04 +10:00
Rick Lan c675c28356 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-10-24 10:05:58 +10:00
Rick Lan f2f7e8d516 update lexus ish defined value to match the value in safety.h in panda/ 2018-10-24 10:03:52 +10:00
Rick Lan 8237b60749 removed extra defined 2018-10-23 14:36:27 +10:00
Rick Lan 7405041b42 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-10-23 13:45:42 +10:00
Rick Lan 4bc57a9792 * merged with 0.5.5 2018-10-22 10:42:22 +10:00
Rick Lan 851d6f1b96 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-10-19 12:02:17 +10:00
Rick Lan 4eeaaf1b08 * update auto high beam dbc address. 2018-10-19 12:02:00 +10:00
Rick Lan 243f10d5fb Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-10-10 16:16:40 +10:00
Rick Lan 837809774b Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-10-04 14:26:51 +10:00
Rick Lan 2100e46b60 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-09-28 12:24:12 +10:00
Rick Lan c7f9c1bd69 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-09-26 10:15:33 +10:00
Rick Lan 574fabf9ca Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-09-20 12:08:22 +10:00
Rick Lan 00def2849c * fixed opendbc content order, otherwise cabana can't load it. 2018-09-20 10:27:43 +10:00
Rick Lan 9df9019c1e * revert unnecessary changes. 2018-09-19 14:10:37 +10:00
EternityLan c818b6ada3 Merge pull request #1 from EternityLan/devel_lexus-ish-ave30r_v2
Devel lexus ish ave30r v2
2018-09-19 14:05:16 +10:00
Rick Lan be750af7ff Merge branch 'devel-lexus-ish-ave30r' of https://github.com/EternityLan/openpilot into devel_lexus-ish-ave30r_v2 2018-09-19 14:02:25 +10:00
Rick Lan f8752fbe2c * fixed .tx_lin assignment 2018-09-19 13:59:00 +10:00
Rick Lan fbbfcc5a74 * renamed AVE30 to ISH 2018-09-19 10:13:07 +10:00
Rick Lan 67ccfb11c7 Merge branch 'devel' of https://github.com/commaai/openpilot into devel_lexus-ish-ave30r_v2 2018-09-19 09:08:10 +10:00
Rick Lan 31d9f18fca * v2 init 2018-09-19 09:05:48 +10:00
Rick Lan 02b6a7a82b Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-09-19 09:02:35 +10:00
Rick Lan 3103b9bfea Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r
# Conflicts:
#	selfdrive/car/toyota/interface.py
2018-09-08 19:53:22 +10:00
Rick Lan fb470830ed * update safetyParam, 100 doesnt hold bumpy road 2018-09-04 17:16:37 +10:00
Rick Lan a988911e05 * changed safetyParam to 100/1.0 2018-09-04 13:24:14 +10:00
Rick Lan 9abe003d1d * remove extra space. 2018-09-04 13:22:39 +10:00
Rick Lan 81477e857a * fix conflict. 2018-09-04 12:50:50 +10:00
Rick Lan 67669174f0 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r
# Conflicts:
#	selfdrive/boardd/boardd.cc
#	selfdrive/car/toyota/interface.py
#	selfdrive/car/toyota/values.py
2018-09-04 12:40:02 +10:00
Rick Lan e0d7ce9e57 * updated minEnableSpeed to 19mph as per @rbiasini recommendation. 2018-09-03 13:46:33 +10:00
Rick Lan ec975a36cd Merge branch 'devel-lexus-ish-ave30r' of https://github.com/EternityLan/openpilot into devel-lexus-ish-ave30r
# Conflicts:
#	selfdrive/car/toyota/interface.py
2018-09-03 12:00:45 +10:00
Rick Lan 65ca70c731 * update minEnableSpeed 2018-09-03 12:00:15 +10:00
Rick Lan 3dffd9a942 * update minEnableSpeed 2018-09-03 11:53:13 +10:00
Rick Lan 547c9eaad0 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-09-03 11:48:54 +10:00
Rick Lan 40c70cc865 * all to lower case 2018-08-31 10:40:55 +10:00
Rick Lan 112c02991d * minor changes to static msgs. 2018-08-31 10:28:17 +10:00
Rick Lan bdc16ce545 * updated comments. 2018-08-31 00:04:46 +10:00
Rick Lan 5c041d3b78 * fix compile error. 2018-08-30 20:49:29 +10:00
Rick Lan 97949b12b3 * delete unused def. 2018-08-30 20:46:33 +10:00
Rick Lan fabf747d74 * removed unused var definition. 2018-08-30 20:45:06 +10:00
Rick Lan 41b7ba1092 * fix control mismatch issue. 2018-08-30 20:40:46 +10:00
Rick Lan f86b42cd81 * use standard ui command, looks no different before and after. 2018-08-30 20:26:09 +10:00
Rick Lan 3d0859dc39 * removed duplicated msg in signal 2018-08-30 20:14:57 +10:00
Rick Lan 1ad1340b58 * init acc_addr & acc_vl value 2018-08-30 20:06:28 +10:00
Rick Lan 05231722e5 * init commit 2018-08-30 16:11:04 +10:00
2515 changed files with 376841 additions and 222285 deletions
+25
View File
@@ -0,0 +1,25 @@
---
name: Bug report
about: Create a report to help us improve openpilot
title: ''
labels: 'bug'
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**How to reproduce or log data**
Steps to reproduce the behavior, or a explorer/cabana link to the exact drive and timestamp of when the bug occurred.
**Expected behavior**
A clear and concise description of what you expected to happen.
**Device/Version information (please complete the following information):**
- Device: [e.g. EON/EON Gold]
- Version: [e.g. 0.6.4], or commit hash when on devel
- Car make/model [e.g. Toyota Prius 2016]
**Additional context**
Add any other context about the problem here.
+21
View File
@@ -0,0 +1,21 @@
Choose one of the templates below:
# Fingerprint
This pull requests adds a fingerprint for <Make - Model - Year - Trim>.
This is an explorer link to a drive with the stock system enabled: ...
# Car support
This pull requests adds support for <Make - Model - Year - Trim>.
This is an explorer link to a drive with the stock system enabled: ...
This is an explorer link to a drive with openpilot system enabled: ...
# Feature
This pull requests adds feature X
## Description
Explain what the feature does
## Testing
Explain how the feature was tested. Either by the added unit tests, or what tests were performed while driving.
+22 -2
View File
@@ -1,11 +1,16 @@
venv/
.DS_Store
.tags
.ipynb_checkpoints
.idea
.overlay_init
.overlay_consistent
.sconsign.dblite
.vscode
model2.png
a.out
*.dylib
*.DSYM
*.d
*.pyc
@@ -13,7 +18,9 @@ a.out
.*.swp
.*.swo
.*.un~
*.tmp
*.o
*.os
*.so
*.a
*.clb
@@ -23,17 +30,30 @@ a.out
config.json
clcache
persist
board/obj/
selfdrive/boardd/boardd
selfdrive/logcatd/logcatd
selfdrive/mapd/default_speeds_by_region.json
selfdrive/proclogd/proclogd
selfdrive/ui/ui
selfdrive/test/tests/plant/out
selfdrive/ui/_ui
selfdrive/test/longitudinal_maneuvers/out
selfdrive/visiond/visiond
selfdrive/loggerd/loggerd
selfdrive/sensord/_gpsd
selfdrive/sensord/_sensord
selfdrive/camerad/camerad
selfdrive/modeld/_modeld
selfdrive/modeld/_dmonitoringmodeld
/src/
one
openpilot
notebooks
xx
panda_jungle
.coverage*
htmlcov
pandaextra
+1 -17
View File
@@ -3,21 +3,5 @@ sudo: required
services:
- docker
install:
- docker build -t tmppilot -f Dockerfile.openpilot .
script:
- docker run
tmppilot /bin/sh -c 'cd /tmp/openpilot/selfdrive/test/ && ./test_fingerprints.py'
- docker run
tmppilot /bin/sh -c 'cd /tmp/openpilot/ && pyflakes $(find . -iname "*.py" | grep -vi "^\./pyextra.*" | grep -vi "^\./panda")'
- docker run
tmppilot /bin/sh -c 'cd /tmp/openpilot/ && pylint $(find . -iname "*.py" | grep -vi "^\./pyextra.*" | grep -vi "^\./panda"); exit $(($? & 3))'
- docker run tmppilot /bin/sh -c 'cd /tmp/openpilot/ && make -C cereal && python -m unittest discover common'
- docker run tmppilot /bin/sh -c 'cd /tmp/openpilot/ && make -C cereal && python -m unittest discover selfdrive/can'
- docker run tmppilot /bin/sh -c 'cd /tmp/openpilot/ && make -C cereal && python -m unittest discover selfdrive/boardd'
- docker run tmppilot /bin/sh -c 'cd /tmp/openpilot/ && make -C cereal && python -m unittest discover selfdrive/controls'
- docker run tmppilot /bin/sh -c 'cd /tmp/openpilot/ && python -m unittest discover selfdrive/loggerd'
- 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'
- ./run_docker_tests.sh
+9
View File
@@ -29,3 +29,12 @@ Code is automatically check for style by travis as part of the automated tests.
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)
## Pull Requests
Pull requests should be against the master branch. Before running master on in-car hardware, you'll need to run
```
git submodule init
git submodule update
```
in order to pull down the submodules, such as `panda` and `opendbc`.
-44
View File
@@ -1,44 +0,0 @@
FROM ubuntu:16.04
ENV PYTHONUNBUFFERED 1
RUN apt-get update && apt-get install -y \
autoconf \
build-essential \
clang \
wget \
bzip2 \
git \
libglib2.0-0 \
libtool \
python-pip \
libzmq5-dev \
libffi-dev \
libusb-1.0-0 \
libssl-dev \
ocl-icd-libopencl1 \
ocl-icd-opencl-dev \
opencl-headers
COPY phonelibs/install_capnp.sh /tmp/install_capnp.sh
RUN /tmp/install_capnp.sh
RUN pip install --upgrade pip==18.0
RUN pip install numpy==1.11.2 scipy==0.18.1 matplotlib==2.1.2
COPY requirements_openpilot.txt /tmp/
RUN pip install -r /tmp/requirements_openpilot.txt
ENV PYTHONPATH /tmp/openpilot:$PYTHONPATH
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
RUN make -C /tmp/openpilot/selfdrive/controls/lib/lateral_mpc clean
-9
View File
@@ -1,9 +0,0 @@
code_dir := $(shell pwd)
# TODO: Add a global build system
.PHONY: all
all:
cd selfdrive && PYTHONPATH=$(code_dir) PREPAREONLY=1 ./manager.py
+231 -154
View File
@@ -1,169 +1,280 @@
[![](https://i.imgur.com/xY2gdHv.png)](#)
Welcome to openpilot
======
[openpilot](http://github.com/commaai/openpilot) is an open source driving agent. Currently, it performs the functions of Adaptive Cruise Control (ACC) and Lane Keeping Assist System (LKAS) for selected Honda, Toyota, Acura, Lexus, Chevrolet, Hyundai, Kia. It's about on par with Tesla Autopilot and GM Super Cruise, and better than [all other manufacturers](http://www.thedrive.com/tech/5707/the-war-for-autonomous-driving-part-iii-us-vs-germany-vs-japan).
The openpilot codebase has been written to be concise and to enable rapid prototyping. We look forward to your contributions - improving real vehicle automation has never been easier.
[![](https://i.imgur.com/UelUjKAh.png)](#)
Table of Contents
=======================
* [Community](#community)
* [Hardware](#hardware)
* [What is openpilot?](#what-is-openpilot)
* [Integration with Stock Features](#integration-with-stock-features)
* [Supported Hardware](#supported-hardware)
* [Supported Cars](#supported-cars)
* [Community Maintained Cars](#community-maintained-cars)
* [In Progress Cars](#in-progress-cars)
* [How can I add support for my car?](#how-can-i-add-support-for-my-car)
* [Directory structure](#directory-structure)
* [User Data / chffr Account / Crash Reporting](#user-data--chffr-account--crash-reporting)
* [Community Maintained Cars and Features](#community-maintained-cars-and-features)
* [Installation Instructions](#installation-instructions)
* [Limitations of openpilot ALC and LDW](#limitations-of-openpilot-alc-and-ldw)
* [Limitations of openpilot ACC and FCW](#limitations-of-openpilot-acc-and-fcw)
* [Limitations of openpilot DM](#limitations-of-openpilot-dm)
* [User Data and comma Account](#user-data-and-comma-account)
* [Safety and Testing](#safety-and-testing)
* [Testing on PC](#testing-on-pc)
* [Contributing](#contributing)
* [Community and Contributing](#community-and-contributing)
* [Directory Structure](#directory-structure)
* [Licensing](#licensing)
---
Community
What is openpilot?
------
openpilot is developed by [comma.ai](https://comma.ai/) and users like you.
We have a [Twitter you should follow](https://twitter.com/comma_ai).
Also, we have a several thousand people community on [Discord](https://discord.comma.ai).
[openpilot](http://github.com/commaai/openpilot) is an open source driver assistance system. Currently, openpilot performs the functions of Adaptive Cruise Control (ACC), Automated Lane Centering (ALC), Forward Collision Warning (FCW) and Lane Departure Warning (LDW) for a growing variety of supported [car makes, models and model years](#supported-cars). In addition, while openpilot is engaged, a camera based Driver Monitoring (DM) feature alerts distracted and asleep drivers.
<table>
<tr>
<td><a href="https://www.youtube.com/watch?v=ICOIin4p70w" title="YouTube" rel="noopener"><img src="https://i.imgur.com/gBTo7yB.png"></a></td>
<td><a href="https://www.youtube.com/watch?v=1zCtj3ckGFo" title="YouTube" rel="noopener"><img src="https://i.imgur.com/gNhhcep.png"></a></td>
<td><a href="https://www.youtube.com/watch?v=Qd2mjkBIRx0" title="YouTube" rel="noopener"><img src="https://i.imgur.com/tFnSexp.png"></a></td>
<td><a href="https://www.youtube.com/watch?v=ju12vlBm59E" title="YouTube" rel="noopener"><img src="https://i.imgur.com/3BKiJVy.png"></a></td>
<td><a href="https://www.youtube.com/watch?v=mgAbfr42oI8" title="YouTube" rel="noopener"><img src="https://i.imgur.com/kAtT6Ei.png"></a></td>
<td><a href="https://www.youtube.com/watch?v=394rJKeh76k" title="YouTube" rel="noopener"><img src="https://i.imgur.com/lTt8cS2.png"></a></td>
<td><a href="https://www.youtube.com/watch?v=1iNOc3cq8cs" title="YouTube" rel="noopener"><img src="https://i.imgur.com/ANnuSpe.png"></a></td>
<td><a href="https://www.youtube.com/watch?v=Vr6NgrB-zHw" title="YouTube" rel="noopener"><img src="https://i.imgur.com/Qypanuq.png"></a></td>
</tr>
<tr>
<td><a href="https://www.youtube.com/watch?v=Z5VY5FzgNt4" title="YouTube" rel="noopener"><img src="https://i.imgur.com/3I9XOK2.png"></a></td>
<td><a href="https://www.youtube.com/watch?v=blnhZC7OmMg" title="YouTube" rel="noopener"><img src="https://i.imgur.com/f9IgX6s.png"></a></td>
<td><a href="https://www.youtube.com/watch?v=iRkz7FuJsA8" title="YouTube" rel="noopener"><img src="https://i.imgur.com/Vo5Zvmn.png"></a></td>
<td><a href="https://www.youtube.com/watch?v=IHjEqAKDqjM" title="YouTube" rel="noopener"><img src="https://i.imgur.com/V9Zd81n.png"></a></td>
<td><a href="https://www.youtube.com/watch?v=Ug41KIKF0oo" title="YouTube" rel="noopener"><img src="https://i.imgur.com/3caZ7xM.png"></a></td>
<td><a href="https://www.youtube.com/watch?v=NVR_CdG1FRg" title="YouTube" rel="noopener"><img src="https://i.imgur.com/bAZOwql.png"></a></td>
<td><a href="https://www.youtube.com/watch?v=tkEvIdzdfUE" title="YouTube" rel="noopener"><img src="https://i.imgur.com/EFINEzG.png"></a></td>
<td><a href="https://www.youtube.com/watch?v=_P-N1ewNne4" title="YouTube" rel="noopener"><img src="https://i.imgur.com/gAyAq22.png"></a></td>
</tr>
</table>
Hardware
Integration with Stock Features
------
At the moment openpilot supports the [EON Dashcam DevKit](https://comma.ai/shop/products/eon-dashcam-devkit). A [panda](https://shop.comma.ai/products/panda-obd-ii-dongle) and a [giraffe](https://comma.ai/shop/products/giraffe/) are recommended tools to interface the EON with the car. We'd like to support other platforms as well.
In all supported cars:
* Stock Lane Keep Assist (LKA) and stock ALC are replaced by openpilot ALC, which only functions when openpilot is engaged by the user.
* Stock LDW is replaced by openpilot LDW.
Install openpilot on a neo device by entering ``https://openpilot.comma.ai`` during NEOS setup.
Additionally, on specific supported cars (see ACC column in [supported cars](#supported-cars)):
* Stock ACC is replaced by openpilot ACC.
* openpilot FCW operates in addition to stock FCW.
openpilot should preserve all other vehicle's stock features, including, but are not limited to: FCW, Automatic Emergency Braking (AEB), auto high-beam, blind spot warning, and side collision warning.
Supported Hardware
------
At the moment, openpilot supports the [EON DevKit](https://comma.ai/shop/products/eon-dashcam-devkit) and the [comma two](https://comma.ai/shop/products/comma-two-devkit). A [car harness](https://comma.ai/shop/products/car-harness) is recommended to connect the EON or comma two to the car. In the future, we'd like to support other platforms as well, like gaming PCs.
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 |
| 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 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 |
| Honda | Civic Sedan/Coupe 2016-18| Honda Sensing | Yes | Yes | 0mph | 12mph | Nidec |
| 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-19 | Honda Sensing | Yes | Stock | 0mph | 12mph | Bosch |
| Honda | CR-V Hybrid 2019 | All | Yes | Stock | 0mph | 12mph | Bosch |
| Honda | Odyssey 2017-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 | Genesis 2018 | All | Yes | Stock | 19mph | 34mph | Custom<sup>6</sup>|
| Jeep | Grand Cherokee 2017-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-19 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
| Toyota | Avalon 2016 | TSS-P | Yes | Yes<sup>2</sup>| 20mph<sup>1</sup>| 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 | Corolla Hatchback 2019 | All | Yes | Yes | 0mph | 0mph | Toyota |
| Toyota | Highlander 2017-18 | 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-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 |
| Make | Model (US Market Reference) | Supported Package | ACC | No ACC accel below | No ALC below |
| ----------| ------------------------------| ------------------| -----------------| -------------------| -------------|
| Acura | ILX 2016-18 | AcuraWatch Plus | openpilot | 25mph<sup>5</sup> | 25mph |
| Acura | RDX 2016-18 | AcuraWatch Plus | openpilot | 25mph<sup>5</sup> | 12mph |
| Chrysler | Pacifica 2017-18 | Adaptive Cruise | Stock | 0mph | 9mph |
| Chrysler | Pacifica Hybrid 2017-18 | Adaptive Cruise | Stock | 0mph | 9mph |
| Chrysler | Pacifica Hybrid 2019-20 | Adaptive Cruise | Stock | 0mph | 39mph |
| Honda | Accord 2018-19 | All | Stock | 0mph | 3mph |
| Honda | Accord Hybrid 2018-19 | All | Stock | 0mph | 3mph |
| Honda | Civic Hatchback 2017-19 | Honda Sensing | Stock | 0mph | 12mph |
| Honda | Civic Sedan/Coupe 2016-18 | Honda Sensing | openpilot | 0mph | 12mph |
| Honda | Civic Sedan/Coupe 2019 | Honda Sensing | Stock | 0mph | 2mph |
| Honda | CR-V 2015-16 | Touring | openpilot | 25mph<sup>5</sup> | 12mph |
| Honda | CR-V 2017-19 | Honda Sensing | Stock | 0mph | 12mph |
| Honda | CR-V Hybrid 2017-2019 | Honda Sensing | Stock | 0mph | 12mph |
| Honda | Fit 2018-19 | Honda Sensing | openpilot | 25mph<sup>5</sup> | 12mph |
| Honda | Odyssey 2018-20 | Honda Sensing | openpilot | 25mph<sup>5</sup> | 0mph |
| Honda | Passport 2019 | All | openpilot | 25mph<sup>5</sup> | 12mph |
| Honda | Pilot 2016-18 | Honda Sensing | openpilot | 25mph<sup>5</sup> | 12mph |
| Honda | Pilot 2019 | All | openpilot | 25mph<sup>5</sup> | 12mph |
| Honda | Ridgeline 2017-19 | Honda Sensing | openpilot | 25mph<sup>5</sup> | 12mph |
| Hyundai | Elantra 2017-19<sup>1</sup> | SCC + LKAS | Stock | 19mph | 34mph |
| Hyundai | Genesis 2018<sup>1</sup> | All | Stock | 19mph | 34mph |
| Hyundai | Santa Fe 2019<sup>1</sup> | All | Stock | 0mph | 0mph |
| Jeep | Grand Cherokee 2016-18 | Adaptive Cruise | Stock | 0mph | 9mph |
| Jeep | Grand Cherokee 2019 | Adaptive Cruise | Stock | 0mph | 39mph |
| Kia | Optima 2019<sup>1</sup> | SCC + LKAS | Stock | 0mph | 0mph |
| Kia | Sorento 2018<sup>1</sup> | All | Stock | 0mph | 0mph |
| Kia | Stinger 2018<sup>1</sup> | SCC + LKAS | Stock | 0mph | 0mph |
| Lexus | CT Hybrid 2017-18 | All | Stock<sup>4</sup>| 0mph | 0mph |
| Lexus | ES 2019 | All | openpilot | 0mph | 0mph |
| Lexus | ES Hybrid 2019 | All | openpilot | 0mph | 0mph |
| Lexus | IS 2017-2019 | All | Stock | 22mph | 0mph |
| Lexus | IS Hybrid 2017 | All | Stock | 0mph | 0mph |
| Lexus | RX 2016-17 | All | Stock<sup>4</sup>| 0mph | 0mph |
| Lexus | RX 2020 | All | openpilot | 0mph | 0mph |
| Lexus | RX Hybrid 2016-19 | All | Stock<sup>4</sup>| 0mph | 0mph |
| Subaru | Crosstrek 2018-19 | EyeSight | Stock | 0mph | 0mph |
| Subaru | Impreza 2019-20 | EyeSight | Stock | 0mph | 0mph |
| Toyota | Avalon 2016 | TSS-P | Stock<sup>4</sup>| 20mph<sup>5</sup> | 0mph |
| Toyota | Avalon 2017-18 | All | Stock<sup>4</sup>| 20mph<sup>5</sup> | 0mph |
| Toyota | Camry 2018-19 | All | Stock | 0mph<sup>2</sup> | 0mph |
| Toyota | Camry Hybrid 2018-19 | All | Stock | 0mph<sup>2</sup> | 0mph |
| Toyota | C-HR 2017-19 | All | Stock | 0mph | 0mph |
| Toyota | C-HR Hybrid 2017-19 | All | Stock | 0mph | 0mph |
| Toyota | Corolla 2017-19 | All | Stock<sup>4</sup>| 20mph<sup>5</sup> | 0mph |
| Toyota | Corolla 2020 | All | openpilot | 0mph | 0mph |
| Toyota | Corolla Hatchback 2019-20 | All | openpilot | 0mph | 0mph |
| Toyota | Corolla Hybrid 2020 | All | openpilot | 0mph | 0mph |
| Toyota | Highlander 2017-19 | All | Stock<sup>4</sup>| 0mph | 0mph |
| Toyota | Highlander Hybrid 2017-19 | All | Stock<sup>4</sup>| 0mph | 0mph |
| Toyota | Prius 2016 | TSS-P | Stock<sup>4</sup>| 0mph | 0mph |
| Toyota | Prius 2017-19 | All | Stock<sup>4</sup>| 0mph | 0mph |
| Toyota | Prius Prime 2017-20 | All | Stock<sup>4</sup>| 0mph | 0mph |
| Toyota | Rav4 2016 | TSS-P | Stock<sup>4</sup>| 20mph<sup>5</sup> | 0mph |
| Toyota | Rav4 2017-18 | All | Stock<sup>4</sup>| 20mph<sup>5</sup> | 0mph |
| Toyota | Rav4 2019 | All | openpilot | 0mph | 0mph |
| Toyota | Rav4 Hybrid 2016 | TSS-P | Stock<sup>4</sup>| 0mph | 0mph |
| Toyota | Rav4 Hybrid 2017-18 | All | Stock<sup>4</sup>| 0mph | 0mph |
| Toyota | Rav4 Hybrid 2019-20 | All | openpilot | 0mph | 0mph |
| Toyota | Sienna 2018 | All | Stock<sup>4</sup>| 0mph | 0mph |
| Volkswagen| Golf 2016-19<sup>3</sup> | Driver Assistance | Stock | 0mph | 0mph |
<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>Requires a [panda](https://comma.ai/shop/products/panda-obd-ii-dongle) and open sourced [Hyundai giraffe](https://github.com/commaai/neo/tree/master/giraffe/hyundai), designed for the 2019 Sante Fe; pinout may differ for other Hyundai and Kia models. <br />
<sup>2</sup>28mph for Camry 4CYL L, 4CYL LE and 4CYL SE which don't have Full-Speed Range Dynamic Radar Cruise Control. <br />
<sup>3</sup>Requires a [custom connector](https://community.comma.ai/wiki/index.php/Volkswagen#Integration_at_R242_Camera) for the [car harness](https://comma.ai/shop/products/car-harness) <br />
Community Maintained Cars
Community Maintained Cars and Features
------
| Make | Model | Supported Package | Lateral | Longitudinal | No Accel Below | No Steer Below | Giraffe |
| ---------------------| -------------------------| ---------------------| --------| ---------------| -----------------| ---------------|-------------------|
| Honda | Fit 2018 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 12mph | Inverted Nidec |
| Tesla | Model S 2012-13 | All | Yes | Not yet | Not applicable | 0mph | Custom<sup>8</sup>|
| Make | Model (US Market Reference) | Supported Package | ACC | No ACC accel below | No ALC below |
| ----------| ------------------------------| ------------------| -----------------| -------------------| -------------|
| Buick | Regal 2018<sup>6</sup> | Adaptive Cruise | openpilot | 0mph | 7mph |
| Cadillac | ATS 2018<sup>6</sup> | Adaptive Cruise | openpilot | 0mph | 7mph |
| Chevrolet | Malibu 2017<sup>6</sup> | Adaptive Cruise | openpilot | 0mph | 7mph |
| Chevrolet | Volt 2017-18<sup>6</sup> | Adaptive Cruise | openpilot | 0mph | 7mph |
| GMC | Acadia Denali 2018<sup>6</sup>| Adaptive Cruise | openpilot | 0mph | 7mph |
| Holden | Astra 2017<sup>6</sup> | Adaptive Cruise | openpilot | 0mph | 7mph |
[[Honda Fit Pull Request]](https://github.com/commaai/openpilot/pull/266). <br />
[[Tesla Model S Pull Request]](https://github.com/commaai/openpilot/pull/246) <br />
<sup>8</sup>Community built Giraffe, find more information here [Community Tesla Giraffe](https://github.com/jeankalud/neo/tree/tesla_giraffe/giraffe/tesla) <br />
<sup>4</sup>When disconnecting the Driver Support Unit (DSU), openpilot ACC will replace stock ACC. For DSU locations, see [Toyota Wiki page](https://community.comma.ai/wiki/index.php/Toyota). ***NOTE: disconnecting the DSU disables Automatic Emergency Braking (AEB).*** <br />
<sup>5</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](https://comma.ai).*** <br />
<sup>6</sup>Requires a [panda](https://comma.ai/shop/products/panda-obd-ii-dongle) and [community built giraffe](https://zoneos.com/volt/). ***NOTE: disconnecting the ASCM disables Automatic Emergency Braking (AEB).*** <br />
Community Maintained Cars are not confirmed by comma.ai to meet our [safety model](https://github.com/commaai/openpilot/blob/devel/SAFETY.md). Be extra cautious using them.
Community Maintained Cars and Features are not verified by comma to meet our [safety model](SAFETY.md). Be extra cautious using them. They are only available after enabling the toggle in `Settings->Developer->Enable Community Features`.
In Progress Cars
------
- All TSS-P Toyota with Steering Assist and LSS-P Lexus with Steering Assist or Lane Keep Assist.
- Only remaining Toyota cars with no port yet are the Avalon and the Sienna.
- All Hyundai with SmartSense.
- All Kia with SCC and LKAS.
- All Chrysler, Jeep, Fiat with Adaptive Cruise Control and LaneSense.
How can I add support for my car?
Installation Instructions
------
If your car has adaptive cruise control and lane keep assist, you are in luck. Using a [panda](https://comma.ai/shop/products/panda-obd-ii-dongle/) and [cabana](https://community.comma.ai/cabana/), you can understand how to make your car drive by wire.
Install openpilot on a EON by entering ``https://openpilot.comma.ai`` during the installer setup.
We've written guides for [Brand](https://medium.com/@comma_ai/how-to-write-a-car-port-for-openpilot-7ce0785eda84) and [Model](https://medium.com/@comma_ai/openpilot-port-guide-for-toyota-models-e5467f4b5fe6) ports. These guides might help you after you have the basics figured out.
Follow this [video instructions](https://youtu.be/3nlkomHathI) to properly mount the EON on the windshield. Note: openpilot features an automatic pose calibration routine and openpilot performance should not be affected by small pitch and yaw misalignments caused by imprecise EON mounting.
- BMW, Audi, Volvo, and Mercedes all use [FlexRay](https://en.wikipedia.org/wiki/FlexRay) and can be supported after [FlexRay support](https://github.com/commaai/openpilot/pull/463) is merged.
- We put time into a Ford port, but the steering has a 10 second cutout limitation that makes it unusable.
- The 2016-2017 Honda Accord uses a custom signaling protocol for steering that's unlikely to ever be upstreamed.
Before placing the device on your windshield, check the state and local laws and ordinances where you drive. Some state laws prohibit or restrict the placement of objects on the windshield of a motor vehicle.
Directory structure
You will be able to engage openpilot after reviewing the onboarding screens and finishing the calibration procedure.
Limitations of openpilot ALC and LDW
------
openpilot ALC and openpilot LDW do not automatically drive the vehicle or reduce the amount of attention that must be paid to operate your vehicle. The driver must always keep control of the steering wheel and be ready to correct the openpilot ALC action at all times.
While changing lanes, openpilot is not capable of looking next to you or checking your blind spot. Only nudge the wheel to initiate a lane change after you have confirmed it's safe to do so.
Many factors can impact the performance of openpilot ALC and openpilot LDW, causing them to be unable to function as intended. These include, but are not limited to:
* Poor visibility (heavy rain, snow, fog, etc.) or weather conditions that may interfere with sensor operation.
* The road facing camera is obstructed, covered or damaged by mud, ice, snow, etc.
* Obstruction caused by applying excessive paint or adhesive products (such as wraps, stickers, rubber coating, etc.) onto the vehicle.
* The EON is mounted incorrectly.
* When in sharp curves, like on-off ramps, intersections etc...; openpilot is designed to be limited in the amount of steering torque it can produce.
* In the presence of restricted lanes or construction zones.
* When driving on highly banked roads or in presence of strong cross-wind.
* Extremely hot or cold temperatures.
* Bright light (due to oncoming headlights, direct sunlight, etc.).
* Driving on hills, narrow, or winding roads.
The list above does not represent an exhaustive list of situations that may interfere with proper operation of openpilot components. It is the driver's responsibility to be in control of the vehicle at all times.
Limitations of openpilot ACC and FCW
------
openpilot ACC and openpilot FCW are not systems that allow careless or inattentive driving. It is still necessary for the driver to pay close attention to the vehicles surroundings and to be ready to re-take control of the gas and the brake at all times.
Many factors can impact the performance of openpilot ACC and openpilot FCW, causing them to be unable to function as intended. These include, but are not limited to:
* Poor visibility (heavy rain, snow, fog, etc.) or weather conditions that may interfere with sensor operation.
* The road facing camera or radar are obstructed, covered, or damaged by mud, ice, snow, etc.
* Obstruction caused by applying excessive paint or adhesive products (such as wraps, stickers, rubber coating, etc.) onto the vehicle.
* The EON is mounted incorrectly.
* Approaching a toll booth, a bridge or a large metal plate.
* When driving on roads with pedestrians, cyclists, etc...
* In presence of traffic signs or stop lights, which are not detected by openpilot at this time.
* When the posted speed limit is below the user selected set speed. openpilot does not detect speed limits at this time.
* In presence of vehicles in the same lane that are not moving.
* When abrupt braking maneuvers are required. openpilot is designed to be limited in the amount of deceleration and acceleration that it can produce.
* When surrounding vehicles perform close cut-ins from neighbor lanes.
* Driving on hills, narrow, or winding roads.
* Extremely hot or cold temperatures.
* Bright light (due to oncoming headlights, direct sunlight, etc.).
* Interference from other equipment that generates radar waves.
The list above does not represent an exhaustive list of situations that may interfere with proper operation of openpilot components. It is the driver's responsibility to be in control of the vehicle at all times.
Limitations of openpilot DM
------
openpilot DM should not be considered an exact measurements of the status of alertness of the driver.
Many factors can impact the performance of openpilot DM, causing it to be unable to function as intended. These include, but are not limited to:
* Low light conditions, such as driving at night or in dark tunnels.
* Bright light (due to oncoming headlights, direct sunlight, etc.).
* The driver face is partially or completely outside field of view of the driver facing camera.
* Right hand driving vehicles.
* The driver facing camera is obstructed, covered, or damaged.
The list above does not represent an exhaustive list of situations that may interfere with proper operation of openpilot components. A driver should not rely on openpilot DM to assess their level of attention.
User Data and comma Account
------
By default, openpilot uploads the driving data to our servers. You can also access your data by pairing with the comma connect app ([iOS](https://apps.apple.com/us/app/comma-connect/id1456551889), [Android](https://play.google.com/store/apps/details?id=ai.comma.connect&hl=en_US)). We use your data to train better models and improve openpilot for everyone.
openpilot is open source software: the user is free to disable data collection if they wish to do so.
openpilot logs the road facing camera, CAN, GPS, IMU, magnetometer, thermal sensors, crashes, and operating system logs.
The driver facing camera is only logged if you explicitly opt-in in settings. The microphone is not recorded.
By using openpilot, you agree to [our Privacy Policy](https://my.comma.ai/privacy). You understand that use of this software or its related services will generate certain types of user data, which may be logged and stored at the sole discretion of comma. By accepting this agreement, you grant an irrevocable, perpetual, worldwide right to comma for the use of this data.
Safety and Testing
----
* openpilot observes ISO26262 guidelines, see [SAFETY.md](SAFETY.md) for more detail.
* openpilot has software in the loop [tests](run_docker_tests.sh) that run on every commit.
* The safety model code lives in panda and is written in C, see [code rigor](https://github.com/commaai/panda#code-rigor) for more details.
* panda has software in the loop [safety tests](https://github.com/commaai/panda/tree/master/tests/safety).
* Internally, we have a hardware in the loop Jenkins test suite that builds and unit tests the various processes.
* panda has additional hardware in the loop [tests](https://github.com/commaai/panda/blob/master/Jenkinsfile).
* We run the latest openpilot in a testing closet containing 10 EONs continuously replaying routes.
Testing on PC
------
Check out the tools directory in master: lots of tools you can use to replay driving data, test and develop openpilot from your pc.
Community and Contributing
------
openpilot is developed by [comma](https://comma.ai/) and by users like you. We welcome both pull requests and issues on [GitHub](http://github.com/commaai/openpilot). Bug fixes and new car ports are encouraged.
You can add support for your car by following guides we have written for [Brand](https://medium.com/@comma_ai/how-to-write-a-car-port-for-openpilot-7ce0785eda84) and [Model](https://medium.com/@comma_ai/openpilot-port-guide-for-toyota-models-e5467f4b5fe6) ports. Generally, a car with adaptive cruise control and lane keep assist is a good candidate. [Join our Discord](https://discord.comma.ai) to discuss car ports: most car makes have a dedicated channel.
Want to get paid to work on openpilot? [comma is hiring](https://comma.ai/jobs/). We also have a [bounty program](https://comma.ai/bounties.html).
And [follow us on Twitter](https://twitter.com/comma_ai).
Directory Structure
------
.
├── apk # The apk files used for the UI
├── cereal # The messaging spec used for all logs on EON
├── cereal # The messaging spec and libs used for all logs on EON
├── common # Library like functionality we've developed here
├── installer/updater # Manages auto-updates of openpilot
├── opendbc # Files showing how to interpret data from cars
├── panda # Code used to communicate on CAN and LIN
├── panda # Code used to communicate on CAN
├── phonelibs # Libraries used on EON
├── 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
├── camerad # Driver to capture images from the camera sensors
├── car # Car specific code to read states and control actuators
├── common # Shared C/C++ code for the daemons
├── controls # Perception, planning and controls
@@ -171,54 +282,20 @@ Directory structure
├── locationd # Soon to be home of precise location
├── logcatd # Android logcat as a service
├── loggerd # Logger and uploader of car data
├── modeld # Driving and monitoring model runners
├── proclogd # Logs information from proc
├── sensord # IMU / GPS interface code
├── test # Car simulator running code through virtual maneuvers
── ui # The UI
└── visiond # Vision pipeline
├── tests # Unit tests, system tests and a car simulator
── ui # The UI
To understand how the services interact, see `selfdrive/service_list.yaml`
User Data / chffr Account / Crash Reporting
------
By default, openpilot creates an account and includes a client for chffr, our dashcam app. We use your data to train better models and improve openpilot for everyone.
It's open source software, so you are free to disable it if you wish.
It logs the road facing camera, CAN, GPS, IMU, magnetometer, thermal sensors, crashes, and operating system logs.
The user facing camera is only logged if you explicitly opt-in in settings.
It does not log the microphone.
By using it, you agree to [our privacy policy](https://community.comma.ai/privacy.html). You understand that use of this software or its related services will generate certain types of user data, which may be logged and stored at the sole discretion of comma.ai. By accepting this agreement, you grant an irrevocable, perpetual, worldwide right to comma.ai for the use of this data.
Testing on PC
------
Check out [openpilot-tools](https://github.com/commaai/openpilot-tools): lots of tools you can use to replay driving data, test and develop openpilot from your pc.
Also, within openpilot there is a rudimentary infrastructure to run a basic simulation and generate a report of openpilot's behavior in different longitudinal control scenarios.
```bash
# Requires working docker
./run_docker_tests.sh
```
Contributing
------
We welcome both pull requests and issues on [github](http://github.com/commaai/openpilot). Bug fixes and new car ports encouraged.
We also have a [bounty program](https://comma.ai/bounties.html).
Want to get paid to work on openpilot? [comma.ai is hiring](https://comma.ai/jobs/)
To understand how the services interact, see `cereal/service_list.yaml`.
Licensing
------
openpilot is released under the MIT license. Some parts of the software are released under other licenses as specified.
Any user of this software shall indemnify and hold harmless Comma.ai, Inc. and its directors, officers, employees, agents, stockholders, affiliates, subcontractors and customers from and against all allegations, claims, actions, suits, demands, damages, liabilities, obligations, losses, settlements, judgments, costs and expenses (including without limitation attorneys fees and costs) which arise out of, relate to or result from any use of this software by user.
Any user of this software shall indemnify and hold harmless comma.ai, Inc. and its directors, officers, employees, agents, stockholders, affiliates, subcontractors and customers from and against all allegations, claims, actions, suits, demands, damages, liabilities, obligations, losses, settlements, judgments, costs and expenses (including without limitation attorneys fees and costs) which arise out of, relate to or result from any use of this software by user.
**THIS IS ALPHA QUALITY SOFTWARE FOR RESEARCH PURPOSES ONLY. THIS IS NOT A PRODUCT.
YOU ARE RESPONSIBLE FOR COMPLYING WITH LOCAL LAWS AND REGULATIONS.
-36
View File
@@ -1,36 +0,0 @@
Welcome to chffrplus
======
[chffrplus](https://github.com/commaai/chffrplus) is an open source dashcam.
This is the shipping reference software for the comma EON Dashcam DevKit. It keeps many of the niceities of [openpilot](https://github.com/commaai/openpilot), like high quality sensors, great camera, and good autostart and stop. Though unlike openpilot, it cannot control your car. chffrplus can interface with your car through a [panda](https://shop.comma.ai/products/panda-obd-ii-dongle), but just like our dashcam app [chffr](https://getchffr.com/), it is read only.
It integrates with the rest of the comma ecosystem, so you can view your drives on the [chffr](https://getchffr.com/) app for Android or iOS, and reverse engineer your car with [cabana](https://community.comma.ai/cabana/?demo=1).
Hardware
------
Right now chffrplus supports the [EON Dashcam DevKit](https://shop.comma.ai/products/eon-dashcam-devkit) for hardware to run on.
Install chffrplus on a EON device by entering ``https://chffrplus.comma.ai`` during NEOS setup.
User Data / chffr Account / Crash Reporting
------
By default chffrplus creates an account and includes a client for chffr, our dashcam app.
It's open source software, so you are free to disable it if you wish.
It logs the road facing camera, CAN, GPS, IMU, magnetometer, thermal sensors, crashes, and operating system logs.
It does not log the user facing camera or the microphone.
By using it, you agree to [our privacy policy](https://beta.comma.ai/privacy.html). You understand that use of this software or its related services will generate certain types of user data, which may be logged and stored at the sole discretion of comma.ai. By accepting this agreement, you grant an irrevocable, perpetual, worldwide right to comma.ai for the use of this data.
Licensing
------
chffrplus is released under the MIT license.
+113
View File
@@ -1,3 +1,116 @@
Version 0.7.2 (2020-02-07)
========================
* ECU firmware version based fingerprinting for Honda & Toyota
* New driving model: improved path prediction during turns and lane changes and better lead speed tracking
* Improve driver monitoring under extreme lighting and add low accuracy alert
* Support for 2019 Rav4 Hybrid thanks to illumiN8i!
* Support for 2016, 2017 and 2020 Lexus RX thanks to illumiN8i!
* Support for 2020 Chrysler Pacifica Hybrid thanks to adhintz!
Version 0.7.1 (2020-01-20)
========================
* comma two support!
* Lane Change Assist above 45 mph!
* Replace zmq with custom messaging library, msgq!
* Supercombo model: calibration and driving models are combined for better lead estimate
* More robust updater thanks to jyoung8607! Requires NEOS update
* Improve low speed ACC tuning
Version 0.7 (2019-12-13)
========================
* Move to SCons build system!
* Add Lane Departure Warning (LDW) for all supported vehicles!
* NEOS update: increase wifi speed thanks to jyoung8607!
* Adaptive driver monitoring based on scene
* New driving model trained end-to-end: improve lane lines and lead detection
* Smarter torque limit alerts for all cars
* Improve GM longitudinal control: proper computations for 15Hz radar
* Move GM port, Toyota with DSU removed, comma pedal in community features; toggle switch required
* Remove upload over cellular toggle: only upload qlog and qcamera files if not on wifi
* Refactor Panda code towards ISO26262 and SIL2 compliancy
* Forward stock FCW for Honda Nidec
* Volkswagen port now standard: comma Harness intercepts stock camera
Version 0.6.6 (2019-11-05)
========================
* Volkswagen support thanks to jyoung8607!
* Toyota Corolla Hybrid with TSS 2.0 support thanks to u8511049!
* Lexus ES with TSS 2.0 support thanks to energee!
* Fix GM ignition detection and lock safety mode not required anymore
* Log panda firmware and dongle ID thanks to martinl!
* New driving model: improve path prediction and lead detection
* New driver monitoring model, 4x smaller and running on DSP
* Display an alert and don't start openpilot if panda has wrong firmware
* Fix bug preventing EON from terminating processes after a drive
* Remove support for Toyota giraffe without the 120Ohm resistor
Version 0.6.5 (2019-10-07)
========================
* NEOS update: upgrade to Python3 and new installer!
* comma Harness support!
* New driving model: improve path prediction
* New driver monitoring model: more accurate face and eye detection
* Redesign offroad screen to display updates and alerts
* Increase maximum allowed acceleration
* Prevent car 12V battery drain by cutting off EON charge after 3 days of no drive
* Lexus CT Hybrid support thanks to thomaspich!
* Louder chime for critical alerts
* Add toggle to switch to dashcam mode
* Fix "invalid vehicle params" error on DSU-less Toyota
Version 0.6.4 (2019-09-08)
========================
* Forward stock AEB for Honda Nidec
* Improve lane centering on banked roads
* Always-on forward collision warning
* Always-on driver monitoring, except for right hand drive countries
* Driver monitoring learns the user's normal driving position
* Honda Fit support thanks to energee!
* Lexus IS support
Version 0.6.3 (2019-08-12)
========================
* Alert sounds from EON: requires NEOS update
* Improve driver monitoring: eye tracking and improved awareness logic
* Improve path prediction with new driving model
* Improve lane positioning with wide lanes and exits
* Improve lateral control on RAV4
* Slow down for turns using model
* Open sourced regression test to verify outputs against reference logs
* Open sourced regression test to sanity check all car models
Version 0.6.2 (2019-07-29)
========================
* New driving model!
* Improve lane tracking with double lines
* Strongly improve stationary vehicle detection
* Strongly reduce cases of braking due to false leads
* Better lead tracking around turns
* Improve cut-in prediction by using neural network
* Improve lateral control on Toyota Camry and C-HR thanks to zorrobyte!
* Fix unintended openpilot disengagements on Jeep thanks to adhintz!
* Fix delayed transition to offroad when car is turned off
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 TSS 2.0
* 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)
+16 -133
View File
@@ -1,16 +1,26 @@
openpilot Safety
======
openpilot is an Adaptive Cruise Control (ACC) and Lane Keeping Assist (LKA) system.
Like other ACC and LKA systems, openpilot requires the driver to be alert and to
pay attention at all times. We repeat, **driver alertness is necessary, but not
sufficient, for openpilot to be used safely**.
openpilot is an Adaptive Cruise Control (ACC) and Automated Lane Centering (ALC) system.
Like other ACC and ALC systems, openpilot is a failsafe passive system and it requires the
driver to be alert and to pay attention at all times.
In order to enforce driver alertness, openpilot includes a driver monitoring feature
that alerts the driver when distracted.
However, even with an attentive driver, we must make further efforts for the system to be
safe. We have designed openpilot with two other safety considerations.
safe. We repeat, **driver alertness is necessary, but not sufficient, for openpilot to be
used safely** and openpilot is provided with no warranty of fitness for any purpose.
openpilot is developed in good faith to be compliant with FMVSS requirements and to follow
industry standards of safety for Level 2 Driver Assistance Systems. In particular, we observe
ISO26262 guidelines, including those from [pertinent documents](https://www.nhtsa.gov/sites/nhtsa.dot.gov/files/documents/13498a_812_573_alcsystemreport.pdf)
released by NHTSA. In addition, we impose strict coding guidelines (like [MISRA C : 2012](https://www.misra.org.uk/MISRAHome/MISRAC2012/tabid/196/Default.aspx))
on parts of openpilot that are safety relevant. We also perform software-in-the-loop,
hardware-in-the-loop and in-vehicle tests before each software release.
Following Hazard and Risk Analysis and FMEA, at a very high level, we have designed openpilot
ensuring two main safety requirements.
1. The driver must always be capable to immediately retake manual control of the vehicle,
by stepping on either pedal or by pressing the cancel button.
@@ -18,134 +28,7 @@ safe. We have designed openpilot with two other safety considerations.
react. This means that while the system is engaged, the actuators are constrained
to operate within reasonable limits.
Following are details of the car specific safety implementations:
Honda/Acura
------
- While the system is engaged, gas, brake and steer commands are subject to the same limits used by
the stock system.
- Without an interceptor, the gas is controlled by the Powertrain Control Module (PCM).
The PCM limits acceleration to what is reasonable for a cruise control system. With an
interceptor, the gas is clipped to 60%.
- The brake is controlled by the 0x1FA CAN message. This message allows full
braking, although the panda firmware and openpilot clip it to 1/4th of the max.
This is approximately 0.3g of braking.
- Steering is controlled by the 0xE4 CAN message. The Electronic Power Steering (EPS)
controller in the car limits the torque to a very small amount, so regardless of the
message, the controller cannot jerk the wheel.
- Brake and gas pedal pressed signals are contained in the 0x17C CAN message. A rising edge of
either signals triggers a disengagement, which is enforced by the panda firmware and by openpilot. The
white led on the panda signifies if the panda is allowing control messages.
- Honda CAN uses both a counter and a checksum to ensure integrity and prevent
replay of the same message.
Toyota/Lexus
------
- While the system is engaged, gas, brake and steer commands are subject to the same limits used by
the stock system.
- With the stock Driving Support Unit (DSU) connected (or in DSU-less models like Camry and C-HR),
the acceleration is controlled by the stock system and is subject to the stock adaptive cruise
control limits. Without the stock DSU connected, the acceleration command is controlled by the
0x343 CAN message and its value is limited between .3g of deceleration and .15g of acceleration
by the panda firmware and by openpilot. The acceleration command is ignored by the Engine Control
Module (ECM) while the cruise control system is disengaged.
- Steering torque is controlled through the 0x2E4 CAN message and it's limited by the panda firmware and by
openpilot to a value between -1500 and 1500. In addition, the vehicle EPS unit will not respond to
commands outside these limits. A steering torque rate limit is enforced by the panda firmware and by
openpilot, so that the commanded steering torque must rise from 0 to max value no faster than
1.5s. Commanded steering torque is limited by the panda firmware and by openpilot to be no more than 350
units above the actual EPS generated motor torque to ensure limited differences between
commanded and actual torques.
- Brake and gas pedal pressed signals are contained in the 0x224 and 0x1D2 CAN messages,
respectively. A rising edge of either signals triggers a disengagement, which is enforced by the
panda firmware and by openpilot. Additionally, the cruise control system disengages on the rising edge of
the brake pedal pressed signal.
- The cruise control system state is contained in the 0x1D2 message. No control messages are
allowed if the cruise control system is not active. This is enforced by openpilot and the
panda firmware. The white led on the panda signifies if the panda is allowing control messages.
GM/Chevrolet
------
- While the system is engaged, gas, brake and steer commands are subject to the same limits used by
the stock system.
- The gas and regen are controlled by the 0x2CB message and it's limited by the panda firmware and by
openpilot to a value between 1404 and 3072. the minimum value correspond to a mild decel due to regen,
while 3072 correspond to approximately 0.18g of acceleration from stop.
- The friction brakes are controlled by the 0x315 message and its value is limited by the panda firmware
and openpilot to 350. This is approximately 0.3g of braking.
- Steering torque is controlled through the 0x180 CAN message and it's limited by the panda firmware and by
openpilot to a value between -300 and 300. In addition, the vehicle EPS unit will fault for
commands outside these limits. A steering torque rate limit is enforced by the panda firmware and by
openpilot, so that the commanded steering torque must rise from 0 to max value no faster than
0.75s. Commanded steering torque is gradually limited by the panda firmware and by openpilot if the driver's
torque exceeds 12 units in the opposite dicrection to ensure limited applied torque against the
driver's will.
- Brake pedal and gas pedal potentiometer signals are contained in the 0xF1 and 0x1A1 CAN messages,
respectively. A rising edge of either signals triggers a disengagement, which is enforced by the
panda firmware and by openpilot. Additionally, the cruise control system disengages on the rising edge of
the brake pedal pressed signal. The regen paddle pressed signal is in the 0xBD message. When the
regen paddle is pressed, a disengagement is enforced by both the firmware and by openpilot.
- GM CAN uses both a counter and a checksum to ensure integrity and prevent
replay of the same message.
Hyundai/Kia (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 0x340 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 -409 and 409. 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.85s. Commanded steering torque is gradually limited by the panda firmware and by openpilot if the driver's
torque exceeds 50 units in the opposite dicrection to ensure limited applied torque against the
driver's will.
Chrysler/Jeep/Fiat (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 0x292 CAN message and it's limited by the panda firmware and by
openpilot to a value between -261 and 261. In addition, the vehicle EPS unit will fault for
commands outside these limits. A steering torque rate limit is enforced by the panda firmware and by
openpilot, so that the commanded steering torque must rise from 0 to max value no faster than
0.87s. Commanded steering torque is limited by the panda firmware and by openpilot to be no more than 80
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.
For vehicle specific implementation of the safety concept, refer to `panda/board/safety/`.
**Extra note**: comma.ai strongly discourages the use of openpilot forks with safety code either missing or
not fully meeting the above requirements.
+232
View File
@@ -0,0 +1,232 @@
import os
import subprocess
import sys
import platform
AddOption('--test',
action='store_true',
help='build test files')
AddOption('--asan',
action='store_true',
help='turn on ASAN')
arch = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip()
if platform.system() == "Darwin":
arch = "Darwin"
if arch == "aarch64":
lenv = {
"LD_LIBRARY_PATH": '/data/data/com.termux/files/usr/lib',
"PATH": os.environ['PATH'],
"ANDROID_DATA": os.environ['ANDROID_DATA'],
"ANDROID_ROOT": os.environ['ANDROID_ROOT'],
}
cpppath = [
"#phonelibs/opencl/include",
]
libpath = [
"#phonelibs/snpe/aarch64-android-clang3.8",
"/usr/lib",
"/data/data/com.termux/files/usr/lib",
"/system/vendor/lib64",
"/system/comma/usr/lib",
"#phonelibs/nanovg",
"#phonelibs/libyuv/lib",
]
cflags = ["-DQCOM", "-mcpu=cortex-a57"]
cxxflags = ["-DQCOM", "-mcpu=cortex-a57"]
rpath = ["/system/vendor/lib64"]
else:
lenv = {
"PATH": "#external/bin:" + os.environ['PATH'],
}
cpppath = [
"#phonelibs/capnp-cpp/include",
"#phonelibs/capnp-c/include",
"#phonelibs/zmq/x64/include",
"#external/tensorflow/include",
]
if arch == "Darwin":
libpath = [
"#phonelibs/capnp-cpp/mac/lib",
"#phonelibs/capnp-c/mac/lib",
"#phonelibs/libyuv/mac/lib",
"#cereal",
"#selfdrive/common",
"/usr/local/lib",
"/System/Library/Frameworks/OpenGL.framework/Libraries",
]
else:
libpath = [
"#phonelibs/capnp-cpp/x64/lib",
"#phonelibs/capnp-c/x64/lib",
"#phonelibs/snpe/x86_64-linux-clang",
"#phonelibs/zmq/x64/lib",
"#phonelibs/libyuv/x64/lib",
"#external/zmq/lib",
"#external/tensorflow/lib",
"#cereal",
"#selfdrive/common",
"/usr/lib",
"/usr/local/lib",
]
rpath = ["phonelibs/capnp-cpp/x64/lib",
"phonelibs/zmq/x64/lib",
"external/tensorflow/lib",
"cereal",
"selfdrive/common"]
# allows shared libraries to work globally
rpath = [os.path.join(os.getcwd(), x) for x in rpath]
cflags = []
cxxflags = []
ccflags_asan = ["-fsanitize=address", "-fno-omit-frame-pointer"] if GetOption('asan') else []
ldflags_asan = ["-fsanitize=address"] if GetOption('asan') else []
# change pythonpath to this
lenv["PYTHONPATH"] = Dir("#").path
env = Environment(
ENV=lenv,
CCFLAGS=[
"-g",
"-fPIC",
"-O2",
"-Werror=implicit-function-declaration",
"-Werror=incompatible-pointer-types",
"-Werror=int-conversion",
"-Werror=return-type",
"-Werror=format-extra-args",
] + cflags + ccflags_asan,
CPPPATH=cpppath + [
"#",
"#selfdrive",
"#phonelibs/bzip2",
"#phonelibs/libyuv/include",
"#phonelibs/openmax/include",
"#phonelibs/json/src",
"#phonelibs/json11",
"#phonelibs/eigen",
"#phonelibs/curl/include",
"#phonelibs/opencv/include",
"#phonelibs/libgralloc/include",
"#phonelibs/android_frameworks_native/include",
"#phonelibs/android_hardware_libhardware/include",
"#phonelibs/android_system_core/include",
"#phonelibs/linux/include",
"#phonelibs/snpe/include",
"#phonelibs/nanovg",
"#selfdrive/common",
"#selfdrive/camerad",
"#selfdrive/camerad/include",
"#selfdrive/loggerd/include",
"#selfdrive/modeld",
"#cereal/messaging",
"#cereal",
"#opendbc/can",
],
CC='clang',
CXX='clang++',
LINKFLAGS=ldflags_asan,
RPATH=rpath,
CFLAGS=["-std=gnu11"] + cflags,
CXXFLAGS=["-std=c++14"] + cxxflags,
LIBPATH=libpath +
[
"#cereal",
"#selfdrive/common",
"#phonelibs",
]
)
if os.environ.get('SCONS_CACHE'):
CacheDir('/tmp/scons_cache')
node_interval = 5
node_count = 0
def progress_function(node):
global node_count
node_count += node_interval
sys.stderr.write("progress: %d\n" % node_count)
if os.environ.get('SCONS_PROGRESS'):
Progress(progress_function, interval=node_interval)
SHARED = False
def abspath(x):
if arch == 'aarch64':
pth = os.path.join("/data/pythonpath", x[0].path)
env.Depends(pth, x)
return File(pth)
else:
# rpath works elsewhere
return x[0].path.rsplit("/", 1)[1][:-3]
#zmq = 'zmq'
# still needed for apks
zmq = FindFile("libzmq.a", libpath)
Export('env', 'arch', 'zmq', 'SHARED')
# cereal and messaging are shared with the system
SConscript(['cereal/SConscript'])
if SHARED:
cereal = abspath([File('cereal/libcereal_shared.so')])
messaging = abspath([File('cereal/libmessaging_shared.so')])
else:
cereal = [File('#cereal/libcereal.a')]
messaging = [File('#cereal/libmessaging.a')]
Export('cereal', 'messaging')
SConscript(['selfdrive/common/SConscript'])
Import('_common', '_visionipc', '_gpucommon', '_gpu_libs')
if SHARED:
common, visionipc, gpucommon = abspath(common), abspath(visionipc), abspath(gpucommon)
else:
common = [_common, 'json']
visionipc = _visionipc
gpucommon = [_gpucommon] + _gpu_libs
Export('common', 'visionipc', 'gpucommon')
SConscript(['opendbc/can/SConscript'])
SConscript(['common/SConscript'])
SConscript(['common/kalman/SConscript'])
SConscript(['phonelibs/SConscript'])
if arch != "Darwin":
SConscript(['selfdrive/camerad/SConscript'])
SConscript(['selfdrive/modeld/SConscript'])
SConscript(['selfdrive/controls/lib/cluster/SConscript'])
SConscript(['selfdrive/controls/lib/lateral_mpc/SConscript'])
SConscript(['selfdrive/controls/lib/longitudinal_mpc/SConscript'])
SConscript(['selfdrive/boardd/SConscript'])
SConscript(['selfdrive/proclogd/SConscript'])
SConscript(['selfdrive/ui/SConscript'])
SConscript(['selfdrive/loggerd/SConscript'])
if arch == "aarch64":
SConscript(['selfdrive/logcatd/SConscript'])
SConscript(['selfdrive/sensord/SConscript'])
SConscript(['selfdrive/clocksd/SConscript'])
SConscript(['selfdrive/locationd/SConscript'])
# TODO: finish cereal, dbcbuilder, MPC
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Executable
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/bash
mode=$1
if [ $1 -eq 1 ]; then
printf %s "1" > /data/params/d/DragonBTG
fi
if [ $1 -eq 0 ]; then
printf %s "0" > /data/params/d/DragonBTG
fi
rm -rf /data/openpilot/selfdrive/boardd/boardd && reboot
+1
View File
@@ -0,0 +1 @@
.sconsign.dblite
+11
View File
@@ -1,3 +1,14 @@
gen
node_modules
package-lock.json
*.pyc
__pycache__
.*.swp
.*.swo
libcereal*.a
libmessaging.*
libmessaging_shared.*
services.h
.sconsign.dblite
libcereal_shared.*
+19
View File
@@ -0,0 +1,19 @@
from ubuntu:16.04
RUN apt-get update && apt-get install -y libzmq3-dev clang wget git autoconf libtool curl make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl
RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
ENV PATH="/root/.pyenv/bin:/root/.pyenv/shims:${PATH}"
RUN pyenv install 3.7.3
RUN pyenv global 3.7.3
RUN pyenv rehash
RUN pip3 install pyyaml==5.1.2 Cython==0.29.14 scons==3.1.1 pycapnp==0.6.4
WORKDIR /project/cereal
COPY install_capnp.sh .
RUN ./install_capnp.sh
ENV PYTHONPATH=/project
COPY . .
RUN scons -c && scons -j$(nproc)
-62
View File
@@ -1,62 +0,0 @@
PWD := $(shell pwd)
SRCS := log.capnp car.capnp
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)
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
else
CAPNPC=capnpc
endif
.PHONY: all
all: $(GENS)
js: $(JS)
.PHONY: clean
clean:
rm -rf gen
rm -rf node_modules
rm -rf package-lock.json
gen/c/%.capnp.c: %.capnp
@echo "[ CAPNPC C ] $@"
mkdir -p gen/c/
$(CAPNPC) '$<' -o c:gen/c/
gen/js/%.capnp.js: %.capnp
@echo "[ CAPNPC JavaScript ] $@"
mkdir -p gen/js/
sh ./generate_javascript.sh
gen/cpp/%.capnp.c++: %.capnp
@echo "[ CAPNPC C++ ] $@"
mkdir -p gen/cpp/
$(CAPNPC) '$<' -o c++:gen/cpp/
gen/java/Car.java gen/java/Log.java: $(SRCS)
@echo "[ CAPNPC java ] $@"
mkdir -p gen/java/
$(CAPNPC) $^ -o java:gen/java
# c-capnproto needs some empty headers
gen/c/include/c++.capnp.h gen/c/include/java.capnp.h:
mkdir -p gen/c/include
touch '$@'
+42
View File
@@ -0,0 +1,42 @@
What is cereal?
----
cereal is both a messaging spec for robotics systems as well as generic high performance IPC pub sub messaging with a single publisher and multiple subscribers.
Imagine this use case:
* A sensor process reads gyro measurements directly from an IMU and publishes a sensorEvents packet
* A calibration process subscribes to the sensorEvents packet to use the IMU
* A localization process subscribes to the sensorEvents packet to use the IMU also
Messaging Spec
----
You'll find the message types in [log.capnp](log.capnp). It uses [Cap'n proto](https://capnproto.org/capnp-tool.html) and defines one struct called Event.
All Events have a logMonoTime and a valid. Then a big union defines the packet type.
Pub Sub Backends
----
cereal supports two backends, one based on [zmq](https://zeromq.org/), the other called msgq, a custom pub sub based on shared memory that doesn't require the bytes to pass through the kernel.
Example
---
```python
import cereal.messaging as messaging
# in subscriber
sm = messaging.SubMaster(['sensorEvents'])
while 1:
sm.update()
print(sm['sensorEvents'])
# in publisher
pm = messaging.PubMaster(['sensorEvents'])
dat = messaging.new_message()
dat.init('sensorEvents', 1)
dat.sensorEvents[0] = {"gyro": {"v": [0.1, -0.1, 0.1]}}
pm.send('sensorEvents', dat)
```
+68
View File
@@ -0,0 +1,68 @@
Import('env', 'arch', 'zmq')
gen_dir = Dir('gen')
messaging_dir = Dir('messaging')
# TODO: remove src-prefix and cereal from command string. can we set working directory?
env.Command(["gen/c/include/c++.capnp.h", "gen/c/include/java.capnp.h"], [], "mkdir -p " + gen_dir.path + "/c/include && touch $TARGETS")
env.Command(
['gen/c/car.capnp.c', 'gen/c/log.capnp.c', 'gen/c/car.capnp.h', 'gen/c/log.capnp.h'],
['car.capnp', 'log.capnp'],
'capnpc $SOURCES --src-prefix=cereal -o c:' + gen_dir.path + '/c/')
env.Command(
['gen/cpp/car.capnp.c++', 'gen/cpp/log.capnp.c++', 'gen/cpp/car.capnp.h', 'gen/cpp/log.capnp.h'],
['car.capnp', 'log.capnp'],
'capnpc $SOURCES --src-prefix=cereal -o c++:' + gen_dir.path + '/cpp/')
import shutil
if shutil.which('capnpc-java'):
env.Command(
['gen/java/Car.java', 'gen/java/Log.java'],
['car.capnp', 'log.capnp'],
'capnpc $SOURCES --src-prefix=cereal -o java:' + gen_dir.path + '/java/')
# TODO: remove non shared cereal and messaging
cereal_objects = env.SharedObject([
'gen/c/car.capnp.c',
'gen/c/log.capnp.c',
'gen/cpp/car.capnp.c++',
'gen/cpp/log.capnp.c++',
])
env.Library('cereal', cereal_objects)
env.SharedLibrary('cereal_shared', cereal_objects, LIBS=["capnp_c"])
cereal_dir = Dir('.')
services_h = env.Command(
['services.h'],
['service_list.yaml', 'services.py'],
'python3 ' + cereal_dir.path + '/services.py > $TARGET')
messaging_objects = env.SharedObject([
'messaging/messaging.cc',
'messaging/impl_zmq.cc',
'messaging/impl_msgq.cc',
'messaging/msgq.cc',
])
messaging_lib = env.Library('messaging', messaging_objects)
Depends('messaging/impl_zmq.cc', services_h)
# note, this rebuilds the deps shared, zmq is statically linked to make APK happy
# TODO: get APK to load system zmq to remove the static link
shared_lib_shared_lib = [zmq, 'm', 'stdc++'] + ["gnustl_shared"] if arch == "aarch64" else [zmq]
env.SharedLibrary('messaging_shared', messaging_objects, LIBS=shared_lib_shared_lib)
env.Program('messaging/bridge', ['messaging/bridge.cc'], LIBS=[messaging_lib, 'zmq'])
Depends('messaging/bridge.cc', services_h)
# different target?
#env.Program('messaging/demo', ['messaging/demo.cc'], LIBS=[messaging_lib, 'zmq'])
env.Command(['messaging/messaging_pyx.so'],
[messaging_lib, 'messaging/messaging_pyx_setup.py', 'messaging/messaging_pyx.pyx', 'messaging/messaging.pxd'],
"cd " + messaging_dir.path + " && python3 messaging_pyx_setup.py build_ext --inplace")
if GetOption('test'):
env.Program('messaging/test_runner', ['messaging/test_runner.cc', 'messaging/msgq_tests.cc'], LIBS=[messaging_lib])
+49
View File
@@ -0,0 +1,49 @@
import os
import subprocess
zmq = 'zmq'
arch = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip()
cereal_dir = Dir('.')
cpppath = [
cereal_dir,
'/usr/lib/include',
]
AddOption('--test',
action='store_true',
help='build test files')
AddOption('--asan',
action='store_true',
help='turn on ASAN')
ccflags_asan = ["-fsanitize=address", "-fno-omit-frame-pointer"] if GetOption('asan') else []
ldflags_asan = ["-fsanitize=address"] if GetOption('asan') else []
env = Environment(
ENV=os.environ,
CC='clang',
CXX='clang++',
CCFLAGS=[
"-g",
"-fPIC",
"-O2",
"-Werror=implicit-function-declaration",
"-Werror=incompatible-pointer-types",
"-Werror=int-conversion",
"-Werror=return-type",
"-Werror=format-extra-args",
] + ccflags_asan,
LDFLAGS=ldflags_asan,
LINKFLAGS=ldflags_asan,
CFLAGS="-std=gnu11",
CXXFLAGS="-std=c++14",
CPPPATH=cpppath,
)
Export('env', 'zmq', 'arch')
SConscript(['SConscript'])
+14
View File
@@ -0,0 +1,14 @@
pr: none
pool:
vmImage: 'ubuntu-16.04'
steps:
- script: |
set -e
docker build -t cereal .
docker run cereal bash -c "scons --test --asan -j$(nproc) && messaging/test_runner"
docker run cereal bash -c "ZMQ=1 python -m unittest discover ."
docker run cereal bash -c "MSGQ=1 python -m unittest discover ."
displayName: 'Run Tests'
+117 -13
View File
@@ -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;
@@ -75,6 +75,30 @@ struct CarEvent @0x9b1657f34caf3ad3 {
vehicleModelInvalid @50;
controlsFailed @51;
sensorDataInvalid @52;
commIssue @53;
tooDistracted @54;
posenetInvalid @55;
soundsUnavailable @56;
preLaneChangeLeft @57;
preLaneChangeRight @58;
laneChange @59;
invalidGiraffeToyota @60;
internetConnectivityNeeded @61;
communityFeatureDisallowed @62;
lowMemory @63;
stockAeb @64;
ldw @65;
carUnrecognized @66;
radarCommIssue @67;
driverMonitorLowAcc @68;
# dragonpilot
manualSteeringRequired @69;
manualSteeringRequiredBlinkersOn @70;
leadCarMoving @71;
leadCarDetected @72;
preAutoLaneChangeLeft @73;
preAutoLaneChangeRight @74;
autoLaneChange @75;
}
}
@@ -106,7 +130,11 @@ struct CarState {
steeringAngle @7 :Float32; # deg
steeringRate @15 :Float32; # deg/s
steeringTorque @8 :Float32; # TODO: standardize units
steeringTorqueEps @27 :Float32; # TODO: standardize units
steeringPressed @9 :Bool; # if the user is using the steering wheel
steeringRateLimited @29 :Bool; # if the torque is limited by the rate limiter
stockAeb @30 :Bool;
stockFcw @31 :Bool;
# cruise state
cruiseState @10 :CruiseState;
@@ -123,6 +151,10 @@ struct CarState {
# lock info
doorOpen @24 :Bool;
seatbeltUnlatched @25 :Bool;
canValid @26 :Bool;
# clutch (manual transmission only)
clutchPressed @28 :Bool;
# which packets this state came from
canMonoTimes @12: List(UInt64);
@@ -152,9 +184,10 @@ struct CarState {
sport @5;
low @6;
brake @7;
eco @8;
manumatic @9;
}
# send on change
struct ButtonEvent {
pressed @0 :Bool;
@@ -170,6 +203,9 @@ struct CarState {
altButton1 @6;
altButton2 @7;
altButton3 @8;
setCruise @9;
resumeCruise @10;
gapAdjustCruise @11;
}
}
}
@@ -184,7 +220,7 @@ struct RadarData @0x888ad6581cf0aacb {
canMonoTimes @2 :List(UInt64);
enum Error {
commIssue @0;
canError @0;
fault @1;
wrongConfig @2;
}
@@ -262,6 +298,7 @@ struct CarControl {
wrongGear @4;
seatbeltUnbuckled @5;
speedTooHigh @6;
ldw @7;
}
enum AudibleAlert {
@@ -293,7 +330,8 @@ struct CarParams {
minEnableSpeed @7 :Float32;
minSteerSpeed @8 :Float32;
safetyModel @9 :Int16;
safetyModel @9 :SafetyModel;
safetyModelPassive @42 :SafetyModel = silent;
safetyParam @10 :Int16;
steerMaxBP @11 :List(Float32);
@@ -303,7 +341,6 @@ struct CarParams {
brakeMaxBP @15 :List(Float32);
brakeMaxV @16 :List(Float32);
# things about the car in the manual
mass @17 :Float32; # [kg] running weight
wheelbase @18 :Float32; # [m] distance from rear to front axle
@@ -317,12 +354,15 @@ struct CarParams {
tireStiffnessRear @24 :Float32; # [N/rad] rear tire coeff of stiff
longitudinalTuning @25 :LongitudinalPIDTuning;
lateralParams @48 :LateralParams;
lateralTuning :union {
pid @26 :LateralPIDTuning;
indi @27 :LateralINDITuning;
lqr @40 :LateralLQRTuning;
}
steerLimitAlert @28 :Bool;
steerLimitTimer @47 :Float32; # time before steerLimitAlert is issued
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
@@ -335,6 +375,18 @@ struct CarParams {
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
isPandaBlack @39: Bool;
dashcamOnly @41: Bool;
transmissionType @43 :TransmissionType;
carFw @44 :List(CarFw);
radarTimeStep @45: Float32 = 0.05; # time delta between radar updates, 20Hz is very standard
communityFeature @46: Bool; # true if a community maintained feature is detected
fingerprintSource @49: FingerprintSource;
struct LateralParams {
torqueBP @0 :List(Int32);
torqueV @1 :List(Int32);
}
struct LateralPIDTuning {
kpBP @0 :List(Float32);
@@ -353,7 +405,6 @@ struct CarParams {
deadzoneV @5 :List(Float32);
}
struct LateralINDITuning {
outerLoopGain @0 :Float32;
innerLoopGain @1 :Float32;
@@ -361,25 +412,78 @@ struct CarParams {
actuatorEffectiveness @3 :Float32;
}
struct LateralLQRTuning {
scale @0 :Float32;
ki @1 :Float32;
dcGain @2 :Float32;
enum SafetyModels {
# does NOT match board setting
noOutput @0;
honda @1;
# State space system
a @3 :List(Float32);
b @4 :List(Float32);
c @5 :List(Float32);
k @6 :List(Float32); # LQR gain
l @7 :List(Float32); # Kalman gain
}
enum SafetyModel {
silent @0;
hondaNidec @1;
toyota @2;
elm327 @3;
gm @4;
hondaBosch @5;
hondaBoschGiraffe @5;
ford @6;
cadillac @7;
hyundai @8;
chrysler @9;
tesla @10;
subaru @11;
gmPassive @12;
mazda @13;
nissan @14;
volkswagen @15;
toyotaIpas @16;
allOutput @17;
gmAscm @18;
noOutput @19; # like silent but without silent CAN TXs
hondaBoschHarness @20;
volkswagenPq @21;
}
enum SteerControlType {
torque @0;
angle @1;
}
enum TransmissionType {
unknown @0;
automatic @1;
manual @2;
}
struct CarFw {
ecu @0 :Ecu;
fwVersion @1 :Data;
address @2: UInt32;
subAddress @3: UInt8;
}
enum Ecu {
eps @0;
esp @1;
fwdRadar @2;
fwdCamera @3;
engine @4;
unknown @5;
# Toyota only
dsu @6;
apgs @7;
}
enum FingerprintSource {
can @0;
fw @1;
}
}
+26
View 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
+40
View File
@@ -0,0 +1,40 @@
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 -j$(nproc)
make install
# 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/
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 -j$(nproc)
make install
# 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
+217 -13
View File
@@ -126,6 +126,7 @@ struct FrameData {
lensErr @13 :Float32;
lensTruePos @14 :Float32;
image @6 :Data;
gainFrac @15 :Float32;
frameType @7 :FrameType;
timestampSof @8 :UInt64;
@@ -137,6 +138,7 @@ struct FrameData {
unknown @0;
neo @1;
chffrAndroid @2;
front @3;
}
struct AndroidCaptureResult {
@@ -150,6 +152,12 @@ struct FrameData {
}
}
struct Thumbnail {
frameId @0 :UInt32;
timestampEof @1 :UInt64;
thumbnail @2 :Data;
}
struct GPSNMEAData {
timestamp @0 :Int64;
localWallTime @1 :UInt64;
@@ -262,6 +270,7 @@ struct ThermalData {
mem @4 :UInt16;
gpu @5 :UInt16;
bat @6 :UInt32;
pa0 @21 :UInt16;
# not thermal
freeSpace @7 :Float32;
@@ -270,6 +279,7 @@ struct ThermalData {
batteryCurrent @15 :Int32;
batteryVoltage @16 :Int32;
usbOnline @12 :Bool;
networkType @22 :NetworkType;
fanSpeed @10 :UInt16;
started @11 :Bool;
@@ -279,23 +289,76 @@ struct ThermalData {
chargingError @17 :Bool;
chargingDisabled @18 :Bool;
memUsedPercent @19 :Int8;
cpuPerc @20 :Int8;
ipAddr @23 :Text; # dragonpilot
enum ThermalStatus {
green @0; # all processes run
yellow @1; # critical processes run (kill uploader), engage still allowed
red @2; # no engage, will disengage
danger @3; # immediate process shutdown
}
enum NetworkType {
none @0;
wifi @1;
cell2G @2;
cell3G @3;
cell4G @4;
cell5G @5;
}
}
struct HealthData {
# from can health
voltage @0 :UInt32;
current @1 :UInt32;
started @2 :Bool;
ignitionLine @2 :Bool;
controlsAllowed @3 :Bool;
gasInterceptorDetected @4 :Bool;
startedSignalDetected @5 :Bool;
isGreyPanda @6 :Bool;
startedSignalDetectedDeprecated @5 :Bool;
hasGps @6 :Bool;
canSendErrs @7 :UInt32;
canFwdErrs @8 :UInt32;
canRxErrs @19 :UInt32;
gmlanSendErrs @9 :UInt32;
hwType @10 :HwType;
fanSpeedRpm @11 :UInt16;
usbPowerMode @12 :UsbPowerMode;
ignitionCan @13 :Bool;
safetyModel @14 :Car.CarParams.SafetyModel;
faultStatus @15 :FaultStatus;
powerSaveEnabled @16 :Bool;
uptime @17 :UInt32;
faults @18 :List(FaultType);
enum FaultStatus {
none @0;
faultTemp @1;
faultPerm @2;
}
enum FaultType {
relayMalfunction @0;
}
enum HwType {
unknown @0;
whitePanda @1;
greyPanda @2;
blackPanda @3;
pedal @4;
uno @5;
}
enum UsbPowerMode {
none @0;
client @1;
cdp @2;
dcp @3;
}
}
struct LiveUI {
@@ -337,6 +400,8 @@ struct RadarState @0x9a185389d6fdd05f {
fcw @10 :Bool;
status @11 :Bool;
aLeadTau @12 :Float32;
modelProb @13 :Float32;
radar @14 :Bool;
}
}
@@ -353,6 +418,8 @@ struct LiveCalibrationData {
# view_frame_from_road_frame
# ui's is inversed needs new
extrinsicMatrix @4 :List(Float32);
# the direction of travel vector in device frame
rpyCalib @7 :List(Float32);
}
struct LiveTracks {
@@ -417,9 +484,10 @@ struct ControlsState @0x97ff69c53601abf1 {
alertSize @39 :AlertSize;
alertBlinkingRate @42 :Float32;
alertType @44 :Text;
alertSound @45 :Text;
alertSoundDEPRECATED @45 :Text;
alertSound @56 :Car.CarControl.HUDControl.AudibleAlert;
awarenessStatus @26 :Float32;
angleModelBias @27 :Float32;
angleModelBiasDEPRECATED @27 :Float32;
gpsPlannerActive @40 :Bool;
engageable @41 :Bool; # can OP be engaged?
driverMonitoringOn @43 :Bool;
@@ -428,9 +496,13 @@ struct ControlsState @0x97ff69c53601abf1 {
vCurvature @46 :Float32;
decelForTurn @47 :Bool;
decelForModel @54 :Bool;
canErrorCounter @57 :UInt32;
lateralControlState :union {
indiState @52 :LateralINDIState;
pidState @53 :LateralPIDState;
lqrState @55 :LateralLQRState;
}
enum OpenpilotState @0xdbe58b96d2d1ac61 {
@@ -471,6 +543,7 @@ struct ControlsState @0x97ff69c53601abf1 {
delayedOutput @7 :Float32;
delta @8 :Float32;
output @9 :Float32;
saturated @10 :Bool;
}
struct LateralPIDState {
@@ -485,6 +558,16 @@ struct ControlsState @0x97ff69c53601abf1 {
saturated @8 :Bool;
}
struct LateralLQRState {
active @0 :Bool;
steerAngle @1 :Float32;
i @2 :Float32;
output @3 :Float32;
lqrOutput @4 :Float32;
saturated @5 :Bool;
}
}
struct LiveEventData {
@@ -494,6 +577,7 @@ struct LiveEventData {
struct ModelData {
frameId @0 :UInt32;
timestampEof @9 :UInt64;
path @1 :PathData;
leftLane @2 :PathData;
@@ -502,18 +586,29 @@ struct ModelData {
freePath @6 :List(Float32);
settings @5 :ModelSettings;
leadFuture @7 :LeadData;
speed @8 :List(Float32);
meta @10 :MetaData;
longitudinal @11 :LongitudinalData;
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 {
@@ -525,6 +620,19 @@ struct ModelData {
yuvCorrection @5 :List(Float32);
inputTransform @6 :List(Float32);
}
struct MetaData {
engagedProb @0 :Float32;
desirePrediction @1 :List(Float32);
brakeDisengageProb @2 :Float32;
gasDisengageProb @3 :Float32;
steerOverrideProb @4 :Float32;
}
struct LongitudinalData {
speeds @0 :List(Float32);
accelerations @1 :List(Float32);
}
}
struct CalibrationFeatures {
@@ -576,6 +684,8 @@ struct LogRotate {
struct Plan {
mdMonoTime @9 :UInt64;
radarStateMonoTime @10 :UInt64;
commIssue @31 :Bool;
eventsDEPRECATED @13 :List(Car.CarEvent);
# lateral, 3rd order polynomial
@@ -614,7 +724,7 @@ struct Plan {
decelForTurn @22 :Bool;
mapValid @25 :Bool;
radarValid @28 :Bool;
radarCommIssue @30 :Bool;
radarCanError @30 :Bool;
processingDelay @29 :Float32;
@@ -629,6 +739,7 @@ struct Plan {
mpc1 @1;
mpc2 @2;
mpc3 @3;
model @4;
}
}
@@ -645,11 +756,41 @@ 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;
desire @17 :Desire;
laneChangeState @18 :LaneChangeState;
laneChangeDirection @19 :LaneChangeDirection;
# dragonpilot
autoLCAllowed @20 :Bool;
enum Desire {
none @0;
turnLeft @1;
turnRight @2;
laneChangeLeft @3;
laneChangeRight @4;
keepLeft @5;
keepRight @6;
}
enum LaneChangeState {
off @0;
preLaneChange @1;
laneChangeStarting @2;
laneChangeFinishing @3;
}
enum LaneChangeDirection {
none @0;
left @1;
right @2;
}
}
struct LiveLocationData {
@@ -1295,6 +1436,7 @@ struct UbloxGnss {
measurementReport @0 :MeasurementReport;
ephemeris @1 :Ephemeris;
ionoData @2 :IonoData;
hwStatus @3 :HwStatus;
}
struct MeasurementReport {
@@ -1418,8 +1560,29 @@ struct UbloxGnss {
healthValid @5 :Bool;
ionoCoeffsValid @6 :Bool;
}
}
struct HwStatus {
noisePerMS @0 :UInt16;
agcCnt @1 :UInt16;
aStatus @2 :AntennaSupervisorState;
aPower @3 :AntennaPowerStatus;
jamInd @4 :UInt8;
enum AntennaSupervisorState {
init @0;
dontknow @1;
ok @2;
short @3;
open @4;
}
enum AntennaPowerStatus {
off @0;
on @1;
dontknow @2;
}
}
}
struct Clocks {
bootTimeNanos @0 :UInt64;
@@ -1561,6 +1724,7 @@ struct UiLayoutState {
home @0;
music @1;
nav @2;
settings @3;
}
}
@@ -1626,10 +1790,39 @@ struct OrbKeyFrame {
descriptors @3 :Data;
}
struct DriverMonitoring {
struct DriverState {
frameId @0 :UInt32;
descriptor @1 :List(Float32);
std @2 :Float32;
descriptorDEPRECATED @1 :List(Float32);
stdDEPRECATED @2 :Float32;
faceOrientation @3 :List(Float32);
facePosition @4 :List(Float32);
faceProb @5 :Float32;
leftEyeProb @6 :Float32;
rightEyeProb @7 :Float32;
leftBlinkProb @8 :Float32;
rightBlinkProb @9 :Float32;
irPwrDEPRECATED @10 :Float32;
faceOrientationStd @11 :List(Float32);
facePositionStd @12 :List(Float32);
}
struct DMonitoringState {
# TODO: deprecate old fields in controlsState
events @0 :List(Car.CarEvent);
faceDetected @1 :Bool;
isDistracted @2 :Bool;
awarenessStatus @3 :Float32;
isRHD @4 :Bool;
rhdChecked @5 :Bool;
posePitchOffset @6 :Float32;
posePitchValidCount @7 :UInt32;
poseYawOffset @8 :Float32;
poseYawValidCount @9 :UInt32;
stepChange @10 :Float32;
awarenessActive @11 :Float32;
awarenessPassive @12 :Float32;
isLowStd @13 :Bool;
hiStdCount @14 :UInt32;
}
struct Boot {
@@ -1646,6 +1839,9 @@ struct LiveParametersData {
stiffnessFactor @4 :Float32;
steerRatio @5 :Float32;
sensorValid @6 :Bool;
yawRate @7 :Float32;
posenetSpeed @8 :Float32;
posenetValid @9 :Bool;
}
struct LiveMapData {
@@ -1669,6 +1865,8 @@ struct LiveMapData {
}
struct CameraOdometry {
frameId @4 :UInt32;
timestampEof @5 :UInt64;
trans @0 :List(Float32); # m/s in device frame
rot @1 :List(Float32); # rad/s in device frame
transStd @2 :List(Float32); # std m/s in device frame
@@ -1685,6 +1883,7 @@ struct KalmanOdometry {
struct Event {
# in nanoseconds?
logMonoTime @0 :UInt64;
valid @67 :Bool = true;
union {
initData @1 :InitData;
@@ -1745,12 +1944,17 @@ struct Event {
orbKeyFrame @56 :OrbKeyFrame;
uiLayoutState @57 :UiLayoutState;
orbFeaturesSummary @58 :OrbFeaturesSummary;
driverMonitoring @59 :DriverMonitoring;
driverState @59 :DriverState;
boot @60 :Boot;
liveParameters @61 :LiveParametersData;
liveMapData @62 :LiveMapData;
cameraOdometry @63 :CameraOdometry;
pathPlan @64 :PathPlan;
kalmanOdometry @65 :KalmanOdometry;
thumbnail @66: Thumbnail;
carEvents @68: List(Car.CarEvent);
carParams @69: Car.CarParams;
frontFrame @70: FrameData;
dMonitoringState @71: DMonitoringState;
}
}
+53
View 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);
}
+10
View File
@@ -0,0 +1,10 @@
demo
bridge
test_runner
*.o
*.os
*.d
*.a
*.so
messaging_pyx.cpp
build/
+221
View File
@@ -0,0 +1,221 @@
# must be build with scons
from .messaging_pyx import Context, Poller, SubSocket, PubSocket # pylint: disable=no-name-in-module, import-error
from .messaging_pyx import MultiplePublishersError, MessagingError # pylint: disable=no-name-in-module, import-error
import capnp
assert MultiplePublishersError
assert MessagingError
from cereal import log
from cereal.services import service_list
# sec_since_boot is faster, but allow to run standalone too
try:
from common.realtime import sec_since_boot
except ImportError:
import time
sec_since_boot = time.time
print("Warning, using python time.time() instead of faster sec_since_boot")
context = Context()
def new_message():
dat = log.Event.new_message()
dat.logMonoTime = int(sec_since_boot() * 1e9)
dat.valid = True
return dat
def pub_sock(endpoint):
sock = PubSocket()
sock.connect(context, endpoint)
return sock
def sub_sock(endpoint, poller=None, addr="127.0.0.1", conflate=False, timeout=None):
sock = SubSocket()
addr = addr.encode('utf8')
sock.connect(context, endpoint, addr, conflate)
if timeout is not None:
sock.setTimeout(timeout)
if poller is not None:
poller.registerSocket(sock)
return sock
def drain_sock_raw(sock, wait_for_one=False):
"""Receive all message currently available on the queue"""
ret = []
while 1:
if wait_for_one and len(ret) == 0:
dat = sock.receive()
else:
dat = sock.receive(non_blocking=True)
if dat is None:
break
ret.append(dat)
return ret
def drain_sock(sock, wait_for_one=False):
"""Receive all message currently available on the queue"""
ret = []
while 1:
if wait_for_one and len(ret) == 0:
dat = sock.receive()
else:
dat = sock.receive(non_blocking=True)
if dat is None: # Timeout hit
break
dat = log.Event.from_bytes(dat)
ret.append(dat)
return ret
# TODO: print when we drop packets?
def recv_sock(sock, wait=False):
"""Same as drain sock, but only returns latest message. Consider using conflate instead."""
dat = None
while 1:
if wait and dat is None:
rcv = sock.receive()
else:
rcv = sock.receive(non_blocking=True)
if rcv is None: # Timeout hit
break
dat = rcv
if dat is not None:
dat = log.Event.from_bytes(dat)
return dat
def recv_one(sock):
dat = sock.receive()
if dat is not None:
dat = log.Event.from_bytes(dat)
return dat
def recv_one_or_none(sock):
dat = sock.receive(non_blocking=True)
if dat is not None:
dat = log.Event.from_bytes(dat)
return dat
def recv_one_retry(sock):
"""Keep receiving until we get a message"""
while True:
dat = sock.receive()
if dat is not None:
return log.Event.from_bytes(dat)
# TODO: This does not belong in messaging
def get_one_can(logcan):
while True:
can = recv_one_retry(logcan)
if len(can.can) > 0:
return can
class SubMaster():
def __init__(self, services, ignore_alive=None, addr="127.0.0.1"):
self.poller = Poller()
self.frame = -1
self.updated = {s : False for s in services}
self.rcv_time = {s : 0. for s in services}
self.rcv_frame = {s : 0 for s in services}
self.alive = {s : False for s in services}
self.sock = {}
self.freq = {}
self.data = {}
self.logMonoTime = {}
self.valid = {}
if ignore_alive is not None:
self.ignore_alive = ignore_alive
else:
self.ignore_alive = []
for s in services:
if addr is not None:
self.sock[s] = sub_sock(s, poller=self.poller, addr=addr, conflate=True)
self.freq[s] = service_list[s].frequency
data = new_message()
try:
data.init(s)
except capnp.lib.capnp.KjException:
# lists
data.init(s, 0)
self.data[s] = getattr(data, s)
self.logMonoTime[s] = 0
self.valid[s] = data.valid
def __getitem__(self, s):
return self.data[s]
def update(self, timeout=1000):
msgs = []
for sock in self.poller.poll(timeout):
msgs.append(recv_one_or_none(sock))
self.update_msgs(sec_since_boot(), msgs)
def update_msgs(self, cur_time, msgs):
# TODO: add optional input that specify the service to wait for
self.frame += 1
self.updated = dict.fromkeys(self.updated, False)
for msg in msgs:
if msg is None:
continue
s = msg.which()
self.updated[s] = True
self.rcv_time[s] = cur_time
self.rcv_frame[s] = self.frame
self.data[s] = getattr(msg, s)
self.logMonoTime[s] = msg.logMonoTime
self.valid[s] = msg.valid
for s in self.data:
# arbitrary small number to avoid float comparison. If freq is 0, we can skip the check
if self.freq[s] > 1e-5:
# alive if delay is within 10x the expected frequency
self.alive[s] = (cur_time - self.rcv_time[s]) < (10. / self.freq[s])
else:
self.alive[s] = True
def all_alive(self, service_list=None):
if service_list is None: # check all
service_list = self.alive.keys()
return all(self.alive[s] for s in service_list if s not in self.ignore_alive)
def all_valid(self, service_list=None):
if service_list is None: # check all
service_list = self.valid.keys()
return all(self.valid[s] for s in service_list)
def all_alive_and_valid(self, service_list=None):
if service_list is None: # check all
service_list = self.alive.keys()
return self.all_alive(service_list=service_list) and self.all_valid(service_list=service_list)
class PubMaster():
def __init__(self, services):
self.sock = {}
for s in services:
self.sock[s] = pub_sock(s)
def send(self, s, dat):
# accept either bytes or capnp builder
if not isinstance(dat, bytes):
dat = dat.to_bytes()
self.sock[s].send(dat)
+64
View File
@@ -0,0 +1,64 @@
#include <iostream>
#include <string>
#include <cassert>
#include <csignal>
#include <map>
typedef void (*sighandler_t)(int sig);
#include "services.h"
#include "impl_msgq.hpp"
#include "impl_zmq.hpp"
void sigpipe_handler(int sig) {
assert(sig == SIGPIPE);
std::cout << "SIGPIPE received" << std::endl;
}
static std::vector<std::string> get_services() {
std::vector<std::string> name_list;
for (const auto& it : services) {
std::string name = it.name;
if (name == "plusFrame" || name == "uiLayoutState") continue;
name_list.push_back(name);
}
return name_list;
}
int main(void){
signal(SIGPIPE, (sighandler_t)sigpipe_handler);
auto endpoints = get_services();
std::map<SubSocket*, PubSocket*> sub2pub;
Context *zmq_context = new ZMQContext();
Context *msgq_context = new MSGQContext();
Poller *poller = new MSGQPoller();
for (auto endpoint: endpoints){
SubSocket * msgq_sock = new MSGQSubSocket();
msgq_sock->connect(msgq_context, endpoint, "127.0.0.1", false);
poller->registerSocket(msgq_sock);
PubSocket * zmq_sock = new ZMQPubSocket();
zmq_sock->connect(zmq_context, endpoint);
sub2pub[msgq_sock] = zmq_sock;
}
while (true){
for (auto sub_sock : poller->poll(100)){
Message * msg = sub_sock->receive();
if (msg == NULL) continue;
sub2pub[sub_sock]->sendMessage(msg);
delete msg;
}
}
return 0;
}
File diff suppressed because it is too large Load Diff
+50
View File
@@ -0,0 +1,50 @@
#include <iostream>
#include <cstddef>
#include <chrono>
#include <thread>
#include <cassert>
#include "messaging.hpp"
#include "impl_zmq.hpp"
#define MSGS 1e5
int main() {
Context * c = Context::create();
SubSocket * sub_sock = SubSocket::create(c, "controlsState");
PubSocket * pub_sock = PubSocket::create(c, "controlsState");
char data[8];
Poller * poller = Poller::create({sub_sock});
auto start = std::chrono::steady_clock::now();
for (uint64_t i = 0; i < MSGS; i++){
*(uint64_t*)data = i;
pub_sock->send(data, 8);
auto r = poller->poll(100);
for (auto p : r){
Message * m = p->receive();
uint64_t ii = *(uint64_t*)m->getData();
assert(i == ii);
delete m;
}
}
auto end = std::chrono::steady_clock::now();
double elapsed = std::chrono::duration_cast<std::chrono::nanoseconds>(end - start).count() / 1e9;
double throughput = ((double) MSGS / (double) elapsed);
std::cout << throughput << " msg/s" << std::endl;
delete poller;
delete sub_sock;
delete pub_sock;
delete c;
return 0;
}
+30
View File
@@ -0,0 +1,30 @@
import time
from messaging_pyx import Context, Poller, SubSocket, PubSocket # pylint: disable=no-name-in-module, import-error
MSGS = 1e5
if __name__ == "__main__":
c = Context()
sub_sock = SubSocket()
pub_sock = PubSocket()
sub_sock.connect(c, "controlsState")
pub_sock.connect(c, "controlsState")
poller = Poller()
poller.registerSocket(sub_sock)
t = time.time()
for i in range(int(MSGS)):
bts = i.to_bytes(4, 'little')
pub_sock.send(bts)
for s in poller.poll(100):
dat = s.receive()
ii = int.from_bytes(dat, 'little')
assert(i == ii)
dt = time.time() - t
print("%.1f msg/s" % (MSGS / dt))
+195
View File
@@ -0,0 +1,195 @@
#include <cassert>
#include <cstring>
#include <iostream>
#include <cstdlib>
#include <csignal>
#include <cerrno>
#include "impl_msgq.hpp"
volatile sig_atomic_t msgq_do_exit = 0;
void sig_handler(int signal) {
assert(signal == SIGINT || signal == SIGTERM);
msgq_do_exit = 1;
}
MSGQContext::MSGQContext() {
}
MSGQContext::~MSGQContext() {
}
void MSGQMessage::init(size_t sz) {
size = sz;
data = new char[size];
}
void MSGQMessage::init(char * d, size_t sz) {
size = sz;
data = new char[size];
memcpy(data, d, size);
}
void MSGQMessage::takeOwnership(char * d, size_t sz) {
size = sz;
data = d;
}
void MSGQMessage::close() {
if (size > 0){
delete[] data;
}
size = 0;
}
MSGQMessage::~MSGQMessage() {
this->close();
}
int MSGQSubSocket::connect(Context *context, std::string endpoint, std::string address, bool conflate){
assert(context);
assert(address == "127.0.0.1");
q = new msgq_queue_t;
int r = msgq_new_queue(q, endpoint.c_str(), DEFAULT_SEGMENT_SIZE);
if (r != 0){
return r;
}
msgq_init_subscriber(q);
if (conflate){
q->read_conflate = true;
}
timeout = -1;
return 0;
}
Message * MSGQSubSocket::receive(bool non_blocking){
msgq_do_exit = 0;
void (*prev_handler_sigint)(int);
void (*prev_handler_sigterm)(int);
if (!non_blocking){
prev_handler_sigint = std::signal(SIGINT, sig_handler);
prev_handler_sigterm = std::signal(SIGTERM, sig_handler);
}
msgq_msg_t msg;
MSGQMessage *r = NULL;
int rc = msgq_msg_recv(&msg, q);
// Hack to implement blocking read with a poller. Don't use this
while (!non_blocking && rc == 0 && msgq_do_exit == 0){
msgq_pollitem_t items[1];
items[0].q = q;
int t = (timeout != -1) ? timeout : 100;
int n = msgq_poll(items, 1, t);
rc = msgq_msg_recv(&msg, q);
// The poll indicated a message was ready, but the receive failed. Try again
if (n == 1 && rc == 0){
continue;
}
if (timeout != -1){
break;
}
}
if (!non_blocking){
std::signal(SIGINT, prev_handler_sigint);
std::signal(SIGTERM, prev_handler_sigterm);
}
errno = msgq_do_exit ? EINTR : 0;
if (rc > 0){
if (msgq_do_exit){
msgq_msg_close(&msg); // Free unused message on exit
} else {
r = new MSGQMessage;
r->takeOwnership(msg.data, msg.size);
}
}
return (Message*)r;
}
void MSGQSubSocket::setTimeout(int t){
timeout = t;
}
MSGQSubSocket::~MSGQSubSocket(){
if (q != NULL){
msgq_close_queue(q);
delete q;
}
}
int MSGQPubSocket::connect(Context *context, std::string endpoint){
assert(context);
q = new msgq_queue_t;
msgq_new_queue(q, endpoint.c_str(), DEFAULT_SEGMENT_SIZE);
msgq_init_publisher(q);
return 0;
}
int MSGQPubSocket::sendMessage(Message *message){
msgq_msg_t msg;
msg.data = message->getData();
msg.size = message->getSize();
return msgq_msg_send(&msg, q);
}
int MSGQPubSocket::send(char *data, size_t size){
msgq_msg_t msg;
msg.data = data;
msg.size = size;
return msgq_msg_send(&msg, q);
}
MSGQPubSocket::~MSGQPubSocket(){
if (q != NULL){
msgq_close_queue(q);
delete q;
}
}
void MSGQPoller::registerSocket(SubSocket * socket){
assert(num_polls + 1 < MAX_POLLERS);
polls[num_polls].q = (msgq_queue_t*)socket->getRawSocket();
sockets.push_back(socket);
num_polls++;
}
std::vector<SubSocket*> MSGQPoller::poll(int timeout){
std::vector<SubSocket*> r;
msgq_poll(polls, num_polls, timeout);
for (size_t i = 0; i < num_polls; i++){
if (polls[i].revents){
r.push_back(sockets[i]);
}
}
return r;
}
+64
View File
@@ -0,0 +1,64 @@
#pragma once
#include "messaging.hpp"
#include "msgq.hpp"
#include <zmq.h>
#include <string>
#define MAX_POLLERS 128
class MSGQContext : public Context {
private:
void * context = NULL;
public:
MSGQContext();
void * getRawContext() {return context;}
~MSGQContext();
};
class MSGQMessage : public Message {
private:
char * data;
size_t size;
public:
void init(size_t size);
void init(char *data, size_t size);
void takeOwnership(char *data, size_t size);
size_t getSize(){return size;}
char * getData(){return data;}
void close();
~MSGQMessage();
};
class MSGQSubSocket : public SubSocket {
private:
msgq_queue_t * q = NULL;
int timeout;
public:
int connect(Context *context, std::string endpoint, std::string address, bool conflate=false);
void setTimeout(int timeout);
void * getRawSocket() {return (void*)q;}
Message *receive(bool non_blocking=false);
~MSGQSubSocket();
};
class MSGQPubSocket : public PubSocket {
private:
msgq_queue_t * q = NULL;
public:
int connect(Context *context, std::string endpoint);
int sendMessage(Message *message);
int send(char *data, size_t size);
~MSGQPubSocket();
};
class MSGQPoller : public Poller {
private:
std::vector<SubSocket*> sockets;
msgq_pollitem_t polls[MAX_POLLERS];
size_t num_polls = 0;
public:
void registerSocket(SubSocket *socket);
std::vector<SubSocket*> poll(int timeout);
~MSGQPoller(){};
};
+155
View File
@@ -0,0 +1,155 @@
#include <cassert>
#include <cstring>
#include <iostream>
#include <cstdlib>
#include <cerrno>
#include <zmq.h>
#include "services.h"
#include "impl_zmq.hpp"
static int get_port(std::string endpoint) {
int port = -1;
for (const auto& it : services) {
std::string name = it.name;
if (name == endpoint) {
port = it.port;
break;
}
}
assert(port >= 0);
return port;
}
ZMQContext::ZMQContext() {
context = zmq_ctx_new();
}
ZMQContext::~ZMQContext() {
zmq_ctx_term(context);
}
void ZMQMessage::init(size_t sz) {
size = sz;
data = new char[size];
}
void ZMQMessage::init(char * d, size_t sz) {
size = sz;
data = new char[size];
memcpy(data, d, size);
}
void ZMQMessage::close() {
if (size > 0){
delete[] data;
}
size = 0;
}
ZMQMessage::~ZMQMessage() {
this->close();
}
int ZMQSubSocket::connect(Context *context, std::string endpoint, std::string address, bool conflate){
sock = zmq_socket(context->getRawContext(), ZMQ_SUB);
if (sock == NULL){
return -1;
}
zmq_setsockopt(sock, ZMQ_SUBSCRIBE, "", 0);
if (conflate){
int arg = 1;
zmq_setsockopt(sock, ZMQ_CONFLATE, &arg, sizeof(int));
}
int reconnect_ivl = 500;
zmq_setsockopt(sock, ZMQ_RECONNECT_IVL_MAX, &reconnect_ivl, sizeof(reconnect_ivl));
full_endpoint = "tcp://" + address + ":";
full_endpoint += std::to_string(get_port(endpoint));
return zmq_connect(sock, full_endpoint.c_str());
}
Message * ZMQSubSocket::receive(bool non_blocking){
zmq_msg_t msg;
assert(zmq_msg_init(&msg) == 0);
int flags = non_blocking ? ZMQ_DONTWAIT : 0;
int rc = zmq_msg_recv(&msg, sock, flags);
Message *r = NULL;
if (rc >= 0){
// Make a copy to ensure the data is aligned
r = new ZMQMessage;
r->init((char*)zmq_msg_data(&msg), zmq_msg_size(&msg));
}
zmq_msg_close(&msg);
return r;
}
void ZMQSubSocket::setTimeout(int timeout){
zmq_setsockopt(sock, ZMQ_RCVTIMEO, &timeout, sizeof(int));
}
ZMQSubSocket::~ZMQSubSocket(){
zmq_close(sock);
}
int ZMQPubSocket::connect(Context *context, std::string endpoint){
sock = zmq_socket(context->getRawContext(), ZMQ_PUB);
if (sock == NULL){
return -1;
}
full_endpoint = "tcp://*:";
full_endpoint += std::to_string(get_port(endpoint));
return zmq_bind(sock, full_endpoint.c_str());
}
int ZMQPubSocket::sendMessage(Message *message){
return zmq_send(sock, message->getData(), message->getSize(), ZMQ_DONTWAIT);
}
int ZMQPubSocket::send(char *data, size_t size){
return zmq_send(sock, data, size, ZMQ_DONTWAIT);
}
ZMQPubSocket::~ZMQPubSocket(){
zmq_close(sock);
}
void ZMQPoller::registerSocket(SubSocket * socket){
assert(num_polls + 1 < MAX_POLLERS);
polls[num_polls].socket = socket->getRawSocket();
polls[num_polls].events = ZMQ_POLLIN;
sockets.push_back(socket);
num_polls++;
}
std::vector<SubSocket*> ZMQPoller::poll(int timeout){
std::vector<SubSocket*> r;
int rc = zmq_poll(polls, num_polls, timeout);
if (rc < 0){
return r;
}
for (size_t i = 0; i < num_polls; i++){
if (polls[i].revents){
r.push_back(sockets[i]);
}
}
return r;
}
+63
View File
@@ -0,0 +1,63 @@
#pragma once
#include "messaging.hpp"
#include <zmq.h>
#include <string>
#define MAX_POLLERS 128
class ZMQContext : public Context {
private:
void * context = NULL;
public:
ZMQContext();
void * getRawContext() {return context;}
~ZMQContext();
};
class ZMQMessage : public Message {
private:
char * data;
size_t size;
public:
void init(size_t size);
void init(char *data, size_t size);
size_t getSize(){return size;}
char * getData(){return data;}
void close();
~ZMQMessage();
};
class ZMQSubSocket : public SubSocket {
private:
void * sock;
std::string full_endpoint;
public:
int connect(Context *context, std::string endpoint, std::string address, bool conflate=false);
void setTimeout(int timeout);
void * getRawSocket() {return sock;}
Message *receive(bool non_blocking=false);
~ZMQSubSocket();
};
class ZMQPubSocket : public PubSocket {
private:
void * sock;
std::string full_endpoint;
public:
int connect(Context *context, std::string endpoint);
int sendMessage(Message *message);
int send(char *data, size_t size);
~ZMQPubSocket();
};
class ZMQPoller : public Poller {
private:
std::vector<SubSocket*> sockets;
zmq_pollitem_t polls[MAX_POLLERS];
size_t num_polls = 0;
public:
void registerSocket(SubSocket *socket);
std::vector<SubSocket*> poll(int timeout);
~ZMQPoller(){};
};
+117
View File
@@ -0,0 +1,117 @@
#include "messaging.hpp"
#include "impl_zmq.hpp"
#include "impl_msgq.hpp"
Context * Context::create(){
Context * c;
if (std::getenv("ZMQ")){
c = new ZMQContext();
} else {
c = new MSGQContext();
}
return c;
}
SubSocket * SubSocket::create(){
SubSocket * s;
if (std::getenv("ZMQ")){
s = new ZMQSubSocket();
} else {
s = new MSGQSubSocket();
}
return s;
}
SubSocket * SubSocket::create(Context * context, std::string endpoint){
SubSocket *s = SubSocket::create();
int r = s->connect(context, endpoint, "127.0.0.1");
if (r == 0) {
return s;
} else {
delete s;
return NULL;
}
}
SubSocket * SubSocket::create(Context * context, std::string endpoint, std::string address){
SubSocket *s = SubSocket::create();
int r = s->connect(context, endpoint, address);
if (r == 0) {
return s;
} else {
delete s;
return NULL;
}
}
SubSocket * SubSocket::create(Context * context, std::string endpoint, std::string address, bool conflate){
SubSocket *s = SubSocket::create();
int r = s->connect(context, endpoint, address, conflate);
if (r == 0) {
return s;
} else {
delete s;
return NULL;
}
}
PubSocket * PubSocket::create(){
PubSocket * s;
if (std::getenv("ZMQ")){
s = new ZMQPubSocket();
} else {
s = new MSGQPubSocket();
}
return s;
}
PubSocket * PubSocket::create(Context * context, std::string endpoint){
PubSocket *s = PubSocket::create();
int r = s->connect(context, endpoint);
if (r == 0) {
return s;
} else {
delete s;
return NULL;
}
}
Poller * Poller::create(){
Poller * p;
if (std::getenv("ZMQ")){
p = new ZMQPoller();
} else {
p = new MSGQPoller();
}
return p;
}
Poller * Poller::create(std::vector<SubSocket*> sockets){
Poller * p = Poller::create();
for (auto s : sockets){
p->registerSocket(s);
}
return p;
}
extern "C" Context * messaging_context_create() {
return Context::create();
}
extern "C" SubSocket * messaging_subsocket_create(Context* context, const char* endpoint) {
return SubSocket::create(context, std::string(endpoint));
}
extern "C" PubSocket * messaging_pubsocket_create(Context* context, const char* endpoint) {
return PubSocket::create(context, std::string(endpoint));
}
extern "C" Poller * messaging_poller_create(SubSocket** sockets, int size) {
std::vector<SubSocket*> socketsVec(sockets, sockets + size);
return Poller::create(socketsVec);
}
+56
View File
@@ -0,0 +1,56 @@
#pragma once
#include <cstddef>
#include <vector>
#include <string>
#define MSG_MULTIPLE_PUBLISHERS 100
class Context {
public:
virtual void * getRawContext() = 0;
static Context * create();
virtual ~Context(){};
};
class Message {
public:
virtual void init(size_t size) = 0;
virtual void init(char * data, size_t size) = 0;
virtual void close() = 0;
virtual size_t getSize() = 0;
virtual char * getData() = 0;
virtual ~Message(){};
};
class SubSocket {
public:
virtual int connect(Context *context, std::string endpoint, std::string address, bool conflate=false) = 0;
virtual void setTimeout(int timeout) = 0;
virtual Message *receive(bool non_blocking=false) = 0;
virtual void * getRawSocket() = 0;
static SubSocket * create();
static SubSocket * create(Context * context, std::string endpoint);
static SubSocket * create(Context * context, std::string endpoint, std::string address);
static SubSocket * create(Context * context, std::string endpoint, std::string address, bool conflate);
virtual ~SubSocket(){};
};
class PubSocket {
public:
virtual int connect(Context *context, std::string endpoint) = 0;
virtual int sendMessage(Message *message) = 0;
virtual int send(char *data, size_t size) = 0;
static PubSocket * create();
static PubSocket * create(Context * context, std::string endpoint);
virtual ~PubSocket(){};
};
class Poller {
public:
virtual void registerSocket(SubSocket *socket) = 0;
virtual std::vector<SubSocket*> poll(int timeout) = 0;
static Poller * create();
static Poller * create(std::vector<SubSocket*> sockets);
virtual ~Poller(){};
};
+39
View File
@@ -0,0 +1,39 @@
# distutils: language = c++
#cython: language_level=3
from libcpp.string cimport string
from libcpp.vector cimport vector
from libcpp cimport bool
cdef extern from "messaging.hpp":
cdef cppclass Context:
@staticmethod
Context * create()
cdef cppclass Message:
void init(size_t)
void init(char *, size_t)
void close()
size_t getSize()
char *getData()
cdef cppclass SubSocket:
@staticmethod
SubSocket * create()
int connect(Context *, string, string, bool)
Message * receive(bool)
void setTimeout(int)
cdef cppclass PubSocket:
@staticmethod
PubSocket * create()
int connect(Context *, string)
int sendMessage(Message *)
int send(char *, size_t)
cdef cppclass Poller:
@staticmethod
Poller * create()
void registerSocket(SubSocket *)
vector[SubSocket*] poll(int) nogil
+151
View File
@@ -0,0 +1,151 @@
# distutils: language = c++
# cython: c_string_encoding=ascii, language_level=3
import sys
from libcpp.string cimport string
from libcpp cimport bool
from libc cimport errno
from messaging cimport Context as cppContext
from messaging cimport SubSocket as cppSubSocket
from messaging cimport PubSocket as cppPubSocket
from messaging cimport Poller as cppPoller
from messaging cimport Message as cppMessage
class MessagingError(Exception):
pass
class MultiplePublishersError(MessagingError):
pass
cdef class Context:
cdef cppContext * context
def __cinit__(self):
self.context = cppContext.create()
def term(self):
del self.context
self.context = NULL
def __dealloc__(self):
pass
# Deleting the context will hang if sockets are still active
# TODO: Figure out a way to make sure the context is closed last
# del self.context
cdef class Poller:
cdef cppPoller * poller
cdef list sub_sockets
def __cinit__(self):
self.sub_sockets = []
self.poller = cppPoller.create()
def __dealloc__(self):
del self.poller
def registerSocket(self, SubSocket socket):
self.sub_sockets.append(socket)
self.poller.registerSocket(socket.socket)
def poll(self, timeout):
sockets = []
cdef int t = timeout
with nogil:
result = self.poller.poll(t)
for s in result:
socket = SubSocket()
socket.setPtr(s)
sockets.append(socket)
return sockets
cdef class SubSocket:
cdef cppSubSocket * socket
cdef bool is_owner
def __cinit__(self):
self.socket = cppSubSocket.create()
self.is_owner = True
if self.socket == NULL:
raise MessagingError
def __dealloc__(self):
if self.is_owner:
del self.socket
cdef setPtr(self, cppSubSocket * ptr):
if self.is_owner:
del self.socket
self.is_owner = False
self.socket = ptr
def connect(self, Context context, string endpoint, string address=b"127.0.0.1", bool conflate=False):
r = self.socket.connect(context.context, endpoint, address, conflate)
if r != 0:
if errno.errno == errno.EADDRINUSE:
raise MultiplePublishersError
else:
raise MessagingError
def setTimeout(self, int timeout):
self.socket.setTimeout(timeout)
def receive(self, bool non_blocking=False):
msg = self.socket.receive(non_blocking)
if msg == NULL:
# If a blocking read returns no message check errno if SIGINT was caught in the C++ code
if errno.errno == errno.EINTR:
print("SIGINT received, exiting")
sys.exit(1)
return None
else:
sz = msg.getSize()
m = msg.getData()[:sz]
del msg
return m
cdef class PubSocket:
cdef cppPubSocket * socket
def __cinit__(self):
self.socket = cppPubSocket.create()
if self.socket == NULL:
raise MessagingError
def __dealloc__(self):
del self.socket
def connect(self, Context context, string endpoint):
r = self.socket.connect(context.context, endpoint)
if r != 0:
if errno.errno == errno.EADDRINUSE:
raise MultiplePublishersError
else:
raise MessagingError
def send(self, string data):
length = len(data)
r = self.socket.send(<char*>data.c_str(), length)
if r != length:
if errno.errno == errno.EADDRINUSE:
raise MultiplePublishersError
else:
raise MessagingError
+56
View File
@@ -0,0 +1,56 @@
import os
import subprocess
import sysconfig
from distutils.core import Extension, setup # pylint: disable=import-error,no-name-in-module
from Cython.Build import cythonize
from Cython.Distutils import build_ext
def get_ext_filename_without_platform_suffix(filename):
name, ext = os.path.splitext(filename)
ext_suffix = sysconfig.get_config_var('EXT_SUFFIX')
if ext_suffix == ext:
return filename
ext_suffix = ext_suffix.replace(ext, '')
idx = name.find(ext_suffix)
if idx == -1:
return filename
else:
return name[:idx] + ext
class BuildExtWithoutPlatformSuffix(build_ext):
def get_ext_filename(self, ext_name):
filename = super().get_ext_filename(ext_name)
return get_ext_filename_without_platform_suffix(filename)
sourcefiles = ['messaging_pyx.pyx']
extra_compile_args = ["-std=c++11"]
libraries = ['zmq']
ARCH = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip() # pylint: disable=unexpected-keyword-arg
if ARCH == "aarch64":
extra_compile_args += ["-Wno-deprecated-register"]
libraries += ['gnustl_shared']
setup(name='CAN parser',
cmdclass={'build_ext': BuildExtWithoutPlatformSuffix},
ext_modules=cythonize(
Extension(
"messaging_pyx",
language="c++",
sources=sourcefiles,
extra_compile_args=extra_compile_args,
libraries=libraries,
extra_objects=[
os.path.join(os.path.dirname(os.path.realpath(__file__)), '../', 'libmessaging.a'),
]
)
),
nthreads=4,
)
+449
View File
@@ -0,0 +1,449 @@
#include <iostream>
#include <cassert>
#include <cerrno>
#include <cmath>
#include <cstring>
#include <cstdint>
#include <chrono>
#include <algorithm>
#include <cstdlib>
#include <csignal>
#include <random>
#include <poll.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/syscall.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include "msgq.hpp"
void sigusr2_handler(int signal) {
assert(signal == SIGUSR2);
}
uint64_t msgq_get_uid(void){
std::random_device rd("/dev/urandom");
std::uniform_int_distribution<uint64_t> distribution(0,std::numeric_limits<uint32_t>::max());
uint64_t uid = distribution(rd) << 32 | syscall(SYS_gettid);
return uid;
}
int msgq_msg_init_size(msgq_msg_t * msg, size_t size){
msg->size = size;
msg->data = new(std::nothrow) char[size];
return (msg->data == NULL) ? -1 : 0;
}
int msgq_msg_init_data(msgq_msg_t * msg, char * data, size_t size) {
int r = msgq_msg_init_size(msg, size);
if (r == 0)
memcpy(msg->data, data, size);
return r;
}
int msgq_msg_close(msgq_msg_t * msg){
if (msg->size > 0)
delete[] msg->data;
msg->size = 0;
return 0;
}
void msgq_reset_reader(msgq_queue_t * q){
int id = q->reader_id;
q->read_valids[id]->store(true);
q->read_pointers[id]->store(*q->write_pointer);
}
void msgq_wait_for_subscriber(msgq_queue_t *q){
while (*q->num_readers == 0){
;
}
return;
}
int msgq_new_queue(msgq_queue_t * q, const char * path, size_t size){
assert(size < 0xFFFFFFFF); // Buffer must be smaller than 2^32 bytes
std::signal(SIGUSR2, sigusr2_handler);
const char * prefix = "/dev/shm/";
char * full_path = new char[strlen(path) + strlen(prefix) + 1];
strcpy(full_path, prefix);
strcat(full_path, path);
auto fd = open(full_path, O_RDWR | O_CREAT, 0777);
delete[] full_path;
if (fd < 0)
return -1;
int rc = ftruncate(fd, size + sizeof(msgq_header_t));
if (rc < 0)
return -1;
char * mem = (char*)mmap(NULL, size + sizeof(msgq_header_t), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
close(fd);
if (mem == NULL)
return -1;
q->mmap_p = mem;
msgq_header_t *header = (msgq_header_t *)mem;
// Setup pointers to header segment
q->num_readers = reinterpret_cast<std::atomic<uint64_t>*>(&header->num_readers);
q->write_pointer = reinterpret_cast<std::atomic<uint64_t>*>(&header->write_pointer);
q->write_uid = reinterpret_cast<std::atomic<uint64_t>*>(&header->write_uid);
for (size_t i = 0; i < NUM_READERS; i++){
q->read_pointers[i] = reinterpret_cast<std::atomic<uint64_t>*>(&header->read_pointers[i]);
q->read_valids[i] = reinterpret_cast<std::atomic<uint64_t>*>(&header->read_valids[i]);
q->read_uids[i] = reinterpret_cast<std::atomic<uint64_t>*>(&header->read_uids[i]);
}
q->data = mem + sizeof(msgq_header_t);
q->size = size;
q->reader_id = -1;
q->endpoint = path;
q->read_conflate = false;
return 0;
}
void msgq_close_queue(msgq_queue_t *q){
if (q->mmap_p != NULL){
munmap(q->mmap_p, q->size + sizeof(msgq_header_t));
}
}
void msgq_init_publisher(msgq_queue_t * q) {
//std::cout << "Starting publisher" << std::endl;
uint64_t uid = msgq_get_uid();
*q->write_uid = uid;
*q->num_readers = 0;
for (size_t i = 0; i < NUM_READERS; i++){
*q->read_valids[i] = false;
*q->read_uids[i] = 0;
}
q->write_uid_local = uid;
}
static void thread_signal(uint32_t tid) {
#ifndef SYS_tkill
// TODO: this won't work for multithreaded programs
kill(tid, SIGUSR2);
#else
syscall(SYS_tkill, tid, SIGUSR2);
#endif
}
void msgq_init_subscriber(msgq_queue_t * q) {
assert(q != NULL);
assert(q->num_readers != NULL);
uint64_t uid = msgq_get_uid();
// Get reader id
while (true){
uint64_t cur_num_readers = *q->num_readers;
uint64_t new_num_readers = cur_num_readers + 1;
// No more slots available. Reset all subscribers to kick out inactive ones
if (new_num_readers > NUM_READERS){
std::cout << "Warning, evicting all subscribers!" << std::endl;
*q->num_readers = 0;
for (size_t i = 0; i < NUM_READERS; i++){
*q->read_valids[i] = false;
uint64_t old_uid = *q->read_uids[i];
*q->read_uids[i] = 0;
// Wake up reader in case they are in a poll
thread_signal(old_uid & 0xFFFFFFFF);
}
continue;
}
// Use atomic compare and swap to handle race condition
// where two subscribers start at the same time
if (std::atomic_compare_exchange_strong(q->num_readers,
&cur_num_readers,
new_num_readers)){
q->reader_id = cur_num_readers;
q->read_uid_local = uid;
// We start with read_valid = false,
// on the first read the read pointer will be synchronized with the write pointer
*q->read_valids[cur_num_readers] = false;
*q->read_pointers[cur_num_readers] = 0;
*q->read_uids[cur_num_readers] = uid;
break;
}
}
//std::cout << "New subscriber id: " << q->reader_id << " uid: " << q->read_uid_local << " " << q->endpoint << std::endl;
msgq_reset_reader(q);
}
int msgq_msg_send(msgq_msg_t * msg, msgq_queue_t *q){
// Die if we are no longer the active publisher
if (q->write_uid_local != *q->write_uid){
std::cout << "Killing old publisher: " << q->endpoint << std::endl;
errno = EADDRINUSE;
return -1;
}
uint64_t total_msg_size = ALIGN(msg->size + sizeof(int64_t));
// We need to fit at least three messages in the queue,
// then we can always safely access the last message
assert(3 * total_msg_size <= q->size);
uint64_t num_readers = *q->num_readers;
uint32_t write_cycles, write_pointer;
UNPACK64(write_cycles, write_pointer, *q->write_pointer);
char *p = q->data + write_pointer; // add base offset
// Check remaining space
// Always leave space for a wraparound tag for the next message, including alignment
int64_t remaining_space = q->size - write_pointer - total_msg_size - sizeof(int64_t);
if (remaining_space <= 0){
// Write -1 size tag indicating wraparound
*(int64_t*)p = -1;
// Invalidate all readers that are beyond the write pointer
// TODO: should we handle the case where a new reader shows up while this is running?
for (uint64_t i = 0; i < num_readers; i++){
uint64_t read_pointer = *q->read_pointers[i];
uint64_t read_cycles = read_pointer >> 32;
read_pointer &= 0xFFFFFFFF;
if ((read_pointer > write_pointer) && (read_cycles != write_cycles)) {
*q->read_valids[i] = false;
}
}
// Update global and local copies of write pointer and write_cycles
write_pointer = 0;
write_cycles = write_cycles + 1;
PACK64(*q->write_pointer, write_cycles, write_pointer);
// Set actual pointer to the beginning of the data segment
p = q->data;
}
// Invalidate readers that are in the area that will be written
uint64_t start = write_pointer;
uint64_t end = ALIGN(start + sizeof(int64_t) + msg->size);
for (uint64_t i = 0; i < num_readers; i++){
uint32_t read_cycles, read_pointer;
UNPACK64(read_cycles, read_pointer, *q->read_pointers[i]);
if ((read_pointer >= start) && (read_pointer < end) && (read_cycles != write_cycles)) {
*q->read_valids[i] = false;
}
}
// Write size tag
std::atomic<int64_t> *size_p = reinterpret_cast<std::atomic<int64_t>*>(p);
*size_p = msg->size;
// Copy data
memcpy(p + sizeof(int64_t), msg->data, msg->size);
__sync_synchronize();
// Update write pointer
uint32_t new_ptr = ALIGN(write_pointer + msg->size + sizeof(int64_t));
PACK64(*q->write_pointer, write_cycles, new_ptr);
// Notify readers
for (uint64_t i = 0; i < num_readers; i++){
uint64_t reader_uid = *q->read_uids[i];
thread_signal(reader_uid & 0xFFFFFFFF);
}
return msg->size;
}
int msgq_msg_ready(msgq_queue_t * q){
start:
int id = q->reader_id;
assert(id >= 0); // Make sure subscriber is initialized
if (q->read_uid_local != *q->read_uids[id]){
std::cout << q->endpoint << ": Reader was evicted, reconnecting" << std::endl;
msgq_init_subscriber(q);
goto start;
}
// Check valid
if (!*q->read_valids[id]){
msgq_reset_reader(q);
goto start;
}
uint32_t read_cycles, read_pointer;
UNPACK64(read_cycles, read_pointer, *q->read_pointers[id]);
uint32_t write_cycles, write_pointer;
UNPACK64(write_cycles, write_pointer, *q->write_pointer);
// Check if new message is available
return (read_pointer != write_pointer);
}
int msgq_msg_recv(msgq_msg_t * msg, msgq_queue_t * q){
start:
int id = q->reader_id;
assert(id >= 0); // Make sure subscriber is initialized
if (q->read_uid_local != *q->read_uids[id]){
std::cout << q->endpoint << ": Reader was evicted, reconnecting" << std::endl;
msgq_init_subscriber(q);
goto start;
}
// Check valid
if (!*q->read_valids[id]){
msgq_reset_reader(q);
goto start;
}
uint32_t read_cycles, read_pointer;
UNPACK64(read_cycles, read_pointer, *q->read_pointers[id]);
uint32_t write_cycles, write_pointer;
UNPACK64(write_cycles, write_pointer, *q->write_pointer);
char * p = q->data + read_pointer;
// Check if new message is available
if (read_pointer == write_pointer) {
msg->size = 0;
return 0;
}
// Read potential message size
std::atomic<int64_t> *size_p = reinterpret_cast<std::atomic<int64_t>*>(p);
std::int64_t size = *size_p;
// Check if the size that was read is valid
if (!*q->read_valids[id]){
msgq_reset_reader(q);
goto start;
}
// If size is -1 the buffer was full, and we need to wrap around
if (size == -1){
read_cycles++;
PACK64(*q->read_pointers[id], read_cycles, 0);
goto start;
}
// crashing is better than passing garbage data to the consumer
// the size will have weird value if it was overwritten by data accidentally
assert((uint64_t)size < q->size);
assert(size > 0);
uint32_t new_read_pointer = ALIGN(read_pointer + sizeof(std::int64_t) + size);
// If conflate is true, check if this is the latest message, else start over
if (q->read_conflate){
if (new_read_pointer != write_pointer){
// Update read pointer
PACK64(*q->read_pointers[id], read_cycles, new_read_pointer);
goto start;
}
}
// Copy message
if (msgq_msg_init_size(msg, size) < 0)
return -1;
__sync_synchronize();
memcpy(msg->data, p + sizeof(int64_t), size);
__sync_synchronize();
// Update read pointer
PACK64(*q->read_pointers[id], read_cycles, new_read_pointer);
// Check if the actual data that was copied is valid
if (!*q->read_valids[id]){
msgq_msg_close(msg);
msgq_reset_reader(q);
goto start;
}
return msg->size;
}
int msgq_poll(msgq_pollitem_t * items, size_t nitems, int timeout){
assert(timeout >= 0);
int num = 0;
// Check if messages ready
for (size_t i = 0; i < nitems; i++) {
items[i].revents = msgq_msg_ready(items[i].q);
if (items[i].revents) num++;
}
int ms = (timeout == -1) ? 100 : timeout;
struct timespec ts;
ts.tv_sec = ms / 1000;
ts.tv_nsec = (ms % 1000) * 1000 * 1000;
while (num == 0) {
int ret;
ret = nanosleep(&ts, &ts);
// Check if messages ready
for (size_t i = 0; i < nitems; i++) {
if (items[i].revents == 0 && msgq_msg_ready(items[i].q)){
num += 1;
items[i].revents = 1;
}
}
// exit if we had a timeout and the sleep finished
if (timeout != -1 && ret == 0){
break;
}
}
return num;
}
+66
View File
@@ -0,0 +1,66 @@
#pragma once
#include <cstdint>
#include <cstring>
#include <string>
#include <atomic>
#define DEFAULT_SEGMENT_SIZE (10 * 1024 * 1024)
#define NUM_READERS 8
#define ALIGN(n) ((n + (8 - 1)) & -8)
#define UNPACK64(higher, lower, input) do {uint64_t tmp = input; higher = tmp >> 32; lower = tmp & 0xFFFFFFFF;} while (0)
#define PACK64(output, higher, lower) output = ((uint64_t)higher << 32 ) | ((uint64_t)lower & 0xFFFFFFFF)
struct msgq_header_t {
uint64_t num_readers;
uint64_t write_pointer;
uint64_t write_uid;
uint64_t read_pointers[NUM_READERS];
uint64_t read_valids[NUM_READERS];
uint64_t read_uids[NUM_READERS];
};
struct msgq_queue_t {
std::atomic<uint64_t> *num_readers;
std::atomic<uint64_t> *write_pointer;
std::atomic<uint64_t> *write_uid;
std::atomic<uint64_t> *read_pointers[NUM_READERS];
std::atomic<uint64_t> *read_valids[NUM_READERS];
std::atomic<uint64_t> *read_uids[NUM_READERS];
char * mmap_p;
char * data;
size_t size;
int reader_id;
uint64_t read_uid_local;
uint64_t write_uid_local;
bool read_conflate;
std::string endpoint;
};
struct msgq_msg_t {
size_t size;
char * data;
};
struct msgq_pollitem_t {
msgq_queue_t *q;
int revents;
};
void msgq_wait_for_subscriber(msgq_queue_t *q);
void msgq_reset_reader(msgq_queue_t *q);
int msgq_msg_init_size(msgq_msg_t *msg, size_t size);
int msgq_msg_init_data(msgq_msg_t *msg, char * data, size_t size);
int msgq_msg_close(msgq_msg_t *msg);
int msgq_new_queue(msgq_queue_t * q, const char * path, size_t size);
void msgq_close_queue(msgq_queue_t *q);
void msgq_init_publisher(msgq_queue_t * q);
void msgq_init_subscriber(msgq_queue_t * q);
int msgq_msg_send(msgq_msg_t *msg, msgq_queue_t *q);
int msgq_msg_recv(msgq_msg_t *msg, msgq_queue_t *q);
int msgq_msg_ready(msgq_queue_t * q);
int msgq_poll(msgq_pollitem_t * items, size_t nitems, int timeout);
+56
View File
@@ -0,0 +1,56 @@
# MSGQ: A lock free single producer multi consumer message queue
[![Build Status](https://dev.azure.com/commaai/default/_apis/build/status/commaai.msgq?branchName=master)](https://dev.azure.com/commaai/default/_build/latest?definitionId=21&branchName=master)
## What is MSGQ?
MSGQ is a system to pass messages from a single producer to multiple consumers. All the consumers need to be able to receive all the messages. It is designed to be a high performance replacement for ZMQ-like SUB/PUB patterns. It uses a ring buffer in shared memory to efficiently read and write data. Each read requires a copy. Writing can be done without a copy, as long as the size of the data is known in advance.
## Storage
The storage for the queue consists of an area of metadata, and the actual buffer. The metadata contains:
1. A counter to the number of readers that are active
2. A pointer to the head of the queue for writing. From now on referred to as *write pointer*
3. A cycle counter for the writer. This counter is incremented when the writer wraps around
4. N pointers, pointing to the current read position for all the readers. From now on referred to as *read pointer*
5. N counters, counting the number of cycles for all the readers
6. N booleans, indicating validity for all the readers. From now on referred to as *validity flag*
The counter and the pointer are both 32 bit values, packed into 64 bit so they can be read and written atomically.
The data buffer is a ring buffer. All messages are prefixed by an 8 byte size field, followed by the data. A size of -1 indicates a wrap-around, and means the next message is stored at the beginning of the buffer.
## Writing
Writing involves the following steps:
1. Check if the area that is to be written overlaps with any of the read pointers, mark those readers as invalid by clearing the validity flag.
2. Write the message
3. Increase the write pointer by the size of the message
In case there is not enough space at the end of the buffer, a special empty message with a prefix of -1 is written. The cycle counter is incremented by one. In this case step 1 will check there are no read pointers pointing to the remainder of the buffer. Then another write cycle will start with the actual message.
There always needs to be 8 bytes of empty space at the end of the buffer. By doing this there is always space to write the -1.
## Reset reader
When the reader is lagging too much behind the read pointer becomes invalid and no longer points to the beginning of a valid message. To reset a reader to the current write pointer, the following steps are performed:
1. Set valid flag
2. Set read cycle counter to that of the writer
3. Set read pointer to write pointer
## Reading
Reading involves the following steps:
1. Read the size field at the current read pointer
2. Read the validity flag
3. Copy the data out of the buffer
4. Increase the read pointer by the size of the message
5. Check the validity flag again
Before starting the copy, the valid flag is checked. This is to prevent a race condition where the size prefix was invalid, and the read could read outside of the buffer. Make sure that step 1 and 2 are not reordered by your compiler or CPU.
If a writer overwrites the data while it's being copied out, the data will be invalid. Therefore the validity flag is also checked after reading it. The order of step 4 and 5 does not matter.
If at steps 2 or 5 the validity flag is not set, the reader is reset. Any data that was already read is discarded. After the reader is reset, the reading starts from the beginning.
If a message with size -1 is encountered, step 3 and 4 are replaced by increasing the cycle counter and setting the read pointer to the beginning of the buffer. After that another read is performed.
+395
View File
@@ -0,0 +1,395 @@
#include "catch2/catch.hpp"
#include "msgq.hpp"
TEST_CASE("ALIGN"){
REQUIRE(ALIGN(0) == 0);
REQUIRE(ALIGN(1) == 8);
REQUIRE(ALIGN(7) == 8);
REQUIRE(ALIGN(8) == 8);
REQUIRE(ALIGN(99999) == 100000);
}
TEST_CASE("msgq_msg_init_size"){
const size_t msg_size = 30;
msgq_msg_t msg;
msgq_msg_init_size(&msg, msg_size);
REQUIRE(msg.size == msg_size);
msgq_msg_close(&msg);
}
TEST_CASE("msgq_msg_init_data"){
const size_t msg_size = 30;
char * data = new char[msg_size];
for (size_t i = 0; i < msg_size; i++){
data[i] = i;
}
msgq_msg_t msg;
msgq_msg_init_data(&msg, data, msg_size);
REQUIRE(msg.size == msg_size);
REQUIRE(memcmp(msg.data, data, msg_size) == 0);
delete[] data;
msgq_msg_close(&msg);
}
TEST_CASE("msgq_init_subscriber"){
remove("/dev/shm/test_queue");
msgq_queue_t q;
msgq_new_queue(&q, "test_queue", 1024);
REQUIRE(*q.num_readers == 0);
q.reader_id = 1;
*q.read_valids[0] = false;
*q.read_pointers[0] = ((uint64_t)1 << 32);
*q.write_pointer = 255;
msgq_init_subscriber(&q);
REQUIRE(q.read_conflate == false);
REQUIRE(*q.read_valids[0] == true);
REQUIRE((*q.read_pointers[0] >> 32) == 0);
REQUIRE((*q.read_pointers[0] & 0xFFFFFFFF) == 255);
}
TEST_CASE("msgq_msg_send first message"){
remove("/dev/shm/test_queue");
msgq_queue_t q;
msgq_new_queue(&q, "test_queue", 1024);
msgq_init_publisher(&q);
REQUIRE(*q.write_pointer == 0);
size_t msg_size = 128;
SECTION("Aligned message size"){
}
SECTION("Unaligned message size"){
msg_size--;
}
char * data = new char[msg_size];
for (size_t i = 0; i < msg_size; i++){
data[i] = i;
}
msgq_msg_t msg;
msgq_msg_init_data(&msg, data, msg_size);
msgq_msg_send(&msg, &q);
REQUIRE(*(int64_t*)q.data == msg_size); // Check size tag
REQUIRE(*q.write_pointer == 128 + sizeof(int64_t));
REQUIRE(memcmp(q.data + sizeof(int64_t), data, msg_size) == 0);
delete[] data;
msgq_msg_close(&msg);
}
TEST_CASE("msgq_msg_send test wraparound"){
remove("/dev/shm/test_queue");
msgq_queue_t q;
msgq_new_queue(&q, "test_queue", 1024);
msgq_init_publisher(&q);
REQUIRE((*q.write_pointer & 0xFFFFFFFF) == 0);
REQUIRE((*q.write_pointer >> 32) == 0);
const size_t msg_size = 120;
msgq_msg_t msg;
msgq_msg_init_size(&msg, msg_size);
for (int i = 0; i < 8; i++) {
msgq_msg_send(&msg, &q);
}
// Check 8th message was written at the beginning
REQUIRE((*q.write_pointer & 0xFFFFFFFF) == msg_size + sizeof(int64_t));
// Check cycle count
REQUIRE((*q.write_pointer >> 32) == 1);
// Check wraparound tag
char * tag_location = q.data;
tag_location += 7 * (msg_size + sizeof(int64_t));
REQUIRE(*(int64_t*)tag_location == -1);
msgq_msg_close(&msg);
}
TEST_CASE("msgq_msg_recv test wraparound"){
remove("/dev/shm/test_queue");
msgq_queue_t q_pub, q_sub;
msgq_new_queue(&q_pub, "test_queue", 1024);
msgq_new_queue(&q_sub, "test_queue", 1024);
msgq_init_publisher(&q_pub);
msgq_init_subscriber(&q_sub);
REQUIRE((*q_pub.write_pointer >> 32) == 0);
REQUIRE((*q_sub.read_pointers[0] >> 32) == 0);
const size_t msg_size = 120;
msgq_msg_t msg1;
msgq_msg_init_size(&msg1, msg_size);
SECTION("Check cycle counter after reset") {
for (int i = 0; i < 8; i++) {
msgq_msg_send(&msg1, &q_pub);
}
msgq_msg_t msg2;
msgq_msg_recv(&msg2, &q_sub);
REQUIRE(msg2.size == 0); // Reader had to reset
msgq_msg_close(&msg2);
}
SECTION("Check cycle counter while keeping up with writer") {
for (int i = 0; i < 8; i++) {
msgq_msg_send(&msg1, &q_pub);
msgq_msg_t msg2;
msgq_msg_recv(&msg2, &q_sub);
REQUIRE(msg2.size > 0);
msgq_msg_close(&msg2);
}
}
REQUIRE((*q_sub.read_pointers[0] >> 32) == 1);
msgq_msg_close(&msg1);
}
TEST_CASE("msgq_msg_send test invalidation"){
remove("/dev/shm/test_queue");
msgq_queue_t q_pub, q_sub;
msgq_new_queue(&q_pub, "test_queue", 1024);
msgq_new_queue(&q_sub, "test_queue", 1024);
msgq_init_publisher(&q_pub);
msgq_init_subscriber(&q_sub);
*q_sub.write_pointer = (uint64_t)1 << 32;
REQUIRE(*q_sub.read_valids[0] == true);
SECTION("read pointer in tag"){
*q_sub.read_pointers[0] = 0;
}
SECTION("read pointer in data section"){
*q_sub.read_pointers[0] = 64;
}
SECTION("read pointer in wraparound section"){
*q_pub.write_pointer = ((uint64_t)1 << 32) | 1000; // Writer is one cycle ahead
*q_sub.read_pointers[0] = 1020;
}
msgq_msg_t msg;
msgq_msg_init_size(&msg, 128);
msgq_msg_send(&msg, &q_pub);
REQUIRE(*q_sub.read_valids[0] == false);
msgq_msg_close(&msg);
}
TEST_CASE("msgq_init_subscriber init 2 subscribers"){
remove("/dev/shm/test_queue");
msgq_queue_t q1, q2;
msgq_new_queue(&q1, "test_queue", 1024);
msgq_new_queue(&q2, "test_queue", 1024);
*q1.num_readers = 0;
REQUIRE(*q1.num_readers == 0);
REQUIRE(*q2.num_readers == 0);
msgq_init_subscriber(&q1);
REQUIRE(*q1.num_readers == 1);
REQUIRE(*q2.num_readers == 1);
REQUIRE(q1.reader_id == 0);
msgq_init_subscriber(&q2);
REQUIRE(*q1.num_readers == 2);
REQUIRE(*q2.num_readers == 2);
REQUIRE(q2.reader_id == 1);
}
TEST_CASE("Write 1 msg, read 1 msg", "[integration]"){
remove("/dev/shm/test_queue");
const size_t msg_size = 128;
msgq_queue_t writer, reader;
msgq_new_queue(&writer, "test_queue", 1024);
msgq_new_queue(&reader, "test_queue", 1024);
msgq_init_publisher(&writer);
msgq_init_subscriber(&reader);
// Build 128 byte message
msgq_msg_t outgoing_msg;
msgq_msg_init_size(&outgoing_msg, msg_size);
for (size_t i = 0; i < msg_size; i++){
outgoing_msg.data[i] = i;
}
REQUIRE(msgq_msg_send(&outgoing_msg, &writer) == msg_size);
msgq_msg_t incoming_msg1;
REQUIRE(msgq_msg_recv(&incoming_msg1, &reader) == msg_size);
REQUIRE(memcmp(incoming_msg1.data, outgoing_msg.data, msg_size) == 0);
// Verify that there are no more messages
msgq_msg_t incoming_msg2;
REQUIRE(msgq_msg_recv(&incoming_msg2, &reader) == 0);
msgq_msg_close(&outgoing_msg);
msgq_msg_close(&incoming_msg1);
msgq_msg_close(&incoming_msg2);
}
TEST_CASE("Write 2 msg, read 2 msg - conflate = false", "[integration]"){
remove("/dev/shm/test_queue");
const size_t msg_size = 128;
msgq_queue_t writer, reader;
msgq_new_queue(&writer, "test_queue", 1024);
msgq_new_queue(&reader, "test_queue", 1024);
msgq_init_publisher(&writer);
msgq_init_subscriber(&reader);
// Build 128 byte message
msgq_msg_t outgoing_msg;
msgq_msg_init_size(&outgoing_msg, msg_size);
for (size_t i = 0; i < msg_size; i++){
outgoing_msg.data[i] = i;
}
REQUIRE(msgq_msg_send(&outgoing_msg, &writer) == msg_size);
REQUIRE(msgq_msg_send(&outgoing_msg, &writer) == msg_size);
msgq_msg_t incoming_msg1;
REQUIRE(msgq_msg_recv(&incoming_msg1, &reader) == msg_size);
REQUIRE(memcmp(incoming_msg1.data, outgoing_msg.data, msg_size) == 0);
msgq_msg_t incoming_msg2;
REQUIRE(msgq_msg_recv(&incoming_msg2, &reader) == msg_size);
REQUIRE(memcmp(incoming_msg2.data, outgoing_msg.data, msg_size) == 0);
msgq_msg_close(&outgoing_msg);
msgq_msg_close(&incoming_msg1);
msgq_msg_close(&incoming_msg2);
}
TEST_CASE("Write 2 msg, read 2 msg - conflate = true", "[integration]"){
remove("/dev/shm/test_queue");
const size_t msg_size = 128;
msgq_queue_t writer, reader;
msgq_new_queue(&writer, "test_queue", 1024);
msgq_new_queue(&reader, "test_queue", 1024);
msgq_init_publisher(&writer);
msgq_init_subscriber(&reader);
reader.read_conflate = true;
// Build 128 byte message
msgq_msg_t outgoing_msg;
msgq_msg_init_size(&outgoing_msg, msg_size);
for (size_t i = 0; i < msg_size; i++){
outgoing_msg.data[i] = i;
}
REQUIRE(msgq_msg_send(&outgoing_msg, &writer) == msg_size);
REQUIRE(msgq_msg_send(&outgoing_msg, &writer) == msg_size);
msgq_msg_t incoming_msg1;
REQUIRE(msgq_msg_recv(&incoming_msg1, &reader) == msg_size);
REQUIRE(memcmp(incoming_msg1.data, outgoing_msg.data, msg_size) == 0);
// Verify that there are no more messages
msgq_msg_t incoming_msg2;
REQUIRE(msgq_msg_recv(&incoming_msg2, &reader) == 0);
msgq_msg_close(&outgoing_msg);
msgq_msg_close(&incoming_msg1);
msgq_msg_close(&incoming_msg2);
}
TEST_CASE("1 publisher, 1 slow subscriber", "[integration]"){
remove("/dev/shm/test_queue");
msgq_queue_t writer, reader;
msgq_new_queue(&writer, "test_queue", 1024);
msgq_new_queue(&reader, "test_queue", 1024);
msgq_init_publisher(&writer);
msgq_init_subscriber(&reader);
int n_received = 0;
int n_skipped = 0;
for (uint64_t i = 0; i < 1e5; i++) {
msgq_msg_t outgoing_msg;
msgq_msg_init_data(&outgoing_msg, (char*)&i, sizeof(uint64_t));
msgq_msg_send(&outgoing_msg, &writer);
msgq_msg_close(&outgoing_msg);
if (i % 10 == 0){
msgq_msg_t msg1;
msgq_msg_recv(&msg1, &reader);
if (msg1.size == 0){
n_skipped++;
} else {
n_received++;
}
msgq_msg_close(&msg1);
}
}
// TODO: verify these numbers by hand
REQUIRE(n_received == 8572);
REQUIRE(n_skipped == 1428);
}
TEST_CASE("1 publisher, 2 subscribers", "[integration]"){
remove("/dev/shm/test_queue");
msgq_queue_t writer, reader1, reader2;
msgq_new_queue(&writer, "test_queue", 1024);
msgq_new_queue(&reader1, "test_queue", 1024);
msgq_new_queue(&reader2, "test_queue", 1024);
msgq_init_publisher(&writer);
msgq_init_subscriber(&reader1);
msgq_init_subscriber(&reader2);
for (uint64_t i = 0; i < 1024 * 3; i++) {
msgq_msg_t outgoing_msg;
msgq_msg_init_data(&outgoing_msg, (char*)&i, sizeof(uint64_t));
msgq_msg_send(&outgoing_msg, &writer);
msgq_msg_t msg1, msg2;
msgq_msg_recv(&msg1, &reader1);
msgq_msg_recv(&msg2, &reader2);
REQUIRE(msg1.size == sizeof(uint64_t));
REQUIRE(msg2.size == sizeof(uint64_t));
REQUIRE(*(uint64_t*)msg1.data == i);
REQUIRE(*(uint64_t*)msg2.data == i);
msgq_msg_close(&outgoing_msg);
msgq_msg_close(&msg1);
msgq_msg_close(&msg2);
}
}
+14
View File
@@ -0,0 +1,14 @@
from messaging_pyx import Context, SubSocket, PubSocket # pylint: disable=no-name-in-module, import-error
if __name__ == "__main__":
c = Context()
pub_sock = PubSocket()
pub_sock.connect(c, "controlsState")
for i in range(int(1e10)):
print(i)
sub_sock = SubSocket()
sub_sock.connect(c, "controlsState")
pub_sock.send(b'a')
print(sub_sock.receive())
+2
View File
@@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch2/catch.hpp"
+142
View File
@@ -0,0 +1,142 @@
import unittest
import time
import cereal.messaging as messaging
import concurrent.futures
def poller():
context = messaging.Context()
p = messaging.Poller()
sub = messaging.SubSocket()
sub.connect(context, 'controlsState')
p.registerSocket(sub)
socks = p.poll(10000)
r = [s.receive(non_blocking=True) for s in socks]
return r
class TestPoller(unittest.TestCase):
def test_poll_once(self):
context = messaging.Context()
pub = messaging.PubSocket()
pub.connect(context, 'controlsState')
with concurrent.futures.ThreadPoolExecutor() as e:
poll = e.submit(poller)
time.sleep(0.1) # Slow joiner syndrome
# Send message
pub.send("a")
# Wait for poll result
result = poll.result()
del pub
context.term()
self.assertEqual(result, [b"a"])
def test_poll_and_create_many_subscribers(self):
context = messaging.Context()
pub = messaging.PubSocket()
pub.connect(context, 'controlsState')
with concurrent.futures.ThreadPoolExecutor() as e:
poll = e.submit(poller)
time.sleep(0.1) # Slow joiner syndrome
c = messaging.Context()
for _ in range(10):
messaging.SubSocket().connect(c, 'controlsState')
time.sleep(0.1)
# Send message
pub.send("a")
# Wait for poll result
result = poll.result()
del pub
context.term()
self.assertEqual(result, [b"a"])
def test_multiple_publishers_exception(self):
context = messaging.Context()
with self.assertRaises(messaging.MultiplePublishersError):
pub1 = messaging.PubSocket()
pub1.connect(context, 'controlsState')
pub2 = messaging.PubSocket()
pub2.connect(context, 'controlsState')
pub1.send("a")
del pub1
del pub2
context.term()
def test_multiple_messages(self):
context = messaging.Context()
pub = messaging.PubSocket()
pub.connect(context, 'controlsState')
sub = messaging.SubSocket()
sub.connect(context, 'controlsState')
time.sleep(0.1) # Slow joiner
for i in range(100):
pub.send(str(i))
msg_seen = False
i = 0
while True:
r = sub.receive(non_blocking=True)
if r is not None:
self.assertEqual(str(i), r.decode('utf8'))
msg_seen = True
i += 1
if r is None and msg_seen: # ZMQ sometimes receives nothing on the first receive
break
del pub
del sub
context.term()
def test_conflate(self):
context = messaging.Context()
pub = messaging.PubSocket()
pub.connect(context, 'controlsState')
sub = messaging.SubSocket()
sub.connect(context, 'controlsState', conflate=True)
time.sleep(0.1) # Slow joiner
pub.send('a')
pub.send('b')
self.assertEqual(b'b', sub.receive())
del pub
del sub
context.term()
if __name__ == "__main__":
unittest.main()
+164
View File
@@ -0,0 +1,164 @@
# TODO: these port numbers are hardcoded in c, fix this
# LogRotate: 8001 is a PUSH PULL socket between loggerd and visiond
# all ZMQ pub sub: port, should_log, frequency, (qlog_decimation)
# frame syncing packet
frame: [8002, true, 20., 1]
# accel, gyro, and compass
sensorEvents: [8003, true, 100., 100]
# GPS data, also global timestamp
gpsNMEA: [8004, true, 9.] # 9 msgs each sec
# CPU+MEM+GPU+BAT temps
thermal: [8005, true, 2., 1]
# List(CanData), list of can messages
can: [8006, true, 100.]
controlsState: [8007, true, 100., 100]
#liveEvent: [8008, true, 0.]
model: [8009, true, 20., 5]
features: [8010, true, 0.]
health: [8011, true, 2., 1]
radarState: [8012, true, 20.]
#liveUI: [8014, true, 0.]
encodeIdx: [8015, true, 20.]
liveTracks: [8016, true, 20.]
sendcan: [8017, true, 100.]
logMessage: [8018, true, 0.]
liveCalibration: [8019, true, 4., 4]
androidLog: [8020, true, 0.]
carState: [8021, true, 100., 10]
# 8022 is reserved for sshd
carControl: [8023, true, 100., 10]
plan: [8024, true, 20.]
liveLocation: [8025, true, 0.]
gpsLocation: [8026, true, 1., 1]
ethernetData: [8027, true, 0.]
navUpdate: [8028, true, 0.]
qcomGnss: [8029, true, 0.]
lidarPts: [8030, true, 0.]
procLog: [8031, true, 0.5]
gpsLocationExternal: [8032, true, 10., 1]
ubloxGnss: [8033, true, 10.]
clocks: [8034, true, 1., 1]
liveMpc: [8035, false, 20.]
liveLongitudinalMpc: [8036, false, 20.]
navStatus: [8038, true, 0.]
gpsLocationTrimble: [8039, true, 0.]
trimbleGnss: [8041, true, 0.]
ubloxRaw: [8042, true, 20.]
gpsPlannerPoints: [8043, true, 0.]
gpsPlannerPlan: [8044, true, 0.]
applanixRaw: [8046, true, 0.]
orbLocation: [8047, true, 0.]
trafficEvents: [8048, true, 0.]
liveLocationTiming: [8049, true, 0.]
orbslamCorrection: [8050, true, 0.]
liveLocationCorrected: [8051, true, 0.]
orbObservation: [8052, true, 0.]
applanixLocation: [8053, true, 0.]
liveLocationKalman: [8054, true, 0.]
uiNavigationEvent: [8055, true, 0.]
orbOdometry: [8057, true, 0.]
orbFeatures: [8058, false, 0.]
orbKeyFrame: [8059, true, 0.]
uiLayoutState: [8060, true, 0.]
frontEncodeIdx: [8061, true, 5.]
orbFeaturesSummary: [8062, true, 0.]
driverState: [8063, true, 5., 1]
liveParameters: [8064, true, 10.]
liveMapData: [8065, true, 0.]
cameraOdometry: [8066, true, 20., 5]
pathPlan: [8067, true, 20.]
kalmanOdometry: [8068, true, 0.]
thumbnail: [8069, true, 0.2, 1]
carEvents: [8070, true, 1., 1]
carParams: [8071, true, 0.02, 1]
frontFrame: [8072, true, 10.]
dMonitoringState: [8073, true, 5., 1]
testModel: [8040, false, 0.]
testLiveLocation: [8045, false, 0.]
testJoystick: [8056, false, 0.]
# 8080 is reserved for slave testing daemon
# 8762 is reserved for logserver
# manager -- base process to manage starting and stopping of all others
# subscribes: thermal
# **** processes that communicate with the outside world ****
# thermald -- decides when to start and stop onroad
# subscribes: health, location
# publishes: thermal
# boardd -- communicates with the car
# subscribes: sendcan
# publishes: can, health, ubloxRaw
# sensord -- publishes IMU and Magnetometer
# publishes: sensorEvents
# gpsd -- publishes EON's gps
# publishes: gpsNMEA
# visiond -- talks to the cameras, runs the model, saves the videos
# publishes: frame, model, driverMonitoring, cameraOdometry, thumbnail
# **** stateful data transformers ****
# plannerd -- decides where to drive the car
# subscribes: carState, model, radarState, controlsState, liveParameters
# publishes: plan, pathPlan, liveMpc, liveLongitudinalMpc
# controlsd -- drives the car by sending CAN messages to panda
# subscribes: can, thermal, health, plan, pathPlan, driverMonitoring, liveCalibration
# publishes: carState, carControl, sendcan, controlsState, carEvents, carParams
# radard -- processes the radar and vision data
# subscribes: can, controlsState, model, liveParameters
# publishes: radarState, liveTracks
# params_learner -- learns vehicle params by observing the vehicle dynamics
# subscribes: controlsState, sensorEvents, cameraOdometry
# publishes: liveParameters
# calibrationd -- reads posenet and applies a temporal filter on the frame region to look at
# subscribes: cameraOdometry
# publishes: liveCalibration
# ubloxd -- read raw ublox data and converts them in readable format
# subscribes: ubloxRaw
# publishes: ubloxGnss
# **** LOGGING SERVICE ****
# loggerd
# subscribes: EVERYTHING
# **** NON VITAL SERVICES ****
# ui
# subscribes: thermal, model, controlsState, uiLayout, liveCalibration, radarState, liveMpc, plusFrame, liveMapData
# uploader
# communicates through file system with loggerd
# deleter
# communicates through file system with loggerd and uploader
# logmessaged -- central logging service, can log to cloud
# publishes: logMessage
# logcatd -- fetches logcat info from android
# publishes: androidLog
# proclogd -- fetches process information
# publishes: procLog
# tombstoned -- reports native crashes
# athenad -- on request, open a sub socket and return the value
# updated -- waits for network access and tries to update every hour
+33
View File
@@ -0,0 +1,33 @@
#!/usr/bin/env python3
import os
import yaml
class Service():
def __init__(self, port, should_log, frequency, decimation=None):
self.port = port
self.should_log = should_log
self.frequency = frequency
self.decimation = decimation
service_list_path = os.path.join(os.path.dirname(__file__), "service_list.yaml")
service_list = {}
with open(service_list_path, "r") as f:
for k, v in yaml.safe_load(f).items():
decimation = None
if len(v) == 4:
decimation = v[3]
service_list[k] = Service(v[0], v[1], v[2], decimation)
if __name__ == "__main__":
print("/* THIS IS AN AUTOGENERATED FILE, PLEASE EDIT service_list.yaml */")
print("#ifndef __SERVICES_H")
print("#define __SERVICES_H")
print("struct service { int port; bool should_log; int frequency; int decimation; char name[0x100]; };")
print("static struct service services[] = {")
for k, v in service_list.items():
print(' { .name = "%s", .port = %d, .should_log = %s, .frequency = %d, .decimation = %d },' % (k, v.port, "true" if v.should_log else "false", v.frequency, -1 if v.decimation is None else v.decimation))
print("};")
print("#endif")
-11
View File
@@ -1,11 +0,0 @@
#!/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
+1
View File
@@ -0,0 +1 @@
*.cpp
+6
View File
@@ -0,0 +1,6 @@
Import('env')
# parser
env.Command(['common_pyx.so'],
['common_pyx_setup.py', 'clock.pyx'],
"cd common && python3 common_pyx_setup.py build_ext --inplace")
+130
View File
@@ -0,0 +1,130 @@
import os
import binascii
import itertools
import re
import struct
import subprocess
import random
from cereal import log
NetworkType = log.ThermalData.NetworkType
ANDROID = os.path.isfile('/EON')
def getprop(key):
if not ANDROID:
return ""
return subprocess.check_output(["getprop", key], encoding='utf8').strip()
def get_imei(slot):
slot = str(slot)
if slot not in ("0", "1"):
raise ValueError("SIM slot must be 0 or 1")
ret = parse_service_call_string(service_call(["iphonesubinfo", "3" ,"i32", str(slot)]))
if not ret:
# allow non android to be identified differently
ret = "%015d" % random.randint(0, 1<<32)
return ret
def get_serial():
ret = getprop("ro.serialno")
if ret == "":
ret = "cccccccc"
return ret
def get_subscriber_info():
ret = parse_service_call_string(service_call(["iphonesubinfo", "7"]))
if ret is None or len(ret) < 8:
return ""
return ret
def reboot(reason=None):
if reason is None:
reason_args = ["null"]
else:
reason_args = ["s16", reason]
subprocess.check_output([
"service", "call", "power", "16", # IPowerManager.reboot
"i32", "0", # no confirmation,
*reason_args,
"i32", "1" # wait
])
def service_call(call):
if not ANDROID:
return None
ret = subprocess.check_output(["service", "call", *call], encoding='utf8').strip()
if 'Parcel' not in ret:
return None
return parse_service_call_bytes(ret)
def parse_service_call_unpack(r, fmt):
try:
return struct.unpack(fmt, r)[0]
except Exception:
return None
def parse_service_call_string(r):
try:
r = r[8:] # Cut off length field
r = r.decode('utf_16_be')
# All pairs of two characters seem to be swapped. Not sure why
result = ""
for a, b, in itertools.zip_longest(r[::2], r[1::2], fillvalue='\x00'):
result += b + a
result = result.replace('\x00', '')
return result
except Exception:
return None
def parse_service_call_bytes(ret):
try:
r = b""
for hex_part in re.findall(r'[ (]([0-9a-f]{8})', ret):
r += binascii.unhexlify(hex_part)
return r
except Exception:
return None
def get_network_type():
if not ANDROID:
return NetworkType.none
wifi_check = parse_service_call_string(service_call(["connectivity", "2"]))
if wifi_check is None:
return NetworkType.none
elif 'WIFI' in wifi_check:
return NetworkType.wifi
else:
cell_check = parse_service_call_unpack(service_call(['phone', '59']), ">q")
# from TelephonyManager.java
cell_networks = {
0: NetworkType.none,
1: NetworkType.cell2G,
2: NetworkType.cell2G,
3: NetworkType.cell3G,
4: NetworkType.cell2G,
5: NetworkType.cell3G,
6: NetworkType.cell3G,
7: NetworkType.cell3G,
8: NetworkType.cell3G,
9: NetworkType.cell3G,
10: NetworkType.cell3G,
11: NetworkType.cell2G,
12: NetworkType.cell3G,
13: NetworkType.cell4G,
14: NetworkType.cell4G,
15: NetworkType.cell3G,
16: NetworkType.cell2G,
17: NetworkType.cell3G,
18: NetworkType.cell4G,
19: NetworkType.cell4G
}
return cell_networks.get(cell_check, NetworkType.none)
+28 -1
View File
@@ -1,7 +1,34 @@
import jwt
import requests
from datetime import datetime, timedelta
from common.basedir import PERSIST
from selfdrive.version import version
class Api():
def __init__(self, dongle_id):
self.dongle_id = dongle_id
with open(PERSIST+'/comma/id_rsa') as f:
self.private_key = f.read()
def get(self, *args, **kwargs):
return self.request('GET', *args, **kwargs)
def post(self, *args, **kwargs):
return self.request('POST', *args, **kwargs)
def request(self, method, endpoint, timeout=None, access_token=None, **params):
return api_get(endpoint, method=method, timeout=timeout, access_token=access_token, **params)
def get_token(self):
now = datetime.utcnow()
payload = {
'identity': self.dongle_id,
'nbf': now,
'iat': now,
'exp': now + timedelta(hours=1)
}
return jwt.encode(payload, self.private_key, algorithm='RS256').decode('utf8')
def api_get(endpoint, method='GET', timeout=None, access_token=None, **params):
backend = "https://api.commadotai.com/"
+99
View File
@@ -0,0 +1,99 @@
import os
import subprocess
import glob
import hashlib
import shutil
from common.basedir import BASEDIR
from selfdrive.swaglog import cloudlog
android_packages = ("tw.com.ainvest.outpack", "cn.dragonpilot.gpsservice", "com.autonavi.amapauto", "com.mixplorer", "com.tomtom.speedcams.android.map", "ai.comma.plus.offroad", "ai.comma.plus.frame")
def get_installed_apks():
dat = subprocess.check_output(["pm", "list", "packages", "-f"], encoding='utf8').strip().split("\n")
ret = {}
for x in dat:
if x.startswith("package:"):
v,k = x.split("package:")[1].split("=")
ret[k] = v
return ret
def install_apk(path):
# can only install from world readable path
install_path = "/sdcard/%s" % os.path.basename(path)
shutil.copyfile(path, install_path)
ret = subprocess.call(["pm", "install", "-r", install_path])
os.remove(install_path)
return ret == 0
def start_frame():
set_package_permissions()
system("am start -n ai.comma.plus.frame/.MainActivity")
def set_package_permissions():
pm_grant("ai.comma.plus.offroad", "android.permission.ACCESS_FINE_LOCATION")
pm_grant("ai.comma.plus.offroad", "android.permission.READ_PHONE_STATE")
appops_set("ai.comma.plus.offroad", "SU", "allow")
appops_set("ai.comma.plus.offroad", "WIFI_SCAN", "allow")
appops_set("ai.comma.plus.offroad", "READ_EXTERNAL_STORAGE", "allow")
appops_set("ai.comma.plus.offroad", "WRITE_EXTERNAL_STORAGE", "allow")
def appops_set(package, op, mode):
system(f"LD_LIBRARY_PATH= appops set {package} {op} {mode}")
def pm_grant(package, permission):
system(f"pm grant {package} {permission}")
def system(cmd):
try:
cloudlog.info("running %s" % cmd)
subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
except subprocess.CalledProcessError as e:
cloudlog.event("running failed",
cmd=e.cmd,
output=e.output[-1024:],
returncode=e.returncode)
# *** external functions ***
def update_apks():
# install apks
installed = get_installed_apks()
install_apks = glob.glob(os.path.join(BASEDIR, "apk/*.apk"))
for apk in install_apks:
app = os.path.basename(apk)[:-4]
if app not in installed:
installed[app] = None
cloudlog.info("installed apks %s" % (str(installed), ))
for app in installed.keys():
apk_path = os.path.join(BASEDIR, "apk/"+app+".apk")
if not os.path.exists(apk_path):
continue
h1 = hashlib.sha1(open(apk_path, 'rb').read()).hexdigest()
h2 = None
if installed[app] is not None:
h2 = hashlib.sha1(open(installed[app], 'rb').read()).hexdigest()
cloudlog.info("comparing version of %s %s vs %s" % (app, h1, h2))
if h2 is None or h1 != h2:
cloudlog.info("installing %s" % app)
success = install_apk(apk_path)
if not success:
cloudlog.info("needing to uninstall %s" % app)
system("pm uninstall %s" % app)
success = install_apk(apk_path)
assert success
def pm_apply_packages(cmd):
for p in android_packages:
system("pm %s %s" % (cmd, p))
if __name__ == "__main__":
update_apks()
+7
View File
@@ -1,4 +1,11 @@
import os
BASEDIR = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../"))
from common.android import ANDROID
if ANDROID:
PERSIST = "/persist"
PARAMS = "/data/params"
else:
PERSIST = os.path.join(BASEDIR, "persist")
PARAMS = os.path.join(BASEDIR, "persist", "params")
+15 -9
View File
@@ -1,16 +1,22 @@
from posix.time cimport clock_gettime, timespec, CLOCK_BOOTTIME, CLOCK_MONOTONIC_RAW
from posix.time cimport clock_gettime, timespec, CLOCK_MONOTONIC_RAW, clockid_t
cdef double readclock(int clock_id):
cdef timespec ts
cdef double current
IF UNAME_SYSNAME == "Darwin":
# Darwin doesn't have a CLOCK_BOOTTIME
CLOCK_BOOTTIME = CLOCK_MONOTONIC_RAW
ELSE:
from posix.time cimport CLOCK_BOOTTIME
clock_gettime(clock_id, &ts)
current = ts.tv_sec + (ts.tv_nsec / 1000000000.)
return current
cdef double readclock(clockid_t 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)
return readclock(CLOCK_MONOTONIC_RAW)
def sec_since_boot():
return readclock(CLOCK_BOOTTIME)
return readclock(CLOCK_BOOTTIME)
+20
View File
@@ -0,0 +1,20 @@
from distutils.core import Extension, setup # pylint: disable=import-error,no-name-in-module
from Cython.Build import cythonize
from common.cython_hacks import BuildExtWithoutPlatformSuffix
sourcefiles = ['clock.pyx']
extra_compile_args = ["-std=c++11"]
setup(name='Common',
cmdclass={'build_ext': BuildExtWithoutPlatformSuffix},
ext_modules=cythonize(
Extension(
"common_pyx",
language="c++",
sources=sourcefiles,
extra_compile_args=extra_compile_args,
)
),
nthreads=4,
)
+23
View File
@@ -0,0 +1,23 @@
import os
import sysconfig
from Cython.Distutils import build_ext
def get_ext_filename_without_platform_suffix(filename):
name, ext = os.path.splitext(filename)
ext_suffix = sysconfig.get_config_var('EXT_SUFFIX')
if ext_suffix == ext:
return filename
ext_suffix = ext_suffix.replace(ext, '')
idx = name.find(ext_suffix)
if idx == -1:
return filename
else:
return name[:idx] + ext
class BuildExtWithoutPlatformSuffix(build_ext):
def get_ext_filename(self, ext_name):
filename = super().get_ext_filename(ext_name)
return get_ext_filename_without_platform_suffix(filename)
+7 -1
View File
@@ -2,14 +2,20 @@ import os
import sys
import fcntl
import hashlib
import platform
from cffi import FFI
def suffix():
if platform.system() == "Darwin":
return ".dylib"
else:
return ".so"
def ffi_wrap(name, c_code, c_header, tmpdir="/tmp/ccache", cflags="", libraries=None):
if libraries is None:
libraries = []
cache = name + "_" + hashlib.sha1(c_code).hexdigest()
cache = name + "_" + hashlib.sha1(c_code.encode('utf-8')).hexdigest()
try:
os.mkdir(tmpdir)
except OSError:
+21 -15
View File
@@ -24,24 +24,15 @@ def rm_tree_or_link(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"):
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"
if len(parts) > 1 and parts[1] == "scratch":
return "/scratch/tmp"
elif len(parts) > 2 and parts[2] == "runner":
return "/{}/runner/tmp".format(parts[1])
return "/tmp"
class AutoMoveTempdir(object):
class AutoMoveTempdir():
def __init__(self, target_path, temp_dir=None):
self._target_path = target_path
self._path = tempfile.mkdtemp(dir=temp_dir)
@@ -61,7 +52,7 @@ class AutoMoveTempdir(object):
else:
shutil.rmtree(self._path)
class NamedTemporaryDir(object):
class NamedTemporaryDir():
def __init__(self, temp_dir=None):
self._path = tempfile.mkdtemp(dir=temp_dir)
@@ -101,3 +92,18 @@ def atomic_write_in_dir(path, **kwargs):
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)
-64
View File
@@ -1,64 +0,0 @@
import os
from common.basedir import BASEDIR
def get_fingerprint_list():
# read all the folders in selfdrive/car and return a dict where:
# - keys are all the car models for which we have a fingerprint
# - values are lists dicts of messages that constitute the unique
# CAN fingerprint of each car model and all its variants
fingerprints = {}
for car_folder in [x[0] for x in os.walk(BASEDIR + '/selfdrive/car')]:
try:
car_name = car_folder.split('/')[-1]
values = __import__('selfdrive.car.%s.values' % car_name, fromlist=['FINGERPRINTS'])
if hasattr(values, 'FINGERPRINTS'):
car_fingerprints = values.FINGERPRINTS
else:
continue
for f, v in car_fingerprints.items():
fingerprints[f] = v
except (ImportError, IOError):
pass
return fingerprints
_FINGERPRINTS = get_fingerprint_list()
_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
def eliminate_incompatible_cars(msg, candidate_cars):
"""Removes cars that could not have sent msg.
Inputs:
msg: A cereal/log CanData message from the car.
candidate_cars: A list of cars to consider.
Returns:
A list containing the subset of candidate_cars that could have sent msg.
"""
compatible_cars = []
for car_name in candidate_cars:
car_fingerprints = _FINGERPRINTS[car_name]
for fingerprint in car_fingerprints:
fingerprint.update(_DEBUG_ADDRESS) # add alien debug address
if is_valid_for_fingerprint(msg, fingerprint):
compatible_cars.append(car_name)
break
return compatible_cars
def all_known_cars():
"""Returns a list of all known car strings."""
return list(_FINGERPRINTS.keys())
+1
View File
@@ -0,0 +1 @@
simple_kalman_impl.c
-10
View File
@@ -1,10 +0,0 @@
all: simple_kalman_impl.so
simple_kalman_impl.so: simple_kalman_impl.pyx simple_kalman_impl.pxd simple_kalman_setup.py
python simple_kalman_setup.py build_ext --inplace
rm -rf build
rm simple_kalman_impl.c
.PHONY: clean
clean:
rm -f simple_kalman_impl.so
+6
View File
@@ -0,0 +1,6 @@
Import('env')
env.Command(['simple_kalman_impl.so'],
['simple_kalman_impl.pyx', 'simple_kalman_impl.pxd', 'simple_kalman_setup.py'],
"cd common/kalman && python3 simple_kalman_setup.py build_ext --inplace")
-253
View File
@@ -1,253 +0,0 @@
# pylint: skip-file
from __future__ import print_function
import abc
import numpy as np
# The EKF class contains the framework for an Extended Kalman Filter, but must be subclassed to use.
# A subclass must implement:
# 1) calc_transfer_fun(); see bottom of file for more info.
# 2) __init__() to initialize self.state, self.covar, and self.process_noise appropriately
# Alternatively, the existing implementations of EKF can be used (e.g. EKF2D)
# Sensor classes are optionally used to pass measurement information into the EKF, to keep
# sensor parameters and processing methods for a each sensor together.
# Sensor classes have a read() method which takes raw sensor data and returns
# a SensorReading object, which can be passed to the EKF update() method.
# For usage, see run_ekf1d.py in selfdrive/new for a simple example.
# ekf.predict(dt) should be called between update cycles with the time since it was last called.
# Ideally, predict(dt) should be called at a relatively constant rate.
# update() should be called once per sensor, and can be called multiple times between predict steps.
# Access and set the state of the filter directly with ekf.state and ekf.covar.
class SensorReading:
# Given a perfect model and no noise, data = obs_model * state
def __init__(self, data, covar, obs_model):
self.data = data
self.obs_model = obs_model
self.covar = covar
def __repr__(self):
return "SensorReading(data={}, covar={}, obs_model={})".format(
repr(self.data), repr(self.covar), repr(self.obs_model))
# A generic sensor class that does no pre-processing of data
class SimpleSensor:
# obs_model can be
# a full observation model matrix, or
# an integer or tuple of indices into ekf.state, indicating which variables are being directly observed
# covar can be
# a full covariance matrix
# a float or tuple of individual covars for each component of the sensor reading
# dims is the number of states in the EKF
def __init__(self, obs_model, covar, dims):
# Allow for integer covar/obs_model
if not hasattr(obs_model, "__len__"):
obs_model = (obs_model, )
if not hasattr(covar, "__len__"):
covar = (covar, )
# Full observation model passed
if dims in np.array(obs_model).shape:
self.obs_model = np.asmatrix(obs_model)
self.covar = np.asmatrix(covar)
# Indices of unit observations passed
else:
self.obs_model = np.matlib.zeros((len(obs_model), dims))
self.obs_model[:, list(obs_model)] = np.identity(len(obs_model))
if np.asarray(covar).ndim == 2:
self.covar = np.asmatrix(covar)
elif len(covar) == len(obs_model):
self.covar = np.matlib.diag(covar)
else:
self.covar = np.matlib.identity(len(obs_model)) * covar
def read(self, data, covar=None):
if covar:
self.covar = covar
return SensorReading(data, self.covar, self.obs_model)
class EKF:
__metaclass__ = abc.ABCMeta
def __init__(self, debug=False):
self.DEBUG = debug
def __str__(self):
return "EKF(state={}, covar={})".format(self.state, self.covar)
# Measurement update
# Reading should be a SensorReading object with data, covar, and obs_model attributes
def update(self, reading):
# Potential improvements:
# deal with negative covars
# add noise to really low covars to ensure stability
# use mahalanobis distance to reject outliers
# wrap angles after state updates and innovation
# y = z - H*x
innovation = reading.data - reading.obs_model * self.state
if self.DEBUG:
print("reading:\n",reading.data)
print("innovation:\n",innovation)
# S = H*P*H' + R
innovation_covar = reading.obs_model * self.covar * reading.obs_model.T + reading.covar
# K = P*H'*S^-1
kalman_gain = self.covar * reading.obs_model.T * np.linalg.inv(
innovation_covar)
if self.DEBUG:
print("gain:\n", kalman_gain)
print("innovation_covar:\n", innovation_covar)
print("innovation: ", innovation)
print("test: ", self.covar * reading.obs_model.T * (
reading.obs_model * self.covar * reading.obs_model.T + reading.covar *
0).I)
# x = x + K*y
self.state += kalman_gain*innovation
# print "covar", np.diag(self.covar)
#self.state[(roll_vel, yaw_vel, pitch_vel),:] = reading.data
# Standard form: P = (I - K*H)*P
# self.covar = (self.identity - kalman_gain*reading.obs_model) * self.covar
# Use the Joseph form for numerical stability: P = (I-K*H)*P*(I - K*H)' + K*R*K'
aux_mtrx = (self.identity - kalman_gain * reading.obs_model)
self.covar = aux_mtrx * self.covar * aux_mtrx.T + kalman_gain * reading.covar * kalman_gain.T
if self.DEBUG:
print("After update")
print("state\n", self.state)
print("covar:\n",self.covar)
def update_scalar(self, reading):
# like update but knowing that measurement is a scalar
# this avoids matrix inversions and speeds up (surprisingly) drived.py a lot
# innovation = reading.data - np.matmul(reading.obs_model, self.state)
# innovation_covar = np.matmul(np.matmul(reading.obs_model, self.covar), reading.obs_model.T) + reading.covar
# kalman_gain = np.matmul(self.covar, reading.obs_model.T)/innovation_covar
# self.state += np.matmul(kalman_gain, innovation)
# aux_mtrx = self.identity - np.matmul(kalman_gain, reading.obs_model)
# self.covar = np.matmul(aux_mtrx, np.matmul(self.covar, aux_mtrx.T)) + np.matmul(kalman_gain, np.matmul(reading.covar, kalman_gain.T))
# written without np.matmul
es = np.einsum
ABC_T = "ij,jk,lk->il"
AB_T = "ij,kj->ik"
AB = "ij,jk->ik"
innovation = reading.data - es(AB, reading.obs_model, self.state)
innovation_covar = es(ABC_T, reading.obs_model, self.covar,
reading.obs_model) + reading.covar
kalman_gain = es(AB_T, self.covar, reading.obs_model) / innovation_covar
self.state += es(AB, kalman_gain, innovation)
aux_mtrx = self.identity - es(AB, kalman_gain, reading.obs_model)
self.covar = es(ABC_T, aux_mtrx, self.covar, aux_mtrx) + \
es(ABC_T, kalman_gain, reading.covar, kalman_gain)
# Prediction update
def predict(self, dt):
es = np.einsum
ABC_T = "ij,jk,lk->il"
AB = "ij,jk->ik"
# State update
transfer_fun, transfer_fun_jacobian = self.calc_transfer_fun(dt)
# self.state = np.matmul(transfer_fun, self.state)
# self.covar = np.matmul(np.matmul(transfer_fun_jacobian, self.covar), transfer_fun_jacobian.T) + self.process_noise * dt
# x = f(x, u), written in the form x = A(x, u)*x
self.state = es(AB, transfer_fun, self.state)
# P = J*P*J' + Q
self.covar = es(ABC_T, transfer_fun_jacobian, self.covar,
transfer_fun_jacobian) + self.process_noise * dt #!dt
#! Clip covariance to avoid explosions
self.covar = np.clip(self.covar,-1e10,1e10)
@abc.abstractmethod
def calc_transfer_fun(self, dt):
"""Return a tuple with the transfer function and transfer function jacobian
The transfer function and jacobian should both be a numpy matrix of size DIMSxDIMS
The transfer function matrix A should satisfy the state-update equation
x_(k+1) = A * x_k
The jacobian J is the direct jacobian A*x_k. For linear systems J=A.
Current implementations calculate A and J as functions of state. Control input
can be added trivially by adding a control parameter to predict() and calc_tranfer_update(),
and using it during calculation of A and J
"""
class FastEKF1D(EKF):
"""Fast version of EKF for 1D problems with scalar readings."""
def __init__(self, dt, var_init, Q):
super(FastEKF1D, self).__init__(False)
self.state = [0, 0]
self.covar = [var_init, var_init, 0]
# Process Noise
self.dtQ0 = dt * Q[0]
self.dtQ1 = dt * Q[1]
def update(self, reading):
raise NotImplementedError
def update_scalar(self, reading):
# TODO(mgraczyk): Delete this for speed.
# assert np.all(reading.obs_model == [1, 0])
rcov = reading.covar[0, 0]
x = self.state
S = self.covar
innovation = reading.data - x[0]
innovation_covar = S[0] + rcov
k0 = S[0] / innovation_covar
k1 = S[2] / innovation_covar
x[0] += k0 * innovation
x[1] += k1 * innovation
mk = 1 - k0
S[1] += k1 * (k1 * (S[0] + rcov) - 2 * S[2])
S[2] = mk * (S[2] - k1 * S[0]) + rcov * k0 * k1
S[0] = mk * mk * S[0] + rcov * k0 * k0
def predict(self, dt):
# State update
x = self.state
x[0] += dt * x[1]
# P = J*P*J' + Q
S = self.covar
S[0] += dt * (2 * S[2] + dt * S[1]) + self.dtQ0
S[2] += dt * S[1]
S[1] += self.dtQ1
# Clip covariance to avoid explosions
S = max(-1e10, min(S, 1e10))
def calc_transfer_fun(self, dt):
tf = np.identity(2)
tf[0, 1] = dt
tfj = tf
return tf, tfj
+1 -8
View File
@@ -1,10 +1,3 @@
# 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)
from simple_kalman_impl import KF1D as KF1D
# Silence pyflakes
from common.kalman.simple_kalman_impl import KF1D as KF1D
assert KF1D
+2 -1
View File
@@ -1,3 +1,4 @@
# cython: language_level=3
cdef class KF1D:
def __init__(self, x0, A, C, K):
@@ -32,4 +33,4 @@ cdef class KF1D:
@x.setter
def x(self, x):
self.x0_0 = x[0][0]
self.x1_0 = x[1][0]
self.x1_0 = x[1][0]
+6 -2
View File
@@ -1,5 +1,9 @@
from distutils.core import setup, Extension
from distutils.core import Extension, setup
from Cython.Build import cythonize
from common.cython_hacks import BuildExtWithoutPlatformSuffix
setup(name='Simple Kalman Implementation',
ext_modules=cythonize(Extension("simple_kalman_impl", ["simple_kalman_impl.pyx"])))
cmdclass={'build_ext': BuildExtWithoutPlatformSuffix},
ext_modules=cythonize(Extension("simple_kalman_impl", ["simple_kalman_impl.pyx"])))
-116
View File
@@ -1,116 +0,0 @@
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()
+38 -22
View File
@@ -1,9 +1,11 @@
import io
import os
import sys
import copy
import json
import socket
import logging
import traceback
from threading import local
from collections import OrderedDict
from contextlib import contextmanager
@@ -78,28 +80,6 @@ class SwagLogger(logging.Logger):
self.log_local = local()
self.log_local.ctx = {}
def findCaller(self, stack_info=None):
"""
Find the stack frame of the caller so that we can note the source
file name, line number and function name.
"""
# f = currentframe()
f = sys._getframe(3)
#On some versions of IronPython, currentframe() returns None if
#IronPython isn't run with -X:Frames.
if f is not None:
f = f.f_back
rv = "(unknown file)", 0, "(unknown function)"
while hasattr(f, "f_code"):
co = f.f_code
filename = os.path.normcase(co.co_filename)
if filename in (logging._srcfile, _srcfile):
f = f.f_back
continue
rv = (co.co_filename, f.f_lineno, co.co_name)
break
return rv
def local_ctx(self):
try:
return self.log_local.ctx
@@ -140,6 +120,42 @@ class SwagLogger(logging.Logger):
else:
self.info(evt)
def findCaller(self, stack_info=False, stacklevel=1):
"""
Find the stack frame of the caller so that we can note the source
file name, line number and function name.
"""
f = sys._getframe(3)
#On some versions of IronPython, currentframe() returns None if
#IronPython isn't run with -X:Frames.
if f is not None:
f = f.f_back
orig_f = f
while f and stacklevel > 1:
f = f.f_back
stacklevel -= 1
if not f:
f = orig_f
rv = "(unknown file)", 0, "(unknown function)", None
while hasattr(f, "f_code"):
co = f.f_code
filename = os.path.normcase(co.co_filename)
if filename == _srcfile:
f = f.f_back
continue
sinfo = None
if stack_info:
sio = io.StringIO()
sio.write('Stack (most recent call last):\n')
traceback.print_stack(f, file=sio)
sinfo = sio.getvalue()
if sinfo[-1] == '\n':
sinfo = sinfo[:-1]
sio.close()
rv = (co.co_filename, f.f_lineno, co.co_name, sinfo)
break
return rv
if __name__ == "__main__":
log = SwagLogger()
+4 -1
View File
@@ -12,7 +12,10 @@ def interp(x, xp, fp):
hi += 1
low = hi - 1
return fp[-1] if hi == N and xv > xp[low] else (
fp[0] if hi == 0 else
fp[0] if hi == 0 else
(xv - xp[low]) * (fp[hi] - fp[low]) / (xp[hi] - xp[low]) + fp[low])
return [get_interp(v) for v in x] if hasattr(
x, '__iter__') else get_interp(x)
def mean(x):
return sum(x) / len(x)
+131 -11
View File
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""ROS has a parameter server, we have files.
The parameter store is a persistent key value store, implemented as a directory with a writer lock.
@@ -27,8 +27,9 @@ import sys
import shutil
import fcntl
import tempfile
import threading
from enum import Enum
from common.basedir import PARAMS
def mkdirs_exists_ok(path):
try:
@@ -50,8 +51,12 @@ class UnknownKeyName(Exception):
keys = {
"AccessToken": [TxType.PERSISTENT],
"AthenadPid": [TxType.PERSISTENT],
"CalibrationParams": [TxType.PERSISTENT],
"CarParams": [TxType.CLEAR_ON_MANAGER_START, TxType.CLEAR_ON_PANDA_DISCONNECT],
"CarParamsCache": [TxType.CLEAR_ON_MANAGER_START, TxType.CLEAR_ON_PANDA_DISCONNECT],
"CarVin": [TxType.CLEAR_ON_MANAGER_START, TxType.CLEAR_ON_PANDA_DISCONNECT],
"CommunityFeaturesToggle": [TxType.PERSISTENT],
"CompletedTrainingVersion": [TxType.PERSISTENT],
"ControlsParams": [TxType.PERSISTENT],
"DoUninstall": [TxType.CLEAR_ON_MANAGER_START],
@@ -59,23 +64,107 @@ keys = {
"GitBranch": [TxType.PERSISTENT],
"GitCommit": [TxType.PERSISTENT],
"GitRemote": [TxType.PERSISTENT],
"GithubSshKeys": [TxType.PERSISTENT],
"HasAcceptedTerms": [TxType.PERSISTENT],
"IsDriverMonitoringEnabled": [TxType.PERSISTENT],
"IsFcwEnabled": [TxType.PERSISTENT],
"HasCompletedSetup": [TxType.PERSISTENT],
"IsLdwEnabled": [TxType.PERSISTENT],
"IsGeofenceEnabled": [TxType.PERSISTENT],
"IsMetric": [TxType.PERSISTENT],
"IsUpdateAvailable": [TxType.PERSISTENT],
"IsUploadVideoOverCellularEnabled": [TxType.PERSISTENT],
"IsOffroad": [TxType.CLEAR_ON_MANAGER_START],
"IsRHD": [TxType.PERSISTENT],
"IsTakingSnapshot": [TxType.CLEAR_ON_MANAGER_START],
"IsUpdateAvailable": [TxType.CLEAR_ON_MANAGER_START],
"IsUploadRawEnabled": [TxType.PERSISTENT],
"LastUpdateTime": [TxType.PERSISTENT],
"LimitSetSpeed": [TxType.PERSISTENT],
"LimitSetSpeedNeural": [TxType.PERSISTENT],
"LiveParameters": [TxType.PERSISTENT],
"LongitudinalControl": [TxType.PERSISTENT],
"OpenpilotEnabledToggle": [TxType.PERSISTENT],
"PandaFirmware": [TxType.CLEAR_ON_MANAGER_START, TxType.CLEAR_ON_PANDA_DISCONNECT],
"PandaFirmwareHex": [TxType.CLEAR_ON_MANAGER_START, TxType.CLEAR_ON_PANDA_DISCONNECT],
"PandaDongleId": [TxType.CLEAR_ON_MANAGER_START, TxType.CLEAR_ON_PANDA_DISCONNECT],
"Passive": [TxType.PERSISTENT],
"RecordFront": [TxType.PERSISTENT],
"ReleaseNotes": [TxType.PERSISTENT],
"ShouldDoUpdate": [TxType.CLEAR_ON_MANAGER_START],
"SpeedLimitOffset": [TxType.PERSISTENT],
"SubscriberInfo": [TxType.PERSISTENT],
"TermsVersion": [TxType.PERSISTENT],
"TrainingVersion": [TxType.PERSISTENT],
"UpdateAvailable": [TxType.CLEAR_ON_MANAGER_START],
"Version": [TxType.PERSISTENT],
"Offroad_ChargeDisabled": [TxType.CLEAR_ON_MANAGER_START, TxType.CLEAR_ON_PANDA_DISCONNECT],
"Offroad_ConnectivityNeeded": [TxType.CLEAR_ON_MANAGER_START],
"Offroad_ConnectivityNeededPrompt": [TxType.CLEAR_ON_MANAGER_START],
"Offroad_TemperatureTooHigh": [TxType.CLEAR_ON_MANAGER_START],
"Offroad_PandaFirmwareMismatch": [TxType.CLEAR_ON_MANAGER_START, TxType.CLEAR_ON_PANDA_DISCONNECT],
"Offroad_InvalidTime": [TxType.CLEAR_ON_MANAGER_START],
"Offroad_IsTakingSnapshot": [TxType.CLEAR_ON_MANAGER_START],
#dragonpilot config
"DragonEnableDashcam": [TxType.PERSISTENT],
"DragonEnableDriverSafetyCheck": [TxType.PERSISTENT],
"DragonAutoShutdownAt": [TxType.PERSISTENT],
"DragonEnableSteeringOnSignal": [TxType.PERSISTENT],
"DragonEnableLogger": [TxType.PERSISTENT],
"DragonEnableUploader": [TxType.PERSISTENT],
"DragonNoctuaMode": [TxType.PERSISTENT],
"DragonCacheCar": [TxType.PERSISTENT],
"DragonCachedModel": [TxType.PERSISTENT],
"DragonCachedFP": [TxType.PERSISTENT],
"DragonCachedVIN": [TxType.PERSISTENT],
"DragonCachedCarFW": [TxType.PERSISTENT],
"DragonCachedSource": [TxType.PERSISTENT],
"DragonAllowGas": [TxType.PERSISTENT],
"DragonToyotaStockDSU": [TxType.PERSISTENT],
"DragonLatCtrl": [TxType.PERSISTENT],
"DragonUISpeed": [TxType.PERSISTENT],
"DragonUIEvent": [TxType.PERSISTENT],
"DragonUIMaxSpeed": [TxType.PERSISTENT],
"DragonUIFace": [TxType.PERSISTENT],
"DragonUIDev": [TxType.PERSISTENT],
"DragonUIDevMini": [TxType.PERSISTENT],
"DragonEnableTomTom": [TxType.PERSISTENT],
"DragonBootTomTom": [TxType.PERSISTENT],
"DragonRunTomTom": [TxType.PERSISTENT],
"DragonEnableAutonavi": [TxType.PERSISTENT],
"DragonBootAutonavi": [TxType.PERSISTENT],
"DragonRunAutonavi": [TxType.PERSISTENT],
"DragonEnableAegis": [TxType.PERSISTENT],
"DragonBootAegis": [TxType.PERSISTENT],
"DragonRunAegis": [TxType.PERSISTENT],
"DragonEnableMixplorer": [TxType.PERSISTENT],
"DragonRunMixplorer": [TxType.PERSISTENT],
"DragonSteeringMonitorTimer": [TxType.PERSISTENT],
"DragonCameraOffset": [TxType.PERSISTENT],
"DragonUIVolumeBoost": [TxType.PERSISTENT],
"DragonGreyPandaMode": [TxType.PERSISTENT],
"DragonDrivingUI": [TxType.PERSISTENT],
"DragonDisplaySteeringLimitAlert": [TxType.PERSISTENT],
"DragonChargingCtrl": [TxType.PERSISTENT],
"DragonCharging": [TxType.PERSISTENT],
"DragonDisCharging": [TxType.PERSISTENT],
"DragonToyotaLaneDepartureWarning": [TxType.PERSISTENT],
"DragonUILane": [TxType.PERSISTENT],
"DragonUILead": [TxType.PERSISTENT],
"DragonUIPath": [TxType.PERSISTENT],
"DragonUIBlinker": [TxType.PERSISTENT],
"DragonEnableDriverMonitoring": [TxType.PERSISTENT],
"DragonCarModel": [TxType.PERSISTENT],
"DragonCarVIN": [TxType.PERSISTENT], #deprecated
"DragonEnableSlowOnCurve": [TxType.PERSISTENT],
"DragonEnableLeadCarMovingAlert": [TxType.PERSISTENT],
"DragonToyotaSnGMod": [TxType.PERSISTENT],
"DragonEnableSRLearner": [TxType.PERSISTENT],
"DragonWazeMode": [TxType.PERSISTENT],
"DragonRunWaze": [TxType.PERSISTENT],
"DragonEnableAssistedLC": [TxType.PERSISTENT],
"DragonEnableAutoLC": [TxType.PERSISTENT],
"DragonAssistedLCMinMPH": [TxType.PERSISTENT],
"DragonAutoLCMinMPH": [TxType.PERSISTENT],
"DragonAutoLCDelay": [TxType.PERSISTENT],
"DragonBTG": [TxType.PERSISTENT],
"DragonBootHotspot": [TxType.PERSISTENT],
}
@@ -87,7 +176,7 @@ def fsync_dir(path):
os.close(fd)
class FileLock(object):
class FileLock():
def __init__(self, path, create):
self._path = path
self._create = create
@@ -103,7 +192,7 @@ class FileLock(object):
self._fd = None
class DBAccessor(object):
class DBAccessor():
def __init__(self, path):
self._path = path
self._vals = None
@@ -273,6 +362,9 @@ def read_db(params_path, key):
return None
def write_db(params_path, key, value):
if isinstance(value, str):
value = value.encode('utf8')
prev_umask = os.umask(0)
lock = FileLock(params_path+"/.lock", True)
lock.acquire()
@@ -291,8 +383,8 @@ def write_db(params_path, key, value):
os.umask(prev_umask)
lock.release()
class Params(object):
def __init__(self, db='/data/params'):
class Params():
def __init__(self, db=PARAMS):
self.db = db
# create the database if it doesn't exist...
@@ -300,6 +392,11 @@ class Params(object):
with self.transaction(write=True):
pass
def clear_all(self):
shutil.rmtree(self.db, ignore_errors=True)
with self.transaction(write=True):
pass
def transaction(self, write=False):
if write:
return DBWriter(self.db)
@@ -322,7 +419,7 @@ class Params(object):
with self.transaction(write=True) as txn:
txn.delete(key)
def get(self, key, block=False):
def get(self, key, block=False, encoding=None):
if key not in keys:
raise UnknownKeyName(key)
@@ -332,14 +429,37 @@ class Params(object):
break
# is polling really the best we can do?
time.sleep(0.05)
if ret is not None and encoding is not None:
ret = ret.decode(encoding)
return ret
def put(self, key, dat):
"""
Warning: This function blocks until the param is written to disk!
In very rare cases this can take over a second, and your code will hang.
Use the put_nonblocking helper function in time sensitive code, but
in general try to avoid writing params as much as possible.
"""
if key not in keys:
raise UnknownKeyName(key)
write_db(self.db, key, dat)
def put_nonblocking(key, val):
def f(key, val):
params = Params()
params.put(key, val)
t = threading.Thread(target=f, args=(key, val))
t.start()
return t
if __name__ == "__main__":
params = Params()
if len(sys.argv) > 2:
+1 -1
View File
@@ -1,6 +1,6 @@
import time
class Profiler(object):
class Profiler():
def __init__(self, enabled=False):
self.enabled = enabled
self.cp = {}
+9 -8
View File
@@ -6,13 +6,14 @@ 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
from common.common_pyx import sec_since_boot # pylint: disable=no-name-in-module, import-error
# time step for each process
DT_CTRL = 0.01 # controlsd
DT_MDL = 0.05 # model
DT_DMON = 0.1 # driver monitoring
DT_TRML = 0.5 # thermald and manager
ffi = FFI()
@@ -35,7 +36,7 @@ def set_realtime_priority(level):
return subprocess.call(['chrt', '-f', '-p', str(level), str(tid)])
class Ratekeeper(object):
class Ratekeeper():
def __init__(self, rate, print_delay_threshold=0.):
"""Rate in Hz for ratekeeping. print_delay_threshold must be nonnegative."""
self._interval = 1. / rate
+63
View File
@@ -0,0 +1,63 @@
import os
import subprocess
from common.basedir import BASEDIR
class Spinner():
def __init__(self):
try:
self.spinner_proc = subprocess.Popen(["./spinner"],
stdin=subprocess.PIPE,
cwd=os.path.join(BASEDIR, "selfdrive", "ui", "spinner"),
close_fds=True)
except OSError:
self.spinner_proc = None
def __enter__(self):
return self
def update(self, spinner_text):
if self.spinner_proc is not None:
self.spinner_proc.stdin.write(spinner_text.encode('utf8') + b"\n")
try:
self.spinner_proc.stdin.flush()
except BrokenPipeError:
pass
def close(self):
if self.spinner_proc is not None:
try:
self.spinner_proc.stdin.close()
except BrokenPipeError:
pass
self.spinner_proc.terminate()
self.spinner_proc = None
def __del__(self):
self.close()
def __exit__(self, type, value, traceback):
self.close()
class FakeSpinner():
def __init__(self):
pass
def __enter__(self):
return self
def update(self, _):
pass
def __exit__(self, type, value, traceback):
pass
if __name__ == "__main__":
import time
with Spinner() as s:
s.update("Spinner text")
time.sleep(5.0)
print("gone")
time.sleep(5.0)
+73
View File
@@ -0,0 +1,73 @@
import numpy as np
class RunningStat():
# tracks realtime mean and standard deviation without storing any data
def __init__(self, priors=None, max_trackable=-1):
self.max_trackable = max_trackable
if priors is not None:
# initialize from history
self.M = priors[0]
self.S = priors[1]
self.n = priors[2]
self.M_last = self.M
self.S_last = self.S
else:
self.reset()
def reset(self):
self.M = 0.
self.S = 0.
self.M_last = 0.
self.S_last = 0.
self.n = 0
def push_data(self, new_data):
# short term memory hack
if self.max_trackable < 0 or self.n < self.max_trackable:
self.n += 1
if self.n == 0:
self.M_last = new_data
self.M = self.M_last
self.S_last = 0.
else:
self.M = self.M_last + (new_data - self.M_last) / self.n
self.S = self.S_last + (new_data - self.M_last) * (new_data - self.M);
self.M_last = self.M
self.S_last = self.S
def mean(self):
return self.M
def variance(self):
if self.n >= 2:
return self.S / (self.n - 1.)
else:
return 0
def std(self):
return np.sqrt(self.variance())
def params_to_save(self):
return [self.M, self.S, self.n]
class RunningStatFilter():
def __init__(self, raw_priors=None, filtered_priors=None, max_trackable=-1):
self.raw_stat = RunningStat(raw_priors, max_trackable)
self.filtered_stat = RunningStat(filtered_priors, max_trackable)
def reset(self):
self.raw_stat.reset()
self.filtered_stat.reset()
def push_and_update(self, new_data):
_std_last = self.raw_stat.std()
self.raw_stat.push_data(new_data)
_delta_std = self.raw_stat.std() - _std_last
if _delta_std<=0:
self.filtered_stat.push_data(new_data)
else:
pass
# self.filtered_stat.push_data(self.filtered_stat.mean())
# class SequentialBayesian():
+1 -1
View File
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import sympy as sp
import numpy as np
+48 -34
View File
@@ -1,6 +1,5 @@
import numpy as np
import common.transformations.orientation as orient
import cv2
import math
FULL_FRAME_SIZE = (1164, 874)
@@ -45,6 +44,7 @@ def get_calib_from_vp(vp):
roll_calib = 0
return roll_calib, pitch_calib, yaw_calib
# aka 'extrinsic_matrix'
# road : x->forward, y -> left, z->up
def get_view_frame_from_road_frame(roll, pitch, yaw, height):
@@ -62,6 +62,13 @@ def vp_from_ke(m):
"""
return (m[0, 0]/m[2,0], m[1,0]/m[2,0])
def vp_from_rpy(rpy):
e = get_view_frame_from_road_frame(rpy[0], rpy[1], rpy[2], 1.22)
ke = np.dot(eon_intrinsics, e)
return vp_from_ke(ke)
def roll_from_ke(m):
# note: different from calibration.h/RollAnglefromKE: i think that one's just wrong
return np.arctan2(-(m[1, 0] - m[1, 1] * m[2, 0] / m[2, 1]),
@@ -124,33 +131,21 @@ def img_from_device(pt_device):
return pt_img.reshape(input_shape)[:,:2]
#TODO please use generic img transform below
def rotate_img(img, eulers, crop=None, intrinsics=eon_intrinsics):
size = img.shape[:2]
rot = orient.rot_from_euler(eulers)
quadrangle = np.array([[0, 0],
[size[1]-1, 0],
[0, size[0]-1],
[size[1]-1, size[0]-1]], dtype=np.float32)
quadrangle_norm = np.hstack((normalize(quadrangle, intrinsics=intrinsics), np.ones((4,1))))
warped_quadrangle_full = np.einsum('ij, kj->ki', intrinsics.dot(rot), quadrangle_norm)
warped_quadrangle = np.column_stack((warped_quadrangle_full[:,0]/warped_quadrangle_full[:,2],
warped_quadrangle_full[:,1]/warped_quadrangle_full[:,2])).astype(np.float32)
if crop:
W_border = (size[1] - crop[0])/2
H_border = (size[0] - crop[1])/2
outside_crop = (((warped_quadrangle[:,0] < W_border) |
(warped_quadrangle[:,0] >= size[1] - W_border)) &
((warped_quadrangle[:,1] < H_border) |
(warped_quadrangle[:,1] >= size[0] - H_border)))
if not outside_crop.all():
raise ValueError("warped image not contained inside crop")
else:
H_border, W_border = 0, 0
M = cv2.getPerspectiveTransform(quadrangle, warped_quadrangle)
img_warped = cv2.warpPerspective(img, M, size[::-1])
return img_warped[H_border: size[0] - H_border,
W_border: size[1] - W_border]
def get_camera_frame_from_calib_frame(camera_frame_from_road_frame):
camera_frame_from_ground = camera_frame_from_road_frame[:, (0, 1, 3)]
calib_frame_from_ground = np.dot(eon_intrinsics,
get_view_frame_from_road_frame(0, 0, 0, 1.22))[:, (0, 1, 3)]
ground_from_calib_frame = np.linalg.inv(calib_frame_from_ground)
camera_frame_from_calib_frame = np.dot(camera_frame_from_ground, ground_from_calib_frame)
return camera_frame_from_calib_frame
def pretransform_from_calib(calib):
roll, pitch, yaw, height = calib
view_frame_from_road_frame = get_view_frame_from_road_frame(roll, pitch, yaw, height)
camera_frame_from_road_frame = np.dot(eon_intrinsics, view_frame_from_road_frame)
camera_frame_from_calib_frame = get_camera_frame_from_calib_frame(camera_frame_from_road_frame)
return np.linalg.inv(camera_frame_from_calib_frame)
def transform_img(base_img,
@@ -158,10 +153,19 @@ def transform_img(base_img,
augment_eulers=np.array([0,0,0]),
from_intr=eon_intrinsics,
to_intr=eon_intrinsics,
calib_rot_view=None,
output_size=None,
pretransform=None,
top_hacks=True):
top_hacks=False,
yuv=False,
alpha=1.0,
beta=0,
blur=0):
import cv2 # pylint: disable=import-error
cv2.setNumThreads(1)
if yuv:
base_img = cv2.cvtColor(base_img, cv2.COLOR_YUV2RGB_I420)
size = base_img.shape[:2]
if not output_size:
output_size = size[::-1]
@@ -177,8 +181,6 @@ def transform_img(base_img,
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)))))
@@ -199,15 +201,27 @@ def transform_img(base_img,
M = M.dot(pretransform)
augmented_rgb[:cyy] = cv2.warpPerspective(base_img, M, (output_size[0], cyy), borderMode=cv2.BORDER_REPLICATE)
return augmented_rgb
# brightness and contrast augment
augmented_rgb = np.clip((float(alpha)*augmented_rgb + beta), 0, 255).astype(np.uint8)
# gaussian blur
if blur > 0:
augmented_rgb = cv2.GaussianBlur(augmented_rgb,(blur*2+1,blur*2+1),cv2.BORDER_DEFAULT)
if yuv:
augmented_img = cv2.cvtColor(augmented_rgb, cv2.COLOR_RGB2YUV_I420)
else:
augmented_img = augmented_rgb
return augmented_img
def yuv_crop(frame, output_size, center=None):
# output_size in camera coordinates so u,v
# center in array coordinates so row, column
import cv2 # pylint: disable=import-error
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 -1
View File
@@ -65,7 +65,7 @@ def ecef2geodetic(ecef, radians=False):
geodetic = np.column_stack((lat, lon, h))
return geodetic.reshape(input_shape)
class LocalCoord(object):
class LocalCoord():
"""
Allows conversions to local frames. In this case NED.
That is: North East Down from the start position in
+3 -3
View File
@@ -1,8 +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
from common.transformations.camera import (FULL_FRAME_SIZE, eon_focal_length,
get_view_frame_from_road_frame,
vp_from_ke)
# segnet
+2 -2
View File
@@ -29,7 +29,7 @@ def euler2quat(eulers):
np.sin(gamma / 2) * np.sin(theta / 2) * np.cos(psi / 2)
quats = array([q0, q1, q2, q3]).T
for i in xrange(len(quats)):
for i in range(len(quats)):
if quats[i,0] < 0:
quats[i] = -quats[i]
return quats.reshape(output_shape)
@@ -99,7 +99,7 @@ def rot2quat(rots):
K3[:, 3, 2] = K3[:, 2, 3]
K3[:, 3, 3] = (rots[:, 0, 0] + rots[:, 1, 1] + rots[:, 2, 2]) / 3.0
q = np.empty((len(rots), 4))
for i in xrange(len(rots)):
for i in range(len(rots)):
_, eigvecs = linalg.eigh(K3[i].T)
eigvecs = eigvecs[:,3:]
q[i, 0] = eigvecs[-1]
-95
View File
@@ -1,95 +0,0 @@
#!/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)
+21
View File
@@ -0,0 +1,21 @@
The MIT License
Copyright (c) 2019-, Rick Lan, dragonpilot community, and a number of other of contributors.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
+92
View File
@@ -0,0 +1,92 @@
This Font Software is licensed under the SIL Open Font License,
Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font
creation efforts of academic and linguistic communities, and to
provide a free and open framework in which fonts may be shared and
improved in partnership with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply to
any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software
components as distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to,
deleting, or substituting -- in part or in whole -- any of the
components of the Original Version, by changing formats or by porting
the Font Software to a new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed,
modify, redistribute, and sell modified and unmodified copies of the
Font Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components, in
Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the
corresponding Copyright Holder. This restriction only applies to the
primary font name as presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created using
the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+372
View File
@@ -0,0 +1,372 @@
<?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="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 lang="zh-Hans">
<font weight="400" style="normal">NotoSansCJKtc-Regular.otf</font>
<font weight="500" style="normal">NotoSansCJKtc-Medium.otf</font>
<font weight="700" style="normal">NotoSansCJKtc-Bold.otf</font>
</family>
<family lang="zh-Hant">
<font weight="400" style="normal">NotoSansCJKtc-Regular.otf</font>
<font weight="500" style="normal">NotoSansCJKtc-Medium.otf</font>
<font weight="700" style="normal">NotoSansCJKtc-Bold.otf</font>
</family>
<family lang="ja">
<font weight="400" style="normal">MTLmr3m.ttf</font>
</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>

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