Compare commits

...

1075 Commits

Author SHA1 Message Date
Rick Lan
204c68d027 update ota/recovery url 2020-11-10 12:42:07 +10:00
Rick Lan
a9a878548e re-add apks 2020-04-07 18:43:13 +10:00
dragonpilot
1f8dffc444 bug fix 2019-11-15 18:30:03 +10:00
dragonpilot
ce44aa7696 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-11-15 09:25:54 +10:00
dragonpilot
bdea69d89b update batt ctrl logic, update APK 2019-11-15 09:10:53 +10:00
Willem Melching
abd3c6b5dc Update driving model (#880) 2019-11-14 13:51:35 -08:00
dragonpilot
f700370a8e update APK 2019-11-13 13:13:07 +10:00
dragonpilot
f462f640f8 only check hw type once in thermald automatically 2019-11-13 11:35:10 +10:00
Jason Young
75618d6ce7 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
c25b3def82 add dragon_is_eon param 2019-11-12 11:00:19 +10:00
dragonpilot
1c75d7fb14 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-11-11 10:48:03 +10:00
dragonpilot
faf9a36067 update APKs, add lead car detected alert 2019-11-11 10:16:43 +10:00
Alex Wang
50eae23440 Add fingerprint (#875) 2019-11-08 23:34:19 -08:00
Willem Melching
14fc0424b8 Make DBC preprocessing deterministic 2019-11-08 17:26:48 -08:00
Willem Melching
7998cf08d3 Make visiond compile on pc (#874) 2019-11-08 12:49:30 -08:00
dragonpilot
0c0ba60ce4 fix GSH issue 2019-11-08 13:10:44 +10:00
Willem Melching
926e5f397f Fix unicode bug in DoUninstall reading 2019-11-07 13:53:42 -08:00
Willem Melching
1d328da675 Fix fan control when not plugged into panda 2019-11-07 11:28:35 -08:00
dragonpilot
39ee5ba5ad update APK 2019-11-07 11:53:09 +10:00
dragonpilot
7983bbd3bd update APK 2019-11-07 11:42:17 +10:00
dragonpilot
dc15b9cae9 Add mock radar for Bosch 53c945c5cd 2019-11-06 16:44:43 +10:00
dragonpilot
7750dc7784 fix appd/dashcamd error due to changes in messaging 2019-11-06 16:34:14 +10:00
dragonpilot
ad40d8f66d disable update prompt 2019-11-06 15:21:46 +10:00
dragonpilot
4f0fb2ce5d add tw.com.ainvest.outpack to android_packages 2019-11-06 14:57:47 +10:00
dragonpilot
7500d48861 delete signed firmware 2019-11-06 14:50:53 +10:00
dragonpilot
4ed8a032d4 update APK 2019-11-06 12:25:39 +10:00
dragonpilot
a49dc4be02 Merge branch 'devel-unsupported-cars' into devel-en 2019-11-06 12:15:05 +10:00
dragonpilot
3b2e7c208a Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-11-06 12:00:30 +10:00
dragonpilot
c8ccddcb8d fix GSH issue, ISH use better steer angle sensor 2019-11-06 11:57:08 +10:00
dragonpilot
eaff7b4bb4 Merge branch 'devel-unsupported-cars' into devel-en 2019-11-05 13:44:57 +10:00
Riccardo
1ceb7ddf0e Decrease build time for dbc files 2019-11-04 19:23:02 -08:00
dragonpilot
3c0be0b4cd add 2017 Lexus GS450H 2019-11-05 12:08:24 +10:00
Vehicle Researcher
5ed475b25e openpilot v0.6.6 release 2019-11-04 15:13:52 -08:00
dragonpilot
64dbc96480 add aegis speed camera app 2019-11-04 16:43:40 +10:00
dragonpilot
58ca42e7ef update APK 2019-11-01 13:39:11 +10:00
dragonpilot
5ede6a346a remove miui fonts to reduce package size 2019-11-01 13:34:28 +10:00
dragonpilot
5cacbbab13 update offroad to multilangual version 2019-11-01 11:10:54 +10:00
Vehicle Researcher
043e83a160 Merge opendbc subtree 2019-10-31 17:02:32 -07: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
a08e586783 Merge panda subtree 2019-10-31 17:02:31 -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
f85f3b36bc Merge cereal subtree 2019-10-31 17:02:27 -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
dragonpilot
5af4d3aeed Merge branch 'devel-unsupported-cars' into devel-en 2019-10-31 11:24:09 +10:00
dragonpilot
06f8fd53ec fix merge conflict 2019-10-31 11:23:50 +10:00
dragonpilot
d9877e694c Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-31 11:22:02 +10:00
Riccardo
d603d5c9b8 Update README with now supported Subaru Harness 2019-10-30 15:15:05 -07:00
Ted Slesinski
8ad2640c11 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
2b721f7fc8 update carcontroller.py for honda 2019-10-30 11:56:17 +10:00
dragonpilot
2a29774272 update safety_honda 2019-10-30 10:37:32 +10:00
dragonpilot
4f41bfcd9e fix allow_gas for honda and slightly adjust lead car moving alert value 2019-10-30 09:31:51 +10:00
xBJx
5219d3c023 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
7c0d01a96c add SnG Mod support 2019-10-29 10:02:46 +10:00
dekerr
ee752d5669 remove unnecessary comprehensions (#863) 2019-10-28 15:16:37 -07:00
dragonpilot
88af74a3da Adjust dragon_allow_gas logic 2019-10-28 14:12:50 +10:00
dragonpilot
2393c2264c Merge branch 'devel-unsupported-cars' into devel-en 2019-10-28 12:33:51 +10:00
dragonpilot
44bab52730 remove fp 2019-10-28 12:33:27 +10:00
dragonpilot
4ad87130f9 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-28 12:33:16 +10:00
dragonpilot
c270f64a07 do not send canError if dragon_toyota_stock_dsu is on 2019-10-28 12:30:04 +10:00
dragonpilot
f17f264c1f rename variable 2019-10-28 11:13:27 +10:00
dragonpilot
8ca719e75a Revert "remove gas/brake value modification when allow_gas is enabled"
This reverts commit d3b7d741af.
2019-10-27 09:50:24 +10:00
u8511049
e36a14f1de 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
6e8ff99781 update lead car alert logic 2019-10-25 09:17:54 +10:00
dragonpilot
9e26bd8a89 remove canbus freq checking 2019-10-24 13:44:03 +10:00
dragonpilot
0df2160823 remove chmod bs 2019-10-22 16:53:36 +10:00
dragonpilot
1ad2ce8b2a slightly adjust es_tss2 port 2019-10-22 11:22:02 +10:00
dragonpilot
61663c77ff ES_TSS2 should be stop_and_go = True 2019-10-21 19:56:32 +10:00
dragonpilot
e5431eab5d completely remove params.put for connectivity check for performance purpose 2019-10-21 19:04:27 +10:00
dragonpilot
09e9f25c29 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-21 16:20:46 +10:00
dragonpilot
344dfa9bca add 2019 Lexus ES200 port from Shell 2019-10-21 16:20:04 +10:00
dragonpilot
d3b7d741af remove gas/brake value modification when allow_gas is enabled 2019-10-21 11:18:17 +10:00
dragonpilot
ce54902f69 disable internet connection checking 2019-10-21 11:11:51 +10:00
Riccardo
4fd5034aff Remove unneded use of replace, causing json to fail loading the alert 2019-10-18 11:29:59 -07:00
dragonpilot
4b962fef63 Add Lead Car Moving Alert 2019-10-18 17:58:12 +10:00
dragonpilot
c61ee95eec Make sure always use unsigned panda firmware 2019-10-18 09:47:14 +10:00
dragonpilot
b5fb96455d adjust STEER_ANGLE to 0.0573 instead of 0.573 2019-10-18 09:41:09 +10:00
dragonpilot
e8c31261c8 Merge branch 'devel-unsupported-cars' into devel-en 2019-10-18 09:39:33 +10:00
dragonpilot
608c8e46fd Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-10-18 09:39:19 +10:00
dragonpilot
0f8cf424ce Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-18 09:38:09 +10:00
Riccardo
9e20d79455 Update ref to process_replay regression test 2019-10-17 14:47:38 -07:00
Jason Young
da1161d7d8 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
62d14b8122 Revert to using the sum of the lane line probabilities instead of the the product 2019-10-17 13:31:28 -07:00
dragonpilot
1608739cf7 Add slow on curve toggle 2019-10-17 14:22:28 +10:00
dragonpilot
3db7389eb8 fix unable to display release note issue 2019-10-17 13:35:10 +10:00
dragonpilot
7c8f42c07e update APK 2019-10-17 10:30:50 +10:00
dragonpilot
84fc30a84b Fix STEER_ANGLE in STEER_TORQUE_SENSOR factor to 0.573 (was 0.056) 2019-10-17 10:21:00 +10:00
dragonpilot
fbbf03bb73 Merge branch 'devel-unsupported-cars' into devel-en 2019-10-17 10:19:50 +10:00
dragonpilot
f096912cb5 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-17 10:19:13 +10:00
dragonpilot
270702f54c Fix charging_ctrl max/min value param reader 2019-10-17 09:59:13 +10:00
dragonpilot
601d0b8f1e Add DragonCarModel/DragonCarVIN params 2019-10-17 09:58:47 +10:00
dragonpilot
5416f2008e delete bs (branch switcher) 2019-10-16 17:22:21 +10:00
dragonpilot
4d8444a4aa upgrade autonavi app to v4.3.0 2019-10-16 16:10:01 +10:00
dragonpilot
4730da4911 Add no-cache header when download changelog 2019-10-16 11:57:49 +10:00
dragonpilot
24ed87e568 Add reboot to flash panda script 2019-10-16 10:36:17 +10:00
dragonpilot
3c658f93c0 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-10-15 11:57:02 +10:00
dragonpilot
f82539ddd4 Update APK 2019-10-14 17:12:13 +10:00
dragonpilot
cdfab1efeb Update APK 2019-10-14 16:59:49 +10:00
dragonpilot
d8501656f0 fix reset_update.sh script again 2019-10-14 16:56:08 +10:00
dragonpilot
5eea31af91 Fix update_panda_firmware.sh 2019-10-14 16:29:13 +10:00
dragonpilot
3caa71ef1b add a script for update panda firmware 2019-10-14 16:03:44 +10:00
dragonpilot
ef33ef60a8 fix reset_update script 2019-10-14 16:03:31 +10:00
dragonpilot
d9ac0507a3 update APK 2019-10-14 13:59:20 +10:00
dragonpilot
3cd0270878 Create a custom script for update feature 2019-10-14 13:44:06 +10:00
dragonpilot
1c03ea3b39 update APK 2019-10-14 12:32:01 +10:00
dragonpilot
7a8f3e1df3 fix charging ctrl toggle 2019-10-14 12:27:39 +10:00
rbiasini
2ea17f00cf Force subaru to assume the stock camera is connected (#849) 2019-10-13 18:25:09 -07:00
dragonpilot
3adf752f1a Display dp's changelog instead of dp's release notes 2019-10-14 11:02:12 +10:00
dragonpilot
8803683a0c remove deprecated dragon params 2019-10-13 10:58:03 +10:00
dragonpilot
c37dd3ec37 re-enable updated 2019-10-13 10:36:21 +10:00
dragonpilot
30f707cf7a Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-10-13 10:17:34 +10:00
rbiasini
77aaead924 Allow to lock safety mode to keep gm/tesla cars supported (#844) 2019-10-11 17:35:07 -07:00
illumiN8i
8e329e1e3a 2019 Highlander Hybrid Limited Platinum (#843)
fingerprint from ogdragonzypher on Discord
2019-10-11 13:46:48 -07:00
dekerr
7ad5f4292e simplify encode/decode in dbc (#840)
* simplify encode/decode
2019-10-11 13:22:16 -07:00
dekerr
a7bfa413ae use list comprehension (#839)
* use list comprehension

* oops index range fix
2019-10-11 00:09:59 -07:00
eFini
b773d54460 Increase LEXUS_IS safetyParam to 77 (#841) 2019-10-10 23:31:05 -07:00
dragonpilot
7f3f07e04e Merge branch 'devel-unsupported-cars' into devel-en 2019-10-11 14:24:04 +10:00
dragonpilot
a1abe13da0 Add Taiwan 2019 RAV4 FP from Max Duan / CloudJ 2019-10-11 14:23:43 +10:00
dragonpilot
e55fd7ae4b Merge branch 'devel-unsupported-cars' into devel-en 2019-10-11 14:17:06 +10:00
dragonpilot
d855a70690 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-11 14:14:35 +10:00
dragonpilot
400889ce65 Fix fp cache issue 2019-10-11 13:44:16 +10:00
dragonpilot
2b706c4335 Fix FP cache 2019-10-11 12:16:18 +10:00
dragonpilot
62cbbb2845 Revert "Fixing up fp cache"
This reverts commit 6b103dac74.
2019-10-11 10:23:37 +10:00
dragonpilot
fa5e8de64d Improve honda dp_allow_gas logic 2019-10-11 09:57:07 +10:00
dragonpilot
6b103dac74 Fixing up fp cache 2019-10-11 09:47:26 +10:00
dragonpilot
07b8c4b0a0 Fix python3 params.get issue in appd 2019-10-10 22:07:05 +10:00
dragonpilot
0f61fe3a44 Fix python3 params.get issue 2019-10-10 21:43:55 +10:00
dragonpilot
3efa000221 use dp spinner 2019-10-10 15:08:01 +10:00
dragonpilot
83c6eca4a1 Fix unavailable variable issue 2019-10-10 14:34:18 +10:00
dragonpilot
d130c6c9a2 Fix unable to display ip address issue 2019-10-10 14:09:09 +10:00
dragonpilot
9798b12384 Update APK 2019-10-10 13:58:03 +10:00
dragonpilot
b67715b480 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-10-10 10:44:43 +10:00
Vehicle Researcher
eec9bb71c4 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
703f51ed56 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
a78baac2e3 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
96bdc0a043 Merge cereal subtree 2019-10-09 18:31:55 +00:00
dragonpilot
d895bd6813 Merge branch 'devel-unsupported-cars' into devel-en 2019-10-09 14:46:13 +10:00
dragonpilot
55fb019272 Revert "Move Max's FP to TSS RAV4H instead of TSS2 variant"
This reverts commit fc3a9adf29.
2019-10-09 14:45:13 +10:00
dragonpilot
a8da7e753c Add warning when LatCtrl is off 2019-10-09 14:43:24 +10:00
dragonpilot
1305ea2483 Add branch switch tool 2019-10-08 14:43:12 +10:00
dragonpilot
050994f673 Update APK 2019-10-08 10:49:49 +10:00
dragonpilot
79bd9d42eb Merge branch 'devel-unsupported-cars' into devel-en 2019-10-08 10:25:37 +10:00
dragonpilot
fc3a9adf29 Move Max's FP to TSS RAV4H instead of TSS2 variant 2019-10-08 10:25:11 +10:00
dragonpilot
7d256852c3 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
6a95cb2b06 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-08 10:23:31 +10:00
dragonpilot
74a2d08430 Remove checks = [] from devel-unsupported-cars branch 2019-10-07 21:11:20 +10:00
dragonpilot
da9fddeaae Merge branch 'devel-unsupported-cars' into devel-en 2019-10-07 21:10:21 +10:00
dragonpilot
860fe53c35 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-07 21:09:11 +10:00
dragonpilot
a5fe383928 move new rav4h fp to tss2 2019-10-07 21:06:11 +10:00
dragonpilot
6c87ac182c Add Taiwan RAV4H FP 2019-10-06 21:44:50 +10:00
dragonpilot
f7c925871a Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-10-06 20:16:21 +10:00
dragonpilot
8f77246fcb Remove zorrobyte's curvature learner, it decreases turning ability 2019-10-06 20:15:21 +10:00
Chris Souers
ee3aedaaea 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
73cc0f1283 Merge branch 'devel-unsupported-cars' into devel-en 2019-10-01 12:16:40 +10:00
dragonpilot
935191e724 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-01 12:16:20 +10:00
dragonpilot
bfef97c7b8 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-10-01 12:15:16 +10:00
illumiN8i
3e4f64cc78 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
59440ba5b7 Update thermald to set ignition_seen back to False if Panda disconnected (#820) 2019-09-30 13:06:38 -07:00
dragonpilot
a57a05b99d Fix missing curvature_factor val 2019-09-30 12:47:25 +10:00
dragonpilot
a944f7d9ed re-activate curvature learner and upgrade it to v4 2019-09-30 11:44:20 +10:00
dragonpilot
c9d8833dfe ISH to use better steer angle sensor 2019-09-30 11:42:06 +10:00
dragonpilot
1d2ea64938 Disable curvature learner 2019-09-28 16:36:39 +10:00
dragonpilot
73d6d1537a ISH to use better angle sensor 2019-09-28 16:35:04 +10:00
dragonpilot
09162309d1 Add zorrobyte's curvature learner 2019-09-27 15:11:29 +10:00
dragonpilot
d927d61f85 Add ability to toggle driver monitoring 2019-09-27 15:03:22 +10:00
dragonpilot
fc7bb4ea1f disable cut steering for 2s after fault 2019-09-27 14:46:12 +10:00
dragonpilot
185887db37 Make steering wheel transparent 2019-09-27 14:32:35 +10:00
dragonpilot
863d0e1c2c Better way to fix loggerd crash issue 2019-09-26 16:59:09 +10:00
dragonpilot
2c4d7a2cd4 fix boot issue if DragonEnableLogger is disabled 2019-09-26 16:50:41 +10:00
dragonpilot
e22b687197 Update APK 2019-09-25 10:29:33 +10:00
dragonpilot
ea472e00c3 Add blinker ui/param 2019-09-24 16:29:50 +10:00
dragonpilot
9f33903798 Make steering wheel transparent 2019-09-24 16:21:30 +10:00
dragonpilot
8cb4ff08c7 Add params to turn on/off ui lead/path/lane 2019-09-24 14:56:14 +10:00
dragonpilot
9c220ebf44 Reduce var checking to 5 secs 2019-09-23 14:52:57 +10:00
dragonpilot
4197340812 Move ip mod back to it's old location 2019-09-23 14:44:16 +10:00
dragonpilot
1880e7ebdc Update APK 2019-09-23 14:12:02 +10:00
dragonpilot
b9a32d6f61 Add toyota lane departure warning toggle 2019-09-23 13:34:31 +10:00
dragonpilot
ca26fe3087 Fix charging ctrl logic 2019-09-23 13:23:40 +10:00
dragonpilot
d189446b68 Merge branch 'devel-unsupported-cars' into devel-en 2019-09-23 12:36:16 +10:00
dragonpilot
bb273acc28 Add Taiwan Prius 4.5 FP, by Lin Hsin Hung 2019-09-23 12:35:44 +10:00
dragonpilot
13280acb12 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-09-23 12:30:45 +10:00
dragonpilot
8d5ef40e8b Fix battery ctrl logic 2019-09-23 12:29:51 +10:00
dragonpilot
246e687ef9 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-09-20 15:50:21 +10:00
dragonpilot
ced9202c46 Add charging control 2019-09-20 15:49:58 +10:00
dragonpilot
11555e198e Create a new service to handle greypanda gps mode 2019-09-20 15:24:33 +10:00
illumiN8i
a5ebac6ede 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
d5aba9035b Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-09-19 16:39:35 +10:00
dragonpilot
aa09e16a60 Remove greypanda mode GPS signal adjustment 2019-09-19 16:39:23 +10:00
Willem Melching
3df522b4d1 Add spinner source files (#812) 2019-09-17 12:47:30 -07:00
Riccardo
987ed000b4 Mistakenly removed Honda Fit support from README.md 2019-09-17 11:15:34 -07:00
dragonpilot
eeaa355c77 Merge branch 'devel-unsupported-cars' into devel-en 2019-09-16 14:17:22 +10:00
dragonpilot
a6273f1a36 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
bbc3507854 Taiwan CT200h FP from CloudJ, CT200h port from thomaspich 2019-09-16 14:14:53 +10:00
dragonpilot
b797a10b6e Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-09-16 13:56:56 +10:00
dragonpilot
068a481769 Fix incorrect light_stalk assignment 2019-09-14 18:16:45 +10:00
dragonpilot
9520c20c6b Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-09-14 18:15:41 +10:00
Willem Melching
508dc5742c 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
fe2a3caf51 Fix ISH error 2019-09-13 22:31:20 +10:00
dragonpilot
364aa99ccf kernel call optimization 2019-09-13 16:34:18 +10:00
dragonpilot
08bb061647 Update APK 2019-09-13 15:04:24 +10:00
dragonpilot
d18f5a0b17 update UI to adapt dragon_driving_ui switch 2019-09-13 14:50:11 +10:00
dragonpilot
8452cb5d58 Add missing init value 2019-09-13 13:02:10 +10:00
dragonpilot
0a398a474e Add ability to display/hide speed in UI 2019-09-13 12:58:09 +10:00
dragonpilot
96b8b66a5a Update APK 2019-09-13 12:50:48 +10:00
dragonpilot
1d75585593 Still allow header to be displayed when dragon_driving_ui is disabled 2019-09-13 12:48:39 +10:00
dragonpilot
2fa7df9c22 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
e932e5d0dc Update APK 2019-09-13 12:34:39 +10:00
dragonpilot
205a1f8121 Add ability to disable steering limit alert 2019-09-13 11:51:58 +10:00
dragonpilot
8b68e26b36 Update shutdownd logic - reported by loveloveses@wechat 2019-09-13 11:31:48 +10:00
dragonpilot
d49bd6ac02 clean up and fix a couple errors that stop honda cars running 2019-09-13 10:05:11 +10:00
dragonpilot
ebea7ebd2c Fix ISH light_stalk message location 2019-09-13 09:15:23 +10:00
dragonpilot
e7c53b1a4e Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en 2019-09-12 23:02:02 +10:00
dragonpilot
7abf659b90 Merge branch 'devel-unsupported-cars' into devel-en 2019-09-12 22:59:57 +10:00
dragonpilot
11824f2756 Add back Shell's odyssey 2019-09-12 22:58:43 +10:00
Comma Device
e815923bb7 ish confirmed working 2019-09-12 21:51:53 +10:00
dragonpilot
88442f0819 supercharge ish 2019-09-12 16:19:05 +10:00
dragonpilot
1e1c3b62f5 Merge branch 'devel-unsupported-cars' into devel-en 2019-09-12 16:14:32 +10:00
dragonpilot
97c5965c65 Add ISH into interface.py 2019-09-12 16:13:56 +10:00
dragonpilot
98444c7783 Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en 2019-09-12 15:54:16 +10:00
dragonpilot
b8b2ca7759 Fix up driver_monitor mod so change requires restart (less query to kernel) 2019-09-12 15:54:07 +10:00
dragonpilot
d96f8b17b4 Fix up driver_monitor mod so change requires restart (less query to kernel) 2019-09-12 15:48:56 +10:00
dragonpilot
beb11b88a1 Merge branch 'devel-unsupported-cars' into devel-en 2019-09-12 15:32:57 +10:00
dragonpilot
b84cef9d95 Keep ISH dbc for future reference 2019-09-12 15:32:34 +10:00
dragonpilot
762115f7f8 Merge branch 'devel-unsupported-cars' into devel-en 2019-09-12 15:27:07 +10:00
dragonpilot
db820d39d1 Update 2017 Lexus IS300h port 2019-09-12 15:26:41 +10:00
dragonpilot
6b79d5bc07 Fix up dragon_enable_driver_safety_check mod 2019-09-12 11:43:09 +10:00
dragonpilot
c62aa79af7 Remove matched fingerprint logs 2019-09-11 16:20:37 +10:00
dragonpilot
089165d1b9 Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en 2019-09-11 16:14:19 +10:00
dragonpilot
ec73591c7a Fix local variable "dragon_lat_control" error 2019-09-11 16:13:30 +10:00
dragonpilot
192fc94fe5 Fix local variable error 2019-09-11 16:12:55 +10:00
dragonpilot
98f6903eda DP spinner 2019-09-11 12:21:34 +10:00
dragonpilot
4d95c008c5 Add unsupported cars 2019-09-11 12:00:09 +10:00
dragonpilot
0d8dbd73a6 use put_nonblocking instead of params.put 2019-09-11 11:46:31 +10:00
dragonpilot
a5518a2330 更新APK 2019-09-11 11:25:19 +10:00
dragonpilot
bbdcb46dc1 Merge branch 'devel-unsupported-cars' into devel-en 2019-09-11 11:17:03 +10:00
dragonpilot
d06bd5953b 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
df694ca719 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
a64d4f7cca Driver monitoring fix when face is visible briefly during nighttime (#806) 2019-09-10 17:35:40 -07:00
dragonpilot
aee19a87eb Add ability to disable driving UI 2019-09-11 10:33:52 +10:00
Vehicle Researcher
57b54d6a8a 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
797644ded1 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
b358137f1d Merge panda subtree 2019-09-09 23:00:23 +00:00
Vehicle Researcher
cbf2c4e08a 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
67fde00df2 Fix GreyPandaMode logic 2019-09-09 14:25:07 +10:00
dragonpilot
2385b2c981 Add DragonGreyPandaMode logic 2019-09-09 14:17:24 +10:00
dragonpilot
3986b37de0 更新APK 2019-09-09 12:56:48 +10:00
dragonpilot
5ffacb58ae 加入 GreyPandaMode 2019-09-05 15:33:12 +10:00
dragonpilot
0c1f24d48b Merge branch 'devel-unsupported-cars' into devel-en
# Conflicts:
#	selfdrive/car/honda/values.py
2019-09-05 11:16:11 +10:00
dragonpilot
420141f46c 加入 Honda Accord Hybrid China 2019-09-05 11:15:07 +10:00
dragonpilot
0bc81f9ace Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-09-05 11:12:00 +10:00
dragonpilot
93e3c9d725 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-09-05 11:11:39 +10:00
dragonpilot
1bbe8389db 加入 Honda Inspire Hybrid 2019-09-05 11:09:38 +10:00
heitikender
0b0968dc38 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
79d38db009 打開 GPS 高精確度定位模式 2019-09-04 15:37:40 +10:00
dragonpilot
85a70c096a Merge branch 'devel-unsupported-cars' into devel-en 2019-09-04 14:40:13 +10:00
dragonpilot
d13c6cc6b3 加入 2019 Taiwan Altis Hybrid (需確認) 2019-09-04 14:39:52 +10:00
dragonpilot
d9f9d439b4 Merge branch 'devel-unsupported-cars' into devel-en 2019-09-04 14:28:51 +10:00
dragonpilot
983ab3001c use PR values 2019-09-04 14:28:14 +10:00
dragonpilot
f1329f043e restore files deleted accidentally 2019-09-04 14:26:39 +10:00
dragonpilot
e9df97064d 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
25a76581e6 Merge branch 'devel-unsupported-cars' into devel-en 2019-09-04 14:17:59 +10:00
dragonpilot
deb7e30b6f 加入台灣 2019 Altis 指紋 2019-09-04 14:16:56 +10:00
dragonpilot
720ceff07e Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-09-04 14:09:33 +10:00
dragonpilot
18064840c4 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-09-04 12:23:21 +10:00
dragonpilot
f9a9b1ddf9 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
03a00ccf45 修正 logic 2019-09-02 14:45:25 +10:00
dragonpilot
734b0b295a 加入延遲開啟/關閉 APP 2019-09-02 13:24:07 +10:00
dragonpilot
972e0a7de1 顯示WIFI IP 位置 2019-09-02 11:47:57 +10:00
dragonpilot
1003213bd1 優化 2019-08-30 17:20:07 +10:00
dragonpilot
0573aa7cea Revert "加入電池充電保護"
This reverts commit 4151d152
2019-08-30 15:17:45 +10:00
dragonpilot
5992179d68 Revert "更新APK"
This reverts commit 80a88170
2019-08-30 15:17:34 +10:00
dragonpilot
a139677386 Revert "修正"
This reverts commit 80e24f20
2019-08-30 15:17:27 +10:00
dragonpilot
db45c6c91b Revert "update logic"
This reverts commit d45a88d5
2019-08-30 15:17:17 +10:00
dragonpilot
e081975298 update logic 2019-08-30 14:13:52 +10:00
dragonpilot
dd0b95689d 修正 2019-08-30 13:56:36 +10:00
dragonpilot
e3d3c20ebb 更新APK 2019-08-30 13:35:34 +10:00
dragonpilot
0df46ccd55 加入電池充電保護 2019-08-30 13:24:07 +10:00
dragonpilot
d66a01fc98 更新APK 2019-08-30 12:01:17 +10:00
dragonpilot
afc7f88566 優化服務 2019-08-30 12:00:36 +10:00
Ted Slesinski
25d90b69dc Update README.md (#795)
Honda Fit can be removed from community-maintained branches now.
2019-08-28 12:51:31 -07:00
dragonpilot
c1a78bd98b 更新APK 2019-08-28 16:19:35 +10:00
dragonpilot
f23adbffed 修正錯誤 2019-08-28 16:08:21 +10:00
dragonpilot
caec02ac5e 修正錯誤 2019-08-28 16:04:49 +10:00
dragonpilot
7ca22104d8 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-08-28 11:15:42 +10:00
dragonpilot
79e031b0f5 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
4f98316c45 修改音量調整 logic 2019-08-28 11:10:47 +10:00
dragonpilot
c03ed0e02c 修改音量調整 logic 2019-08-28 09:50:16 +10:00
Ted Slesinski
9e3ff30c0c 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
0e6c5775e4 修正錯誤 2019-08-27 17:24:48 +10:00
dragonpilot
b35cd304b0 修正錯誤 2019-08-27 17:21:45 +10:00
dragonpilot
70b2222ede 加入可調警示音量 2019-08-27 17:13:12 +10:00
dragonpilot
96330c25ce 自動關機改為可調時長 2019-08-27 11:49:00 +10:00
Rick Lan
9fa2a47525 Adjust SafetyParam to 100 as it can do 130 2019-08-26 13:47:02 +10:00
Rick Lan
106f43287e 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
6009c36423 Revert "Add support to 2017 Lexus is300h (AVE30R)"
This reverts commit c187ea59
2019-08-26 13:34:46 +10:00
dragonpilot
8621334d76 Add support to 2017 Lexus is300h (AVE30R) 2019-08-26 13:33:30 +10:00
wocsor
d4651fcc79 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
1b75ac55ac permission 2019-08-23 01:25:31 +10:00
dragonpilot
891d417f7c 修正 appd 2019-08-23 01:22:18 +10:00
dragonpilot
57411524ff 修正permission 2019-08-23 01:10:07 +10:00
dragonpilot
e509158e18 優化appd 2019-08-23 00:59:57 +10:00
dragonpilot
b2b06e8a48 優化appd 2019-08-23 00:55:49 +10:00
dragonpilot
cb5883d57b 更新APK 2019-08-23 00:36:55 +10:00
dragonpilot
f6868275d2 調整camera_offset 單位 2019-08-22 18:05:16 +10:00
dragonpilot
05479c4b7d 加入調整相機偏移距離 2019-08-22 16:25:23 +10:00
dragonpilot
06f47c1352 更新APK 2019-08-22 15:56:00 +10:00
dragonpilot
5c8114ef73 調整appd logic 2019-08-21 23:57:29 +10:00
dragonpilot
3bb4af65ae 調整appd logic 2019-08-21 23:30:53 +10:00
dragonpilot
d022449502 更新3rd Party APP 管理 2019-08-21 17:42:40 +10:00
dragonpilot
46f4e0ac0a 讓第三方APK 不要每次開機都重新安裝 2019-08-21 13:01:27 +10:00
dragonpilot
1fdf2d59b7 更新APK 2019-08-21 12:35:38 +10:00
dragonpilot
a1e0ba73c9 車子啟動後強迫關閉 mixplorer 2019-08-21 12:32:42 +10:00
dragonpilot
8f4281a10f 加入 mixplorer 2019-08-21 12:18:17 +10:00
dragonpilot
b6e97ad135 修正DragonSteeringMonitorTimer 錯誤 2019-08-20 16:21:17 +10:00
dragonpilot
f07e24cba4 修正DragonSteeringMonitorTimer 錯誤 2019-08-20 15:56:06 +10:00
dragonpilot
a3e914ec7a Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en 2019-08-20 15:53:51 +10:00
dragonpilot
1d498095aa 加入可設定的 steering monitor timer 2019-08-20 12:46:07 +10:00
dragonpilot
249c6512bb 駕駛監控改至30 分鐘 2019-08-19 21:30:42 +10:00
dragonpilot
c094c53b30 阻止tomtom/autonavi 過熱時使用 2019-08-19 16:45:12 +10:00
dragonpilot
bd2c65ea6d 讓tomtom/autonavi 在起動時自動啟動,熄火時自動關閉 2019-08-19 15:26:21 +10:00
dragonpilot
81836bba3f 修正 honda lat ctrl 關閉時會 trigger steerSaturated 錯誤 2019-08-19 14:26:03 +10:00
dragonpilot
99eec0aa47 semibold 字型改 medium 2019-08-19 12:48:49 +10:00
dragonpilot
47a0a48f0c semibold 字型改 medium 2019-08-19 12:48:32 +10:00
dragonpilot
6b0701c5f9 把loading dragonpilot 改成網址 2019-08-19 12:25:34 +10:00
dragonpilot
197143d3b7 revert 刪除字型 2019-08-19 12:11:38 +10:00
dragonpilot
816bc9d4ca UI 移除MIUI 字型 2019-08-19 12:09:39 +10:00
dragonpilot
16992bfb15 更新APK 2019-08-19 11:49:48 +10:00
dragonpilot
862c5507a1 spinner 改用 dp 圖示 2019-08-19 11:20:47 +10:00
dragonpilot
c209d38d92 關閉 tooDistracted 錯誤,以防 dp 無法啟動 2019-08-19 10:30:03 +10:00
dragonpilot
d900c8e9b2 行車介面改用NotoSansCJK 字型 2019-08-15 17:15:51 +10:00
dragonpilot
52bfd679ad BBUI 轉向顯示至小數點第一位 2019-08-15 15:55:00 +10:00
dragonpilot
d31713a4a8 加入 persist.sys.local 設置 2019-08-15 15:37:39 +10:00
dragonpilot
7b8a2043b9 每次開機後都會把 locale 設定成指定的語系 2019-08-15 15:15:09 +10:00
dragonpilot
c58f2a817c Revert "加入特斯拉音效"
This reverts commit 5772b681
2019-08-14 13:57:54 +10:00
dragonpilot
c4765f9aef 修正開機啟動 autonavi 的錯誤 2019-08-14 12:06:42 +10:00
dragonpilot
255505e532 在 frame 之後再開啟 tomtom/autonavi 2019-08-14 12:03:45 +10:00
dragonpilot
675801948e 加入開機啟動TOMTOM/AUTONAVI 功能 2019-08-14 11:53:59 +10:00
dragonpilot
25634cc2a0 關閉 updated 2019-08-14 11:14:59 +10:00
dragonpilot
1e0f989d3f 延遲 params check 至3秒以減少 kernel calls 2019-08-14 10:31:51 +10:00
dragonpilot
1c43aefada 調整 DragonEnableDriverSafetyCheck Logic 2019-08-14 10:28:58 +10:00
dragonpilot
afbe7830a3 加入特斯拉音效 2019-08-14 10:26:50 +10:00
dragonpilot
02f04dd953 更新APK 2019-08-13 16:56:26 +10:00
dragonpilot
2156e48aa9 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
dac25e5a14 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
13e3783327 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
80eb52d1dd 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
96442bc9e1 Merge cereal subtree 2019-08-13 01:34:22 +00:00
dragonpilot
d56f690432 更新 APK 2019-08-12 22:58:08 +10:00
dragonpilot
b6a6fea700 加入導航 2019-08-12 22:00:05 +10:00
dragonpilot
88a47b0a96 Merge branch 'devel-en' into devel-en-unsupported-cars 2019-08-11 02:01:13 +10:00
dragonpilot
a6088fd3e9 加入新的指紋 2019-08-11 01:58:11 +10:00
dragonpilot
a22b600496 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-08-06 15:43:06 +10:00
Dragonpilot
06a4ca837e 回傳指紋到 sentry.io 2019-08-02 09:18:07 +10:00
Dragonpilot
a0e5e385d7 修改指紋暫存 logic 2019-08-02 09:17:14 +10:00
Dragonpilot
51069dc41e 嘗試更新指紋暫存 2019-08-02 08:53:24 +10:00
Riccardo
f72db32d6e Revert "Revert "Update hyundaican for Correct Message ID on LKAS11 (#746)" (#775)"
This reverts commit 5d1e7ddbc2.
2019-08-01 12:44:41 -07:00
TK211X
97bfc183ef 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
5d1e7ddbc2 Revert "Update hyundaican for Correct Message ID on LKAS11 (#746)" (#775)
This reverts commit 958f69608c.
2019-08-01 12:35:24 -07:00
TK211X
958f69608c 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
b83d573701 Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en 2019-08-01 11:30:03 +10:00
Dragonpilot
e67b0094b0 更新 APK 2019-08-01 11:29:38 +10:00
Dragonpilot
11f1f9e5a7 加入 UI 設定 2019-08-01 11:28:59 +10:00
Willem Melching
81a1601f3c Fix timeout in longitudinal test (#772)
* Fix timeout in longitudinal test
2019-07-31 18:17:19 -07:00
Dragonpilot
2fafc81e06 加回指紋暫存 2019-08-01 09:25:46 +10:00
Dragonpilot
a31e196205 Revert "移除指紋暫存"
This reverts commit 89574f5c7a.

Conflicts:
	apk/ai.comma.plus.offroad.apk
2019-08-01 09:14:19 +10:00
dragonpilot
02644ab02a dragon_toyota_stock_dsu 模式下只在適當的情況下 pcm_acc_active 才設成 True 2019-07-31 22:34:29 +10:00
dragonpilot
3bad9f3136 原廠 LKAS 只在關閉下觸發,不然會有 steering error 2019-07-31 22:31:52 +10:00
Dragonpilot
534fb98c35 更新 APK 2019-07-31 15:44:27 +10:00
Dragonpilot
624ac8bd8c 加入 Lat 控制開關,Toyota/Lexus 原廠 LKAS 模式 2019-07-31 15:27:16 +10:00
Dragonpilot
7e8a0d2413 更新 APK 2019-07-31 11:25:35 +10:00
Dragonpilot
89574f5c7a 移除指紋暫存 2019-07-31 11:25:15 +10:00
Dragonpilot
0a90614301 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
9e22d17b0e 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
9b898a9365 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
346fa152f9 Merge panda subtree 2019-07-30 02:25:28 +00:00
Vehicle Researcher
ad29964e18 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
53b0e3b6ac Update README.md (#766) 2019-07-29 15:06:34 -07:00
Dragonpilot
d6898b1245 優化 params.get 讀取次數,最快每秒讀一次 2019-07-29 15:03:53 +10:00
Dragonpilot
2014a651f5 fix logic 2019-07-29 14:09:39 +10:00
Dragonpilot
c73cbdd69e 更新 APK 2019-07-29 13:57:30 +10:00
Dragonpilot
4b54ecdf2f 加入 Toyota/Lexus 原廠 DSU 模式 2019-07-29 13:26:30 +10:00
Dragonpilot
bfda984aa1 Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en 2019-07-29 10:39:19 +10:00
Dragonpilot
5a7da65049 更新 crash.py 讓它能回傳更多訊息 2019-07-29 10:39:06 +10:00
dragonpilot
d12b26a2ed Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en 2019-07-28 10:22:20 +10:00
Rick Lan
2e766dd0db comment out unused var (causing panda flash error?) 2019-07-28 10:17:31 +10:00
Dragonpilot
3e30f8eb36 更新 APK 2019-07-26 15:02:00 +10:00
Dragonpilot
7bf0e245c6 更新變數名 2019-07-26 14:50:45 +10:00
Dragonpilot
cf43256b1d Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en 2019-07-26 12:01:48 +10:00
Dragonpilot
52e564a4d4 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-07-26 12:01:06 +10:00
Gernby
15562775d8 Remove offset from curvature (#761) 2019-07-25 15:00:50 -07:00
dragonpilot
34f2b3404f 更新 APK 2019-07-25 22:22:06 +10:00
dragonpilot
7984d3dc8c 更新 APK 2019-07-25 21:59:11 +10:00
dragonpilot
a4031262d9 Merge pull request #7 from eFiniLan/dp-bbui
加入 BBUI
2019-07-25 21:40:59 +10:00
Rick Lan
61d2b7d151 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
34beaeecd3 finalise BBUI 2019-07-25 21:03:47 +10:00
Rick Lan
747bb5a5e0 bbui mod 2019-07-25 17:27:58 +10:00
Arne Schwarck
0051c8a6f7 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
bf5d68dae6 Make it always write new cache fp 2019-07-24 00:28:31 +10:00
Dragonpilot
95abf32e32 加入 DragonAllowGas 功能 2019-07-23 15:51:45 +10:00
Dragonpilot
e8acd2a969 加入 DragonAllowGas 功能 2019-07-23 15:40:30 +10:00
Dragonpilot
b15a4c7435 取消自動更新 2019-07-23 12:10:46 +10:00
Dragonpilot
7d795f4dca 更新 APK 2019-07-23 12:07:34 +10:00
Dragonpilot
e764548702 更新 APK 2019-07-23 10:56:10 +10:00
Dragonpilot
e3bb1a9f05 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
e3a266863d 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
11f0915771 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
ef8305d13d 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
86063b41dd Merge cereal subtree 2019-07-22 19:15:25 +00:00
Dragonpilot
18125068e3 fix missing variables 2019-07-22 16:37:41 +10:00
Dragonpilot
6a284fc24c Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-07-22 16:10:24 +10:00
Dragonpilot
62afb42240 更新 APK 2019-07-22 16:10:06 +10:00
Dragonpilot
99b5ec04d2 Merge branch 'devel-disable-uploader' into devel-en 2019-07-22 15:39:01 +10:00
Dragonpilot
17effeff51 加入取消上傳comma ai記錄功能 2019-07-22 15:28:43 +10:00
rbiasini
4419fdc0df Use standard steer angle sensor in DSU-less pre-TSS2 Toyota. (#751) 2019-07-20 23:21:50 -07:00
Dragonpilot
80a5544bf2 Revert "把accordh 的指紋往上移"
This reverts commit 6c23abac48.
2019-07-16 15:43:35 +10:00
Dragonpilot
6c23abac48 把accordh 的指紋往上移 2019-07-16 15:22:52 +10:00
Dragonpilot
52adf9d190 更新 ACCORDH 指紋,支援 2019 版 2019-07-16 14:28:20 +10:00
Dragonpilot
2ee5cb849a 移除 safeguardd 服務 2019-07-16 11:26:59 +10:00
ErichMoraga
afd2b9f6d9 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
c21ff40343 更新 APK 2019-07-15 11:42:24 +10:00
Dragonpilot
904ef92505 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
5922f488d7 更新 APK 2019-07-15 11:17:23 +10:00
dragonpilot
1253f1eebb 加入 pickle.loads 讀取暫存資料 2019-07-13 22:45:34 +10:00
dragonpilot
99be18e32f 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
a94ef2cacd Improve Toyota Highlander tuning from https://github.com/commaai/openpilot/pull/690 2019-07-12 19:24:35 -07:00
eFini
d7878df3da add loggered, gpsd, sensord to gitignore (#735) 2019-07-12 11:02:23 -07:00
Gernby
7ad0d8ca45 Fix lane centering with single lane line (#737) 2019-07-12 10:55:34 -07:00
dragonpilot
4b5b49756d 更新APK 2019-07-12 20:56:17 +10:00
dragonpilot
c4159ba7a0 修正暫存指紋錯誤 2019-07-12 20:22:23 +10:00
eFini
4db632d669 fix spacing in toyota/carstate.py (#736) 2019-07-11 21:22:02 -07:00
Dragonpilot
3d7c8e5795 更新 APK 2019-07-12 13:54:24 +10:00
Dragonpilot
26cbf76312 更新 APK 2019-07-12 13:22:59 +10:00
Dragonpilot
92fc4c8aa1 方向燈取消方向盤控制開啟時顯示提示訊息 2019-07-12 12:08:16 +10:00
dragonpilot
4bde16547e Merge pull request #5 from eFiniLan/dragonpilot-cache-fp
加入暫存指紋功能
2019-07-12 09:47:38 +10:00
dragonpilot
0cee9d388a Merge pull request #4 from eFiniLan/dragonpilot-dev-lkmod
加入 honda 的 Lane Keeping 模式開關
2019-07-12 09:47:07 +10:00
Rick Lan
eef175d247 更新參數名 2019-07-12 09:35:05 +10:00
Rick Lan
2b44c2fe3d 將數值分開儲存 2019-07-12 09:16:49 +10:00
Rick Lan
ff3145215e use pickle instead of repr 2019-07-11 16:30:06 +10:00
Rick Lan
03cbdb3fae 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
d91c191854 make car fingerprint cacheable 2019-07-11 15:40:12 +10:00
Rick Lan
5ab145d968 remove unnecessary changes 2019-07-11 11:21:46 +10:00
Dragonpilot
a8ac2023d5 Merge branch 'devel' into dragonpilot-dev-en 2019-07-11 10:52:24 +10:00
Rick Lan
b35e861262 add alerts for lkmode 2019-07-11 10:16:46 +10:00
Rick Lan
e355fde8bf add alerts for lkmode 2019-07-11 10:11:16 +10:00
Rick Lan
9006734293 Merge branch 'dragonpilot-dev' of https://github.com/dragonpilot/dragonpilot into dragonpilot-dev-lkmod 2019-07-11 09:35:00 +10:00
Rick Lan
cc85c30c4f 修正打方向燈取消方向盤控制結束後產生的錯誤 2019-07-11 09:14:26 +10:00
Rick Lan
b41741136d 更新 APK 2019-07-10 16:26:35 +10:00
Rick Lan
b356d39779 修正Noctua模式 2019-07-10 15:26:14 +10:00
Rick Lan
ffba451dce 修正Noctua模式 2019-07-10 15:22:25 +10:00
Rick Lan
c283b71b42 加入Noctua模式 2019-07-10 15:11:09 +10:00
Rick Lan
5016d5bd58 修正關閉記錄功能 2019-07-10 14:10:53 +10:00
Rick Lan
454cfc929b 加入關閉記錄選項 2019-07-10 11:25:44 +10:00
Rick Lan
72bfd147f3 fix issue after merge 2019-07-10 09:59:51 +10:00
Rick Lan
74cbb6fde3 update to 0.6 2019-07-10 09:51:52 +10:00
Nick Brown
99a96a99bc 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
affbdfafcd 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
87de29ee47 lkmod from honda 2019-07-04 15:02:27 +10:00
Willem Melching
28419d09da Fix run_docker_tests.sh (#730) 2019-07-03 15:53:49 -07:00
Willem Melching
c1e2a1e9be 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
86425f095b Merge branch 'dragonpilot-dev' of https://github.com/dragonpilot/dragonpilot into dragonpilot-dev 2019-07-03 15:21:35 +10:00
dragonpilot
41a95a64f0 Merge pull request #1 from eFiniLan/dragonpilot-dev
Dragonpilot 客制功能
2019-07-03 14:04:24 +10:00
Rick Lan
e60fa6453c 啟動畫面文字改為 dragonpilot 2019-07-03 13:50:00 +10:00
Rick Lan
15c9e398f1 Revert "啟動畫面文字改成 dragonpilot"
This reverts commit 0992311f
2019-07-03 13:49:18 +10:00
Rick Lan
7e560cef77 啟動畫面文字改成 dragonpilot 2019-07-03 13:48:32 +10:00
Rick Lan
31a83f69a6 調整UI 顯示 N/A 時使用的字數 2019-07-03 13:44:07 +10:00
Rick Lan
8783c5fd71 加入 dragonpilot offroad apk 2019-07-03 13:41:43 +10:00
Rick Lan
bd6c37dcaa 修正錯誤 2019-07-03 13:35:08 +10:00
Rick Lan
d8d4dcbda0 當轉向燈暫停方向控制功能開啟時,我們在方向燈關閉後一秒取回控制 2019-07-03 13:27:37 +10:00
Rick Lan
04863474d2 Merge branch 'dragonpilot-dev' of https://github.com/eFiniLan/openpilot into dragonpilot-dev 2019-07-03 12:43:21 +10:00
Rick Lan
f41a49132f 修正 dashcamd 和 safetyguard 邏輯 2019-07-03 12:41:53 +10:00
Riccardo
6afa454543 Chrysler Pacifica 2018 Hybrid: fix fingerprint 2019-07-02 15:24:51 -07:00
Riccardo
500c8ad2af Chrysler Pacifica 2018 Hybrid: add fingerprint 2019-07-02 11:45:24 -07:00
Rick Lan
47294b083f 修正 dashcamd 和 safeguardd 無法啟動的錯誤 2019-07-02 22:50:24 +10:00
Rick Lan
ac443ea42f 更改 safetycheck 預設值 2019-07-02 16:25:46 +10:00
Rick Lan
c21c824010 dragonconf 改至 apk 2019-07-02 16:19:22 +10:00
Rick Lan
7b3cab409a 修正參數名,將自動關機設定單位換成分鐘,修正dragonconf logic 2019-07-02 16:17:01 +10:00
Rick Lan
c9bf25b937 重新命名變數,apk 不支援 underscore 2019-07-02 12:57:22 +10:00
Rick Lan
54da0f0fb9 remove unneeded changes 2019-07-02 11:21:56 +10:00
Rick Lan
d5d7a46d45 remove unneeded changes 2019-07-02 11:18:21 +10:00
Rick Lan
8e6f4e5200 remove unneeded changes 2019-07-02 11:15:51 +10:00
Rick Lan
4e1518c90a revert safety_toyota.h change 2019-07-02 11:11:37 +10:00
Rick Lan
d55c7ef173 移除油門不取消 OP 選項 2019-07-02 11:04:36 +10:00
Rick Lan
d8665f682b 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
d79c10c022 修正 toyota d_allowGasOnOP,移除 panda 檢測 gas/brake 2019-07-02 10:02:52 +10:00
George Hotz
5077378c1c Merge pull request #716 from dekerr/readme
Update README
2019-07-01 14:15:34 -07:00
Willem Melching
7265e635b9 Exclude tools from linter (#718)
* exclude tools from linter

* Exclude tools from pylint too
2019-07-01 13:14:16 -07:00
Willem Melching
76dde174d8 Install fastcluster in CI for controls tests 2019-07-01 12:16:16 -07:00
Vehicle Researcher
7b469bc8be openpilot v0.6 release 2019-06-28 21:11:30 +00:00
Vehicle Researcher
bbc7de2cbd 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
23c0cd841a 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
bf26f737fd Merge commit 'dba8e01e540f8b6b231be082ee6d36304aa1997d' as 'panda' 2019-06-28 21:09:12 +00:00
Vehicle Researcher
838bcaa843 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
b255a0d55a Merge commit '24e096d9f0f424c22b616b43957a5fd310f4ee83' as 'cereal' 2019-06-28 21:09:10 +00:00
Vehicle Researcher
bbf513839a Remove old cereal subtree 2019-06-28 21:09:09 +00:00
Rick Lan
b079fa23a6 將 dragonconf 移至系統的 params, 方便將來移植到 APK 2019-06-28 15:22:34 +10:00
Rick Lan
81fbea44e4 加入油門不取消 OP 選項 2019-06-27 15:11:18 +10:00
Rick Lan
afb3405654 加入轉向燈暫時取消 OP 方向盤控制選項 2019-06-27 15:11:18 +10:00
Rick Lan
ef079957aa 加入 minimal UI 2019-06-27 15:11:18 +10:00
Rick Lan
db500be81d 加入斷電自動關機功能 2019-06-27 15:11:18 +10:00
Rick Lan
71602b28de 加入安全檢測功能 (提示駕駛以防止 OP 在使用中突然斷開 USB) 2019-06-27 15:11:18 +10:00
Rick Lan
9a496c5a6a 加入 mediaplayer (播放音效) 2019-06-27 15:11:18 +10:00
Rick Lan
8d7f18dea9 加入完全取消駕駛監控選項 2019-06-27 15:11:18 +10:00
Rick Lan
8cd5abd0e1 調降模型路寬至 3.5m 2019-06-27 13:33:15 +10:00
Rick Lan
3580a36be3 加入 dashcam (行車記錄) 2019-06-27 13:30:33 +10:00
Rick Lan
65f19b01fa 加入 dragonconf 讀取 /data/dragonpilot.json 設定 2019-06-27 13:27:58 +10:00
Rick Lan
42effa5f4e 讓 UI 能夠顯示中文 2019-06-27 12:00:52 +10:00
Rick Lan
4b4f541455 自動安裝中文字型 2019-06-27 11:56:49 +10:00
Rick Lan
327a5d426b 修改 sentry.io 相關程式碼
* 提供更多的資訊
* 將錯誤轉發至 dragonpilot 帳號
2019-06-27 11:36:32 +10:00
dekerr
0bf3fa6bf8 remove 17 odyssey 2019-06-26 15:20:11 -04:00
eFini
402e07827c 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
56aba899df Added fingerprint for 2019 Toyota Prius LE (#694)
* Adding fingerprint for 2019 Prius LE
2019-06-25 14:04:39 -07:00
Rick Lan
979d1e9fb4 Merge branch 'devel' of https://github.com/eFiniLan/openpilot into devel-lexus-ish-ave30r 2019-06-25 13:44:06 +10:00
Rick Lan
9f1dc4194e Merge branch 'devel' of https://github.com/eFiniLan/openpilot into devel-lexus-ish-ave30r 2019-06-25 13:42:38 +10:00
Rick Lan
e8d2b3232e Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-06-24 16:24:32 +10:00
dekerr
8794ebc92f update vals (#705) 2019-06-20 12:22:30 -07:00
Willem Melching
d0d631285b Deterministic boardd build (#702) 2019-06-17 15:23:03 -07:00
rbiasini
c5ce0dcddd Reconcile panda pedal cancel logic for Toyota with controls (#698) 2019-06-13 17:51:12 -07:00
rbiasini
609a80ba0e 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
d30f8e5c75 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
cacc7f082f Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-06-07 08:11:31 +10:00
Rick Lan
f60d3290c5 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-06-07 08:10:39 +10:00
Vehicle Researcher
deaad0f8fd openpilot v0.5.13 release 2019-06-06 04:38:45 +00:00
Vehicle Researcher
7ccae06bce Squashed 'pyextra/' changes from 4242801..4348db7
4348db7 add PyJWT we use in backend

git-subtree-dir: pyextra
git-subtree-split: 4348db7e867dafbbcb7ec0302b5528688d1102c6
2019-06-06 04:31:54 +00:00
Vehicle Researcher
c250fb9e0d Merge pyextra subtree 2019-06-06 04:31:54 +00:00
Vehicle Researcher
53c4b90ffc Squashed 'opendbc/' changes from 4fc6f63..34bd4c4
34bd4c4 Toyota ipas msgs: fix repeated signal name
488b8f4 Civic: HUD_SETTING is 5 bytes
fe5b873 Honda: added time gap setting signal
f814307 Honda: fix bug due to little endianess
e16eec2 Honda: added signal with imperial unit bit
87fad4a Volkswagen MQB platform DBC updates (#167)

git-subtree-dir: opendbc
git-subtree-split: 34bd4c4dca459b02caba1b26eff7e2a703ebb423
2019-06-06 04:31:49 +00:00
Vehicle Researcher
8373f5bfce Merge opendbc subtree 2019-06-06 04:31:49 +00:00
Vehicle Researcher
72f242319d Merge panda subtree 2019-06-06 04:31:46 +00:00
Vehicle Researcher
9a143c5ab2 Squashed 'panda/' changes from 3e199cb..7f8babb
7f8babb Much more thorough limit safety tests on Honda, also switching long_controls_allowed
71099ef AddedToyota safety test around long_controls_allowed logic and fixed a bug
07fd31e added long_controls_allowed tests in GM
6ce580a added function to get/set long_controls_allowed
a2f93d4 update VERSION
380b7c7 Long allowed (#202)
09714e3 Toyota gas cancellation (#200)
436b203 Honda safety: fixed bug and properly abstracted gas_interceptor_detected variable
220cc8f Honda safety: this concludes the proper re-naming
a00a50c Honda safety: better naming
95b0109 Toyota: fixed regression safety tests
192fd05 Toyota safety: fixed rounding logic
0c5b220 Merge pull request #194 from commaai/refactor
b35f6ff legacy build is no longer supported
a06af9f always LIVE on EON
dc5979f LIVE on EON
0b26645 no EON by default
1906a4b panda now draws below 100mw in power save mode
e70b44a move that to main.c
dfce5f6 minor fixes, and no more autobaud
7f303e8 bump version to 1.3.0
96a7e31 a soothing blue in power save mode
a74f001 refactor power savings to depend on car started bit
386d5df can wake from sleep is removed, didn't work in the first place
881b1f4 not on pedal chip
0a9f8eb remove many ifdef PANDA
5069005 remove nested includes and include guards
3810452 WTF WHY WAS THIS SHIT PUT EVERYWHERE
3cf8db9 can.h always has CAN3
1f97c21 refactor pedal bootstub to use llcan
58ec63b oops, backward
6255097 new style power savings
6b282f1 tesla doesn't need a special LIN hook
1d24677 refactor #ifdef EON
d9306c5 NEO are no longer supported
4af036e fixup puts
2c1e5f6 the refactor continues
7517f2c remove ifdef PANDA from main
aec40ae remove fan, as it was only for NEO board
605bb27 fix bootstub build
c0f1f6e move things around for simplicity
f32f039 factor out clear_send
8221927 this is probably broken. refactor out llcan and clock
1114cb1 ELM327 safety mode: re use existing functions
cd104e2 Vin query msg is 0x7df
223323a Examples: fixed import bug
533d239 update price
4396fb9 Update jenkinsfile (#193)
1aa00c9 Misra c2012 (#192)
047bd72 fix tests and remove rev b support

git-subtree-dir: panda
git-subtree-split: 7f8babb8adf6e9c10bf3aecbe8c8eac0b155d066
2019-06-06 04:31:45 +00:00
Nick Brown
e0cf685e45 Camry Fingerprint (#647) 2019-06-05 17:56:21 -07:00
CAmaninacan1
2be290d146 Update values.py (#687)
Added fingerprint for 2019 Highlander XLE
2019-06-05 16:35:48 -07:00
Rick Lan
1a8a5dbee2 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-06-05 16:31:13 +10:00
Nick Brown
987fd0ade3 Detect toyota connected car wifi as a hotspot and not a normal home wifi network. 2019-06-02 00:18:00 -04:00
Joel Natividad
e592f889c1 Correct typos (#677)
“thansk” to “thanks”
2019-06-01 17:03:10 -07:00
Willem Melching
86fb709c81 Revert "Fix registration's params get_git_remote()" (#674) 2019-05-31 17:32:43 -07:00
ChaseCares
28e4960780 Add 2019 RAV4 XLE fingerprints (#671)
* Add 2019 RAV4 XLE fingerprints
2019-05-31 16:47:07 -07:00
George Hotz
9775aa165f Merge pull request #673 from rafcabezas/devel
Fix registration's params get_git_remote()
2019-05-31 16:44:08 -07:00
Willem Melching
a80b506f96 Merge pull request #669 from martinl/feature_subaru_lane_lines
Add lane lines visible indicators to Subaru dash display
2019-05-31 14:06:34 -07:00
raf
e76c9b8082 Fix registration's params get_git_remote() 2019-05-31 12:10:37 -04:00
Riccardo
0f78c98629 Fingeprint script: better instructions 2019-05-28 17:12:49 -07:00
Arne Schwarck
15c3793dab Update mapd.py (#672) 2019-05-28 16:16:32 -07:00
Martin Lillepuu
0592c72ab3 Add subaru dash lane lines 2019-05-26 11:13:39 +03:00
Martin Lillepuu
744a3566d6 add Openpilot lane line indicators to Subaru LKAS HUD 2019-05-26 11:08:17 +03:00
Rick Lan
6d8e8c7661 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-05-22 20:01:38 +10:00
Chris Souers
fc7e2dd630 add 19 crv to readme (#657) 2019-05-21 22:41:06 -07:00
Rick Lan
7c573c684f Fix values.py 2019-05-22 10:09:01 +10:00
Rick Lan
bf70f4636b Update variable name 2019-05-22 10:07:31 +10:00
Rick Lan
ce20724121 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
9265671d25 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-05-21 10:16:31 +10:00
Rick Lan
f144e4c383 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-05-17 22:11:58 +10:00
Vehicle Researcher
9c68a385ff openpilot v0.5.12 release 2019-05-16 13:20:29 -07:00
Vehicle Researcher
99c81d291f Squashed 'opendbc/' changes from 08757620..4fc6f639
4fc6f639 Update metric value for Dash_Units (#164)
340ca18f Subaru: added lane line visibility to ES_LKAS message
6b1246d9 Subaru: added hud unit selection
829ca5e6 Update subaru_outback_2015_eyesight.dbc (#163)
5d884dfb add Chrysler ACC resume button (#161)
ba2a69b5 DBC for the Bosch Radar for Tesla (#158)
7aacee13 Lexus GS300h 2017 DBC (#159)
d6eb4ae8 Rav4 2019 ADAS (#160)

git-subtree-dir: opendbc
git-subtree-split: 4fc6f6390274a8ebcea7eb87b247ba987b0bee4b
2019-05-16 13:13:38 -07:00
Vehicle Researcher
530b637d27 Squashed 'panda/' changes from 1282e8f5..3e199cb9
3e199cb9 Subaru safety: ES_LKAS message should not be forwarded
252dec22 Change docker tags in jenkins to use git commit instead of build_id
4a3b587c generate dependencies and clean (#184)
005e1310 Toyota Safety: cleaned up logic for TSSP2.0 cars
b53fb271 add ACCEL_CMD to filtering for TSSP2.0 cars (#185)
18c2e69e Fix query_vin_and_status.py require python 3.7
3b351b70 Minor fix to current type

git-subtree-dir: panda
git-subtree-split: 3e199cb914dd383fbc6dad964b31712860be04d7
2019-05-16 13:13:38 -07:00
Vehicle Researcher
e11a646657 Merge opendbc subtree 2019-05-16 13:13:38 -07:00
Vehicle Researcher
adb82cae81 Merge panda subtree 2019-05-16 13:13:38 -07:00
Rick Lan
d961b41607 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-05-16 15:05:10 +10:00
Arne Schwarck
764a4034a2 1263: 8 for highlander hybrid (#642) 2019-05-14 00:26:16 -07:00
Rick Lan
facd216835 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-05-14 12:30:46 +10:00
Nigel Armstrong
03e64e043b Add changes to 0.5.11 release notes 2019-05-09 16:42:14 -07:00
Willem Melching
d29b51561b Cleanup Toyota LDW 2019-05-07 22:42:04 -07:00
Willem Melching
2548f41be8 Install newer pip version in CI (#627)
* Update pip in CI

* Longer timeout for docker build

* Increase travis timeout

* revert changes to travis file
2019-05-07 21:56:45 +02:00
Rick Lan
4c4736f99b Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-05-07 10:39:21 +10:00
Willem Melching
aa482a199a add minimum score to consider a way valid (#292) 2019-05-06 13:21:34 -07:00
Arne Schwarck
c04ca640bf Add lane departure warning on dashboard for Toyota (#605)
* Add lane departure alert in controlsd

* Need init values for LDA

* Add lane departure in interface.py

* Include LDA in CarControler

* Add logic for LDA in toyotacan

* Add speed condition and comments for LDA

* Correct right CS.vEgo

* Correct rPoly spelling

* Add left and rightLaneDepart to HUDControl in car.capnp

* Add left and rightLane_Depart in UI function

* set controlsd priority

* revert

* There must be a line to depart from

* Include changes from @pd0wm

* Remove redundant False allocation

leftLaneDepart and rightLaneDepart as False by default according to @pd0wm

* Modify variable names

right_lane_depart and left_lane_depart to conform with python naming convention

* Modify variable names

right_lane_depart and left_lane_depart to conform with python naming convention

* Wrap lane departure warning in one bool
2019-05-06 22:19:00 +02:00
ErichMoraga
1c730c0622 Updated Prius & Prius Prime to include 2019 (#629) 2019-05-05 20:32:05 -07:00
marcbou
e1c3b01f68 correct some spelling errors (#628) 2019-05-05 03:23:32 -07:00
Riccardo
bf1b47be1a Maintain Python 2-3 compatibility but use six.iteritems(). 2019-05-04 19:01:46 -07:00
Rick Lan
7dd8f9f481 revert unneeded change 2019-05-04 11:40:41 +10:00
Rick Lan
a63162f5a7 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-05-04 11:36:50 +10:00
Drew Hintz
c714d9c9e9 getting ready for Python 3 (#619)
* tabs to spaces
python 2 to 3: https://portingguide.readthedocs.io/en/latest/syntax.html#tabs-and-spaces

* use the new except syntax
python 2 to 3: https://portingguide.readthedocs.io/en/latest/exceptions.html#the-new-except-syntax

* make relative imports absolute
python 2 to 3: https://portingguide.readthedocs.io/en/latest/imports.html#absolute-imports

* Queue renamed to queue in python 3
Use the six compatibility library to support both python 2 and 3: https://portingguide.readthedocs.io/en/latest/stdlib-reorg.html#renamed-modules

* replace dict.has_key() with in
python 2 to 3: https://portingguide.readthedocs.io/en/latest/dicts.html#removed-dict-has-key

* make dict views compatible with python 3
python 2 to 3: https://portingguide.readthedocs.io/en/latest/dicts.html#dict-views-and-iterators
Where needed, wrapping things that will be a view in python 3 with a list(). For example, if it's accessed with []
Python 3 has no iter*() methods, so just using the values() instead of itervalues() as long as it's not too performance intensive. Note that any minor performance hit of using a list instead of a view will go away when switching to python 3. If it is intensive, we could use the six version.

* Explicitly use truncating division
python 2 to 3: https://portingguide.readthedocs.io/en/latest/numbers.html#division
python 3 treats / as float division. When we want the result to be an integer, use //

* replace map() with list comprehension where a list result is needed.
In python 3, map() returns an iterator.
python 2 to 3: https://portingguide.readthedocs.io/en/latest/iterators.html#new-behavior-of-map-and-filter

* replace filter() with list comprehension
In python 3, filter() returns an interatoooooooooooor.
python 2 to 3: https://portingguide.readthedocs.io/en/latest/iterators.html#new-behavior-of-map-and-filter

* wrap zip() in list() where we need the result to be a list
python 2 to 3: https://portingguide.readthedocs.io/en/latest/iterators.html#new-behavior-of-zip

* clean out some lint
Removes these pylint warnings:
************* Module selfdrive.car.chrysler.chryslercan
W: 15, 0: Unnecessary semicolon (unnecessary-semicolon)
W: 16, 0: Unnecessary semicolon (unnecessary-semicolon)
W: 25, 0: Unnecessary semicolon (unnecessary-semicolon)
************* Module common.dbc
W:101, 0: Anomalous backslash in string: '\?'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
************* Module selfdrive.car.gm.interface
R:102, 6: Redefinition of ret.minEnableSpeed type from float to int (redefined-variable-type)
R:103, 6: Redefinition of ret.mass type from int to float (redefined-variable-type)
************* Module selfdrive.updated
R: 20, 6: Redefinition of r type from int to str (redefined-variable-type)
2019-05-02 11:08:59 -07:00
Rick Lan
2a5a458172 * change steering torque to 1600 2019-04-24 21:59:03 +10:00
Vehicle Researcher
9c26f5ec7b openpilot v0.5.11 release 2019-04-23 01:41:19 +00:00
Vehicle Researcher
684e7b9f9e Squashed 'opendbc/' changes from 3a55ae92d..08757620d
08757620d Subaru: removed unknown signals from ES_LKAS_State
b0a47d86c Subaru: filling ES_LKAS message
218d369ca Civic: added speed Unit
443507602 Subaru: temporarily simplified msg 545 for dev reasons. Removed signals will be restored
a35743688 Subaru: filled Cruise Buttons message
ea162219c Subaru: minor pedal gas conversion fix
24951ed85 Subaru: added cruise buttons
d2f330632 Added SPORT_ON message for Corolla (#155)
e18ba369e Add wet  road symbol for RSA (#156)
7470d98ad Lexus IS: generated file was out of synch
68cab29e8 Fix manually created dbc files (#154)

git-subtree-dir: opendbc
git-subtree-split: 08757620d782ea3d6456ffcd6c7cf820d7352f3e
2019-04-23 01:34:20 +00:00
Vehicle Researcher
df25aa0a95 Merge opendbc subtree 2019-04-23 01:34:20 +00:00
Vehicle Researcher
3c25760cc9 Squashed 'panda/' changes from 38dc4e678..1282e8f5a
1282e8f5a cap libusb1 version in setup (#183)
64bcc89a9 Subaru: 545 msg must be generated
9159df9a5 Merge branch '0.5.10-chyrsler'
f8ab74a1c L-line relay (#166)
11c4cdcc4 Cleanup leftover jenkins command
22572d949 Fix Jenkins build dockerfiles with same name
1d2f8f0ab Jenkins (#179)
f383eee96 Power saving: wake on RX and don't print durint IRQ
9540db744 Chrysler safety: better to mention messages we don't want to forward
104950264 chrysler: forward bus 0 to bus 2 (#177)
4276c380e Additional Power saving (#170)

git-subtree-dir: panda
git-subtree-split: 1282e8f5a0904b1aaa50f382db2e27f20e74a154
2019-04-23 01:34:19 +00:00
Vehicle Researcher
65c42b436f Merge panda subtree 2019-04-23 01:34:19 +00:00
Nigel Armstrong
6ca53d7f6a Fix dirty flag
Git diff-index doesn't rebuild index, so files with modified dates or touched
are marked as modified with a SHA1 of all 0.

To fix this, we run update-index --refresh before diff index. Any touched
files are updated in the index.

https://stackoverflow.com/questions/36367190/git-diff-files-output-changes-after-git-status
2019-04-17 00:33:13 -07:00
Nigel Armstrong
ead64d7770 Better logging of dirty files 2019-04-16 20:22:38 -07:00
Nigel Armstrong
413db08e1a Log dirty files 2019-04-16 13:50:38 -07:00
wocsor
2f7d46071d add pedal IDs to a Lexus RXH and Rav4 China (#604) 2019-04-15 18:10:13 -07:00
Nigel Armstrong
7345433d03 Add pylint to travis-ci (#595)
* Add pylint to travis-ci

* Change travis build order

* Fix missing pylint

* Add pylint to dockerfile

* Test with fixed linter for chrysler changes

* Fix linter issues in OP

* fixed linter on ford

* Fix Riccardo's comments
2019-04-12 23:12:34 -07:00
Nigel Armstrong
27ef9f2236 Squashed 'panda/' changes from 06958e4..38dc4e6
38dc4e6 Chrysler safety: better to mention messages we don't want to forward
236705f chrysler: forward bus 0 to bus 2 (#177)
62d4219 debug_console.py: exit when no pandas found (#175)

git-subtree-dir: panda
git-subtree-split: 38dc4e678325d13b4324f91f6eff8cb6a0fe575d
2019-04-12 16:57:32 -07:00
Nigel Armstrong
b6e514d006 Merge panda subtree 2019-04-12 16:57:32 -07:00
Rick Lan
2a34efc31d Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-04-10 10:40:31 +10:00
eFini
9472ee91ed Add port for 2019 Honda CRV Hybrid (China ver) (#596)
* 2019 honda crv hybrid port (china version)

* adjust mass based on spec

* update mass based on spec

* add 2019 Honda CRV Hybrid
2019-04-09 17:35:57 -07:00
eFini
5669962393 Add Port for 2019 Honda Odyssey Exclusive (China version) (#592)
* Port for 2019 Honda Odyssey China ver

* update as per comments
2019-04-08 17:58:56 -07:00
dekerr
87f244b4fe remove transpose (#588) 2019-04-05 22:59:38 -07:00
Riccardo
a00df10264 Chrysler: matching file in panda repo 2019-04-05 00:27:39 -07:00
Drew Hintz
8bbca86603 Add Chrysler Pacifica Hybrid 2019 (#591)
Add Chrysler Pacifica Hybrid 2019 to list of supported cars.
Clarify Jeep 2019 minimum steering speed.
2019-04-04 23:45:57 -07:00
Drew Hintz
be36f71c44 📋📷 2019 Chrysler Pacifica and 2019 Jeep Grand Cherokee support (#590)
* 2019 Chrysler Pacfica and 2019 Jeep Grand Cherokee support, along with likely support for arbitrary models.
This is done by copying most values from the stock LKAS camera which is active with https://github.com/commaai/panda/pull/177

* No longer send LKAS_HEARTBIT because Panda now forwards it for us.

* Pacifica Hybrid 2018 combine fingerprints, add 808: 8

* panda chrysler: forward bus 0 to bus 2
copy of Panda commit: 1049502644
2019-04-04 22:48:37 -07:00
Rick Lan
6741753643 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-04-03 14:08:39 +10:00
Gernby
21a85c421a Eliminate unnecessary temporary disengagements (#584)
This status was defined as a bump error, but it isn't actually due to bumps.  It's also triggered by driver overrides that are somewhat higher than the "steer_override" threshold.  By removing this temporary disengagement, the car is much more predictable on bumpy roads AND in turns that require assistance from the driver.
2019-04-02 00:21:23 -07:00
Nigel Armstrong
a6cc298377 Update 0.5.10 Release Notes 2019-03-28 22:17:12 -07:00
Douglas Schilling Landgraf
011154ba20 patches (#582)
* selfdrive: add sys module to exit call

exit() is a helper for interactive shell. Let's explicit
use the module sys.

* selfdrive: tomstoned.py use constant for /data/tombstones/

Instead of use multiple times a string for
the data dir, use a variable.
2019-03-26 20:50:37 -07:00
Rick Lan
eaf2c1894d Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-03-27 09:02:39 +10:00
Rick Lan
f195f7e5fe Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-03-27 09:01:26 +10:00
Vehicle Researcher
1fca65977d openpilot v0.5.10 release 2019-03-26 01:09:18 -07:00
Vehicle Researcher
342bb13bff Squashed 'pyextra/' changes from 0d19c13e..42428013
42428013 websocket patch from commaai/websocket-client.git
0fda5bb7 add jsonrpc
8139b06b add websocket_client

git-subtree-dir: pyextra
git-subtree-split: 4242801316e12c55e5b7c626331fbefad2e15e0c
2019-03-26 01:03:51 -07:00
Vehicle Researcher
238c403df9 Merge pyextra subtree 2019-03-26 01:03:51 -07:00
Vehicle Researcher
6aa1048d15 Squashed 'opendbc/' changes from 45c32855..3a55ae92
3a55ae92 New camry steer message (#149)
6cd02385 Add 2019 CR-V Hybrid DBC (#148)
721e9b23 Subaru: set speed can be in kph and it needs 8 bits
0e98b2c5 Subaru: update LKAS_State
945b6ad7 Subaru: slightly touched wheel speed factor
608a4a62 Add files via upload (#147)
6a29f7ef Subaru: fixed DOOR_OPEN sgs
434debbd Adds dbc for 2017 lexus is300h (hybrid) (#146)
679dd421 Subaru: some cleanup to dbc
38140d28 Subaru: endianess consistency in wheel speeds
82818134 Subaru Global: more endianess consistency. Still a long way to go
a3b78a32 Subaru Global: simplified Stalk Message
b8250bca fixed sign in steering angle
9552df4a Subaru: left steer is positive
4aca14c2 SUBARU LKAS: minus sign to steer command to match standard convention
a6cc574d Merge pull request #145 from Jafaral/master
abcb9a28  Add Mazda CX-5 2017 GT
f4a8f79f Pedal: back again at 6 bytes
3fd25bf3 Pedal: same checksum and counter (#143)
2c74c55f Toyota pedal: messages are now 7 bytes
732f3fcd Toyota pedal: added counter
acf0da72 Subaru global dbc (#142)
e0fa5d0b Subaru: added global dbc
cb221257 change chrysler radar to all big endian to avoid OP can parser bug (#141)
ecf99e03 chrysler car model in LKAS message so we can use CAN packer (#140)

git-subtree-dir: opendbc
git-subtree-split: 3a55ae92d4e621c3fc1ad3c8dffd76c6daa74bef
2019-03-26 01:03:50 -07:00
Vehicle Researcher
7bb715cbe7 Merge opendbc subtree 2019-03-26 01:03:50 -07:00
Vehicle Researcher
2a0f066426 Squashed 'panda/' changes from 39c1e39e..06958e42
06958e42 Fix pedal bootstub build
f5817e6b Fix Pedal bootstub version
c00fe867 CircleCI needs to check bootstub doesn't break too
9b5b696e Subaru: remove GM leftover
20c76ad5 Power Saving (#169)
c6eeaad6 Subaru: added last engage/disengage regression test
37d46e0c Subaru: added subaru safety tests
5686dae2 Subaru updated driver factor
a6193a82 Dcp remove (#168)
e437b9b4 Subaru: fixed bug and added safety tests
176f1325 Subaru: added proper safety model
0b10bb70 Subaru safety: move camera to bus 2
bce279a6 Pedal: only one firmware (#164)
4f73cb48 Toyota pedal: checking for no pedal being commanded when openpilot is off
0b2327e5 Merge pull request #160 from commaai/capture_make_failure
7b504d2f panda safety test that replays drives of saved CAN messages (#151)
d7d08892 Capture make failure so it can be logged to sentry

git-subtree-dir: panda
git-subtree-split: 06958e424cad7efa3fb35d262480c29817733059
2019-03-26 01:03:49 -07:00
Vehicle Researcher
cfbc9ce733 Merge panda subtree 2019-03-26 01:03:49 -07:00
Rick Lan
a602f57dc4 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-03-20 10:18:51 +10:00
Rick Lan
18cf187fda Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-03-15 11:41:20 +10:00
Rick Lan
c831bf6993 move dbc files PR to opendbc repo. 2019-03-12 11:21:43 +10:00
Rick Lan
2606ba2100 fix symbol issue on checks array 2019-03-12 11:09:23 +10:00
Nigel Armstrong
c8e2a6636e Add better volt fingerprint detection (#564)
Missing 578:8 causing unsupported car exception
2019-03-11 12:13:18 -07:00
Sumit Binnani
eb527a4c81 Added new fingerprint for 2018 Camry Hybrid LE (#560)
* Updated Fingerprint for Camry Hybrid LE

The updated fingerprint is a superset of the previous fingerprint (maybe due to blindspot monitors).
2019-03-11 12:08:52 -07:00
arne182
2c220c87fa Add better volt fingerprint detection
Missing 578:8 causing unsupported car exception
2019-03-11 11:00:06 +01:00
srpape
bc107c28ae Fix 2018 volt fingerprint (#561)
Update fingerprint and remove offending PACIFICA_2018 match
2019-03-09 18:17:20 -08:00
arne182
290aa2ac41 update @Kumar fingerprint for better recognition (#554) 2019-03-08 17:26:08 -08:00
Rick Lan
9c7cf0f505 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-03-06 14:56:51 +10:00
Rick Lan
b386f50203 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-03-04 09:57:44 +10:00
jfrux
b71f83aa8f Updates splash image with newer UI for README (#543) 2019-02-28 20:13:07 +01:00
Rick Lan
2754e73d61 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-02-27 13:58:59 +10:00
Rick Lan
8f9844eb82 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-02-27 12:57:17 +10:00
Nigel Armstrong
a4ddc816e8 .gitignore visiond (#539) 2019-02-25 10:43:56 -08:00
Drew Hintz
444ece8c8f remove Pacifica 2019 from supported car list (#538)
Although there's a fingerprint and LKAS constant for the 2019 Pacifica, it doesn't work well enough that I'd consider it supported.

P.S. I have an idea for how to support all Chrysler with one code base, even those I've never looked at. Forward can0 to the stock LKAS (can2) so that the stock LKAS is active. Then read the stock LKAS messages on can2 to both get the vehicle's LKAS constant, any status messages, and perhaps a more reliable counter. I'll try to code it up this weekend.
2019-02-22 12:48:33 -08:00
Nigel Armstrong
69876dce00 Chrysler updates (#537)
* Chrysler updates

* Update openDBC
2019-02-21 23:23:40 -08:00
Rick Lan
3058b81601 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
1ca8839e53 * refactor carstate 2019-02-22 16:12:38 +10:00
Rick Lan
cc7f15fe88 * refactor carstate 2019-02-22 16:08:33 +10:00
Rick Lan
b4bef4c034 update safetyParam to 66 2019-02-22 12:40:36 +10:00
Nigel Armstrong
9a47e634b9 Update Panda 2019-02-21 13:44:39 -08:00
Rick Lan
7e555671fe add stop_and_go and update retParam value 2019-02-21 23:35:32 +10:00
Rick Lan
5f268f3d9e Remove invalid signals/checks 2019-02-21 22:14:08 +10:00
Rick Lan
4ab5a70cdb remove duplicated definition 2019-02-21 20:15:45 +10:00
Rick Lan
1e2dc36a9f Update dbc 2019-02-21 19:57:54 +10:00
Rick Lan
2e7ee276f1 Merge branch 'devel' of https://github.com/eFiniLan/openpilot into devel-lexus-ish-ave30r 2019-02-21 16:46:29 +10:00
Rick Lan
ac4d303a54 fix indentation 2019-02-21 16:38:48 +10:00
Rick Lan
09c58ea91d 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
4edf2c5c01 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-02-21 16:14:15 +10:00
Vehicle Researcher
a36bad8391 openpilot v0.5.9 release 2019-02-20 01:39:02 +00:00
Vehicle Researcher
9a79df8a8a Squashed 'pyextra/' changes from 8cc1594..0d19c13
0d19c13 Revert adding reverse_geocoder
4a22fac Fix reverse_geocoder folder
35308c5 Add reverse_geocoder

git-subtree-dir: pyextra
git-subtree-split: 0d19c13e6e4e5fa82a470374146a86dc5d5afa35
2019-02-20 01:32:52 +00:00
Vehicle Researcher
993e63c000 Merge pyextra subtree 2019-02-20 01:32:52 +00:00
Vehicle Researcher
603f3f1a34 Squashed 'opendbc/' changes from b632acf..45c3285
45c3285 Added support to Toyota pedal
cfb7070 Revert "Added pedal support for Toyota"
ca607f4 Added pedal support for Toyota
22efd56 Honda: for simplicity all cars now have BRAKE_HOLD signal
f969de0 Honda Nidec: VSA_STATUS msg is teh same for all
85b0df7 chrysler L gear (#139)
b9618da Update Gear Packet with Eco and Sport button (#135)
5259345 Update DBC for Hyundai Kona Support (#138)
608caba Create subaru_outback_2015_eyesight.dbc (#137)

git-subtree-dir: opendbc
git-subtree-split: 45c32855d1672073459e59598fe3009c6d5d2465
2019-02-20 01:32:51 +00:00
Vehicle Researcher
43867dfe1a Merge opendbc subtree 2019-02-20 01:32:51 +00:00
Vehicle Researcher
26de1b3fa8 Merge panda subtree 2019-02-20 01:32:50 +00:00
Vehicle Researcher
a25e2153a0 Squashed 'panda/' changes from 9ee6285..39c1e39
39c1e39 Cadillac: added brake msg forwarding
aaa1b14 bump VERSION
e0dd558 Fixed undefined reference error when "make recover" in EON
c91f038 Toyota pedal support (#159)
de1ba06 Build optimizer: back to Os now that 'make --recover' is fixed
fd23383 add -lgcc flag to fix "undefined reference to __aeabi_llsr" (#156)
1cc74e2 Reverted code optimizer option to O2 after 'make recover' broke
1218d09 Cadillac ascm proxy (#155)
064446f Panda: bumped version
93266a9 Hyundai: allow the same max steer torque as stock
d275fa8 Subaru: Forwarding (#152)

git-subtree-dir: panda
git-subtree-split: 39c1e39e8142d3c2984cf5efe6b55c42bc748d9a
2019-02-20 01:32:49 +00:00
Rick Lan
cbd8cf8686 apply quillford's value again 2019-02-17 12:36:49 +10:00
Rick Lan
caae16218e Revert "remove unnecessary changes in carstate.py"
This reverts commit 28836f85e5.
2019-02-17 12:36:11 +10:00
Rick Lan
17fbe1a4dd getting error from last change, revert a couple back. 2019-02-17 10:46:07 +10:00
Rick Lan
0f47ccc1ba apply quillford's KpV and KiV value. 2019-02-17 10:30:38 +10:00
Rick Lan
28836f85e5 remove unnecessary changes in carstate.py 2019-02-17 10:28:20 +10:00
Rick Lan
4368401e33 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-02-15 15:00:34 +10:00
Rick Lan
9e6470a325 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-02-15 14:59:28 +10:00
eFini
08fd80dc15 Allow uploader.py to compress rlog without upload permission (#471)
* Always Compress - Make sure uploader to bzip2 rlog once it's completed without any upload permission.
2019-02-13 20:39:24 -08:00
eFini
030577f4d7 Add "Accept-Encoding: gzip" header to mapd.py to reduce data consumption (#525) 2019-02-13 18:19:17 +01:00
Rick Lan
e867ae40ba Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-02-07 12:11:55 +10:00
Rick Lan
4b865a1955 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-02-07 12:10:23 +10:00
Riccardo
d03e94c4d5 Readme: FCA giraffe added 2019-02-06 16:40:08 -08:00
Rick Lan
8fe520a678 * add matched canbus message descriptions from 2017_toyota_master.dbc 2019-02-05 15:52:17 +10:00
kegman
97b5997b8b Eliminate brake oscillations and grinding / crunching / ripping sound when using Pedal (Honda Pilot Only) (#475)
* Eliminate brake oscillations when using Pedal

* Simplified code

* syntax error fix

* Grinding code as applied to Honda Pilot only 

Each model may need its own setting due to USER_BRAKE noise disengagements

* correction: self.CP.carFingerprint instead of CP.carFingerprint

* Add Ridgeline to Pedal Grinding fix

Confirmed to work also on Ridgeline
2019-02-04 20:30:19 -08:00
Rick Lan
c3390a0cb5 update dbc file add a couple more definitions 2019-02-01 16:44:59 +10:00
Rick Lan
e4a07f1b89 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-01-30 16:20:19 +10:00
Rick Lan
5c5ffb0129 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-01-30 16:18:35 +10:00
rbiasini
1b8ae3ed2e removal of snpe libs (#517)
Removal of unnecessary snpe shared libs
2019-01-28 21:10:39 -08:00
Roma Sokolkov
57d1157faf Add missing mapd and orbd dirs into README.md (#515) 2019-01-26 15:08:10 -08:00
Drew Hintz
26a61ecc61 fix typos, Jeep tuning (#511) 2019-01-25 22:41:08 -08:00
Rick Lan
4c2feaa1ab Update dbc file to support mini car and left/right line indicator on display 2019-01-25 12:28:04 +10:00
Rick Lan
3b3b366651 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-01-25 12:07:38 +10:00
Rick Lan
2eb7068a2d Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-01-25 11:51:16 +10:00
Vehicle Researcher
f2cd3a85a5 openpilot v0.5.8 release 2019-01-23 15:34:52 -08:00
Vehicle Researcher
ea35a0043c Squashed 'opendbc/' changes from e108b6b..b632acf
b632acf new GM powertrain signals (#136)
ef8c223 Toyota: clarified lane line VALs
6567d24 Toyota: added more info to long control message
6730303 Run generator again and added Toyota Sienna
85de1ff Chrysler message to play an audible beep & ACC cancel (#133)
6824002 Chrysler: fixed torque motor understanding
7ea8318 Add DSU Speed (#134)
8094782 Chrysler: minor message renaming
9578326 Chrysler: beter names and LKAS_HUD message understood
59eaae9 Chrysler: added lkas icon color signal
63be265 added torque driver and torque motor
225beb2 Chrysler: no more big endian
41ec067 Chrysler: less big endian in dbc
8cc8da3 Chrysler: no big endian
166b32b Chrysler: naming consistency
1c1dd5a Chrysler: seems more correct for torque
1d64206 Hyundai Cleanup (#130)
bcde8fd GM Object Front Cam Signals (#128)
8ac852b Add Chrysler ACC cancel button (#127)

git-subtree-dir: opendbc
git-subtree-split: b632acfba661c85cf3dd84953b59bbe905ce3115
2019-01-23 15:28:22 -08:00
Vehicle Researcher
2da41efc26 Merge opendbc subtree 2019-01-23 15:28:22 -08:00
Vehicle Researcher
d21c6591c1 Squashed 'panda/' changes from 293fa33..9ee6285
9ee6285 optimize board build for size to avoid going over the limit. (#150)
20e8fa9 Start introducing Bounties
a2046e9 make it smaller
1dfcf2b update panda price
37ee289 chrysler safety: fixed comments
c2dfbad tesla safety: return -1 to block forward (#149)
74c0c1b update README
be0061d Chrysler: safety now based on motor torque
039d183 Chrysler: fixed regression test
9193eeb Chrysler: safety limits updated
04f1d44 Chrysler safety: 3 sa max rate down for now
cf3ecd6 Chrysler safety: re-using hyundai framework
49ed9bc Update CLICKS for longer bootup time of EONS and avoid unwanted fast charge mode

git-subtree-dir: panda
git-subtree-split: 9ee628557f3f33759c62b567964b918a597d3387
2019-01-23 15:28:16 -08:00
Vehicle Researcher
67c96e196e Merge panda subtree 2019-01-23 15:28:16 -08:00
Chris Souers
2b9771e594 Increment hatchback year (#508)
Confirmed working by user. Same steer dropout as before.
2019-01-21 18:01:16 -08:00
Riccardo
80fea67a58 Updated links from Slack to Discord 2019-01-14 14:32:43 -08:00
Chris Souers
f6c2c9f283 Merge new 2019 Civic and existing 2017-18 Civic Hatch (#446)
* fingerprint and new car

* you know the drill

* fix

* mod civic hatch to work for now

* try to merge hatch and other bosch

* fix

* fixed spaces

* comma (heh)

* make mass civic

* Add to readme. Need to confirm speed

* steering dropout at ~3.3 kph

* Remove additional fingerprint

* combined comment. fixed formatting to match
2019-01-11 17:13:57 -08:00
Kylan
5d15d83faf Adding GM Steering Rate (#495)
* adding steering rate

* adding steering rate
2019-01-08 19:40:09 -08:00
Ted Slesinski
cb31eb3408 Fixed TOC anchor links (#492) 2019-01-02 20:33:37 -08:00
ErichMoraga
38130c20ac Added EX-L subsection for the existing 2019 Pilot (#489)
*  Added EX-L subsection for the existing 2019 Pilot

Verified working with @Hitmantw25 12/20... and again 12/27 (VG w/ "Josh").

* Update selfdrive/car/honda/values.py

@energee wants to revert a change he made in a previous PR.

Co-Authored-By: ErichMoraga <33645296+ErichMoraga@users.noreply.github.com>

* Removed an extra space @energee included.
2018-12-30 18:23:10 -08:00
arne182
35a23f6f46 Update 0x365 for Rav4H from @squall and my observations (#490)
on stock 00000080fc0008 is the inital value then it changes to a static 00000080fd0008
2018-12-29 11:12:28 -08:00
Andrew Frahn
55e6a6f58b Clean Up hyundai (#481)
* Update fingerprints.py

Taiwanese Prius Prime fingerprint was identical to the regular prime (107 msgs.), but should really have 110.  I have the correct one in there now.

* openpilot 0.4.3.1 (#220)

* Honda Pilot 2017 Port (#161)

* Update README.md

* Update fingerprints.py

* Update carstate.py

* Update hondacan.py

* Update interface.py

* Update interface.py

* Update interface.py

* Update README.md

* Update README.md

* Update README.md

* Update fingerprints.py

* Update carstate.py

* Update hondacan.py

* Update interface.py

* Update carstate.py

* Update hondacan.py

* Update README.md

* Update fingerprints.py

* Update carstate.py

* Update carstate.py

* Update carstate.py

* Update hondacan.py

* Update interface.py

* Update carstate.py

* Update carstate.py

* Update Pilot Fingerprint

* Update fingerprints.py

* Give pilot its own definition and not use ILX

* add pilot argument

* Add Pilot interface

* Add pilot argument

* Update interface.py

* Parse Different gear on pilot

* Add steer max

* Fixed duplication of steer max value

* Adjust PID's for steering

* Update carcontroller.py

* Change Steer Ratio and wheelbase

* Update Steer fault values

Steer fault value of 3, does not seem to effect anything

* Update Kp,Ki Ratio

* Update interface.py

* Update readme for Pilot

* add pilot

* Update fingerprints.py

* Update carstate.py

* add signals

* add signal

* fix restricting video upload to wifi

* Dibs on SAFETY_GM numerical value

To match Panda repo.

* Safety Reference for Honda Bosch

* Update fingerprints.py (#210)

Consolidated my fingerprint and removed duplicates and ordered the fingerprint for the RAV4H. Double Checked.

* Interpolate ki/kp for steering PID loop (#200)

* Interpolate ki/kp for steering PID loop

Very much needed for the Volt port: car ping-pongs with low kp
on high speeeds, and the loop is unstable with high kp on
low speeds.

Also, removes "number or array?" logic from PIController,
now that all the callers use interpolation ofr ki/kp.

* Pass speed to steering PID loop for ki/kp interpolation

* Remove unused numbers import

* Slight changes to UI and Fingerprint for Odyssey Elite (#196)

* Adding back drive time to UI

* Add fingerprint for Odyssey Elite

* Removed extended fingerprint for Elite

* Revert "Adding back drive time to UI"

This reverts commit b9b02f7ff2511f28922f0bea47cd8c70bb9f4010.

* Squashed 'panda/' changes from 98f29a4..67d5208

67d5208 fix signedness issue in toyota safety
fe15d3f bump pandacan
11c2b08 add fault invalid
2c26e45 add sleep
27c7637 forgot the counter
3a6d7db don't hang
bfa7d2e canloader works
b259e2a can flasher is close to working
83f2edf isotp can support in softloader
7ae7c79 typo
e85cc47 forgot the selfs
190b4f6 start work on canflasher
5c655c9 add recover support
ae3457f usbflash is reliable
f7a0ab0 pedal usbflash works
585d0f9 add way to call isotp
be82899 despite it being bad code, move isotp
000715b start work on pedal canloader
626e312 pedal has a bootstub now
3662d1e redundant check
81e6b0d fix bug
083cd12 should have bounty to refactor that ish
b65d30c bad asserts
b2e6c3f isotp untested support for subaddr
30fd66a Merge pull request #93 from vntarasov/volt
06f5109 Merge pull request #94 from gregjhogan/can-printer-hex
c7d098c Merge pull request #95 from gregjhogan/setup-script
22fe250 Merge pull request #99 from gregjhogan/bit-transition-example
ba16ba3 Merge pull request #100 from gregjhogan/j2534-troubleshooting-instructions
ad08ea4 Merge pull request #90 from gregjhogan/can-forwarding
f3b6f5d added j2534 troubleshooting instructions
858d150 added script to find bits that transition from 0 to 1
c6acac8 added checking pedal interceptor message length
f7226ff added brake safety checks
d0c2634 added gas safety checks
d378e4a removed bosch safety forwarding restriction on 29 bit addresses
5c7ef9e added bosch safety hooks and forwarding
90c64b6 add note
23de8d4 Merge pull request #97 from commaai/pedal_improvements
0261641 added missing python packages
b92b235 fix bytearray encode issue
2434f1c Tweak Volt's brake pedal stickiness
e2f73d2 enable has a whole byte to itself
d5a9e1e correct checksum
f8ed9fa better names
986a14c don't alias pointers
9b8472e add watchdog support
8f0add9 handle faults
1d917f8 split gas set into 2 values, and have a fault state
1b77026 j2534 isn't alpha anymore
fbcc872 Merge pull request #92 from commaai/pedal
8a6f44b pedal is sending messages
08f464c python 3 bro is bad bro
9390961 kline checksum algo was broken...
3b7c33b add kline debug support
aa622bc init values
631ea9f better refactor
eb1fd75 add PEDAL adc sets
ccaa310 don't build with usb
8d4d763 debug console works
bd09883 comma pedal is building
75a29d5 Merge pull request #84 from gregjhogan/j2534-hds
eece37d only the panda has gmlan
9f43abe Merge pull request #89 from vntarasov/volt
5364d43 Merge pull request #88 from vntarasov/smaller-firmware
377a1ec bump version for descriptor fix
4fabdf0 Merge pull request #87 from gregjhogan/usb-multi-packet-control
8580773 fix sending WinUSB Extended Properties Feature Descriptor
6908feb Chevy Volt safety
786a004 Enable optimization to reduce firmware size
d70f43b hack to fix thinkpad
95ab1ae fixed flow control message padding
bbd04d1 updated installer
62216d0 single standalone DLL for J2534 driver
5c9138d fixed 11 bit address issue
f3b0ad2 fix LOOPBACK getting set when DATA_RATE is set
b750d36 updated README
a9a097f lowered CPU utilization
7c26a70 TIS needs unsupported protocols to return an error
42692b4 TIS doesn't like ChannelID being zero
cf126bb SET_CONFIG return error for reserved parameters
2e99dbf fix HDS issues
8203cc8 add is_grey
e946a54 add insecure_okay flag
4363b3e check webpage
4f59ded add secure mode note
6b11fb5 add autosecuring to tests
b27d185 Merge pull request #86 from commaai/better_pairing
4b53b42 elm wifi isn't an automated test
99f85cb Merge pull request #85 from gregjhogan/usb-wcid
0d38060 auto-install WinUSB device driver
c6653ca from python import
38cc0ee add wifi_secure_mode, boots in insecure mode

git-subtree-dir: panda
git-subtree-split: 67d52089a1300b86800d897f2b271e0a24cf6dd6

* Squashed 'opendbc/' changes from 81d9871..aa067f7

aa067f7 Chevy Volt tweaks (#83)
a60c6c4 Toyota: change signal name in EPS_STATUS msg
ce70b1a extra setme field toyota LKAS_HUD
df2a552 toyota missing ACC_CONTROL checksum
48bb293 Revert "Toyota Prius: added a comma specific message to control the speed sent to the EPS"
5f42439 Toyota Prius: added a comma specific message to control the speed sent to the EPS
6f5e8b6 Pedal Interceptor: fault state VAL moved to _comma
efd5f5c add setme to honda ACC_HUD
97fc335 add interceptor to civic
6f40f16 update generator script to allow for multiple imports
9ca956b add setme to toyota STEERING_IPAS
e5afa57 run generator for ipas scaling
8bd1182 Toyota IPAS: proper steer angle unit
f57511e acceleration pedal for gasPressed
c8d1dbc high beams also. likely dashboard message.
9f1c78b high beams for genericToggle
f037d42 turn signal lights (and thus hazard lights)
b35bb08 turn signals
78986cf Revert "turn signals"
ba946c9 turn signals
2af3ecc Speed, braking, and distance signals
f40ab87 Set packet lengths, adding steering rate, adjusted speed
cd59bfa units for speed_right
c2fcce2 speed of right vs left side of car
4ef5fae value table for gear status
97c48e2 tighten up speed bits. brake pressue max comment.
a0cbfd1 add gear status PRNDL
0c82865 initial signals for chrysler pacifica 2017 hybrid
5ed0540 add set me to toyota LKAS_HUD
aecac5d add set me fields to toyota ACC_HUD
5417013 update toyota ACC_CONTROL fields
e91e967 Comma Pedal: made GAS_COMMAND 6 bytes
d04434a Comma Pedal: added state byte and enable bit
c30b2cd Comma Pedal: sending 2 tracks on 0x200
8f72467 Volt doors and belts status (#70)
60f8b6c add set me to lkas hud honda
3c9e335 fix honda pcm gas message size
7ca471d Add 2018 Toyota CHR dbc (#78)
637fe00 set scaling to 1 for brake and gas which have no real unit
62a88d4 Volt: switch to parsing ACC buttons from powertrain CAN (#74)
3fdd47b Volt's gas pedal only and combined gas/acc (#76)
45ec9c9 Add 2017 Honda Ridgeline (#77)
cbd186a Add 2018 Camry Hybrid DBC's (#73)
974eeaf Toyota: re-generated the files after cfbc9ae363f98ef
19ea195 Toyota: more vals for LKA_STATE
cfbc9ae fixed inconsistent factor for speed in Honda dbc files
e7db803 convert all line endings to unix style

git-subtree-dir: opendbc
git-subtree-split: aa067f7079aa12617f7a37d85233e51af44e1bb2

* openpilot v0.4.3 release

* Squashed 'panda/' changes from 67d5208..3125232

3125232 bump version
703c0b4 Gas Interceptor: another fix to gas pressed logic
196d383 Interceptor: fixed gas pressed logic

git-subtree-dir: panda
git-subtree-split: 31252324d98e701c33cb6aeda20af6b549175764

* Squashed 'opendbc/' changes from aa067f7..91e882d

91e882d Updating bosch dbcs to use new format and bringing in new honda changes (#82)
9b32e2e Fix Checksum errors for CH-R (#86)

git-subtree-dir: opendbc
git-subtree-split: 91e882d4a04c129e12d39bcff0bbe56b75166e0f

* openpilot v0.4.3 release

* openpilot v0.4.3.1 release

* fix bug in canpacker for Toyotas with DSU connected (#221)

* update year on civic

* Revert "openpilot 0.4.3.1 (#220)"

This reverts commit 32ebfde2ddf907878aa2faca2624ec23e495b5f7.

* Revert the changes to GM in 0.5.4 (#380) (#386)

* Revert 0.5.4 changes for GM for 18ers

* Redo the refactor of stock control msgs

* Fixed missing CONTROL_MSGS -> STOCK_CONTROL_MSGS

* Remove spacing

* Need candidate array idx

* Cleanup

Uses generic dbc
All car names in alphabetical order
All fingerprints in alphabetical order
Acknowledgement to users who have made each vehicle possible

* no unecessary comments

* Match dbc to opendbc
2018-12-26 21:43:04 -08:00
Braden
185e5b3865 Read from usb/present instead of usb/online (#484) 2018-12-25 09:51:07 -08:00
ErichMoraga
44d4b643f3 Replaced 60 msg. C-HR print w/ 73 msg. C-HR print (#467)
Confirmed working, and necessary with @wackojacko Toyota CHR's Kiwi (New Zealand) ICE C-HR.
2018-12-21 01:43:18 -06:00
arne182
431a6de992 add self.CP = CP as with other carstate files (#459) 2018-12-21 01:40:26 -06:00
Ted Slesinski
921b8d3cdb Adds 2019 Ridgeline fingerprint (#473)
* Adds 2019 Ridgeline fingerprint

* Add readme
2018-12-21 01:21:05 -06:00
rbiasini
734cb27345 Faster NEOS download and auto removal of NEOS image after installation (#478) 2018-12-21 01:17:27 -06:00
Rick Lan
0bf4f95a41 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-12-17 17:11:43 +10:00
Rick Lan
d473152c82 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-12-17 17:10:45 +10:00
rbiasini
cffdffb528 hotfix: wait longer in CDP mode before switching to fast charge, so EON can boot (#469) 2018-12-16 19:54:29 -07:00
Rick Lan
a641e8c9d3 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-12-14 10:42:46 +10:00
Rick Lan
46543952e5 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-12-14 10:25:05 +10:00
Riccardo
7d5daf4747 0.5.7 hotfixes 2018-12-13 20:49:44 +01:00
Rick Lan
b9a925481e Move ave30r related changes to only this branch 2018-12-12 11:52:31 +10:00
Rick Lan
39f150ad96 Merge branch 'devel' of https://github.com/EternityLan/openpilot into devel-lexus-ish-ave30r 2018-12-12 11:51:16 +10:00
Rick Lan
7f72a7d28e revert changes. 2018-12-12 11:50:06 +10:00
Rick Lan
8b7e17d86f Merge branch 'devel' of https://github.com/EternityLan/openpilot into devel 2018-12-12 11:47:37 +10:00
Rick Lan
4935fa7353 revert devel back to stock devel 2018-12-12 11:47:31 +10:00
Rick Lan
0cf5bfaaf4 revert devel back to stock devel 2018-12-12 11:45:51 +10:00
Rick Lan
f45cb16d4e Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-12-11 18:39:00 +10:00
Rick Lan
9cfd6bfeea Merge branch 'devel' of https://github.com/EternityLan/openpilot into devel 2018-12-11 18:36:40 +10:00
Vehicle Researcher
f552ca210e openpilot v0.5.7 release 2018-12-10 14:13:12 -08:00
Vehicle Researcher
30ec405890 Squashed 'pyextra/' changes from fb152de..8cc1594
8cc1594 update overpy
2c18997 switch to forked version of overpy

git-subtree-dir: pyextra
git-subtree-split: 8cc1594238fcae6acb8bcd825ac73bbca586b1be
2018-12-10 14:06:10 -08:00
Vehicle Researcher
9d2fef093e Merge pyextra subtree 2018-12-10 14:06:10 -08:00
Vehicle Researcher
0002cc7c3a Squashed 'opendbc/' changes from 3f6cd74..e108b6b
e108b6b Add more Sign recognitions (#126)
6e8a363 Add GM FCW Alert (Take 2) (#125)
368701a Revert "Add GM FCW dashboard alert (#123)" (#124)
98b5f66 Add GM FCW dashboard alert (#123)
71b7588 Adds dbc for 2019 Honda Insight (#122)

git-subtree-dir: opendbc
git-subtree-split: e108b6bbe5ddd33f8ae63a3d9002a494bc732c8f
2018-12-10 14:06:07 -08:00
Vehicle Researcher
2729c0d740 Merge opendbc subtree 2018-12-10 14:06:07 -08:00
chassdesk
51d9c1a7c6 Add Lexus RX450HL as sub to RX450H (#458)
Add Lexus RX450HL as sub to RX450H
2018-12-08 13:13:09 -08:00
Chris McCammon
9b86a6edf4 Fixed Capitalization + Made CT6 Comment Cleaner (#456)
* Update README.md

* Updated CT6 comment
2018-12-07 17:32:41 -08:00
Vasily Tarasov
15dc299714 GM: Cadillac ATS Coupe 2018 support (#445)
* GM: Cadillac ATS Coupe 2018 support

* Missed adding Cadillac ATS
2018-12-06 21:22:21 -08:00
Rick Lan
1ace12eb12 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-12-05 12:54:42 +10:00
Kylan
9ea18b8e2b Adding support for 2018 GMC Acadia Denali (#453)
* added acadia

* adding acadia

* adding acadia

* Update radar_interface.py

* adding acadia

* refactored

* fixed tuning

* Adding acadia

* Update interface.py

* fixed whitespace

* fixed whitespace
2018-12-04 08:35:36 -08:00
rbiasini
3251b60a22 Honda Nidec: avoid giraffe setting alert when car is turned off (#449) 2018-11-29 20:36:34 -08:00
Rick Lan
c49d85082f Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-23 11:03:32 +10:00
rbiasini
3fad3bfc5c Added Astra support to README and RELEASE notes (#443) 2018-11-21 00:01:04 -08:00
Rick Lan
0f4acd346c Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-21 15:38:07 +10:00
Alex Hill
0f82021798 Add initial support for Holden/Opel Astra BK (#431) 2018-11-20 20:12:50 -08:00
Rick Lan
703bef2735 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-20 16:02:26 +10:00
Vasily Tarasov
6e83cf4245 Keep steering on radar fault (#442) 2018-11-19 20:25:33 -08:00
Rick Lan
b7b24f5a8f revert if else statement so it doesn't cause error. 2018-11-19 21:10:50 +10:00
Rick Lan
6fd1eaf492 remove else statements 2018-11-19 12:27:34 +10:00
Rick Lan
f6bf0e4f4e Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-19 12:19:56 +10:00
Rick Lan
1b3dd93fcc ignore standstill in lexus ish 2018-11-19 12:19:27 +10:00
dekerr
083ce17c02 Move calibration values (#441)
* initial commit

* moved constants
2018-11-18 17:18:29 -08:00
Vasily Tarasov
5591e42fcf GM: remove refactor leftovers (#440) 2018-11-18 16:13:44 -08:00
Rick Lan
a79fc339ae fix dbc to adapt 0.5.6 2018-11-18 15:55:06 +10:00
Rick Lan
959abaca9c Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-18 14:13:32 +10:00
Abdul Hagi
a06eaf7b95 Added 2016 Honda pilot (#438)
I am able to validate that openpilot works on a 2016 Honda Pilot.
2018-11-17 09:34:48 -08:00
Vehicle Researcher
9302045232 openpilot v0.5.6 release 2018-11-17 02:08:34 -08:00
Vehicle Researcher
efa97f23a5 Squashed 'pyextra/' changes from eb09257..fb152de
fb152de add overpy

git-subtree-dir: pyextra
git-subtree-split: fb152de1e9e54247d933400be1dbf580f4dd0f43
2018-11-17 01:58:38 -08:00
Vehicle Researcher
e2df5f91ad Merge pyextra subtree 2018-11-17 01:58:38 -08:00
Vehicle Researcher
2f0b0fb15e Squashed 'opendbc/' changes from 62b7a01..3f6cd74
3f6cd74 Add 3rd RSA signal and cleanup (#120)
a308ec1 add vals honda (#121)
1317514 Toyota: fixed typos
0339fc8 Toyota: added a better cruise active indicator
b0c012d Lexus: add is
94ba43c Toyota: generated dnc files after latest change
e16723e Add Distance Lines and RSA (#118)
9aec1ef Add GM signals for ESP/Mode/Highbeams/Intellibeam (#114)
a67fff9 add   toyota_prius_2010_pt.dbc (#50)
c1ee10f Revert "Revert "GM: copy radar header from cadillac (#116)""

git-subtree-dir: opendbc
git-subtree-split: 3f6cd74b6ea8e77da957501cfa3acf8ff0812509
2018-11-17 01:58:36 -08:00
Vehicle Researcher
d44213f6d4 Merge opendbc subtree 2018-11-17 01:58:36 -08:00
Vehicle Researcher
c10a755516 Squashed 'panda/' changes from 4dd3f5a..293fa33
293fa33 Honda: fixed message forwarding addresses from can2 to can0
799c338 Chrysler safety controls (#130)
c05b15b Toyota frc on (#141)
8291971 Toyota: using a more generalized CRUISE_ACTIVE bit that works on all cars
6f157aa Toyota frc on (#140)
8d2470c bumped panda version
915ee4f Honda: forwarding CAN0 to camera, so camera can stay on (#139)

git-subtree-dir: panda
git-subtree-split: 293fa33f830f0c7cdfad31f621c4bdc016aa7d41
2018-11-17 01:58:34 -08:00
Vehicle Researcher
73df3624f9 Merge panda subtree 2018-11-17 01:58:34 -08:00
Rick Lan
21c6e66e4f Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-16 09:06:10 +10:00
rbiasini
4680447dd0 Revert "Honda Pilot tuning / lane centering fixes (#408)" (#433)
This reverts commit c6be3e2ed5.
2018-11-13 14:36:29 -08:00
Rick Lan
5e617d1104 use downloaded file 2018-11-12 16:06:12 +10:00
Rick Lan
729fc8464c more changes 2018-11-12 16:05:26 +10:00
Rick Lan
0e79da03b5 remove changes 2018-11-12 16:04:42 +10:00
Rick Lan
70a71b741b fix 2018-11-12 16:03:55 +10:00
Rick Lan
0990c0ee5e revert changes 2018-11-12 15:55:01 +10:00
Rick Lan
9d33ceee33 removed all customd stuff 2018-11-12 15:51:55 +10:00
Rick Lan
b47b371d7e some minor code update. 2018-11-12 15:44:33 +10:00
Rick Lan
977579e4aa Use os.system instead of subprocess. 2018-11-12 13:10:16 +10:00
Rick Lan
643224fd7d * init -- customd 2018-11-12 11:51:53 +10:00
arne182
bb2af14dab 0x470 for RAV4H (#428)
@squall and me have checked the dsu static values for our RAV4H and found that this is similar to the highlander message.
2018-11-09 13:36:34 -08:00
Rick Lan
e908f4b8dc Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-09 15:31:44 +10:00
rbiasini
07c33192fe more stable calibration (#427)
* more stable calibration

* no commented print
2018-11-08 19:48:21 -08:00
Rick Lan
49eaa39aa2 Merge branch 'devel' of https://github.com/EternityLan/openpilot into devel 2018-11-09 13:35:53 +10:00
Rick Lan
afa8692dbe more changes for removing lexus specific safety. 2018-11-09 13:35:39 +10:00
Rick Lan
6d1a974f74 more changes for removing lexus specific safety. 2018-11-09 13:34:36 +10:00
Rick Lan
096aec71e5 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
93a5dc40c7 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-09 09:59:36 +10:00
ErichMoraga
b5f662e26c Expanded the previously added Chinese RAV4 (#425)
This came after testing a different trim level.  This fingerprint is confirmed working on both.
2018-11-08 09:56:05 -08:00
Rick Lan
6c73e0d877 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-07 16:56:35 +10:00
dekerr
2b8e62a0d6 Faster calibration filtering (#421)
* separable filter

* add missing args

* formatting

* fix casing
2018-11-06 13:51:37 -08:00
ErichMoraga
736cf2fe32 Added fingerprint for Chinese RAV4 (#422)
Confirmed working on 2017-2018 Chinese RAV4 by @Fiftycentsjj
2018-11-05 18:43:50 -08:00
kegman
c6be3e2ed5 Honda Pilot tuning / lane centering fixes (#408)
Tuned kP and kI and Tire Stiffness Factor settings.
Fixes lane centering issues in the following situations:
1.  Hugging of left lane line during fast left curving roads
2.  Hugging of right lane line during fast right curving roads
3.  Left bias in fast lane on crowned roads (sloping down to the left)
4.  Right bias in slow lane on crowned roads (sloping down to the right)
Works better when lane_width = 2.85 (vs 3.7 default) in pathplanner.py
2018-10-31 11:09:48 -07:00
Rick Lan
327c6b8c53 added missing line break 2018-10-31 12:44:21 +10:00
Rick Lan
87140dc8b5 Merge branch 'devel' of https://github.com/commaai/openpilot into devel
# Conflicts:
#	selfdrive/boardd/boardd.cc
2018-10-31 12:41:16 +10:00
dekerr
153d7a4816 Improve VM dynamic sol accuracy (#391)
* use solve and eye func

* remove uneeded import from vehicle model
2018-10-30 22:30:09 +01:00
Jafar Al-Gharaibeh
e0d95a63f3 boardd: keep defined safety models in sync with panda repo (#412)
This is a noop for most users, but for those of us working on new
car ports where we have our own additional defines, having
those defines out of sync creates merge conflicts in one place
(good so we can fix it) but not the other ( not good becasue
they will go unnoticed). I learned this the hardway!.

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
2018-10-30 22:13:18 +01:00
Rick Lan
43d81590bb min enable speed set to -1. 2018-10-29 08:54:27 +10:00
Willem Melching
ea684537a9 Improve Toyota radar filtering (#409) 2018-10-26 17:26:00 +02:00
Rick Lan
61576239cf Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-10-26 10:57:45 +10:00
Rick Lan
ad7f1bb446 * revert unnecessary changes 2018-10-26 10:24:57 +10:00
Rick Lan
72ab35d8d6 * added missing values in checks[] 2018-10-26 10:23:39 +10:00
Rick Lan
46655232b6 * 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
Vasily Tarasov
318e22e39f GM: disengage on radar fault (#396)
* GM: copy cadillac's radar header DBC

* Remove unused interface imports

* Rename num targets message to radar header

* Catch various radar faults
2018-10-23 18:59:34 -07:00
James-T1
8b7f4dc154 Update Genesis fingerprint for longer version from Saeed (#406) 2018-10-23 18:57:51 -07:00
Rick Lan
bbc001e12a making sure every SAFETY_LEXUS_ISH defined as 9 2018-10-24 10:12:04 +10:00
Rick Lan
96dbf1657c Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-10-24 10:05:58 +10:00
Rick Lan
615f90629c update lexus ish defined value to match the value in safety.h in panda/ 2018-10-24 10:03:52 +10:00
rbiasini
434a29a4ee remove badly named file (#404) 2018-10-23 12:05:11 -07:00
Rick Lan
660aaae90c removed extra defined 2018-10-23 14:36:27 +10:00
Rick Lan
97fb20e9fd Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-10-23 13:45:42 +10:00
Willem Melching
1f0144d121 Fix Visiond (#402) 2018-10-22 21:59:18 +02:00
Rick Lan
6e4ac6e5be * merged with 0.5.5 2018-10-22 10:42:22 +10:00
Vehicle Researcher
caad98839f openpilot v0.5.5 release 2018-10-21 15:00:31 -07:00
Vehicle Researcher
25eb268c10 Merge opendbc subtree 2018-10-21 14:52:59 -07:00
Vehicle Researcher
9843c250ce Merge panda subtree 2018-10-21 14:52:58 -07:00
Vehicle Researcher
a51a60b598 Squashed 'panda/' changes from 5253ab0..4dd3f5a
4dd3f5a bump version
6385551 Added Tesla safety changes. (#132)

git-subtree-dir: panda
git-subtree-split: 4dd3f5ac0101a6a14b003ecac1105e122a8f10bd
2018-10-21 14:52:57 -07:00
Ted Slesinski
ecd6e1597f Added new fingerprint for EX-L (#401) 2018-10-20 11:02:00 -07:00
Rick Lan
8068e418c0 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-10-19 12:02:17 +10:00
Rick Lan
2ea95f18e4 * update auto high beam dbc address. 2018-10-19 12:02:00 +10:00
Andrew Frahn
ce13309d74 Revert to using CLU15 message for Gear Selection for Compatability Reasons (#362)
* hyundai WIP

* steer_driver_factor is 1

* removed unnecessary file

* removed unnecessary code

* Update carcontroller.py

bug fix

* safety tuning and fixed interface stiffness

* better lateral tuning, some fixes

* Fix set speed

* added camera state reading, autoresume from stop, cancel on accel, hud alerts

* WIP

* Updated for Kia Sorento *WIP*

* Cleanup

* clean2

* Bug Fixes

* pre-merge

* Add all the cars!

* Panda to auto-detect Camera Bus

* Move Checksum Check

* Final Sorento Tuning

* Make CAN3 for Cam default

* Update README.md

* update panda, minor aesthetic updates

* few other minor changes

* added steer not allowed alert

* bup panda version to force panda update

* fixed camera alerts

* Revert to using CLU15 for Gear Selection

* Missing Defines

Didn’t realise this was removed as well!

* Change Gear Selection Definitions

Add logic to use transmission message rather than cluster message for all gear selections UNLESS the car in question does not have the known good transmission messages

* Revert Camera CAN Bus

* self.candidate

* fixed fingerpint, tested on Sorento

* Update for Elantra on Hyundai-Dev Branch

Latest Elantra values that correlate to progress Community branch.
2018-10-14 07:30:18 -07:00
Vasily Tarasov
64f8cbd387 GM: LKA dashboard icon support (#389)
* GM: LKA dashboard icon support

* Decrease camera keepalive interval

* Use tuple for LKA icon status
2018-10-12 17:37:13 -07:00
Rick Lan
e2767e94a7 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-10-10 16:16:40 +10:00
dekerr
a2b46f3e8e Save one inverse call in building transformation matrix (#384) 2018-10-08 21:02:20 +02:00
Rick Lan
e70922b1ce Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-10-04 14:26:51 +10:00
Jamezz
92146346bf Revert the changes to GM in 0.5.4 (#380)
* Revert 0.5.4 changes for GM for 18ers

* Redo the refactor of stock control msgs

* Fixed missing CONTROL_MSGS -> STOCK_CONTROL_MSGS

* Remove spacing

* Need candidate array idx
2018-10-01 19:13:34 +02:00
Rick Lan
41cb13ada0 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-09-28 12:24:12 +10:00
George Hotz
fb2263a0b1 Merge pull request #377 from commaai/nowiggle
visiond: replace wiggly model with non wiggly model
2018-09-27 13:25:00 -08:00
George Hotz
a32e5119fd visiond: replace wiggly model with non wiggly model 2018-09-27 09:52:07 -07:00
Rick Lan
7b4cd6dd2d Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-09-26 10:15:33 +10:00
Vehicle Researcher
71f1af62c2 openpilot v0.5.4 release 2018-09-25 00:13:41 -07:00
Vehicle Researcher
07d65aa3e6 Merge opendbc subtree 2018-09-25 00:04:00 -07:00
Vehicle Researcher
5c0935d253 Squashed 'panda/' changes from f2292e4..5253ab0
5253ab0 bump panda
6277139 GM Volt: allowing 300 max steer
63b7926 Hyundai safety: temporarily disabled button spam check to avoid camera faults
53aef76 GM: passive on LKA-only cars (#135)
01b5235 bumped panda version
1c0ffd1 Hyundai safety: simplifications
56794d6 Hyundai Safety Auto-Detect which CAN bus Camera is on (#134)

git-subtree-dir: panda
git-subtree-split: 5253ab0ee8fd71f67f62ee1d08361459903c7172
2018-09-25 00:03:58 -07:00
Vehicle Researcher
12e51751ee Merge panda subtree 2018-09-25 00:03:58 -07:00
Vasily Tarasov
af474d4935 Increase Volt's steering limit (#351)
* Increase Volt's steering limit

* Merge panda subtree
2018-09-22 04:41:44 +02:00
Vasily Tarasov
0a72e578f0 GM refactor (#374) 2018-09-22 04:40:52 +02:00
wocsor
8e42b86660 Add XSE trim to fingerprints (#372) 2018-09-21 01:06:15 +02:00
Rick Lan
854f9cf59e Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-09-20 12:08:22 +10:00
Ted Slesinski
45a18307e5 Docker environment breaking (#369)
* Fixes matplotlib dependency

* Use version 2.1.2
2018-09-20 02:59:18 +02:00
Rick Lan
ddef346fc3 * fixed opendbc content order, otherwise cabana can't load it. 2018-09-20 10:27:43 +10:00
Rick Lan
976847dc69 * revert unnecessary changes. 2018-09-19 14:10:37 +10:00
EternityLan
ef0af88f23 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
4a1dd020c7 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
6e476b69c7 * fixed .tx_lin assignment 2018-09-19 13:59:00 +10:00
Rick Lan
4cbbce39d7 * renamed AVE30 to ISH 2018-09-19 10:13:07 +10:00
Rick Lan
fe606a5ba4 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
c87526ea54 * v2 init 2018-09-19 09:05:48 +10:00
Rick Lan
bfdf0508c0 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-09-19 09:02:35 +10:00
Ted Slesinski
cf268ff510 Add support for accord hybrid (#361) 2018-09-18 06:39:58 +02:00
wocsor
c1283b0976 update CHR fingerprint (#364)
CHR 2016 fingerprint has more messages
2018-09-17 22:24:52 +02:00
Andrew Frahn
72c13f975f Kia Sorento and future Multi-Car Support (#346)
* hyundai WIP

* steer_driver_factor is 1

* removed unnecessary file

* removed unnecessary code

* Update carcontroller.py

bug fix

* safety tuning and fixed interface stiffness

* better lateral tuning, some fixes

* Fix set speed

* added camera state reading, autoresume from stop, cancel on accel, hud alerts

* WIP

* Updated for Kia Sorento *WIP*

* Cleanup

* clean2

* Bug Fixes

* pre-merge

* Add all the cars!

* Panda to auto-detect Camera Bus

* Move Checksum Check

* Final Sorento Tuning

* Make CAN3 for Cam default

* Update README.md

* update panda, minor aesthetic updates

* few other minor changes

* added steer not allowed alert

* bup panda version to force panda update

* fixed camera alerts
2018-09-10 00:30:36 +02:00
Rick Lan
23126143be 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
rbiasini
7abb07b402 fixed sign in after Google change (#357) 2018-09-08 06:19:48 +02:00
zeeexsixare
f94419ccb0 Tried native Stop and Go on Highlander ICE with no comma pedal: Works! (#353)
* Trying to make Highlander ICE stop and go

* Making acceleration slow for fuel efficiency

* Removing annoying commanded disengage beep

* Raised accel_max by 50% and commented on chime

* Testing if Highlander ICE can resume follow from 0

* Returned to 1.5 m/s2 for testing stop and go

* Prep for merging upstream

* Prep for upstream merge item #2

* Added Highlander ICE/Hybrid to Stop and Go

Also updated table of vehicles

* Rollback advertising stop and go for Highlanders

* Fix whitespace
2018-09-07 05:03:10 +02:00
Vasily Tarasov
ff3df00e0f GM: update readme, ACC is a required package (#354)
ACC implies Driver Confidence II, but not the other
way around. Openpilot requires front, long range radar
that only comes with ACC package.
2018-09-07 05:01:53 +02:00
Vasily Tarasov
d845a258de GM: go passive if detected ASCM or LKA camera (#350)
Since fingerprint is powertrain CAN only, camera still present
on object bus is not an issue.
2018-09-06 20:59:05 +02:00
daehahn
4888d07567 Correct typo for Highlander (#349) 2018-09-05 15:29:36 -07:00
Vasily Tarasov
5acc12852a Change dashboard command of GM to use packer (#347)
* Change dashboard command of GM to use packer

Also, separate "follow distance" from "engaged".

* Fix dashboard setSpeed scaling
2018-09-04 00:21:04 -07:00
Rick Lan
47fa5c78a1 * update safetyParam, 100 doesnt hold bumpy road 2018-09-04 17:16:37 +10:00
Vasily Tarasov
b87dc53c39 Fix pre-enable engagement on GM (#348)
In 2017 Volts, PCM fault occurs for a few seconds if ACC gas
is commanded while user presses gas pedal. PID winds up,
and when PCM fault clears, car gets a "max gas" jolt.

In 2018 Volts, PCM fault doesn't time out, which means pre-enable
doesn't work at all, and car would slowly decelerate, while openpilot
thinks it's engaged.
2018-09-04 00:16:09 -07:00
Rick Lan
175a3b074f * changed safetyParam to 100/1.0 2018-09-04 13:24:14 +10:00
Rick Lan
4bf897953c * remove extra space. 2018-09-04 13:22:39 +10:00
Rick Lan
30be8b9d04 * fix conflict. 2018-09-04 12:50:50 +10:00
Rick Lan
c70a2175c0 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
Vehicle Researcher
5942905701 openpilot v0.5.3 release 2018-09-03 16:43:12 -07:00
Vehicle Researcher
b6ade014a5 Merge opendbc subtree 2018-09-03 16:41:18 -07:00
Vehicle Researcher
c4bba32347 Squashed 'panda/' changes from b058c14..f2292e4
f2292e4 Hyundai: added safety check for button spam
1a8c4c4 Hyundai safety: fwd option
5398abf Hyundai safety: added tests for cruise enable/disable too
a91d7ef added hyundai regression test
487fcae Safety hyundai: fixed RT check
04270b8 Safety Hyundai: bug fixes
d0c28b7 Hyndai safety: tuned
ad1ba69 Hyundai safety: fixed wrong param
8a1dcbe Hyundai safety: added Santa Fe safety: need to be tested. Removed some unnecessary funcitons
4e9d08a Hyundai safety: controls_allowed ==1 by default for now
f42d092 Hyundai all output for now
7927cab compiling the use of bitbang_gmlan only for panda
4fe2dcd build pedal image in CI
3d67294 keep pedal obj folder

git-subtree-dir: panda
git-subtree-split: f2292e420bd856b8cef6633af46e2641f401e84c
2018-09-03 16:41:16 -07:00
Vehicle Researcher
46bdbd36b5 Merge panda subtree 2018-09-03 16:41:16 -07:00
Rick Lan
164a84d049 * updated minEnableSpeed to 19mph as per @rbiasini recommendation. 2018-09-03 13:46:33 +10:00
tentious
3f4c902c6a Honda Odyssey 2018/2019 EX-L PID Tuning (#343)
* Honda Odyssey 2019 EX-L PID Tuning.

* Update interface.py - Increased Kp for Odyssey

Increases response from 0.4, but oscillation still occurs in very sharp curves.
2018-09-02 20:06:19 -07:00
Rick Lan
d382623398 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
db6f46b862 * update minEnableSpeed 2018-09-03 12:00:15 +10:00
Rick Lan
9c2cae25d0 * update minEnableSpeed 2018-09-03 11:53:13 +10:00
Rick Lan
7d34a8fe71 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-09-03 11:48:54 +10:00
Ted Slesinski
e968bb921d Some code refactoring to Honda (#335)
* Move vehicle state values (that get sent to radar) into values.py file, its a better place for it :)

* idx with offset should only be applied to 0x300

* Adds new honda pilot to vehicle state msg array
2018-08-31 19:57:11 -07:00
Rick Lan
4931c8ed3b * all to lower case 2018-08-31 10:40:55 +10:00
Rick Lan
e488a6d88d * minor changes to static msgs. 2018-08-31 10:28:17 +10:00
Rick Lan
f3af6c1fd5 * updated comments. 2018-08-31 00:04:46 +10:00
Rick Lan
397494478a * fix compile error. 2018-08-30 20:49:29 +10:00
Rick Lan
80f13dc8ef * delete unused def. 2018-08-30 20:46:33 +10:00
Rick Lan
7a1a14418e * removed unused var definition. 2018-08-30 20:45:06 +10:00
Rick Lan
defe5dff68 * fix control mismatch issue. 2018-08-30 20:40:46 +10:00
Rick Lan
c5d2d2ea5f * use standard ui command, looks no different before and after. 2018-08-30 20:26:09 +10:00
Rick Lan
bc81560e3b * removed duplicated msg in signal 2018-08-30 20:14:57 +10:00
Rick Lan
99a25a480b * init acc_addr & acc_vl value 2018-08-30 20:06:28 +10:00
Rick Lan
8c05ca15b4 * init commit 2018-08-30 16:11:04 +10:00
Riccardo
5e37e14498 Added Pilot 2019 as supported car to README 2018-08-28 14:25:00 -07:00
rbiasini
f815038069 fixing base UI crash after completing OP guide for the first time (#337) 2018-08-27 10:43:23 -07:00
Ted Slesinski
fe296e91ba Adds 2019 Pilot (#334) 2018-08-26 22:35:11 -07:00
rbiasini
64ba1a7cab fix critical put and get param that caused sporadic controlsd hanging (#333)
* fix critical put and get param that caused sporadic controlsd hanging

* test fix
2018-08-24 19:45:33 -07:00
Jamezz
d18aefe4bc Volt: Don't adjust speed on resume from stopped (#325)
* Don't adjust speed if resuming

* Detab
2018-08-23 18:39:11 -07:00
rbiasini
86a8902872 little endian mask fix (#330) 2018-08-22 11:36:55 -07:00
Vehicle Researcher
fd891b97d6 openpilot v0.5.2 release 2018-08-19 20:36:37 -07:00
Vehicle Researcher
c2a1b71ed4 Merge opendbc subtree 2018-08-19 20:34:33 -07:00
Vehicle Researcher
c812915765 Squashed 'panda/' changes from 5570dac..b058c14
b058c14 add build step for legacy board to CI
866dd85 Fix README (#133)
c2a0853 Hyundai safety: 593 also needs ot be modified
594863c Hyundai: added initial safety files which just fwd bus 0 to 2 and viceversa, except for lkas msgs
905a935 fixed pedal and legacy board builds: no float support
0a480ec moved interpolate function to safety header
d7bd473 Merge pull request #131 from appleguru/master
c0b1ef2 Example to get wifi password from panda over USB using python library
01c0383 Merge pull request #128 from appleguru/gmlan_gpio
f9a46e3 Match safety order from master
aafbe05 GMLAN GPIO Rebase
37df290 rename to gmlan_alt

git-subtree-dir: panda
git-subtree-split: b058c145709a93d56fbe764701962e7d97344ecf
2018-08-19 20:34:21 -07:00
Vehicle Researcher
5e3daaaf11 Merge panda subtree 2018-08-19 20:34:21 -07:00
rbiasini
5e21353fca updated opendbc (#322) 2018-08-16 17:02:52 -07:00
Ted Slesinski
c441124228 Adds 1.5L accord support (#321)
* Adds support for 1.5L Accord

* Merge opendbc subtree
2018-08-13 22:38:14 -07:00
arne182
ce6d787ca2 Spelling Correction (#316) 2018-08-03 00:17:00 -07:00
Vehicle Researcher
38cfc60441 openpilot v0.5.1 release 2018-08-02 02:58:52 +00:00
Vehicle Researcher
03f5ec3346 Merge opendbc subtree 2018-08-02 02:55:39 +00:00
Vehicle Researcher
84fd87c67c Merge panda subtree 2018-08-02 02:55:38 +00:00
Vehicle Researcher
76494ab0be Squashed 'panda/' changes from 5c905b75..5570dac1
5570dac1 Merge pull request #124 from AllWashedOut/patch-1
341e6d31 bumped panda version
98b71f3a Toyota safety: added support for camry and chr (#127)
ba8762d5 Toyota safety: vars and consts need 'toyota_' prefix
d8fc9ff4 Update tesla_tester.py
2a8c2c21 Strengthen VIN detection

git-subtree-dir: panda
git-subtree-split: 5570dac19e908e2980fbab6d935476e5a672299f
2018-08-02 02:55:37 +00:00
rbiasini
d17f80f86a Revert "Added 2014 pre-AP tesla (prior to Oct 28, 2014) (#303)" (#307)
This reverts commit 60426226d0.
2018-07-20 15:06:57 -07:00
Jean-Claude Thibault
60426226d0 Added 2014 pre-AP tesla (prior to Oct 28, 2014) (#303) 2018-07-20 15:02:01 -07:00
Mutley
fad769fbaa Update README.md (#295)
Changed GM minimum speed for steer control
2018-07-15 22:21:52 -07:00
Joshua F. Rountree
758c885973 Adds Pedal Interceptor Support for Honda & Acura Vehicles (#274)
* Adds Joel's Changes to values, sorted as Rick wanted.

* Adds space at end of file.

* Adds Changes to Steering Ratio for Pilot testing.

* Adding this to steer ratio makes it even 3.33

Not sure if this should go into this PR though or not.
This makes the ratio match the other vehicles in the file.  Otherwise it's 3.454545...

* Changes the RAV4 back to not include pedal.

* Updated Comments for Pedal Support

* - Adds menuever test output to gitignore.
- Slight comment update to Ridgeline

* - Cleanup steer status comments
- Adds steering warning for interceptor cars in low speed lockout.

* Cleans up comments.

* Update README.md

* Corrects verbiage in README regarding Comma Pedal on Honda's

* Updates Odyssey and MDX to not add extra warnings for low-speed-lockout.

* Updates Comma Pedal references to use anchor links.

* Minor tweak to README

* Updates RDX to warn no steering below 12mph

* Reverts changes to README, carstate.py, and interface.py

* Removes extra libraries from a prior experiment.

* Replaces README with one from current devel.  Hope this fixes spacing issues.

* Adds Pedal back to Honda Cars and sorts fingerprint values

* Fixes spacing changes that were not intentional.

* Fixed carstate no newline at end of file.

* Fixes new line at end of file issue.

* Converted the Long's to Int's
2018-07-13 17:15:42 -07:00
George Hotz
734002eb63 Merge pull request #290 from commaai/pedal-resum-speed-fix
fixed resume press when comma pedal is used
2018-07-13 16:55:40 -07:00
Riccardo
949cbd214b fixed resume press when comma pedal is used 2018-07-13 15:52:59 -07:00
George Hotz
0d9447c76b Merge pull request #288 from jfrux/patch-1
Minor README.md update.
2018-07-13 12:24:24 -07:00
Joshua F. Rountree
ce0205bcd4 Update README.md 2018-07-13 13:10:37 -04:00
Joshua F. Rountree
919a131c58 Integrated the requests by Andrew 2018-07-13 12:17:42 -04:00
George Hotz
34efbd6869 fix up table 2018-07-12 23:02:20 -07:00
Joshua F. Rountree
23444a7a70 Minor README.md update.
Loving the way this adds some realism and cleans things up a bit on the image.
Let's do this! xD <3

Thanks for the AMAZING and EXCITING update.  Driving on it first thing in the morning.
Congratulations Comma Team!
2018-07-13 01:56:01 -04:00
Vehicle Researcher
0ac89e92ae openpilot v0.5 release 2018-07-12 18:52:06 -07:00
Vehicle Researcher
df2413e2d7 Merge opendbc subtree 2018-07-12 18:48:44 -07:00
Vehicle Researcher
5e977f42b3 Merge panda subtree 2018-07-12 18:48:43 -07:00
Vehicle Researcher
7fca1ba2f4 Squashed 'panda/' changes from e7ca587b..5c905b75
5c905b75 update J2534 install instructions
a4f3cc79 update panda readme for amazon

git-subtree-dir: panda
git-subtree-split: 5c905b75253db1094926243d53faa9fa24fad19d
2018-07-12 18:48:42 -07:00
AlexMcInerney
3da91deed6 Added 2018 Chevy Volt Support with New Fingerprint (#283)
* Update values.py

* Add 2018 Volt Support Fingerprint
2018-07-06 16:29:31 -07:00
dekerr
6cdc2a8bc7 Small cleanup (#275)
* mass unit conversions

* flat/explicit conditions

* fix typos

* remove hardcode

* Update README.md

* Update carcontroller.py
2018-06-28 12:33:54 -07:00
Vehicle Researcher
16132b3aaa openpilot v0.4.7.2 release 2018-06-25 13:48:52 -07:00
Vehicle Researcher
00af220ee1 Merge opendbc subtree 2018-06-25 13:45:15 -07:00
Vehicle Researcher
7953078a31 Squashed 'panda/' changes from 0dcd84d7..e7ca587b
e7ca587b long isotp msgs
1a94543a Panda safety: minor generalization of the function max_limit_check
6b316011 Safety: minor data type cleanup

git-subtree-dir: panda
git-subtree-split: e7ca587b2bf70ae321e0260a7997cf893f8c8389
2018-06-25 13:45:14 -07:00
Vehicle Researcher
0b4715a1b4 Merge panda subtree 2018-06-25 13:45:14 -07:00
Ted Slesinski
05ae05ce05 Add accord hybrid to fingerprint (#271) 2018-06-24 20:43:51 -07:00
Ted Slesinski
6c299f6f62 Adjusting Kp, Ki values to reduce steer oscillation on CRV_5G 2018-06-21 19:53:21 +02:00
Vehicle Researcher
ec92462301 openpilot v0.4.7.1 release 2018-06-19 01:41:45 +00:00
Vehicle Researcher
7266508701 Merge opendbc subtree 2018-06-19 01:38:16 +00:00
rbiasini
16f124d385 Acura ILX steer fault fix: send STEER_TORQUE_REQUEST = 0 when temp faults are present (#264) 2018-06-17 23:35:05 -07:00
Vehicle Researcher
0d9734960e openpilot v0.4.7 release 2018-06-16 20:59:34 -07:00
Vehicle Researcher
c8f4b4e420 Merge opendbc subtree 2018-06-16 20:56:04 -07:00
Vehicle Researcher
4920e69752 Merge panda subtree 2018-06-16 20:56:03 -07:00
Vehicle Researcher
d5b884f824 Squashed 'panda/' changes from ef880b76..0dcd84d7
0dcd84d7 Toyota safety: integer division bug
9a268f33 Toyota Safety: cleaner var types
8638650d bump panda version
9ab6a562 gmlan recv test
a1a2d979 gmlan test
8efa3897 detect ack
f5fab4b4 nicer err
ad4d4231 add gmlan fail count
bb41ff75 test
998f7c01 oops, set recessive
80051bea autoretry on chime
813218de GM: allowing higher brakes in Volt, so decel can reach between 3 and 3.5 m/s2
74ad3d65 GM: max param definitions
38a9ea9a added gm safety for steering (#123)
bf5db45a Safety: made the driver steer check common so it can be shared across multiple safety files
ef079e6d Safety: made rate limit check also common
dc3cc240 Safety: made common the max torque check as well
dbc3568a removing extra spaces
1966bdf3 Safety: made real time rate limit check a shared function
e2144776 use timer for can bitbanging
cb927337 minor bitbang refactor
ed2920cf support extended addressing in canbitbang
36df0996 move speed
be46c7a3 Merge pull request #122 from commaai/gmbitbang
7edc88e5 put that back
fa66e4b7 Revert "handle rollover"
2ce3a26a handle rollover
223a1fb6 cleanin it up
1ba79077 that space tho
d917386b bitbanging works
74af4417 can crc
932d7278 bit stuffing support
be225227 bros ok match bros
55da0b65 rigol yea, dj pauly d yea
a5775835 working on gmbitbang
875c2bd3 Cadillac: block OP messages if OP is on
7caba241 Addition to Bosch safety to support Hatchback (#111)
63ca46bc modify before we forward
bf70f515 Safety: increase buffer for sampled signals. TBD a violation feedback from board to prevent car faults
b0541a83 Cadillac: monitoring the 4 torque messages independently
cd1dba9f Cadillac: fixed bug in regression safety
ca0b6beb Cadillac: fixed typo. Need better regression tests to catch this
d9f1e616 Cadillac: simplified the ignition code by removing the timeout logic and resetting controls_allowed = 0 at each init
293fd1ac GM: using real ignition logic. Creedit to Jamezz
8fa507b6 GM: simplified max steer check logic, Cadillac: fixed can parsing bug
c7e2c2d6 Cadillac (#119)
83bcaa39 small logic cleanup (#118)
9d92bf27 Cadillac: need to specify car name in const
79ab5af8 Toyota: moved common functions into safety header file
40c8ddaf Cadillac ignition: simplified logic
69be556d Cadillac: better ignition logic
d176220c Ignition: made a default hook for GPIO
bea51874 Cadillac: added max steer safety
dbc11a17 Cadillac: always controls allowed for now
ace232a9 Cadillac: ignition bug
e2c89d6b Cadillac: changed ignition logic to be based on can presence
528f901b Cadillac: simpler ignition logic
4e79ecf1 Cadillac: added safety file placeholder

git-subtree-dir: panda
git-subtree-split: 0dcd84d7912cd72d3aeaad4653007d1f178a1567
2018-06-16 20:56:02 -07:00
Ted Slesinski
e68afd7a08 Add missing messages fron Pilot EX-L to fingerprint (#260) 2018-06-06 10:20:38 -07:00
dekerr
0fe3e51115 Std unit conversions (#259)
* Added conversion constants

* implemented std unit conversion

* changed centerToFront ratio

Changed weight distribution ratios used to calc center of gravity distances to align closer to manufacturer specs

* implemented std unit conversion

* remove unused conversion

* reverted wheelbase conversion

slight change to pilot wheelbase

* removed redundant conversion

* removed incorrect/unused conversion

* removed class that now exists in honda/values.py

* redirect Cruisebuttons call

* redirect Cruisebuttons call

* Update interface.py

* Update numpy_fast.py

Refactor

* Update numpy_fast.py

* Update numpy_fast.py

-encapsulated get_interp 
-reduced calls to len() for iterable input
2018-06-04 12:39:54 -07:00
Tyler
2f641984d9 Update process_dbc.py 2018-05-31 20:16:08 +02:00
Vasily Tarasov
37ac143808 s/persistant/persistent/g (#254) 2018-05-30 13:40:18 -07:00
Willem Melching
0c959c062b clean git repo before neos update 2018-05-24 00:22:48 +02:00
Vehicle Researcher
c6a761a06f openpilot v0.4.6 release 2018-05-23 03:59:04 +00:00
Vehicle Researcher
ea6c19638c Squashed 'pyextra/' changes from 4eda4dd..eb09257
eb09257 Add gunicorn to pyextra
9558197 add flask to pyextra

git-subtree-dir: pyextra
git-subtree-split: eb092578c359bd54db22569d696ecacbd90237c3
2018-05-23 03:55:35 +00:00
Vehicle Researcher
e40ed2d6de Merge pyextra subtree 2018-05-23 03:55:35 +00:00
Vehicle Researcher
ece216260e Merge opendbc subtree 2018-05-23 03:55:33 +00:00
Vehicle Researcher
dcacbf606a Squashed 'panda/' changes from 9cffa74..ef880b7
ef880b7 Merge pull request #116 from commaai/buy_panda
9311f0d update readme graphics
4150684 add javascript and bump pandacan version
ace4a22 Ford safety (#115)

git-subtree-dir: panda
git-subtree-split: ef880b76356a992509d809d3369b5954636969f3
2018-05-23 03:55:30 +00:00
Vehicle Researcher
5bff3e4bc3 Merge panda subtree 2018-05-23 03:55:30 +00:00
Vehicle Researcher
ce0a47f674 openpilot v0.4.5.1 release 2018-05-01 23:19:47 +00:00
Vehicle Researcher
48de7ee011 openpilot v0.4.5 release 2018-04-28 09:44:39 +00:00
Vehicle Researcher
e1387452be Merge opendbc subtree 2018-04-28 09:40:30 +00:00
Vehicle Researcher
bb2587664a Squashed 'panda/' changes from 2253dd3..9cffa74
9cffa74 bump version
988fbf5 disable autobaud by default

git-subtree-dir: panda
git-subtree-split: 9cffa74e04a9c46d728162834b80df818dde0375
2018-04-28 09:40:29 +00:00
Vehicle Researcher
045cc233c8 Merge panda subtree 2018-04-28 09:40:29 +00:00
Vehicle Researcher
624abefdb0 openpilot v0.4.4 release 2018-04-14 06:10:58 +00:00
Vehicle Researcher
2da8c42a82 Merge opendbc subtree 2018-04-14 06:06:43 +00:00
Vehicle Researcher
e6e6ad2e1f Squashed 'panda/' changes from 3125232..2253dd3
2253dd3 fix volt ign detect
3b299d7 add ignition and refactor
af9af6d Merge pull request #110 from Jamezz/volt
13e850e more correct
f295063 add new define to tests
fec9758 gate that with debug
5516ebf one more ifdef
cac7b31 only panda has float
938d474 fpu enable
ffbf0c7 cleaner
de30f27 Revert "need f to not be double"
4142acf need f to not be double
3eb15c8 refactor to share code
a4c8b64 change to O2 to fix make recover
711fd11 Enable compiler optimizations, fix things it breaks
2e6f774 block IPAS in main toyota safety mode
e7a2b3a add ipas tests
894572c fix tests
367c9ad add safety toyota ipas
95919b9 Bounty: panda high quality CAN autobaud (#96)
6557cd2 Toyota Safety: allow controls only on rising edge of cruise_engaged
02c1ddf Revert "added steer override check when IPAS is in control (#106)"
9f925ba Fix the merge mess
23d3833 Merge from comma upstream
a0cc51a Undo safety mode override
ea1c1dc make wlan interface name generic
6dbd8c9 Implement WebUSB and upgrade WinUSB to 2.0 (#107)
4fc83a5 Add safety hook for ignition and have GM use gear selector to determine ignition
52b2ac0 switch from travis to circleci
48e2374 build panda esp image
065572a circleci build stm image
7a1f319 add panda python package test and fix safety test
021dde7 move saftey test helper files into safety folder
ce0545f add ci files
6a3307c no LIN over ELM
7d21acb added steer override check when IPAS is in control (#106)
1c88caf Safety code testing (#104)
f4efd1f Merge pull request #101 from adhintz/master
c02618b Merge pull request #102 from quillford/master
1ba5f8a added link to wiki for user scripts
de2b19e add support for multiple buses to can_unique and can_bittransition output data in sorted order.

git-subtree-dir: panda
git-subtree-split: 2253dd3c48e21abb82fe161d6f58237490111206
2018-04-14 06:06:42 +00:00
Vehicle Researcher
c9253a8d52 Merge panda subtree 2018-04-14 06:06:42 +00:00
Ted Slesinski
703b05187d 2017 Honda Ridgeline (#198)
* Adds Honda Ridgeline

Replaced trim level placeholder

Adding 0x301 ridgeline message

(I restructured this slightly since we don't need to repeat `commands.append(make_can_msg(0x300, msg_0x300, idx, 1))` so many times

Updated dbc name

Use pedal_gas to detect gas pressed

Remove unnecessary signal check

Fix array notation

* Tire stiffness factor bumped to 1.5x

* Adds safety tests at line 133

* Revert "Adds safety tests at line 133"

This reverts commit 349edf5b1a879cac704db3786d0626211497bcb7.

* fix failing build due to syntax

* update variables for failing build

* Update interface.py

* Update Tire Slip Factor
2018-04-12 19:12:45 -07:00
Vehicle Researcher
9f59ef7516 openpilot v0.4.3.2 release 2018-03-31 07:54:47 +00:00
Vehicle Researcher
2352ad0bb0 Merge opendbc subtree 2018-03-31 07:29:19 +00:00
vanillagorillaa
deab5888bb update year on civic 2018-03-22 23:34:47 +01:00
Willem Melching
80ed445604 fix bug in canpacker for Toyotas with DSU connected (#221) 2018-03-22 15:13:23 -07:00
Vehicle Researcher
2e591b3923 openpilot v0.4.3.1 release 2018-03-19 23:40:24 -07:00
Vehicle Researcher
5ddfd922fe openpilot v0.4.3 release 2018-03-18 10:36:29 -07:00
Vehicle Researcher
17c209da85 Merge opendbc subtree 2018-03-18 10:32:25 -07:00
Vehicle Researcher
a8d110ad74 Squashed 'panda/' changes from 67d5208..3125232
3125232 bump version
703c0b4 Gas Interceptor: another fix to gas pressed logic
196d383 Interceptor: fixed gas pressed logic

git-subtree-dir: panda
git-subtree-split: 31252324d98e701c33cb6aeda20af6b549175764
2018-03-18 10:32:24 -07:00
Vehicle Researcher
d55aa7b715 Merge panda subtree 2018-03-18 10:32:24 -07:00
George Hotz
6eca4b7b42 Merge pull request #192 from gregjhogan/wifi-only-upload-fix
fix restricting video upload to wifi
2018-03-17 12:01:42 -07:00
Vehicle Researcher
0a53d754af openpilot v0.4.3 release 2018-03-17 00:01:50 -07:00
Vehicle Researcher
75432db70d Merge opendbc subtree 2018-03-16 23:57:47 -07:00
Vehicle Researcher
38cac4d9a8 Merge panda subtree 2018-03-16 23:57:46 -07:00
Vehicle Researcher
098e304118 Squashed 'panda/' changes from 98f29a4..67d5208
67d5208 fix signedness issue in toyota safety
fe15d3f bump pandacan
11c2b08 add fault invalid
2c26e45 add sleep
27c7637 forgot the counter
3a6d7db don't hang
bfa7d2e canloader works
b259e2a can flasher is close to working
83f2edf isotp can support in softloader
7ae7c79 typo
e85cc47 forgot the selfs
190b4f6 start work on canflasher
5c655c9 add recover support
ae3457f usbflash is reliable
f7a0ab0 pedal usbflash works
585d0f9 add way to call isotp
be82899 despite it being bad code, move isotp
000715b start work on pedal canloader
626e312 pedal has a bootstub now
3662d1e redundant check
81e6b0d fix bug
083cd12 should have bounty to refactor that ish
b65d30c bad asserts
b2e6c3f isotp untested support for subaddr
30fd66a Merge pull request #93 from vntarasov/volt
06f5109 Merge pull request #94 from gregjhogan/can-printer-hex
c7d098c Merge pull request #95 from gregjhogan/setup-script
22fe250 Merge pull request #99 from gregjhogan/bit-transition-example
ba16ba3 Merge pull request #100 from gregjhogan/j2534-troubleshooting-instructions
ad08ea4 Merge pull request #90 from gregjhogan/can-forwarding
f3b6f5d added j2534 troubleshooting instructions
858d150 added script to find bits that transition from 0 to 1
c6acac8 added checking pedal interceptor message length
f7226ff added brake safety checks
d0c2634 added gas safety checks
d378e4a removed bosch safety forwarding restriction on 29 bit addresses
5c7ef9e added bosch safety hooks and forwarding
90c64b6 add note
23de8d4 Merge pull request #97 from commaai/pedal_improvements
0261641 added missing python packages
b92b235 fix bytearray encode issue
2434f1c Tweak Volt's brake pedal stickiness
e2f73d2 enable has a whole byte to itself
d5a9e1e correct checksum
f8ed9fa better names
986a14c don't alias pointers
9b8472e add watchdog support
8f0add9 handle faults
1d917f8 split gas set into 2 values, and have a fault state
1b77026 j2534 isn't alpha anymore
fbcc872 Merge pull request #92 from commaai/pedal
8a6f44b pedal is sending messages
08f464c python 3 bro is bad bro
9390961 kline checksum algo was broken...
3b7c33b add kline debug support
aa622bc init values
631ea9f better refactor
eb1fd75 add PEDAL adc sets
ccaa310 don't build with usb
8d4d763 debug console works
bd09883 comma pedal is building
75a29d5 Merge pull request #84 from gregjhogan/j2534-hds
eece37d only the panda has gmlan
9f43abe Merge pull request #89 from vntarasov/volt
5364d43 Merge pull request #88 from vntarasov/smaller-firmware
377a1ec bump version for descriptor fix
4fabdf0 Merge pull request #87 from gregjhogan/usb-multi-packet-control
8580773 fix sending WinUSB Extended Properties Feature Descriptor
6908feb Chevy Volt safety
786a004 Enable optimization to reduce firmware size
d70f43b hack to fix thinkpad
95ab1ae fixed flow control message padding
bbd04d1 updated installer
62216d0 single standalone DLL for J2534 driver
5c9138d fixed 11 bit address issue
f3b0ad2 fix LOOPBACK getting set when DATA_RATE is set
b750d36 updated README
a9a097f lowered CPU utilization
7c26a70 TIS needs unsupported protocols to return an error
42692b4 TIS doesn't like ChannelID being zero
cf126bb SET_CONFIG return error for reserved parameters
2e99dbf fix HDS issues
8203cc8 add is_grey
e946a54 add insecure_okay flag
4363b3e check webpage
4f59ded add secure mode note
6b11fb5 add autosecuring to tests
b27d185 Merge pull request #86 from commaai/better_pairing
4b53b42 elm wifi isn't an automated test
99f85cb Merge pull request #85 from gregjhogan/usb-wcid
0d38060 auto-install WinUSB device driver
c6653ca from python import
38cc0ee add wifi_secure_mode, boots in insecure mode

git-subtree-dir: panda
git-subtree-split: 67d52089a1300b86800d897f2b271e0a24cf6dd6
2018-03-16 23:57:45 -07:00
Mark Krieger
e9e884b0ee Slight changes to UI and Fingerprint for Odyssey Elite (#196)
* Adding back drive time to UI

* Add fingerprint for Odyssey Elite

* Removed extended fingerprint for Elite

* Revert "Adding back drive time to UI"

This reverts commit b9b02f7ff2511f28922f0bea47cd8c70bb9f4010.
2018-03-16 21:28:50 -07:00
Vasily Tarasov
e311cb647f Interpolate ki/kp for steering PID loop (#200)
* Interpolate ki/kp for steering PID loop

Very much needed for the Volt port: car ping-pongs with low kp
on high speeeds, and the loop is unstable with high kp on
low speeds.

Also, removes "number or array?" logic from PIController,
now that all the callers use interpolation ofr ki/kp.

* Pass speed to steering PID loop for ki/kp interpolation

* Remove unused numbers import
2018-03-15 13:28:15 -07:00
arne182
48de5711c9 Update fingerprints.py (#210)
Consolidated my fingerprint and removed duplicates and ordered the fingerprint for the RAV4H. Double Checked.
2018-03-09 13:34:39 -08:00
George Hotz
b7f4e0fb84 Merge pull request #203 from energee/safety-honda-bosch
Safety Reference for Honda Bosch
2018-03-08 08:33:31 -08:00
Ted Slesinski
5407485f96 Safety Reference for Honda Bosch 2018-02-28 10:24:05 -05:00
George Hotz
478012f716 Merge pull request #202 from vntarasov/volt-gm-id
Dibs on SAFETY_GM numerical value
2018-02-27 22:58:02 -08:00
Vasily Tarasov
d0b952fbc5 Dibs on SAFETY_GM numerical value
To match Panda repo.
2018-02-26 10:22:19 -08:00
Greg Hogan
420631d588 fix restricting video upload to wifi 2018-02-10 09:31:56 -06:00
vanillagorillaa
a102cc7c8c Honda Pilot 2017 Port (#161)
* Update README.md

* Update fingerprints.py

* Update carstate.py

* Update hondacan.py

* Update interface.py

* Update interface.py

* Update interface.py

* Update README.md

* Update README.md

* Update README.md

* Update fingerprints.py

* Update carstate.py

* Update hondacan.py

* Update interface.py

* Update carstate.py

* Update hondacan.py

* Update README.md

* Update fingerprints.py

* Update carstate.py

* Update carstate.py

* Update carstate.py

* Update hondacan.py

* Update interface.py

* Update carstate.py

* Update carstate.py

* Update Pilot Fingerprint

* Update fingerprints.py

* Give pilot its own definition and not use ILX

* add pilot argument

* Add Pilot interface

* Add pilot argument

* Update interface.py

* Parse Different gear on pilot

* Add steer max

* Fixed duplication of steer max value

* Adjust PID's for steering

* Update carcontroller.py

* Change Steer Ratio and wheelbase

* Update Steer fault values

Steer fault value of 3, does not seem to effect anything

* Update Kp,Ki Ratio

* Update interface.py

* Update readme for Pilot

* add pilot

* Update fingerprints.py

* Update carstate.py

* add signals

* add signal
2018-02-09 12:50:37 -08:00
Vehicle Researcher
ec46db033a openpilot v0.4.2 release 2018-02-06 12:43:45 -08:00
Vehicle Researcher
2446f64e45 Merge opendbc subtree 2018-02-06 12:39:39 -08:00
Vehicle Researcher
db67cffb4d Squashed 'panda/' changes from b42db6d..98f29a4
98f29a4 v1.0.7 has working grey panda

git-subtree-dir: panda
git-subtree-split: 98f29a4a97af58aa4707bdaba948ac366ab2e6a0
2018-02-06 12:39:38 -08:00
Vehicle Researcher
909cc30181 Merge panda subtree 2018-02-06 12:39:38 -08:00
vanillagorillaa
c7bf1369d6 Acura RDX 2018 AcuraWatch Plus Port (#162)
* Adding Acura RDX alpha support
2018-02-05 18:38:40 -08:00
ErichMoraga
c00bc15a2a Update fingerprints.py
Taiwanese Prius Prime fingerprint was identical to the regular prime (107 msgs.), but should really have 110.  I have the correct one in there now.
2018-02-05 14:16:58 -08:00
George Hotz
15aea578e0 openpilot v0.4.1 hotfix 2018-02-02 19:30:44 -08:00
George Hotz
0e60a6235d openpilot v0.4.1 tweaks 2018-01-30 21:34:01 -08:00
Vehicle Researcher
0250a1aa64 openpilot v0.4.1 release 2018-01-30 12:58:14 -08:00
Vehicle Researcher
4dc2cccd48 Merge opendbc subtree 2018-01-30 12:54:13 -08:00
Vehicle Researcher
96f8e5158e Squashed 'panda/' changes from 2573d86..b42db6d
b42db6d Merge pull request #82 from commaai/uart_dma
fd68f86 smallr
be99ffc ok that doesn't hurt i think
a9f6bf0 this
8b7e849 working now
7fa4808 froze up, maybe thats the fix
1465aa4 ok, it's fixed
915cd84 ugh, ok, need that
fd05376 comment out debug
37c5263 big fifo
497f069 dma is all critical, no interrupts
7c34afe minor change
743d244 high baud rate works
5d2a4ba v1.0.6
fbf1390 Toyota Safety: fix in input param
6c01d09 Toyota: less torque error allowance to meet Corolla acceptable behavior
07c01b2 Toyota safety: using input param
4410a59 add safety param support
fc81fc1 uart dma in progress
65fb2b2 grey panda query, 1.0.5
f415c9a grey panda detection
b68957e add pandadebug support
b5e4962 leave msgs around in isotp
0acce2d add recvaddr support
3fc38f4 set bootmode with power
d4c052a make that work
21f8195 fix panda serial write
af74aa9 from python import

git-subtree-dir: panda
git-subtree-split: b42db6dc082fb13ef5ac63ed197a63e179651ef6
2018-01-30 12:54:12 -08:00
Vehicle Researcher
dcf112237f Merge panda subtree 2018-01-30 12:54:12 -08:00
George Hotz
3368e23a5b Merge pull request #155 from slesinski/odyssey-port
Honda Odyssey 2018 EX-L with Honda Sensing
2018-01-18 21:49:14 -08:00
Ted Slesinski
fcddfab737 Unnecessary characters in comma's dongle id 2018-01-19 00:47:47 -05:00
Ted Slesinski
684a20da1d SteerRatio should be 14.35 2018-01-19 00:37:32 -05:00
Ted Slesinski
c0b865aa07 Added the extra carstate reads 2018-01-19 00:34:02 -05:00
Ted Slesinski
9bac947c5d Tuning specific to odyssey 2018-01-19 00:34:02 -05:00
Ted Slesinski
a0fa4b6bcc Gear shifter values like acura 2018-01-19 00:32:51 -05:00
Ted Slesinski
c5024a837d Car_gas 130 missing canbus, using 17c 2018-01-19 00:32:51 -05:00
Ted Slesinski
c00f90638d BRAKE_HOLD signal not ready yet 2018-01-19 00:32:51 -05:00
Ted Slesinski
d8b3a0220a Park Brake not yet in DBC 2018-01-19 00:32:51 -05:00
Ted Slesinski
eca5067f2b Wrong value for MAIN_ON 2018-01-19 00:32:51 -05:00
Ted Slesinski
c31e56727a Packet size off on a fingerprint id 2018-01-19 00:32:51 -05:00
Ted Slesinski
63dce92056 Add hondacan changes 2018-01-19 00:30:33 -05:00
Ted Slesinski
b599d835aa Add carcontroller changes 2018-01-19 00:30:33 -05:00
Ted Slesinski
981871c512 Add odyssey car params to interface 2018-01-19 00:30:33 -05:00
Ted Slesinski
d4b8088969 Add carstate changes 2018-01-19 00:30:33 -05:00
Ted Slesinski
0fd3ea3b1a Add odyssey fingerprint 2018-01-19 00:30:33 -05:00
Vehicle Researcher
176edf427e openpilot v0.4.0.2 release 2018-01-18 15:46:12 -08:00
Vehicle Researcher
87d313e132 Merge opendbc subtree 2018-01-18 15:42:13 -08:00
Vehicle Researcher
5f014635e1 Squashed 'panda/' changes from c371fe6..2573d86
2573d86 docs say max is 4, respect the docs
864cd8f failing on some devices
54bcc67 Merge pull request #75 from gregjhogan/j2534-vs-2017-upgrade
1664270 Merge pull request #74 from gregjhogan/j2534-disconnect-fix
a7e3a8f bump panda version for serial bug
aa0cfad fix UART hang
09ab8f6 add sendaddr support to isotp
40a1883 fix up baud rate
65997ff add PandaSerial and location panda (aka pigeon) test
57d633c upgraded to VS 2017
35cc32a fixed pointer exception on disconnect

git-subtree-dir: panda
git-subtree-split: 2573d861e605a2dcf456a6421b31e83fdd9ca606
2018-01-18 15:42:12 -08:00
Vehicle Researcher
252e8d57ce Merge panda subtree 2018-01-18 15:42:12 -08:00
Vehicle Researcher
6b1716a43c openpilot v0.4.0.1 tweaks 2018-01-16 23:26:39 -08:00
heatnation
23fe981cd5 Update fingerprints.py 2018-01-15 18:22:15 -08:00
Vehicle Researcher
68ffef7ae8 openpilot v0.4.0.1 release 2017-12-23 17:15:27 -08:00
Vehicle Researcher
57b9ddf20e Squashed 'pyextra/' content from commit 4eda4dd
git-subtree-dir: pyextra
git-subtree-split: 4eda4dd765c2bc719da9064774de6b2c14c322d1
2017-12-23 17:10:45 -08:00
Vehicle Researcher
ef1227777f Merge commit '57b9ddf20ef28d7a9b4fd57c08630281ef103422' as 'pyextra' 2017-12-23 17:10:45 -08:00
Vehicle Researcher
94c28dd0a0 Merge commit 'ba97d0e83837b4c893edc609001dde7c41b8e24b' as 'opendbc' 2017-12-23 17:10:44 -08:00
Vehicle Researcher
c251b312d8 Squashed 'panda/' content from commit c371fe6
git-subtree-dir: panda
git-subtree-split: c371fe688dbad4c53635905d3471a01c185e811d
2017-12-23 17:10:42 -08:00
Vehicle Researcher
36c3fc1842 Merge commit 'c251b312d87d26b5ed347b267f6f1570793f9b91' as 'panda' 2017-12-23 17:10:42 -08:00
Vehicle Researcher
73a0364d24 remove submodules 2017-12-23 17:06:56 -08:00
Vehicle Researcher
9bb5274201 openpilot v0.3.9 tweaks 2017-12-06 12:48:00 -08:00
Vehicle Researcher
4ad0e4c24c openpilot v0.3.9 release 2017-11-22 04:30:24 -08:00
Vehicle Researcher
cf7a5b9b7c update releases 2017-11-04 05:31:15 -07:00
Vehicle Researcher
d07b14657e openpilot v0.3.8.2 tweaks 2017-11-03 18:21:38 -07:00
Vehicle Researcher
e9e57ebc4d openpilot v0.3.8.2 release 2017-10-31 02:27:39 -07:00
Vehicle Researcher
61c2994880 openpilot v0.3.7 tweaks 2017-10-03 23:46:23 -07:00
Vehicle Researcher
629d2b8af4 openpilot v0.3.7 tweaks 2017-10-03 00:35:46 -07:00
George Hotz
8b7486f5c0 Bump panda version to fix old board updating 2017-09-30 23:30:38 -07:00
Vehicle Researcher
471024f7b7 openpilot v0.3.7 release 2017-09-30 19:05:03 -07:00
espes
d6dca124a7 Fix rear view mirror setting 2017-08-28 22:24:11 -07:00
Vehicle Researcher
d9f8719f51 openpilot v0.3.6.1 tweaks 2017-08-16 05:21:06 -07:00
Vehicle Researcher
be014c1b23 openpilot v0.3.6.1 release 2017-08-15 03:15:00 -07:00
Vehicle Researcher
6bd42e1d92 openpilot v0.3.6 tweaks 2017-08-10 20:38:56 -07:00
Vehicle Researcher
efac35a337 openpilot v0.3.6 release 2017-08-09 17:41:38 -07:00
Vehicle Researcher
d297393649 openpilot v0.3.5 release 2017-07-30 17:59:37 -07:00
Vehicle Researcher
93df8edcf6 openpilot v0.3.4 tweaks 2017-07-28 20:51:27 -07:00
Vehicle Researcher
8cc5a0802d openpilot v0.3.4 release 2017-07-28 03:23:57 -07:00
George Hotz
b1c272b893 Merge pull request #116 from commaai/revert-114-new_panda_code
Revert "Pulled in new panda firmware and updated boardd to support the changes."
2017-07-17 23:17:13 -07:00
George Hotz
9f0e201537 Revert "Pulled in new panda firmware and updated boardd to support the changes." 2017-07-17 23:16:57 -07:00
George Hotz
753f81a9f2 Merge pull request #114 from diamondman/new_panda_code
Pulled in new panda firmware and updated boardd to support the changes.
2017-07-11 22:24:38 -07:00
Jessy Diamond Exum
8162b0833c Removed unnecessary TODO 2017-07-11 22:01:04 -07:00
Jessy Diamond Exum
93e322a9a0 Moved boardd loopback config to envvar. 2017-07-11 21:59:03 -07:00
Jessy Diamond Exum
8e0cd2fd3b Pulled in new panda firmware and updated boardd to support the changes. 2017-07-11 21:45:16 -07:00
George Hotz
28b00c1086 Merge pull request #113 from pjlao307/update-alert-text
Update alert text
2017-07-07 10:25:59 -07:00
Joey Lao
8a760b4bb5 Update steering controls saturated message 2017-07-06 22:36:55 -07:00
pjlao307
3b9ebd43db Merge pull request #2 from commaai/release
Release
2017-07-03 11:15:42 -07:00
George Hotz
4a145a3415 Merge pull request #109 from commaai/devel
openpilot 0.3.3
2017-06-30 18:23:10 -07:00
Vehicle Researcher
f558179f1e openpilot v0.3.3 release 2017-06-28 13:57:09 -07:00
George Hotz
3e4854e7e6 Merge pull request #102 from energee/devel-crv
Bounty: 2016 Honda CR-V Touring
2017-06-22 11:52:38 -07:00
Ted Slesinski
bc57d65c36 Addresses brake error review comment 2017-06-20 02:51:58 -04:00
Ted Slesinski
5bbdee5b1d Fixes global saturation change 2017-06-20 02:47:47 -04:00
Ted Slesinski
df363ff0c3 Adds correct value of 8 to gearshifter check array 2017-06-20 02:46:59 -04:00
Ted Slesinski
d417e4b8aa Init crv variable 2017-06-20 02:26:50 -04:00
George Hotz
7b9791660d Merge pull request #103 from pjlao307/pjlao-update-ui
Update UI to make text more readable in all conditions as requested by community
2017-06-19 20:37:37 -07:00
Joey Lao
8cd9767a99 Make lead car text a little brighter 2017-06-12 16:39:10 -07:00
Vehicle Researcher
70467635f7 Revert last commit since KPH can get 3 digits long 2017-06-12 09:30:47 -07:00
Vehicle Researcher
83ceffbf87 Adjust position of left speed to align with label (based on 2 digit speeds) 2017-06-12 09:03:49 -07:00
Vehicle Researcher
c449945b6c More code cleanup 2017-06-12 08:41:11 -07:00
Vehicle Researcher
161a8e8184 Use color param in ui_draw_rounded_rect instead of hard coding 2017-06-12 08:27:57 -07:00
Vehicle Researcher
af90994b1e Add background to radar text. Code cleanup. 2017-06-12 08:19:47 -07:00
John Jones
1aebd13649 missed one update in latcontrol 2017-06-11 21:33:44 -04:00
Vehicle Researcher
c43d143744 Clean up code 2017-06-11 15:18:39 -07:00
Vehicle Researcher
fd1a382f99 Remove commented line 2017-06-11 15:16:46 -07:00
Vehicle Researcher
e1c419d845 Update UI to make speed text more readable in all conditions as requested by community 2017-06-11 15:12:50 -07:00
John Jones
ab03b47fc3 adding steering change from video and removing integer div and adding ki/kp changes 2017-06-11 13:20:19 -04:00
Ted Slesinski
70a192348f Reverting steering to original value 2017-06-08 13:15:30 -04:00
Ted Slesinski
0bae1a40d1 Syntax typo 2017-06-08 02:33:31 -04:00
Ted Slesinski
5a8384a048 Adds support for 2016 Honda CR-V Touring 2017-06-08 01:37:39 -04:00
Vehicle Researcher
1d87a0a350 openpilot v0.3.2 release 2017-05-22 22:26:12 -07:00
George Hotz
55ed5a1153 Merge pull request #82 from energee/devel
DBC file for 2017 Honda CR-V
2017-05-22 09:00:44 -07:00
Ted Slesinski
01c20c31c2 Adds 2017 CR-V dbc file 2017-05-21 19:46:34 -04:00
Vehicle Researcher
4479d4000e openpilot v0.3.1 release 2017-05-17 00:40:33 -07:00
Vehicle Researcher
edd511f06e openpilot v0.3.0 release 2017-05-12 16:46:20 -07:00
Vehicle Researcher
8ef3f520b1 openpilot v0.3.0-devel release 2017-05-11 12:41:17 -07:00
George Hotz
ab3492bb90 Merge pull request #93 from heidecjj/master
Bug fixes for testing suite
2017-05-02 23:34:32 -07:00
George Hotz
ed7cbb3866 Merge pull request #90 from heidecjj/patch-1
Update maneuver.py
2017-05-02 23:30:36 -07:00
Josh Heidecker
a30626cfe3 Fixed relative distance errors in testing 2017-05-02 22:01:03 -04:00
heidecjj
d2c087b3e2 Update maneuver.py
self.speed_lead_breakpoints was reading from "speed_lead_values" instead of "speed_lead_breakpoints"
2017-04-20 17:09:15 -04:00
George Hotz
0a747f991d Merge pull request #65 from jeankalud/master
Fixed little endian (and scaling/offset)
2017-03-01 16:09:46 -08:00
jeankalud
f5a1e86d85 Add files via upload
Removed unused debug strings
2017-03-01 18:13:37 -05:00
Vehicle Researcher
693bcb0f83 openpilot v0.2.9 release 2017-03-01 10:54:12 -08:00
jeankalud
0d0daed86e Add files via upload
Fixed little endian handling
Fixed offset / scaling handling
2017-03-01 11:02:46 -05:00
Vehicle Researcher
95a349abcc openpilot v0.2.8 release 2017-02-28 00:03:11 -08:00
Vehicle Researcher
c6ba5dc539 openpilot v0.2.7 release 2017-02-08 15:01:17 -08:00
Vehicle Researcher
6c3afeec0f openpilot v0.2.6 release 2017-01-31 01:33:55 -08:00
Vehicle Researcher
29c58b4588 openpilot v0.2.5 release 2017-01-30 14:10:01 -08:00
Vehicle Researcher
ecc565aa3f openpilot v0.2.4 release 2017-01-29 16:10:13 -08:00
George Hotz
db61810f98 Merge pull request #49 from mullakhmetov/master
Added context manager to file reading
2017-01-27 01:17:23 -08:00
Artur Mullakhmetov
48f203ad5b Added context manager to file reading 2017-01-27 11:33:27 +03:00
George Hotz
6ab4ac2dfb Merge pull request #47 from mullakhmetov/crossplatform-gettime
Refactor cross-platform libc usage
2017-01-25 09:19:22 -08:00
Artur Mullakhmetov
9cb3c7b6e6 Refactor cross-platform libc usage 2017-01-25 16:16:00 +03:00
Vehicle Researcher
adaa4ed350 openpilot v0.2.3 release 2017-01-11 14:30:55 -08:00
Vehicle Researcher
a64b9aa9b8 openpilot v0.2.2 release 2017-01-10 11:10:04 -08:00
George Hotz
0138eca61d Merge pull request #40 from TheMutley/master
DBC modified to match the Vector format
2017-01-09 20:47:52 -08:00
Mutley
139a40de29 DBC modified to match the Vector format 2017-01-05 16:55:54 -05:00
Vehicle Researcher
17d9becd3c openpilot v0.2.1 release 2016-12-14 21:29:12 -08:00
Vehicle Researcher
449b482cc3 openpilot v0.2 release 2016-12-12 20:18:19 -08:00
espes
a7e099c946 Update README.md 2016-11-30 14:31:28 -08:00
espes
610462be5a Merge pull request #2 from autti/ford-fusion
Ford Fusion 2017 dbc can file. refs #1.
2016-11-30 11:57:31 -08:00
Ariel Nuñez
207d32668f Added ford fusion dbc can file. refs #1.
Obtained from:

https://bitbucket.org/DataspeedInc/dbw_mkz_ros/downloads
2016-11-30 14:52:47 -05:00
Vehicle Researcher
e94a30bec0 openpilot release 2016-11-29 18:34:21 -08:00
1637 changed files with 335221 additions and 4020 deletions

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

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

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

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

46
.gitignore vendored
View File

@@ -1,2 +1,48 @@
venv/
.DS_Store
.tags
.ipynb_checkpoints
.idea
.sconsign.dblite
.vscode
model2.png
a.out
*.DSYM
*.d
*.pyc
*.pyo
.*.swp
.*.swo
.*.un~
*.o
*.so
*.a
*.clb
*.class
*.pyxbldc
*.vcd
config.json
clcache
board/obj/
selfdrive/boardd/boardd
selfdrive/logcatd/logcatd
selfdrive/mapd/default_speeds_by_region.json
selfdrive/proclogd/proclogd
selfdrive/ui/ui
selfdrive/test/longitudinal_maneuvers/out
selfdrive/visiond/visiond
selfdrive/loggerd/loggerd
selfdrive/sensord/gpsd
selfdrive/sensord/sensord
/src/
one
openpilot
notebooks
xx
.coverage*
htmlcov

585
.pylintrc Normal file
View File

@@ -0,0 +1,585 @@
[MASTER]
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code
extension-pkg-whitelist=scipy
# Add files or directories to the blacklist. They should be base names, not
# paths.
ignore=CVS
# Add files or directories matching the regex patterns to the blacklist. The
# regex matches against base names, not paths.
ignore-patterns=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=
# Use multiple processes to speed up Pylint.
jobs=4
# List of plugins (as comma separated values of python modules names) to load,
# usually to register additional checkers.
load-plugins=
# Pickle collected data for later comparisons.
persistent=yes
# Specify a configuration file.
#rcfile=
# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages
suggestion-mode=yes
# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no
[MESSAGES CONTROL]
# Only show warnings with the listed confidence levels. Leave empty to show
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
confidence=
# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once).You can also use "--disable=all" to
# disable everything first and then reenable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=print-statement,
parameter-unpacking,
unpacking-in-except,
old-raise-syntax,
backtick,
long-suffix,
old-ne-operator,
old-octal-literal,
import-star-module-level,
non-ascii-bytes-literal,
raw-checker-failed,
bad-inline-option,
locally-disabled,
locally-enabled,
file-ignored,
suppressed-message,
useless-suppression,
deprecated-pragma,
apply-builtin,
basestring-builtin,
buffer-builtin,
cmp-builtin,
coerce-builtin,
execfile-builtin,
file-builtin,
long-builtin,
raw_input-builtin,
reduce-builtin,
standarderror-builtin,
unicode-builtin,
xrange-builtin,
coerce-method,
delslice-method,
getslice-method,
setslice-method,
no-absolute-import,
old-division,
dict-iter-method,
dict-view-method,
next-method-called,
metaclass-assignment,
indexing-exception,
raising-string,
reload-builtin,
oct-method,
hex-method,
nonzero-method,
cmp-method,
input-builtin,
round-builtin,
intern-builtin,
unichr-builtin,
map-builtin-not-iterating,
zip-builtin-not-iterating,
range-builtin-not-iterating,
filter-builtin-not-iterating,
using-cmp-argument,
eq-without-hash,
div-method,
idiv-method,
rdiv-method,
exception-message-attribute,
invalid-str-codec,
sys-max-int,
bad-python3-import,
deprecated-string-function,
deprecated-str-translate-call,
deprecated-itertools-function,
deprecated-types-field,
next-method-defined,
dict-items-not-iterating,
dict-keys-not-iterating,
dict-values-not-iterating,
bad-indentation,
line-too-long,
missing-docstring,
multiple-statements,
bad-continuation,
invalid-name,
too-many-arguments,
too-many-locals,
superfluous-parens,
bad-whitespace,
too-many-instance-attributes,
wrong-import-position,
ungrouped-imports,
wrong-import-order,
protected-access,
trailing-whitespace,
too-many-branches,
too-few-public-methods,
too-many-statements,
trailing-newlines,
attribute-defined-outside-init,
too-many-return-statements,
too-many-public-methods,
unused-argument,
old-style-class,
no-init,
len-as-condition,
unneeded-not,
no-self-use,
multiple-imports,
no-else-return,
logging-not-lazy,
fixme,
redefined-outer-name,
unused-variable,
unsubscriptable-object,
expression-not-assigned,
too-many-boolean-expressions,
consider-using-ternary,
invalid-unary-operand-type,
relative-import,
deprecated-lambda
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once). See also the "--disable" option for examples.
enable=c-extension-no-member
[REPORTS]
# Python expression which should return a note less than 10 (10 is the highest
# note). You have access to the variables errors warning, statement which
# respectively contain the number of errors / warnings messages and the total
# number of statements analyzed. This is used by the global evaluation report
# (RP0004).
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
# Template used to display messages. This is a python new-style format string
# used to format the message information. See doc for all details
#msg-template=
# Set the output format. Available formats are text, parseable, colorized, json
# and msvs (visual studio).You can also give a reporter class, eg
# mypackage.mymodule.MyReporterClass.
output-format=text
# Tells whether to display a full report or only the messages
reports=no
# Activate the evaluation score.
score=yes
[REFACTORING]
# Maximum number of nested blocks for function / method body
max-nested-blocks=5
# Complete name of functions that never returns. When checking for
# inconsistent-return-statements if a never returning function is called then
# it will be considered as an explicit return statement and no message will be
# printed.
never-returning-functions=optparse.Values,sys.exit
[LOGGING]
# Logging modules to check that the string format arguments are in logging
# function parameter format
logging-modules=logging
[SPELLING]
# Limits count of emitted suggestions for spelling mistakes
max-spelling-suggestions=4
# Spelling dictionary name. Available dictionaries: none. To make it working
# install python-enchant package.
spelling-dict=
# List of comma separated words that should not be checked.
spelling-ignore-words=
# A path to a file that contains private dictionary; one word per line.
spelling-private-dict-file=
# Tells whether to store unknown words to indicated private dictionary in
# --spelling-private-dict-file option instead of raising a message.
spelling-store-unknown-words=no
[MISCELLANEOUS]
# List of note tags to take in consideration, separated by a comma.
notes=FIXME,
XXX,
TODO
[SIMILARITIES]
# Ignore comments when computing similarities.
ignore-comments=yes
# Ignore docstrings when computing similarities.
ignore-docstrings=yes
# Ignore imports when computing similarities.
ignore-imports=no
# Minimum lines number of a similarity.
min-similarity-lines=4
[TYPECHECK]
# List of decorators that produce context managers, such as
# contextlib.contextmanager. Add to this list to register other decorators that
# produce valid context managers.
contextmanager-decorators=contextlib.contextmanager
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E1101 when accessed. Python regular
# expressions are accepted.
generated-members=capnp.* cereal.* pygame.* zmq.* setproctitle.* smbus2.* usb1.* serial.* cv2.*
# Tells whether missing members accessed in mixin class should be ignored. A
# mixin class is detected if its name ends with "mixin" (case insensitive).
ignore-mixin-members=yes
# This flag controls whether pylint should warn about no-member and similar
# checks whenever an opaque object is returned when inferring. The inference
# can return multiple potential results while evaluating a Python object, but
# some branches might not be evaluated, which results in partial inference. In
# that case, it might be useful to still emit no-member and other checks for
# the rest of the inferred objects.
ignore-on-opaque-inference=yes
# List of class names for which member attributes should not be checked (useful
# for classes with dynamically set attributes). This supports the use of
# qualified names.
ignored-classes=optparse.Values,thread._local,_thread._local
# List of module names for which member attributes should not be checked
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis. It
# supports qualified module names, as well as Unix pattern matching.
ignored-modules=flask setproctitle usb1 flask.ext.socketio smbus2 usb1.*
# Show a hint with possible names when a member name was not found. The aspect
# of finding the hint is based on edit distance.
missing-member-hint=yes
# The minimum edit distance a name should have in order to be considered a
# similar match for a missing member name.
missing-member-hint-distance=1
# The total number of similar names that should be taken in consideration when
# showing a hint for a missing member.
missing-member-max-choices=1
[VARIABLES]
# List of additional names supposed to be defined in builtins. Remember that
# you should avoid to define new builtins when possible.
additional-builtins=
# Tells whether unused global variables should be treated as a violation.
allow-global-unused-variables=yes
# List of strings which can identify a callback function by name. A callback
# name must start or end with one of those strings.
callbacks=cb_,
_cb
# A regular expression matching the name of dummy variables (i.e. expectedly
# not used).
dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
# Argument names that match this expression will be ignored. Default to name
# with leading underscore
ignored-argument-names=_.*|^ignored_|^unused_
# Tells whether we should check for unused import in __init__ files.
init-import=no
# List of qualified module names which can have objects that can redefine
# builtins.
redefining-builtins-modules=six.moves,past.builtins,future.builtins
[FORMAT]
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
expected-line-ending-format=
# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
# Number of spaces of indent required inside a hanging or continued line.
indent-after-paren=4
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
# tab).
indent-string=' '
# Maximum number of characters on a single line.
max-line-length=100
# Maximum number of lines in a module
max-module-lines=1000
# List of optional constructs for which whitespace checking is disabled. `dict-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
# `empty-line` allows space-only lines.
no-space-check=trailing-comma,
dict-separator
# Allow the body of a class to be on the same line as the declaration if body
# contains single statement.
single-line-class-stmt=no
# Allow the body of an if to be on the same line as the test if there is no
# else.
single-line-if-stmt=no
[BASIC]
# Naming style matching correct argument names
argument-naming-style=snake_case
# Regular expression matching correct argument names. Overrides argument-
# naming-style
#argument-rgx=
# Naming style matching correct attribute names
attr-naming-style=snake_case
# Regular expression matching correct attribute names. Overrides attr-naming-
# style
#attr-rgx=
# Bad variable names which should always be refused, separated by a comma
bad-names=foo,
bar,
baz,
toto,
tutu,
tata
# Naming style matching correct class attribute names
class-attribute-naming-style=any
# Regular expression matching correct class attribute names. Overrides class-
# attribute-naming-style
#class-attribute-rgx=
# Naming style matching correct class names
class-naming-style=PascalCase
# Regular expression matching correct class names. Overrides class-naming-style
#class-rgx=
# Naming style matching correct constant names
const-naming-style=UPPER_CASE
# Regular expression matching correct constant names. Overrides const-naming-
# style
#const-rgx=
# Minimum line length for functions/classes that require docstrings, shorter
# ones are exempt.
docstring-min-length=-1
# Naming style matching correct function names
function-naming-style=snake_case
# Regular expression matching correct function names. Overrides function-
# naming-style
#function-rgx=
# Good variable names which should always be accepted, separated by a comma
good-names=i,
j,
k,
ex,
Run,
_
# Include a hint for the correct naming format with invalid-name
include-naming-hint=no
# Naming style matching correct inline iteration names
inlinevar-naming-style=any
# Regular expression matching correct inline iteration names. Overrides
# inlinevar-naming-style
#inlinevar-rgx=
# Naming style matching correct method names
method-naming-style=snake_case
# Regular expression matching correct method names. Overrides method-naming-
# style
#method-rgx=
# Naming style matching correct module names
module-naming-style=snake_case
# Regular expression matching correct module names. Overrides module-naming-
# style
#module-rgx=
# Colon-delimited sets of names that determine each other's naming style when
# the name regexes allow several styles.
name-group=
# Regular expression which should only match function or class names that do
# not require a docstring.
no-docstring-rgx=^_
# List of decorators that produce properties, such as abc.abstractproperty. Add
# to this list to register other decorators that produce valid properties.
property-classes=abc.abstractproperty
# Naming style matching correct variable names
variable-naming-style=snake_case
# Regular expression matching correct variable names. Overrides variable-
# naming-style
#variable-rgx=
[DESIGN]
# Maximum number of arguments for function / method
max-args=5
# Maximum number of attributes for a class (see R0902).
max-attributes=7
# Maximum number of boolean expressions in a if statement
max-bool-expr=5
# Maximum number of branch for function / method body
max-branches=12
# Maximum number of locals for function / method body
max-locals=15
# Maximum number of parents for a class (see R0901).
max-parents=7
# Maximum number of public methods for a class (see R0904).
max-public-methods=20
# Maximum number of return / yield for function / method body
max-returns=6
# Maximum number of statements in function / method body
max-statements=50
# Minimum number of public methods for a class (see R0903).
min-public-methods=2
[CLASSES]
# List of method names used to declare (i.e. assign) instance attributes.
defining-attr-methods=__init__,
__new__,
setUp
# List of member names, which should be excluded from the protected access
# warning.
exclude-protected=_asdict,
_fields,
_replace,
_source,
_make
# List of valid names for the first argument in a class method.
valid-classmethod-first-arg=cls
# List of valid names for the first argument in a metaclass class method.
valid-metaclass-classmethod-first-arg=mcs
[IMPORTS]
# Allow wildcard imports from modules that define __all__.
allow-wildcard-with-all=no
# Analyse import fallback blocks. This can be used to support both Python 2 and
# 3 compatible code, which means that the block might have code that exists
# only in one or another interpreter, leading to false positives when analysed.
analyse-fallback-blocks=no
# Deprecated modules which should not be used, separated by a comma
deprecated-modules=regsub,
TERMIOS,
Bastion,
rexec
# Create a graph of external dependencies in the given file (report RP0402 must
# not be disabled)
ext-import-graph=
# Create a graph of every (i.e. internal and external) dependencies in the
# given file (report RP0402 must not be disabled)
import-graph=
# Create a graph of internal dependencies in the given file (report RP0402 must
# not be disabled)
int-import-graph=
# Force import order to recognize a module as part of the standard
# compatibility libraries.
known-standard-library=
# Force import order to recognize a module as part of a third party library.
known-third-party=enchant
[EXCEPTIONS]
# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
overgeneral-exceptions=Exception

7
.travis.yml Normal file
View File

@@ -0,0 +1,7 @@
sudo: required
services:
- docker
script:
- ./run_docker_tests.sh

31
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,31 @@
# How to contribute
Our software is open source so you can solve your own problems without needing help from others. And if you solve a problem and are so kind, you can upstream it for the rest of the world to use.
Most open source development activity is coordinated through our [Discord](https://discord.comma.ai). A lot of documentation is available on our [medium](https://medium.com/@comma_ai/)
## Getting Started
* Join our [Discord](https://discord.comma.ai)
* Make sure you have a [GitHub account](https://github.com/signup/free)
* Fork [our repositories](https://github.com/commaai) on GitHub
## Testing
### Local Testing
You can test your changes on your machine by running `run_docker_tests.sh`. This will run some automated tests in docker against your code.
### Automated Testing
All PRs are automatically checked by travis. Check out `.travis.yml` for what travis runs. Any new tests sould be added to travis.
### Code Style and Linting
Code is automatically check for style by travis as part of the automated tests. You can also run these yourself by running `check_code_quality.sh`.
## Car Ports (openpilot)
We've released a [Model Port guide](https://medium.com/@comma_ai/openpilot-port-guide-for-toyota-models-e5467f4b5fe6) for porting to Toyota/Lexus models.
If you port openpilot to a substantially new car brand, see this more generic [Brand Port guide](https://medium.com/@comma_ai/how-to-write-a-car-port-for-openpilot-7ce0785eda84). You might also be eligible for a bounty. See our bounties at [comma.ai/bounties.html](https://comma.ai/bounties.html)

80
Dockerfile.openpilot Normal file
View File

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

7
LICENSE Normal file
View File

@@ -0,0 +1,7 @@
Copyright (c) 2018, Comma.ai, Inc.
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.

9
Makefile Normal file
View File

@@ -0,0 +1,9 @@
code_dir := $(shell pwd)
# TODO: Add a global build system
.PHONY: all
all:
cd selfdrive && PYTHONPATH=$(code_dir) PREPAREONLY=1 ./manager.py

146
Pipfile Normal file
View File

@@ -0,0 +1,146 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
opencv-python= "==3.4.2.17"
PyQt5 = "*"
ipython = "*"
networkx = "*"
azure-common = "*"
azure-nspkg = "*"
azure-storage-blob = "*"
azure-storage-common = "*"
azure-storage-nspkg = "*"
bincopy = "*"
bleach = "*"
boto = "*"
"boto3" = "*"
celery = "*"
control = "*"
datadog = "*"
decorator = "*"
dlib = "*"
dominate = "*"
elasticsearch = "*"
fasteners = "*"
future = "*"
futures = "*"
gevent = "*"
pycocotools = {git = "https://github.com/cocodataset/cocoapi.git",subdirectory = "PythonAPI"}
gunicorn = "*"
"h5py" = "*"
hexdump = "*"
"html5lib" = "*"
imageio = "*"
intervaltree = "*"
ipykernel = "*"
joblib = "*"
json-logging-py = "*"
jupyter = "*"
libarchive = "*"
lru-dict = "*"
lxml = "*"
"mpld3" = "*"
msgpack-python = "*"
nbstripout = "*"
nose-parameterized = "*"
numpy = "*"
osmium = "*"
pbr = "*"
percache = "*"
pprofile = "*"
psutil = "*"
pycurl = "*"
git-pylint-commit-hook = "*"
pymongo = "*"
"pynmea2" = "*"
pypolyline = "*"
pysendfile = "*"
python-logstash = "*"
pyvcd = "*"
redis = "*"
redlock = "*"
"s2sphere" = "*"
scikit-image = "*"
"subprocess32" = "*"
supervisor = "*"
tenacity = "*"
tensorflow-gpu = ""
utm = "*"
"v4l2" = "*"
PyJWT = "==1.4.1"
PyMySQL = "==0.9.2"
Theano = "*"
Werkzeug = "*"
"backports.lzma" = "*"
Flask-Cors = "*"
Flask-SocketIO = "*"
"GeoAlchemy2" = "*"
Pygments = "*"
PyNaCl = "*"
"PySDL2" = "*"
reverse_geocoder = "*"
Shapely = "*"
SQLAlchemy = "*"
uWSGI = "*"
scipy = "*"
fastcluster = "*"
backports-abc = "*"
pygame = "*"
simplejson = "*"
python-logstash-async = "*"
seaborn = "*"
tensorflow-estimator = "*"
pyproj = "*"
mock = "*"
blinker = "*"
gast = "==0.2.2"
matplotlib = "*"
dictdiffer = "*"
aenum = "*"
coverage = "*"
[packages]
overpy = {git = "https://github.com/commaai/python-overpy.git",ref = "f86529af402d4642e1faeb146671c40284007323"}
atomicwrites = "*"
cffi = "*"
crcmod = "*"
hexdump = "*"
libusb1 = "*"
numpy = "*"
psutil = "*"
pycapnp = "*"
cryptography = "*"
pyserial = "*"
python-dateutil = "*"
pyzmq = "*"
raven = "*"
requests = "*"
setproctitle = "*"
six = "*"
smbus2 = "*"
sympy = "*"
tqdm = "*"
Cython = "*"
PyYAML = "*"
websocket_client = "*"
Logentries = {git = "https://github.com/commaai/le_python.git",ref = "feaeacb48f7f4bdb02c0a8fc092326d4e101b7f2"}
urllib3 = "*"
chardet = "*"
idna = "*"
gunicorn = "*"
utm = "*"
json-rpc = "*"
Flask = "*"
PyJWT = "*"
"Jinja2" = "*"
nose = "*"
flake8 = "*"
pylint = "*"
pycryptodome = "*"
pillow = "*"
[requires]
python_version = "3.7.3"

2815
Pipfile.lock generated Normal file

File diff suppressed because it is too large Load Diff

266
README.md
View File

@@ -1,53 +1,243 @@
opendbc
[![](https://i.imgur.com/UetIFyH.jpg)](#)
Welcome to openpilot
======
The project to democratize access to the decoder ring of your car.
[openpilot](http://github.com/commaai/openpilot) is an open source driver assistance system. Currently, it performs the functions of Adaptive Cruise Control (ACC) and Automated Lane Centering (ALC) for selected Honda, Toyota, Acura, Lexus, Chevrolet, Hyundai, Kia, Subaru, Volkswagen. 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.
Table of Contents
=======================
### DBC file basics
* [Community](#community)
* [Hardware](#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)
* [Testing on PC](#testing-on-pc)
* [Contributing](#contributing)
* [Licensing](#licensing)
A DBC file encodes, in a humanly readable way, the information needed to understand a vehicle's CAN bus traffic. A vehicle might have multiple CAN buses and every CAN bus is represented by its own dbc file.
Wondering what's the DBC file format? [Here](http://www.socialledge.com/sjsu/index.php?title=DBC_Format) and [Here](https://github.com/stefanhoelzl/CANpy/blob/master/docs/DBC_Specification.md) a couple of good overviews.
---
### How to start reverse engineering cars
Community
------
[opendbc](https://github.com/commaai/opendbc) is integrated with [cabana](https://community.comma.ai/cabana/).
openpilot is developed by [comma.ai](https://comma.ai/) and users like you.
Use [panda](https://github.com/commaai/panda) to connect your car to a computer.
[Follow us on Twitter](https://twitter.com/comma_ai) and [join our Discord](https://discord.comma.ai).
### DBC file preprocessor
<table>
<tr>
<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=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>
DBC files for different models of the same brand have a lot of overlap. Therefore, we wrote a preprocessor to create DBC files from a brand DBC file and a model specific DBC file. The source DBC files can be found in the generator folder. After changing one of the files run the generator.py script to regenerate the output files. These output files will be placed in the root of the opendbc repository and are suffixed by _generated.
Hardware
------
### Good practices for contributing to opendbc
At the moment openpilot supports the [EON DevKit](https://comma.ai/shop/products/eon-dashcam-devkit). A [car harness](https://comma.ai/shop/products/car-harness) is recommended to connect the EON to the car. We'd like to support other platforms as well.
- Comments: the best way to store comments is to add them directly to the DBC files. For example:
```
CM_ SG_ 490 LONG_ACCEL "wheel speed derivative, noisy and zero snapping";
```
is a comment that refers to signal `LONG_ACCEL` in message `490`. Using comments is highly recommended, especially for doubts and uncertainties. [cabana](https://community.comma.ai/cabana/) can easily display/add/edit comments to signals and messages.
Install openpilot on a neo device by entering ``https://openpilot.comma.ai`` during NEOS setup.
- Units: when applicable, it's recommended to convert signals into physical units, by using a proper signal factor. Using a SI unit is preferred, unless a non-SI unit rounds the signal factor much better.
For example:
```
SG_ VEHICLE_SPEED : 7|15@0+ (0.00278,0) [0|70] "m/s" PCM
```
is better than:
```
SG_ VEHICLE_SPEED : 7|15@0+ (0.00620,0) [0|115] "mph" PCM
```
However, the cleanest option is really:
```
SG_ VEHICLE_SPEED : 7|15@0+ (0.01,0) [0|250] "kph" PCM
```
Supported Cars
------
- Signal's size: always use the smallest amount of bits possible. For example, let's say I'm reverse engineering the gas pedal position and I've determined that it's in a 3 bytes message. For 0% pedal position I read a message value of `0x00 0x00 0x00`, while for 100% of pedal position I read `0x64 0x00 0x00`: clearly, the gas pedal position is within the first byte of the message and I might be tempted to define the signal `GAS_POS` as:
```
SG_ GAS_POS : 7|8@0+ (1,0) [0|100] "%" PCM
```
However, I can't be sure that the very first bit of the message is referred to the pedal position: I haven't seen it changing! Therefore, a safer way of defining the signal is:
```
SG_ GAS_POS : 6|7@0+ (1,0) [0|100] "%" PCM
```
which leaves the first bit unallocated. This prevents from very erroneous reading of the gas pedal position, in case the first bit is indeed used for something else.
| Make | Model (US Market Reference) | Supported Package | Lateral | Longitudinal | No Accel Below | No Steer Below |
| ----------------------| -----------------------------------| ---------------------| --------| ---------------| -----------------| ---------------|
| Acura | ILX 2016-18 | AcuraWatch Plus | Yes | Yes | 25mph<sup>1</sup>| 25mph |
| Acura | RDX 2016-18 | AcuraWatch Plus | Yes | Yes | 25mph<sup>1</sup>| 12mph |
| Buick<sup>3</sup> | Regal 2018<sup>6</sup> | Adaptive Cruise | Yes | Yes | 0mph | 7mph |
| Chevrolet<sup>3</sup> | Malibu 2017<sup>6</sup> | Adaptive Cruise | Yes | Yes | 0mph | 7mph |
| Chevrolet<sup>3</sup> | Volt 2017-18<sup>6</sup> | Adaptive Cruise | Yes | Yes | 0mph | 7mph |
| Cadillac<sup>3</sup> | ATS 2018 | Adaptive Cruise | Yes | Yes | 0mph | 7mph |
| Chrysler | Pacifica 2017-18<sup>7</sup> | Adaptive Cruise | Yes | Stock | 0mph | 9mph |
| Chrysler | Pacifica Hybrid 2017-18<sup>7</sup>| Adaptive Cruise | Yes | Stock | 0mph | 9mph |
| Chrysler | Pacifica Hybrid 2019<sup>7</sup> | Adaptive Cruise | Yes | Stock | 0mph | 39mph |
| GMC<sup>3</sup> | Acadia Denali 2018<sup>6</sup> | Adaptive Cruise | Yes | Yes | 0mph | 7mph |
| Holden<sup>3</sup> | Astra 2017<sup>6</sup> | Adaptive Cruise | Yes | Yes | 0mph | 7mph |
| Honda | Accord 2018-19 | All | Yes | Stock | 0mph | 3mph |
| Honda | Accord Hybrid 2018-19 | All | Yes | Stock | 0mph | 3mph |
| Honda | Civic Sedan/Coupe 2016-18 | Honda Sensing | Yes | Yes | 0mph | 12mph |
| Honda | Civic Sedan/Coupe 2019 | Honda Sensing | Yes | Stock | 0mph | 2mph |
| Honda | Civic Hatchback 2017-19 | Honda Sensing | Yes | Stock | 0mph | 12mph |
| Honda | CR-V 2015-16 | Touring | Yes | Yes | 25mph<sup>1</sup>| 12mph |
| Honda | CR-V 2017-19 | Honda Sensing | Yes | Stock | 0mph | 12mph |
| Honda | CR-V Hybrid 2017-2019 | Honda Sensing | Yes | Stock | 0mph | 12mph |
| Honda | Fit 2018-19 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 12mph |
| Honda | Odyssey 2018-19 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 0mph |
| Honda | Passport 2019 | All | Yes | Yes | 25mph<sup>1</sup>| 12mph |
| Honda | Pilot 2016-18 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 12mph |
| Honda | Pilot 2019 | All | Yes | Yes | 25mph<sup>1</sup>| 12mph |
| Honda | Ridgeline 2017-19 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 12mph |
| Hyundai | Santa Fe 2019<sup>5</sup> | All | Yes | Stock | 0mph | 0mph |
| Hyundai | Elantra 2017-19<sup>5</sup> | SCC + LKAS | Yes | Stock | 19mph | 34mph |
| Hyundai | Genesis 2018<sup>5</sup> | All | Yes | Stock | 19mph | 34mph |
| Jeep | Grand Cherokee 2016-18<sup>7</sup> | Adaptive Cruise | Yes | Stock | 0mph | 9mph |
| Jeep | Grand Cherokee 2019<sup>7</sup> | Adaptive Cruise | Yes | Stock | 0mph | 39mph |
| Kia | Optima 2019<sup>5</sup> | SCC + LKAS | Yes | Stock | 0mph | 0mph |
| Kia | Sorento 2018<sup>5</sup> | All | Yes | Stock | 0mph | 0mph |
| Kia | Stinger 2018<sup>5</sup> | SCC + LKAS | Yes | Stock | 0mph | 0mph |
| Lexus | CT Hybrid 2017-18 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph |
| Lexus | ES Hybrid 2019 | All | Yes | Yes | 0mph | 0mph |
| Lexus | RX Hybrid 2016-19 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph |
| Lexus | IS 2017-2019 | All | Yes | Stock | 22mph | 0mph |
| Lexus | IS Hybrid 2017 | All | Yes | Stock | 0mph | 0mph |
| Subaru | Crosstrek 2018-19 | EyeSight | Yes | Stock | 0mph | 0mph |
| Subaru | Impreza 2019-20 | EyeSight | Yes | Stock | 0mph | 0mph |
| Toyota | Avalon 2016 | TSS-P | Yes | Yes<sup>2</sup>| 20mph<sup>1</sup>| 0mph |
| Toyota | Avalon 2017-18 | All | Yes | Yes<sup>2</sup>| 20mph<sup>1</sup>| 0mph |
| Toyota | Camry 2018-19 | All | Yes | Stock | 0mph<sup>4</sup> | 0mph |
| Toyota | Camry Hybrid 2018-19 | All | Yes | Stock | 0mph<sup>4</sup> | 0mph |
| Toyota | C-HR 2017-19 | All | Yes | Stock | 0mph | 0mph |
| Toyota | C-HR Hybrid 2017-19 | All | Yes | Stock | 0mph | 0mph |
| Toyota | Corolla 2017-19 | All | Yes | Yes<sup>2</sup>| 20mph<sup>1</sup>| 0mph |
| Toyota | Corolla 2020 | All | Yes | Yes | 0mph | 0mph |
| Toyota | Corolla Hatchback 2019 | All | Yes | Yes | 0mph | 0mph |
| Toyota | Corolla Hybrid 2020 | All | Yes | Yes | 0mph | 0mph |
| Toyota | Highlander 2017-19 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph |
| Toyota | Highlander Hybrid 2017-19 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph |
| Toyota | Prius 2016 | TSS-P | Yes | Yes<sup>2</sup>| 0mph | 0mph |
| Toyota | Prius 2017-19 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph |
| Toyota | Prius Prime 2017-20 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph |
| Toyota | Rav4 2016 | TSS-P | Yes | Yes<sup>2</sup>| 20mph<sup>1</sup>| 0mph |
| Toyota | Rav4 2017-18 | All | Yes | Yes<sup>2</sup>| 20mph<sup>1</sup>| 0mph |
| Toyota | Rav4 2019 | All | Yes | Yes | 0mph | 0mph |
| Toyota | Rav4 Hybrid 2016 | TSS-P | Yes | Yes<sup>2</sup>| 0mph | 0mph |
| Toyota | Rav4 Hybrid 2017-18 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph |
| Toyota | Sienna 2018 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph |
| Volkswagen<sup>8</sup>| Golf 2016-19 | Driver Assistance | Yes | 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).*** <br />
<sup>2</sup>When disconnecting the Driver Support Unit (DSU), otherwise longitudinal control is stock ACC. For DSU locations, see [Toyota Wiki page](https://community.comma.ai/wiki/index.php/Toyota). ***NOTE: disconnecting the DSU disables Automatic Emergency Braking (AEB).*** <br />
<sup>3</sup>[GM installation guide](https://zoneos.com/volt/). ***NOTE: disconnecting the ASCM disables Automatic Emergency Braking (AEB).*** <br />
<sup>4</sup>28mph for Camry 4CYL L, 4CYL LE and 4CYL SE which don't have Full-Speed Range Dynamic Radar Cruise Control. <br />
<sup>5</sup>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 Hyundais. <br />
<sup>6</sup>Requires a [panda](https://comma.ai/shop/products/panda-obd-ii-dongle) and community built giraffe, find more information [here](https://zoneos.com/shop/). <br />
<sup>7</sup>Requires a [panda](https://comma.ai/shop/products/panda-obd-ii-dongle) and FCA [giraffe](https://comma.ai/shop/products/giraffe) <br />
<sup>8</sup>Requires a [custom connector](https://community.comma.ai/wiki/index.php/Volkswagen#Integration_at_J533_Gateway) for the [car harness](https://comma.ai/shop/products/car-harness) <br />
Community Maintained Cars
------
| Make | Model (US Market Reference) | Supported Package | Lateral | Longitudinal | No Accel Below | No Steer Below |
| ---------------------| -----------------------------------| ---------------------| --------| ---------------| -----------------| ---------------|
| Tesla | Model S 2012-13<sup>9</sup> | All | Yes | NA | NA | 0mph |
[[Tesla Model S Pull Request]](https://github.com/commaai/openpilot/pull/246) <br />
<sup>9</sup>Requires a [panda](https://comma.ai/shop/products/panda-obd-ii-dongle) and community built giraffe, find more information [here](https://github.com/jeankalud/neo/tree/tesla_giraffe/giraffe/tesla). <br />
Community Maintained Cars are not confirmed by comma.ai to meet our [safety model](https://github.com/commaai/openpilot/blob/devel/SAFETY.md). Be extra cautious using them.
In Progress Cars
------
- All TSS-P Toyota with Steering Assist and LSS-P Lexus with Steering Assist or Lane Keep Assist.
- All Hyundai with SmartSense.
- All Kia, Genesis with SCC and LKAS.
- All Chrysler, Jeep, Fiat with Adaptive Cruise Control and LaneSense.
- All Subaru with EyeSight.
- All Volkswagen, Audi, Škoda and SEAT with Adaptive Cruise Control.
How can I add support for my car?
------
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.
We've written guides for [Brand](https://medium.com/@comma_ai/how-to-write-a-car-port-for-openpilot-7ce0785eda84) and [Model](https://medium.com/@comma_ai/openpilot-port-guide-for-toyota-models-e5467f4b5fe6) ports. These guides might help you after you have the basics figured out.
- BMW, Audi, Volvo, and Mercedes all use [FlexRay](https://en.wikipedia.org/wiki/FlexRay) and 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.
Directory structure
------
.
├── apk # The apk files used for the UI
├── cereal # The messaging spec used for all logs on EON
├── common # Library like functionality we've developed here
├── installer/updater # Manages auto-updates of openpilot
├── opendbc # Files showing how to interpret data from cars
├── panda # Code used to communicate on CAN and LIN
├── phonelibs # Libraries used on EON
├── pyextra # Libraries used on EON
└── selfdrive # Code needed to drive the car
├── assets # Fonts and images for UI
├── athena # Allows communication with the app
├── boardd # Daemon to talk to the board
├── can # Helpers for parsing CAN messages
├── car # Car specific code to read states and control actuators
├── common # Shared C/C++ code for the daemons
├── controls # Perception, planning and controls
├── debug # Tools to help you debug and do car ports
├── locationd # Soon to be home of precise location
├── logcatd # Android logcat as a service
├── loggerd # Logger and uploader of car data
├── proclogd # Logs information from proc
├── sensord # IMU / GPS interface code
├── test # Car simulator running code through virtual maneuvers
├── ui # The UI
└── visiond # Vision pipeline
To understand how the services interact, see `selfdrive/service_list.yaml`
User Data / chffr Account / Crash Reporting
------
By default, openpilot creates an account and includes a client for chffr, our dashcam app. We use your data to train better models and improve openpilot for everyone.
It's open source software, so you are free to disable it if you wish.
It logs the road facing camera, CAN, GPS, IMU, magnetometer, thermal sensors, crashes, and operating system logs.
The user facing camera is only logged if you explicitly opt-in in settings.
It does not log the microphone.
By using it, you agree to [our privacy policy](https://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.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/)
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.
**THIS IS ALPHA QUALITY SOFTWARE FOR RESEARCH PURPOSES ONLY. THIS IS NOT A PRODUCT.
YOU ARE RESPONSIBLE FOR COMPLYING WITH LOCAL LAWS AND REGULATIONS.
NO WARRANTY EXPRESSED OR IMPLIED.**
---
<img src="https://d1qb2nb5cznatu.cloudfront.net/startups/i/1061157-bc7e9bf3b246ece7322e6ffe653f6af8-medium_jpg.jpg?buster=1458363130" width="75"></img> <img src="https://cdn-images-1.medium.com/max/1600/1*C87EjxGeMPrkTuVRVWVg4w.png" width="225"></img>

36
README_chffrplus.md Normal file
View File

@@ -0,0 +1,36 @@
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.

476
RELEASES.md Normal file
View File

@@ -0,0 +1,476 @@
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)
* Reduce EON power consumption by 40%, down to 1100mW, when car is off
* Reduce CPU utilization by 20% and improve stability
* Temporarily remove mapd functionalities to improve stability
* Add openpilot record-only mode for unsupported cars
* Synchronize controlsd to boardd to reduce latency
* Remove panda support for Subaru giraffe
Version 0.5.12 (2019-05-16)
==========================
* Improve lateral control for the Prius and Prius Prime
* Compress logs before writing to disk
* Remove old driving data when storage reaches 90% full
* Fix small offset in following distance
* Various small CPU optimizations
* Improve offroad power consumption: require NEOS Update
* Add default speed limits for Estonia thanks to martinl!
* Subaru Crosstrek support thanks to martinl!
* Toyota Avalon support thanks to njbrown09!
* Toyota Rav4 with TSS 2.0 support thanks to wocsor!
* Toyota Corolla with TSS 2.0 support thanks to wocsor!
Version 0.5.11 (2019-04-17)
========================
* Add support for Subaru
* Reduce panda power consumption by 60% when car is off
* Fix controlsd lag every 6 minutes. This would sometimes cause disengagements
* Fix bug in controls with new angle-offset learner in MPC
* Reduce cpu consumption of ubloxd by rewriting it in C++
* Improve driver monitoring model and face detection
* Improve performance of visiond and ui
* Honda Passport 2019 support
* Lexus RX Hybrid 2019 support thanks to schomems!
* Improve road selection heuristic in mapd
* Add Lane Departure Warning to dashboard for Toyota thanks to arne182
Version 0.5.10 (2019-03-19)
========================
* Self-tuning vehicle parameters: steering offset, tire stiffness and steering ratio
* Improve longitudinal control at low speed when lead vehicle harshly decelerates
* Fix panda bug going unexpectedly in DCP mode when EON is connected
* Reduce white panda power consumption by 500mW when EON is disconnected by turning off WIFI
* New Driver Monitoring Model
* Support QR codes for login using comma connect
* Refactor comma pedal FW and use CRC-8 checksum algorithm for safety. Reflashing pedal is required.
Please see `#hw-pedal` on [discord](discord.comma.ai) for assistance updating comma pedal.
* Additional speed limit rules for Germany thanks to arne182
* Allow negative speed limit offsets
Version 0.5.9 (2019-02-10)
========================
* Improve calibration using a dedicated neural network
* Abstract planner in its own process to remove lags in controls process
* Improve speed limits with country/region defaults by road type
* Reduce mapd data usage with gzip thanks to eFiniLan
* Zip log files in the background to reduce disk usage
* Kia Optima support thanks to emmertex!
* Buick Regal 2018 support thanks to HOYS!
* Comma pedal support for Toyota thanks to wocsor! Note: tuning needed and not maintained by comma
* Chrysler Pacifica and Jeep Grand Cherokee support thanks to adhintz!
Version 0.5.8 (2019-01-17)
========================
* Open sourced visiond
* Auto-slowdown for upcoming turns
* Chrysler/Jeep/Fiat support thanks to adhintz!
* Honda Civic 2019 support thanks to csouers!
* Improve use of car display in Toyota thanks to arne182!
* No data upload when connected to Android or iOS hotspots and "Enable Upload Over Cellular" setting is off
* EON stops charging when 12V battery drops below 11.8V
Version 0.5.7 (2018-12-06)
========================
* Speed limit from OpenStreetMap added to UI
* Highlight speed limit when speed exceeds road speed limit plus a delta
* Option to limit openpilot max speed to road speed limit plus a delta
* Cadillac ATS support thanks to vntarasov!
* GMC Acadia support thanks to CryptoKylan!
* Decrease GPU power consumption
* NEOSv8 autoupdate
Version 0.5.6 (2018-11-16)
========================
* Refresh settings layout and add feature descriptions
* In Honda, keep stock camera on for logging and extra stock features; new openpilot giraffe setting is 0111!
* In Toyota, option to keep stock camera on for logging and extra stock features (e.g. AHB); 120Ohm resistor required on giraffe.
* Improve camera calibration stability
* More tuning to Honda positive accelerations
* Reduce brake pump use on Hondas
* Chevrolet Malibu support thanks to tylergets!
* Holden Astra support thanks to AlexHill!
Version 0.5.5 (2018-10-20)
========================
* Increase allowed Honda positive accelerations
* Fix sporadic unexpected braking when passing semi-trucks in Toyota
* Fix gear reading bug in Hyundai Elantra thanks to emmertex!
Version 0.5.4 (2018-09-25)
========================
* New Driving Model
* New Driver Monitoring Model
* Improve longitudinal mpc in mid-low speed braking
* Honda Accord hybrid support thanks to energee!
* Ship mpc binaries and sensibly reduce build time
* Calibration more stable
* More Hyundai and Kia cars supported thanks to emmertex!
* Various GM Volt improvements thanks to vntarasov!
Version 0.5.3 (2018-09-03)
========================
* Hyundai Santa Fe support!
* Honda Pilot 2019 support thanks to energee!
* Toyota Highlander support thanks to daehahn!
* Improve steering tuning for Honda Odyssey
Version 0.5.2 (2018-08-16)
========================
* New calibration: more accurate, a lot faster, open source!
* Enable orbd
* Add little endian support to CAN packer
* Fix fingerprint for Honda Accord 1.5T
* Improve driver monitoring model
Version 0.5.1 (2018-08-01)
========================
* Fix radar error on Civic sedan 2018
* Improve thermal management logic
* Alpha Toyota C-HR and Camry support!
* Auto-switch Driver Monitoring to 3 min counter when inaccurate
Version 0.5 (2018-07-11)
========================
* Driver Monitoring (beta) option in settings!
* Make visiond, loggerd and UI use less resources
* 60 FPS UI
* Better car parameters for most cars
* New sidebar with stats
* Remove Waze and Spotify to free up system resources
* Remove rear view mirror option
* Calibration 3x faster
Version 0.4.7.2 (2018-06-25)
==========================
* Fix loggerd lag issue
* No longer prompt for updates
* Mitigate right lane hugging for properly mounted EON (procedure on wiki)
Version 0.4.7.1 (2018-06-18)
==========================
* Fix Acura ILX steer faults
* Fix bug in mock car
Version 0.4.7 (2018-06-15)
==========================
* New model!
* GM Volt (and CT6 lateral) support!
* Honda Bosch lateral support!
* Improve actuator modeling to reduce lateral wobble
* Minor refactor of car abstraction layer
* Hack around orbd startup issue
Version 0.4.6 (2018-05-18)
==========================
* NEOSv6 required! Will autoupdate
* Stability improvements
* Fix all memory leaks
* Update C++ compiler to clang6
* Improve front camera exposure
Version 0.4.5 (2018-04-27)
==========================
* Release notes added to the update popup
* Improve auto shut-off logic to disallow empty battery
* Added onboarding instructions
* Include orbd, the first piece of new calibration algorithm
* Show remaining upload data instead of file numbers
* Fix UI bugs
* Fix memory leaks
Version 0.4.4 (2018-04-13)
==========================
* EON are flipped! Flip your EON's mount!
* Alpha Honda Ridgeline support thanks to energee!
* Support optional front camera recording
* Upload over cellular toggle now applies to all files, not just video
* Increase acceleration when closing lead gap
* User now prompted for future updates
* NEO no longer supported :(
Version 0.4.3.2 (2018-03-29)
============================
* Improve autofocus
* Improve driving when only one lane line is detected
* Added fingerprint for Toyota Corolla LE
* Fixed Toyota Corolla steer error
* Full-screen driving UI
* Improved path drawing
Version 0.4.3.1 (2018-03-19)
============================
* Improve autofocus
* Add check for MPC solution error
* Make first distracted warning visual only
Version 0.4.3 (2018-03-13)
==========================
* Add HDR and autofocus
* Update UI aesthetic
* Grey panda works in Waze
* Add alpha support for 2017 Honda Pilot
* Slight increase in acceleration response from stop
* Switch CAN sending to use CANPacker
* Fix pulsing acceleration regression on Honda
* Fix openpilot bugs when stock system is in use
* Change starting logic for chffrplus to use battery voltage
Version 0.4.2 (2018-02-05)
==========================
* Add alpha support for 2017 Lexus RX Hybrid
* Add alpha support for 2018 ACURA RDX
* Updated fingerprint to include Toyota Rav4 SE and Prius Prime
* Bugfixes for Acura ILX and Honda Odyssey
Version 0.4.1 (2018-01-30)
==========================
* Add alpha support for 2017 Toyota Corolla
* Add alpha support for 2018 Honda Odyssey with Honda Sensing
* Add alpha support for Grey Panda
* Refactored car abstraction layer to make car ports easier
* Increased steering torque limit on Honda CR-V by 30%
Version 0.4.0.2 (2018-01-18)
==========================
* Add focus adjustment slider
* Minor bugfixes
Version 0.4.0.1 (2017-12-21)
==========================
* New UI to match chffrplus
* Improved lateral control tuning to fix oscillations on Civic
* Add alpha support for 2017 Toyota Rav4 Hybrid
* Reduced CPU usage
* Removed unnecessary utilization of fan at max speed
* Minor bug fixes
Version 0.3.9 (2017-11-21)
==========================
* Add alpha support for 2017 Toyota Prius
* Improved longitudinal control using model predictive control
* Enable Forward Collision Warning
* Acura ILX now maintains openpilot engaged at standstill when brakes are applied
Version 0.3.8.2 (2017-10-30)
==========================
* Add alpha support for 2017 Toyota RAV4
* Smoother lateral control
* Stay silent if stock system is connected through giraffe
* Minor bug fixes
Version 0.3.7 (2017-09-30)
==========================
* Improved lateral control using model predictive control
* Improved lane centering
* Improved GPS
* Reduced tendency of path deviation near right side exits
* Enable engagement while the accelerator pedal is pressed
* Enable engagement while the brake pedal is pressed, when stationary and with lead vehicle within 5m
* Disable engagement when park brake or brake hold are active
* Fixed sporadic longitudinal pulsing in Civic
* Cleanups to vehicle interface
Version 0.3.6.1 (2017-08-15)
============================
* Mitigate low speed steering oscillations on some vehicles
* Include board steering check for CR-V
Version 0.3.6 (2017-08-08)
==========================
* Fix alpha CR-V support
* Improved GPS
* Fix display of target speed not always matching HUD
* Increased acceleration after stop
* Mitigated some vehicles driving too close to the right line
Version 0.3.5 (2017-07-30)
==========================
* Fix bug where new devices would not begin calibration
* Minor robustness improvements
Version 0.3.4 (2017-07-28)
==========================
* Improved model trained on more data
* Much improved controls tuning
* Performance improvements
* Bugfixes and improvements to calibration
* Driving log can play back video
* Acura only: system now stays engaged below 25mph as long as brakes are applied
Version 0.3.3 (2017-06-28)
===========================
* Improved model trained on more data
* Alpha CR-V support thanks to energee and johnnwvs!
* Using the opendbc project for DBC files
* Minor performance improvements
* UI update thanks to pjlao307
* Power off button
* 6% more torque on the Civic
Version 0.3.2 (2017-05-22)
===========================
* Minor stability bugfixes
* Added metrics and rear view mirror disable to settings
* Update model with more crowdsourced data
Version 0.3.1 (2017-05-17)
===========================
* visiond stability bugfix
* Add logging for angle and flashing
Version 0.3.0 (2017-05-12)
===========================
* Add CarParams struct to improve the abstraction layer
* Refactor visiond IPC to support multiple clients
* Add raw GPS and beginning support for navigation
* Improve model in visiond using crowdsourced data
* Add improved system logging to diagnose instability
* Rewrite baseui in React Native
* Moved calibration to the cloud
Version 0.2.9 (2017-03-01)
===========================
* Retain compatibility with NEOS v1
Version 0.2.8 (2017-02-27)
===========================
* Fix bug where frames were being dropped in minute 71
Version 0.2.7 (2017-02-08)
===========================
* Better performance and pictures at night
* Fix ptr alignment issue in boardd
* Fix brake error light, fix crash if too cold
Version 0.2.6 (2017-01-31)
===========================
* Fix bug in visiond model execution
Version 0.2.5 (2017-01-30)
===========================
* Fix race condition in manager
Version 0.2.4 (2017-01-27)
===========================
* OnePlus 3T support
* Enable installation as NEOS app
* Various minor bugfixes
Version 0.2.3 (2017-01-11)
===========================
* Reduce space usage by 80%
* Add better logging
* Add Travis CI
Version 0.2.2 (2017-01-10)
===========================
* Board triggers started signal on CAN messages
* Improved autoexposure
* Handle out of space, improve upload status
Version 0.2.1 (2016-12-14)
===========================
* Performance improvements, removal of more numpy
* Fix boardd process priority
* Make counter timer reset on use of steering wheel
Version 0.2 (2016-12-12)
=========================
* Car/Radar abstraction layers have shipped, see cereal/car.capnp
* controlsd has been refactored
* Shipped plant model and testing maneuvers
* visiond exits more gracefully now
* Hardware encoder in visiond should always init
* ui now turns off the screen after 30 seconds
* Switch to openpilot release branch for future releases
* Added preliminary Docker container to run tests on PC
Version 0.1 (2016-11-29)
=========================
* Initial release of openpilot
* Adaptive cruise control is working
* Lane keep assist is working
* Support for Acura ILX 2016 with AcuraWatch Plus
* Support for Honda Civic 2016 Touring Edition

174
SAFETY.md Normal file
View File

@@ -0,0 +1,174 @@
openpilot Safety
======
openpilot is an Adaptive Cruise Control (ACC) and Automated Lane Centering (ALC) system.
Like other ACC and ALC 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**.
In order to enforce driver alertness, openpilot includes a driver monitoring feature
that alerts the driver when distracted.
However, even with an attentive driver, we must make further efforts for the system to be
safe. We have designed openpilot with two other safety considerations.
1. The driver must always be capable to immediately retake manual control of the vehicle,
by stepping on either pedal or by pressing the cancel button.
2. The vehicle must not alter its trajectory too quickly for the driver to safely
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 direction 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 direction 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 direction to ensure limited applied torque against the
driver's will.
Volkswagen, Audi, SEAT, Škoda (Lateral only)
------
- While the system is engaged, steer commands are subject to the same limits used by the stock system, and
additional limits required to meet Comma safety standards.
- Steering torque is controlled through the CAN message 0x126, also known as HCA_01 for Heading Control Assist.
It's limited by openpilot and Panda to a value between -250 and 250, representing 2.5 Nm of torque applied
at the steering rack. The vehicle EPS unit will fault for values outside -300 and 300.
- The vehicle EPS unit will tolerate any rate of increase or decrease, but may limit the effective rate of
change to 5.0 Nm/s. In accordance with the Comma AI safety model requirements, a rate limit is enforced by
the Panda firmware and by openpilot, so that the commanded steering torque cannot rise from 0 to maximum
faster than 1.25s. Commanded steering torque is gradually limited by the Panda firmware and by openpilot
if the driver's torque exceeds 0.8 Nm in the opposite direction to ensure limited applied torque against
the driver's will.
- Brake and gas pedal pressed signals are contained in the ESP_05 0x106 and Motor_20 0x121 CAN messages,
respectively. A rising edge of either signals triggers a disengagement and is enforced by openpilot.
The cancellation due to the rising edge of the gas pressed signal is also enforced by the Panda firmware.
Additionally, the cruise control system disengages on the rising edge of the brake pedal pressed signal,
and it's enforced by both openpilot and the Panda firmware.
**Extra note**: comma.ai strongly discourages the use of openpilot forks with safety code either missing or
not fully meeting the above requirements.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
apk/ai.comma.plus.black.apk Normal file

Binary file not shown.

BIN
apk/ai.comma.plus.frame.apk Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
apk/com.mixplorer.apk Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

6
cereal/.gitignore vendored Normal file
View File

@@ -0,0 +1,6 @@
gen
node_modules
package-lock.json
*.pyc
__pycache__

62
cereal/Makefile Normal file
View File

@@ -0,0 +1,62 @@
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 '$@'

8
cereal/__init__.py Normal file
View File

@@ -0,0 +1,8 @@
import os
import capnp
CEREAL_PATH = os.path.dirname(os.path.abspath(__file__))
capnp.remove_import_hook()
log = capnp.load(os.path.join(CEREAL_PATH, "log.capnp"))
car = capnp.load(os.path.join(CEREAL_PATH, "car.capnp"))

439
cereal/car.capnp Normal file
View File

@@ -0,0 +1,439 @@
using Cxx = import "./include/c++.capnp";
$Cxx.namespace("cereal");
using Java = import "./include/java.capnp";
$Java.package("ai.comma.openpilot.cereal");
$Java.outerClassname("Car");
@0x8e2af1e708af8b8d;
# ******* events causing controls state machine transition *******
struct CarEvent @0x9b1657f34caf3ad3 {
name @0 :EventName;
enable @1 :Bool;
noEntry @2 :Bool;
warning @3 :Bool;
userDisable @4 :Bool;
softDisable @5 :Bool;
immediateDisable @6 :Bool;
preEnable @7 :Bool;
permanent @8 :Bool;
enum EventName @0xbaa8c5d505f727de {
# TODO: copy from error list
canError @0;
steerUnavailable @1;
brakeUnavailable @2;
gasUnavailable @3;
wrongGear @4;
doorOpen @5;
seatbeltNotLatched @6;
espDisabled @7;
wrongCarMode @8;
steerTempUnavailable @9;
reverseGear @10;
buttonCancel @11;
buttonEnable @12;
pedalPressed @13;
cruiseDisabled @14;
radarCanError @15;
dataNeeded @16;
speedTooLow @17;
outOfSpace @18;
overheat @19;
calibrationIncomplete @20;
calibrationInvalid @21;
controlsMismatch @22;
pcmEnable @23;
pcmDisable @24;
noTarget @25;
radarFault @26;
modelCommIssueDEPRECATED @27;
brakeHold @28;
parkBrake @29;
manualRestart @30;
lowSpeedLockout @31;
plannerError @32;
ipasOverride @33;
debugAlert @34;
steerTempUnavailableMute @35;
resumeRequired @36;
preDriverDistracted @37;
promptDriverDistracted @38;
driverDistracted @39;
geofence @40;
driverMonitorOn @41;
driverMonitorOff @42;
preDriverUnresponsive @43;
promptDriverUnresponsive @44;
driverUnresponsive @45;
belowSteerSpeed @46;
calibrationProgress @47;
lowBattery @48;
invalidGiraffeHonda @49;
vehicleModelInvalid @50;
controlsFailed @51;
sensorDataInvalid @52;
commIssue @53;
tooDistracted @54;
posenetInvalid @55;
soundsUnavailable @56;
preLaneChangeLeft @57;
preLaneChangeRight @58;
laneChange @59;
invalidGiraffeToyota @60;
internetConnectivityNeeded @61;
manualSteeringRequired @62;
manualSteeringRequiredBlinkersOn @63;
leadCarMoving @64;
leadCarDetected @65;
}
}
# ******* main car state @ 100hz *******
# all speeds in m/s
struct CarState {
errorsDEPRECATED @0 :List(CarEvent.EventName);
events @13 :List(CarEvent);
# car speed
vEgo @1 :Float32; # best estimate of speed
aEgo @16 :Float32; # best estimate of acceleration
vEgoRaw @17 :Float32; # unfiltered speed from CAN sensors
yawRate @22 :Float32; # best estimate of yaw rate
standstill @18 :Bool;
wheelSpeeds @2 :WheelSpeeds;
# gas pedal, 0.0-1.0
gas @3 :Float32; # this is user + computer
gasPressed @4 :Bool; # this is user pedal only
# brake pedal, 0.0-1.0
brake @5 :Float32; # this is user pedal only
brakePressed @6 :Bool; # this is user pedal only
brakeLights @19 :Bool;
# steering wheel
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
# cruise state
cruiseState @10 :CruiseState;
# gear
gearShifter @14 :GearShifter;
# button presses
buttonEvents @11 :List(ButtonEvent);
leftBlinker @20 :Bool;
rightBlinker @21 :Bool;
genericToggle @23 :Bool;
# 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);
struct WheelSpeeds {
# optional wheel speeds
fl @0 :Float32;
fr @1 :Float32;
rl @2 :Float32;
rr @3 :Float32;
}
struct CruiseState {
enabled @0 :Bool;
speed @1 :Float32;
available @2 :Bool;
speedOffset @3 :Float32;
standstill @4 :Bool;
}
enum GearShifter {
unknown @0;
park @1;
drive @2;
neutral @3;
reverse @4;
sport @5;
low @6;
brake @7;
eco @8;
manumatic @9;
}
# send on change
struct ButtonEvent {
pressed @0 :Bool;
type @1 :Type;
enum Type {
unknown @0;
leftBlinker @1;
rightBlinker @2;
accelCruise @3;
decelCruise @4;
cancel @5;
altButton1 @6;
altButton2 @7;
altButton3 @8;
setCruise @9;
resumeCruise @10;
gapAdjustCruise @11;
}
}
}
# ******* radar state @ 20hz *******
struct RadarData @0x888ad6581cf0aacb {
errors @0 :List(Error);
points @1 :List(RadarPoint);
# which packets this state came from
canMonoTimes @2 :List(UInt64);
enum Error {
canError @0;
fault @1;
wrongConfig @2;
}
# similar to LiveTracks
# is one timestamp valid for all? I think so
struct RadarPoint {
trackId @0 :UInt64; # no trackId reuse
# these 3 are the minimum required
dRel @1 :Float32; # m from the front bumper of the car
yRel @2 :Float32; # m
vRel @3 :Float32; # m/s
# these are optional and valid if they are not NaN
aRel @4 :Float32; # m/s^2
yvRel @5 :Float32; # m/s
# some radars flag measurements VS estimates
measured @6 :Bool;
}
}
# ******* car controls @ 100hz *******
struct CarControl {
# must be true for any actuator commands to work
enabled @0 :Bool;
active @7 :Bool;
gasDEPRECATED @1 :Float32;
brakeDEPRECATED @2 :Float32;
steeringTorqueDEPRECATED @3 :Float32;
actuators @6 :Actuators;
cruiseControl @4 :CruiseControl;
hudControl @5 :HUDControl;
struct Actuators {
# range from 0.0 - 1.0
gas @0: Float32;
brake @1: Float32;
# range from -1.0 - 1.0
steer @2: Float32;
steerAngle @3: Float32;
}
struct CruiseControl {
cancel @0: Bool;
override @1: Bool;
speedOverride @2: Float32;
accelOverride @3: Float32;
}
struct HUDControl {
speedVisible @0: Bool;
setSpeed @1: Float32;
lanesVisible @2: Bool;
leadVisible @3: Bool;
visualAlert @4: VisualAlert;
audibleAlert @5: AudibleAlert;
rightLaneVisible @6: Bool;
leftLaneVisible @7: Bool;
rightLaneDepart @8: Bool;
leftLaneDepart @9: Bool;
enum VisualAlert {
# these are the choices from the Honda
# map as good as you can for your car
none @0;
fcw @1;
steerRequired @2;
brakePressed @3;
wrongGear @4;
seatbeltUnbuckled @5;
speedTooHigh @6;
ldw @7;
}
enum AudibleAlert {
# these are the choices from the Honda
# map as good as you can for your car
none @0;
chimeEngage @1;
chimeDisengage @2;
chimeError @3;
chimeWarning1 @4;
chimeWarning2 @5;
chimeWarningRepeat @6;
chimePrompt @7;
}
}
}
# ****** car param ******
struct CarParams {
carName @0 :Text;
carFingerprint @1 :Text;
enableGasInterceptor @2 :Bool;
enableCruise @3 :Bool;
enableCamera @4 :Bool;
enableDsu @5 :Bool; # driving support unit
enableApgs @6 :Bool; # advanced parking guidance system
minEnableSpeed @7 :Float32;
minSteerSpeed @8 :Float32;
safetyModel @9 :SafetyModel;
safetyModelPassive @42 :SafetyModel = noOutput;
safetyParam @10 :Int16;
steerMaxBP @11 :List(Float32);
steerMaxV @12 :List(Float32);
gasMaxBP @13 :List(Float32);
gasMaxV @14 :List(Float32);
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
centerToFront @19 :Float32; # [m] GC distance to front axle
steerRatio @20 :Float32; # [] ratio between front wheels and steering wheel angles
steerRatioRear @21 :Float32; # [] rear steering ratio wrt front steering (usually 0)
# things we can derive
rotationalInertia @22 :Float32; # [kg*m2] body rotational inertia
tireStiffnessFront @23 :Float32; # [N/rad] front tire coeff of stiff
tireStiffnessRear @24 :Float32; # [N/rad] rear tire coeff of stiff
longitudinalTuning @25 :LongitudinalPIDTuning;
lateralTuning :union {
pid @26 :LateralPIDTuning;
indi @27 :LateralINDITuning;
lqr @40 :LateralLQRTuning;
}
steerLimitAlert @28 :Bool;
vEgoStopping @29 :Float32; # Speed at which the car goes into stopping state
directAccelControl @30 :Bool; # Does the car have direct accel control or just gas/brake
stoppingControl @31 :Bool; # Does the car allows full control even at lows speeds when stopping
startAccel @32 :Float32; # Required acceleraton to overcome creep braking
steerRateCost @33 :Float32; # Lateral MPC cost on steering rate
steerControlType @34 :SteerControlType;
radarOffCan @35 :Bool; # True when radar objects aren't visible on CAN
steerActuatorDelay @36 :Float32; # Steering wheel actuator delay in seconds
openpilotLongitudinalControl @37 :Bool; # is openpilot doing the longitudinal control?
carVin @38 :Text; # VIN number queried during fingerprinting
isPandaBlack @39: Bool;
dashcamOnly @41: Bool;
transmissionType @43 :TransmissionType;
struct LateralPIDTuning {
kpBP @0 :List(Float32);
kpV @1 :List(Float32);
kiBP @2 :List(Float32);
kiV @3 :List(Float32);
kf @4 :Float32;
}
struct LongitudinalPIDTuning {
kpBP @0 :List(Float32);
kpV @1 :List(Float32);
kiBP @2 :List(Float32);
kiV @3 :List(Float32);
deadzoneBP @4 :List(Float32);
deadzoneV @5 :List(Float32);
}
struct LateralINDITuning {
outerLoopGain @0 :Float32;
innerLoopGain @1 :Float32;
timeConstant @2 :Float32;
actuatorEffectiveness @3 :Float32;
}
struct LateralLQRTuning {
scale @0 :Float32;
ki @1 :Float32;
dcGain @2 :Float32;
# 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 {
noOutput @0;
honda @1;
toyota @2;
elm327 @3;
gm @4;
hondaBosch @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;
}
enum SteerControlType {
torque @0;
angle @1;
}
enum TransmissionType {
unknown @0;
automatic @1;
manual @2;
}
}

26
cereal/generate_javascript.sh Executable file
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

26
cereal/include/c++.capnp Normal file
View File

@@ -0,0 +1,26 @@
# Copyright (c) 2013-2014 Sandstorm Development Group, Inc. and contributors
# Licensed under the MIT License:
#
# 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.
@0xbdf87d7bb8304e81;
$namespace("capnp::annotations");
annotation namespace(file): Text;
annotation name(field, enumerant, struct, enum, interface, method, param, group, union): Text;

28
cereal/include/java.capnp Normal file
View File

@@ -0,0 +1,28 @@
# Copyright (c) 2013-2015 Sandstorm Development Group, Inc. and contributors
# Licensed under the MIT License:
#
# 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.
@0xc5f1af96651f70ea;
annotation package @0x9ee4c8f803b3b596 (file) : Text;
# Name of the package, such as "org.example.foo", in which the generated code will reside.
annotation outerClassname @0x9b066bb4881f7cd3 (file) : Text;
# Name of the outer class that will wrap the generated code.

39
cereal/install_capnp.sh Executable file
View File

@@ -0,0 +1,39 @@
set -e
echo "Installing capnp"
cd /tmp
VERSION=0.6.1
wget https://capnproto.org/capnproto-c++-${VERSION}.tar.gz
tar xvf capnproto-c++-${VERSION}.tar.gz
cd capnproto-c++-${VERSION}
CXXFLAGS="-fPIC" ./configure
make -j4
# manually build binaries statically
g++ -std=gnu++11 -I./src -I./src -DKJ_HEADER_WARNINGS -DCAPNP_HEADER_WARNINGS -DCAPNP_INCLUDE_DIR=\"/usr/local/include\" -pthread -O2 -DNDEBUG -pthread -pthread -o .libs/capnp src/capnp/compiler/module-loader.o src/capnp/compiler/capnp.o ./.libs/libcapnpc.a ./.libs/libcapnp.a ./.libs/libkj.a -lpthread -pthread
g++ -std=gnu++11 -I./src -I./src -DKJ_HEADER_WARNINGS -DCAPNP_HEADER_WARNINGS -DCAPNP_INCLUDE_DIR=\"/usr/local/include\" -pthread -O2 -DNDEBUG -pthread -pthread -o .libs/capnpc-c++ src/capnp/compiler/capnpc-c++.o ./.libs/libcapnp.a ./.libs/libkj.a -lpthread -pthread
g++ -std=gnu++11 -I./src -I./src -DKJ_HEADER_WARNINGS -DCAPNP_HEADER_WARNINGS -DCAPNP_INCLUDE_DIR=\"/usr/local/include\" -pthread -O2 -DNDEBUG -pthread -pthread -o .libs/capnpc-capnp src/capnp/compiler/capnpc-capnp.o ./.libs/libcapnp.a ./.libs/libkj.a -lpthread -pthread
cp .libs/capnp /usr/local/bin/
ln -s /usr/local/bin/capnp /usr/local/bin/capnpc
cp .libs/capnpc-c++ /usr/local/bin/
cp .libs/capnpc-capnp /usr/local/bin/
cp .libs/*.a /usr/local/lib
cd /tmp
echo "Installing c-capnp"
git clone https://github.com/commaai/c-capnproto.git
cd c-capnproto
git submodule update --init --recursive
autoreconf -f -i -s
CXXFLAGS="-fPIC" ./configure
make -j4
# manually build binaries statically
gcc -fPIC -o .libs/capnpc-c compiler/capnpc-c.o compiler/schema.capnp.o compiler/str.o ./.libs/libcapnp_c.a
cp .libs/capnpc-c /usr/local/bin/
cp .libs/*.a /usr/local/lib

1862
cereal/log.capnp Normal file

File diff suppressed because it is too large Load Diff

53
cereal/maptile.capnp Normal file
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);
}

12
check_code_quality.sh Normal file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
# Only pyflakes checks (--select=F)
flake8 --select=F $(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

0
common/__init__.py Normal file
View File

42
common/api/__init__.py Normal file
View File

@@ -0,0 +1,42 @@
import jwt
import requests
from datetime import datetime, timedelta
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/"
headers = {}
if access_token is not None:
headers['Authorization'] = "JWT "+access_token
headers['User-Agent'] = "openpilot-" + version
return requests.request(method, backend+endpoint, timeout=timeout, headers = headers, params=params)

4
common/basedir.py Normal file
View File

@@ -0,0 +1,4 @@
import os
BASEDIR = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../"))

16
common/clock.pyx Normal file
View File

@@ -0,0 +1,16 @@
from posix.time cimport clock_gettime, timespec, CLOCK_BOOTTIME, CLOCK_MONOTONIC_RAW
cdef double readclock(int clock_id):
cdef timespec ts
cdef double current
clock_gettime(clock_id, &ts)
current = ts.tv_sec + (ts.tv_nsec / 1000000000.)
return current
def monotonic_time():
return readclock(CLOCK_MONOTONIC_RAW)
def sec_since_boot():
return readclock(CLOCK_BOOTTIME)

23
common/cython_hacks.py Normal file
View File

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

276
common/dbc.py Executable file
View File

@@ -0,0 +1,276 @@
import re
import os
import struct
import sys
import numbers
from collections import namedtuple, defaultdict
def int_or_float(s):
# return number, trying to maintain int format
if s.isdigit():
return int(s, 10)
else:
return float(s)
DBCSignal = namedtuple(
"DBCSignal", ["name", "start_bit", "size", "is_little_endian", "is_signed",
"factor", "offset", "tmin", "tmax", "units"])
class dbc():
def __init__(self, fn):
self.name, _ = os.path.splitext(os.path.basename(fn))
with open(fn, encoding="ascii") as f:
self.txt = f.readlines()
self._warned_addresses = set()
# regexps from https://github.com/ebroecker/canmatrix/blob/master/canmatrix/importdbc.py
bo_regexp = re.compile(r"^BO\_ (\w+) (\w+) *: (\w+) (\w+)")
sg_regexp = re.compile(r"^SG\_ (\w+) : (\d+)\|(\d+)@(\d+)([\+|\-]) \(([0-9.+\-eE]+),([0-9.+\-eE]+)\) \[([0-9.+\-eE]+)\|([0-9.+\-eE]+)\] \"(.*)\" (.*)")
sgm_regexp = re.compile(r"^SG\_ (\w+) (\w+) *: (\d+)\|(\d+)@(\d+)([\+|\-]) \(([0-9.+\-eE]+),([0-9.+\-eE]+)\) \[([0-9.+\-eE]+)\|([0-9.+\-eE]+)\] \"(.*)\" (.*)")
val_regexp = re.compile(r"VAL\_ (\w+) (\w+) (\s*[-+]?[0-9]+\s+\".+?\"[^;]*)")
# A dictionary which maps message ids to tuples ((name, size), signals).
# name is the ASCII name of the message.
# size is the size of the message in bytes.
# signals is a list signals contained in the message.
# signals is a list of DBCSignal in order of increasing start_bit.
self.msgs = {}
# A dictionary which maps message ids to a list of tuples (signal name, definition value pairs)
self.def_vals = defaultdict(list)
# lookup to bit reverse each byte
self.bits_index = [(i & ~0b111) + ((-i-1) & 0b111) for i in range(64)]
for l in self.txt:
l = l.strip()
if l.startswith("BO_ "):
# new group
dat = bo_regexp.match(l)
if dat is None:
print("bad BO {0}".format(l))
name = dat.group(2)
size = int(dat.group(3))
ids = int(dat.group(1), 0) # could be hex
if ids in self.msgs:
sys.exit("Duplicate address detected %d %s" % (ids, self.name))
self.msgs[ids] = ((name, size), [])
if l.startswith("SG_ "):
# new signal
dat = sg_regexp.match(l)
go = 0
if dat is None:
dat = sgm_regexp.match(l)
go = 1
if dat is None:
print("bad SG {0}".format(l))
sgname = dat.group(1)
start_bit = int(dat.group(go+2))
signal_size = int(dat.group(go+3))
is_little_endian = int(dat.group(go+4))==1
is_signed = dat.group(go+5)=='-'
factor = int_or_float(dat.group(go+6))
offset = int_or_float(dat.group(go+7))
tmin = int_or_float(dat.group(go+8))
tmax = int_or_float(dat.group(go+9))
units = dat.group(go+10)
self.msgs[ids][1].append(
DBCSignal(sgname, start_bit, signal_size, is_little_endian,
is_signed, factor, offset, tmin, tmax, units))
if l.startswith("VAL_ "):
# new signal value/definition
dat = val_regexp.match(l)
if dat is None:
print("bad VAL {0}".format(l))
ids = int(dat.group(1), 0) # could be hex
sgname = dat.group(2)
defvals = dat.group(3)
defvals = defvals.replace("?",r"\?") #escape sequence in C++
defvals = defvals.split('"')[:-1]
# convert strings to UPPER_CASE_WITH_UNDERSCORES
defvals[1::2] = [d.strip().upper().replace(" ","_") for d in defvals[1::2]]
defvals = '"'+"".join(str(i) for i in defvals)+'"'
self.def_vals[ids].append((sgname, defvals))
for msg in self.msgs.values():
msg[1].sort(key=lambda x: x.start_bit)
self.msg_name_to_address = {}
for address, m in self.msgs.items():
name = m[0][0]
self.msg_name_to_address[name] = address
def lookup_msg_id(self, msg_id):
if not isinstance(msg_id, numbers.Number):
msg_id = self.msg_name_to_address[msg_id]
return msg_id
def reverse_bytes(self, x):
return ((x & 0xff00000000000000) >> 56) | \
((x & 0x00ff000000000000) >> 40) | \
((x & 0x0000ff0000000000) >> 24) | \
((x & 0x000000ff00000000) >> 8) | \
((x & 0x00000000ff000000) << 8) | \
((x & 0x0000000000ff0000) << 24) | \
((x & 0x000000000000ff00) << 40) | \
((x & 0x00000000000000ff) << 56)
def encode(self, msg_id, dd):
"""Encode a CAN message using the dbc.
Inputs:
msg_id: The message ID.
dd: A dictionary mapping signal name to signal data.
"""
msg_id = self.lookup_msg_id(msg_id)
msg_def = self.msgs[msg_id]
size = msg_def[0][1]
result = 0
for s in msg_def[1]:
ival = dd.get(s.name)
if ival is not None:
ival = (ival / s.factor) - s.offset
ival = int(round(ival))
if s.is_signed and ival < 0:
ival = (1 << s.size) + ival
if s.is_little_endian:
shift = s.start_bit
else:
b1 = (s.start_bit // 8) * 8 + (-s.start_bit - 1) % 8
shift = 64 - (b1 + s.size)
mask = ((1 << s.size) - 1) << shift
dat = (ival & ((1 << s.size) - 1)) << shift
if s.is_little_endian:
mask = self.reverse_bytes(mask)
dat = self.reverse_bytes(dat)
result &= ~mask
result |= dat
result = struct.pack('>Q', result)
return result[:size]
def decode(self, x, arr=None, debug=False):
"""Decode a CAN message using the dbc.
Inputs:
x: A collection with elements (address, time, data), where address is
the CAN address, time is the bus time, and data is the CAN data as a
hex string.
arr: Optional list of signals which should be decoded and returned.
debug: True to print debugging statements.
Returns:
A tuple (name, data), where name is the name of the CAN message and data
is the decoded result. If arr is None, data is a dict of properties.
Otherwise data is a list of the same length as arr.
Returns (None, None) if the message could not be decoded.
"""
if arr is None:
out = {}
else:
out = [None]*len(arr)
msg = self.msgs.get(x[0])
if msg is None:
if x[0] not in self._warned_addresses:
#print("WARNING: Unknown message address {}".format(x[0]))
self._warned_addresses.add(x[0])
return None, None
name = msg[0][0]
if debug:
print(name)
st = x[2].ljust(8, b'\x00')
le, be = None, None
for s in msg[1]:
if arr is not None and s[0] not in arr:
continue
start_bit = s[1]
signal_size = s[2]
little_endian = s[3]
signed = s[4]
factor = s[5]
offset = s[6]
if little_endian:
if le is None:
le = struct.unpack("<Q", st)[0]
tmp = le
shift_amount = start_bit
else:
if be is None:
be = struct.unpack(">Q", st)[0]
tmp = be
b1 = (start_bit // 8) * 8 + (-start_bit - 1) % 8
shift_amount = 64 - (b1 + signal_size)
if shift_amount < 0:
continue
tmp = (tmp >> shift_amount) & ((1 << signal_size) - 1)
if signed and (tmp >> (signal_size - 1)):
tmp -= (1 << signal_size)
tmp = tmp * factor + offset
# if debug:
# print("%40s %2d %2d %7.2f %s" % (s[0], s[1], s[2], tmp, s[-1]))
if arr is None:
out[s[0]] = tmp
else:
out[arr.index(s[0])] = tmp
return name, out
def get_signals(self, msg):
msg = self.lookup_msg_id(msg)
return [sgs.name for sgs in self.msgs[msg][1]]
if __name__ == "__main__":
from opendbc import DBC_PATH
import numpy as np
dbc_test = dbc(os.path.join(DBC_PATH, 'toyota_prius_2017_pt_generated.dbc'))
msg = ('STEER_ANGLE_SENSOR', {'STEER_ANGLE': -6.0, 'STEER_RATE': 4, 'STEER_FRACTION': -0.2})
encoded = dbc_test.encode(*msg)
decoded = dbc_test.decode((0x25, 0, encoded))
assert decoded == msg
dbc_test = dbc(os.path.join(DBC_PATH, 'hyundai_santa_fe_2019_ccan.dbc'))
decoded = dbc_test.decode((0x2b0, 0, "\xfa\xfe\x00\x07\x12"))
assert np.isclose(decoded[1]['SAS_Angle'], -26.2)
msg = ('SAS11', {'SAS_Stat': 7.0, 'MsgCount': 0.0, 'SAS_Angle': -26.200000000000003, 'SAS_Speed': 0.0, 'CheckSum': 0.0})
encoded = dbc_test.encode(*msg)
decoded = dbc_test.decode((0x2b0, 0, encoded))
assert decoded == msg

49
common/ffi_wrapper.py Normal file
View File

@@ -0,0 +1,49 @@
import os
import sys
import fcntl
import hashlib
from cffi import FFI
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.encode('utf-8')).hexdigest()
try:
os.mkdir(tmpdir)
except OSError:
pass
fd = os.open(tmpdir, 0)
fcntl.flock(fd, fcntl.LOCK_EX)
try:
sys.path.append(tmpdir)
try:
mod = __import__(cache)
except Exception:
print("cache miss {0}".format(cache))
compile_code(cache, c_code, c_header, tmpdir, cflags, libraries)
mod = __import__(cache)
finally:
os.close(fd)
return mod.ffi, mod.lib
def compile_code(name, c_code, c_header, directory, cflags="", libraries=None):
if libraries is None:
libraries = []
ffibuilder = FFI()
ffibuilder.set_source(name, c_code, source_extension='.cpp', libraries=libraries)
ffibuilder.cdef(c_header)
os.environ['OPT'] = "-fwrapv -O2 -DNDEBUG -std=c++11"
os.environ['CFLAGS'] = cflags
ffibuilder.compile(verbose=True, debug=False, tmpdir=directory)
def wrap_compiled(name, directory):
sys.path.append(directory)
mod = __import__(name)
return mod.ffi, mod.lib

109
common/file_helpers.py Normal file
View File

@@ -0,0 +1,109 @@
import os
import shutil
import tempfile
from atomicwrites import AtomicWriter
def mkdirs_exists_ok(path):
try:
os.makedirs(path)
except OSError:
if not os.path.isdir(path):
raise
def rm_not_exists_ok(path):
try:
os.remove(path)
except OSError:
if os.path.exists(path):
raise
def rm_tree_or_link(path):
if os.path.islink(path):
os.unlink(path)
elif os.path.isdir(path):
shutil.rmtree(path)
def get_tmpdir_on_same_filesystem(path):
normpath = os.path.normpath(path)
parts = normpath.split("/")
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():
def __init__(self, target_path, temp_dir=None):
self._target_path = target_path
self._path = tempfile.mkdtemp(dir=temp_dir)
@property
def name(self):
return self._path
def close(self):
os.rename(self._path, self._target_path)
def __enter__(self): return self
def __exit__(self, type, value, traceback):
if type is None:
self.close()
else:
shutil.rmtree(self._path)
class NamedTemporaryDir():
def __init__(self, temp_dir=None):
self._path = tempfile.mkdtemp(dir=temp_dir)
@property
def name(self):
return self._path
def close(self):
shutil.rmtree(self._path)
def __enter__(self): return self
def __exit__(self, type, value, traceback):
self.close()
def _get_fileobject_func(writer, temp_dir):
def _get_fileobject():
file_obj = writer.get_fileobject(dir=temp_dir)
os.chmod(file_obj.name, 0o644)
return file_obj
return _get_fileobject
def atomic_write_on_fs_tmp(path, **kwargs):
"""Creates an atomic writer using a temporary file in a temporary directory
on the same filesystem as path.
"""
# TODO(mgraczyk): This use of AtomicWriter relies on implementation details to set the temp
# directory.
writer = AtomicWriter(path, **kwargs)
return writer._open(_get_fileobject_func(writer, get_tmpdir_on_same_filesystem(path)))
def atomic_write_in_dir(path, **kwargs):
"""Creates an atomic writer using a temporary file in the same directory
as the destination file.
"""
writer = AtomicWriter(path, **kwargs)
return writer._open(_get_fileobject_func(writer, os.path.dirname(path)))
def atomic_write_in_dir_neos(path, contents, mode=None):
"""
Atomically writes contents to path using a temporary file in the same directory
as path. Useful on NEOS, where `os.link` (required by atomic_write_in_dir) is missing.
"""
f = tempfile.NamedTemporaryFile(delete=False, prefix=".tmp", dir=os.path.dirname(path))
f.write(contents)
f.flush()
if mode is not None:
os.fchmod(f.fileno(), mode)
os.fsync(f.fileno())
f.close()
os.rename(f.name, path)

10
common/filter_simple.py Normal file
View File

@@ -0,0 +1,10 @@
class FirstOrderFilter():
# first order filter
def __init__(self, x0, ts, dt):
self.k = (dt / ts) / (1. + dt / ts)
self.x = x0
def update(self, x):
self.x = (1. - self.k) * self.x + self.k * x

10
common/kalman/Makefile Normal file
View File

@@ -0,0 +1,10 @@
all: simple_kalman_impl.so
simple_kalman_impl.so: simple_kalman_impl.pyx simple_kalman_impl.pxd simple_kalman_setup.py
python3 simple_kalman_setup.py build_ext --inplace
rm -rf build
rm simple_kalman_impl.c
.PHONY: clean
clean:
rm -f simple_kalman_impl.so

View File

View File

@@ -0,0 +1,9 @@
# 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
assert KF1D

View File

@@ -0,0 +1,16 @@
cdef class KF1D:
cdef public:
double x0_0
double x1_0
double K0_0
double K1_0
double A0_0
double A0_1
double A1_0
double A1_1
double C0_0
double C0_1
double A_K_0
double A_K_1
double A_K_2
double A_K_3

View File

@@ -0,0 +1,36 @@
# cython: language_level=3
cdef class KF1D:
def __init__(self, x0, A, C, K):
self.x0_0 = x0[0][0]
self.x1_0 = x0[1][0]
self.A0_0 = A[0][0]
self.A0_1 = A[0][1]
self.A1_0 = A[1][0]
self.A1_1 = A[1][1]
self.C0_0 = C[0]
self.C0_1 = C[1]
self.K0_0 = K[0][0]
self.K1_0 = K[1][0]
self.A_K_0 = self.A0_0 - self.K0_0 * self.C0_0
self.A_K_1 = self.A0_1 - self.K0_0 * self.C0_1
self.A_K_2 = self.A1_0 - self.K1_0 * self.C0_0
self.A_K_3 = self.A1_1 - self.K1_0 * self.C0_1
def update(self, meas):
cdef double x0_0 = self.A_K_0 * self.x0_0 + self.A_K_1 * self.x1_0 + self.K0_0 * meas
cdef double x1_0 = self.A_K_2 * self.x0_0 + self.A_K_3 * self.x1_0 + self.K1_0 * meas
self.x0_0 = x0_0
self.x1_0 = x1_0
return [self.x0_0, self.x1_0]
@property
def x(self):
return [[self.x0_0], [self.x1_0]]
@x.setter
def x(self, x):
self.x0_0 = x[0][0]
self.x1_0 = x[1][0]

View File

@@ -0,0 +1,23 @@
import numpy as np
class KF1D:
# this EKF assumes constant covariance matrix, so calculations are much simpler
# the Kalman gain also needs to be precomputed using the control module
def __init__(self, x0, A, C, K):
self.x = x0
self.A = A
self.C = C
self.K = K
self.A_K = self.A - np.dot(self.K, self.C)
# K matrix needs to be pre-computed as follow:
# import control
# (x, l, K) = control.dare(np.transpose(self.A), np.transpose(self.C), Q, R)
# self.K = np.transpose(K)
def update(self, meas):
self.x = np.dot(self.A_K, self.x) + np.dot(self.K, meas)
return self.x

View File

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

View File

View File

@@ -0,0 +1,85 @@
import unittest
import random
import timeit
import numpy as np
from common.kalman.simple_kalman import KF1D
from common.kalman.simple_kalman_old import KF1D as KF1D_old
class TestSimpleKalman(unittest.TestCase):
def setUp(self):
dt = 0.01
x0_0 = 0.0
x1_0 = 0.0
A0_0 = 1.0
A0_1 = dt
A1_0 = 0.0
A1_1 = 1.0
C0_0 = 1.0
C0_1 = 0.0
K0_0 = 0.12287673
K1_0 = 0.29666309
self.kf_old = KF1D_old(x0=np.matrix([[x0_0], [x1_0]]),
A=np.matrix([[A0_0, A0_1], [A1_0, A1_1]]),
C=np.matrix([C0_0, C0_1]),
K=np.matrix([[K0_0], [K1_0]]))
self.kf = KF1D(x0=[[x0_0], [x1_0]],
A=[[A0_0, A0_1], [A1_0, A1_1]],
C=[C0_0, C0_1],
K=[[K0_0], [K1_0]])
def test_getter_setter(self):
self.kf.x = [[1.0], [1.0]]
self.assertEqual(self.kf.x, [[1.0], [1.0]])
def update_returns_state(self):
x = self.kf.update(100)
self.assertEqual(x, self.kf.x)
def test_old_equal_new(self):
for _ in range(1000):
v_wheel = random.uniform(0, 200)
x_old = self.kf_old.update(v_wheel)
x = self.kf.update(v_wheel)
# Compare the output x, verify that the error is less than 1e-4
self.assertAlmostEqual(x_old[0], x[0])
self.assertAlmostEqual(x_old[1], x[1])
def test_new_is_faster(self):
setup = """
import numpy as np
from common.kalman.simple_kalman import KF1D
from common.kalman.simple_kalman_old import KF1D as KF1D_old
dt = 0.01
x0_0 = 0.0
x1_0 = 0.0
A0_0 = 1.0
A0_1 = dt
A1_0 = 0.0
A1_1 = 1.0
C0_0 = 1.0
C0_1 = 0.0
K0_0 = 0.12287673
K1_0 = 0.29666309
kf_old = KF1D_old(x0=np.matrix([[x0_0], [x1_0]]),
A=np.matrix([[A0_0, A0_1], [A1_0, A1_1]]),
C=np.matrix([C0_0, C0_1]),
K=np.matrix([[K0_0], [K1_0]]))
kf = KF1D(x0=[[x0_0], [x1_0]],
A=[[A0_0, A0_1], [A1_0, A1_1]],
C=[C0_0, C0_1],
K=[[K0_0], [K1_0]])
"""
kf_speed = timeit.timeit("kf.update(1234)", setup=setup, number=10000)
kf_old_speed = timeit.timeit("kf_old.update(1234)", setup=setup, number=10000)
self.assertTrue(kf_speed < kf_old_speed / 4)

174
common/logging_extra.py Normal file
View File

@@ -0,0 +1,174 @@
import os
import sys
import copy
import json
import socket
import logging
from threading import local
from collections import OrderedDict
from contextlib import contextmanager
def json_handler(obj):
# if isinstance(obj, (datetime.date, datetime.time)):
# return obj.isoformat()
return repr(obj)
def json_robust_dumps(obj):
return json.dumps(obj, default=json_handler)
class NiceOrderedDict(OrderedDict):
def __str__(self):
return json_robust_dumps(self)
class SwagFormatter(logging.Formatter):
def __init__(self, swaglogger):
logging.Formatter.__init__(self, None, '%a %b %d %H:%M:%S %Z %Y')
self.swaglogger = swaglogger
self.host = socket.gethostname()
def format_dict(self, record):
record_dict = NiceOrderedDict()
if isinstance(record.msg, dict):
record_dict['msg'] = record.msg
else:
try:
record_dict['msg'] = record.getMessage()
except (ValueError, TypeError):
record_dict['msg'] = [record.msg]+record.args
record_dict['ctx'] = self.swaglogger.get_ctx()
if record.exc_info:
record_dict['exc_info'] = self.formatException(record.exc_info)
record_dict['level'] = record.levelname
record_dict['levelnum'] = record.levelno
record_dict['name'] = record.name
record_dict['filename'] = record.filename
record_dict['lineno'] = record.lineno
record_dict['pathname'] = record.pathname
record_dict['module'] = record.module
record_dict['funcName'] = record.funcName
record_dict['host'] = self.host
record_dict['process'] = record.process
record_dict['thread'] = record.thread
record_dict['threadName'] = record.threadName
record_dict['created'] = record.created
return record_dict
def format(self, record):
return json_robust_dumps(self.format_dict(record))
class SwagErrorFilter(logging.Filter):
def filter(self, record):
return record.levelno < logging.ERROR
_tmpfunc = lambda: 0
_srcfile = os.path.normcase(_tmpfunc.__code__.co_filename)
class SwagLogger(logging.Logger):
def __init__(self):
logging.Logger.__init__(self, "swaglog")
self.global_ctx = {}
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
except AttributeError:
self.log_local.ctx = {}
return self.log_local.ctx
def get_ctx(self):
return dict(self.local_ctx(), **self.global_ctx)
@contextmanager
def ctx(self, **kwargs):
old_ctx = self.local_ctx()
self.log_local.ctx = copy.copy(old_ctx) or {}
self.log_local.ctx.update(kwargs)
try:
yield
finally:
self.log_local.ctx = old_ctx
def bind(self, **kwargs):
self.local_ctx().update(kwargs)
def bind_global(self, **kwargs):
self.global_ctx.update(kwargs)
def event(self, event_name, *args, **kwargs):
evt = NiceOrderedDict()
evt['event'] = event_name
if args:
evt['args'] = args
evt.update(kwargs)
ctx = self.get_ctx()
if ctx:
evt['ctx'] = self.get_ctx()
if 'error' in kwargs:
self.error(evt)
else:
self.info(evt)
if __name__ == "__main__":
log = SwagLogger()
stdout_handler = logging.StreamHandler(sys.stdout)
stdout_handler.setLevel(logging.INFO)
stdout_handler.addFilter(SwagErrorFilter())
log.addHandler(stdout_handler)
stderr_handler = logging.StreamHandler(sys.stderr)
stderr_handler.setLevel(logging.ERROR)
log.addHandler(stderr_handler)
log.info("asdasd %s", "a")
log.info({'wut': 1})
log.warning("warning")
log.error("error")
log.critical("critical")
log.event("test", x="y")
with log.ctx():
stdout_handler.setFormatter(SwagFormatter(log))
stderr_handler.setFormatter(SwagFormatter(log))
log.bind(user="some user")
log.info("in req")
print("")
log.warning("warning")
print("")
log.error("error")
print("")
log.critical("critical")
print("")
log.event("do_req", a=1, b="c")

21
common/numpy_fast.py Normal file
View File

@@ -0,0 +1,21 @@
def int_rnd(x):
return int(round(x))
def clip(x, lo, hi):
return max(lo, min(hi, x))
def interp(x, xp, fp):
N = len(xp)
def get_interp(xv):
hi = 0
while hi < N and xv > xp[hi]:
hi += 1
low = hi - 1
return fp[-1] if hi == N and xv > xp[low] else (
fp[0] if hi == 0 else
(xv - xp[low]) * (fp[hi] - fp[low]) / (xp[hi] - xp[low]) + fp[low])
return [get_interp(v) for v in x] if hasattr(
x, '__iter__') else get_interp(x)
def mean(x):
return sum(x) / len(x)

458
common/params.py Executable file
View File

@@ -0,0 +1,458 @@
#!/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.
On Android, we store params under params_dir = /data/params. The writer lock is a file
"<params_dir>/.lock" taken using flock(), and data is stored in a directory symlinked to by
"<params_dir>/d".
Each key, value pair is stored as a file with named <key> with contents <value>, located in
<params_dir>/d/<key>
Readers of a single key can just open("<params_dir>/d/<key>") and read the file contents.
Readers who want a consistent snapshot of multiple keys should take the lock.
Writers should take the lock before modifying anything. Writers should also leave the DB in a
consistent state after a crash. The implementation below does this by copying all params to a temp
directory <params_dir>/<tmp>, then atomically symlinking <params_dir>/<d> to <params_dir>/<tmp>
before deleting the old <params_dir>/<d> directory.
Writers that only modify a single key can simply take the lock, then swap the corresponding value
file in place without messing with <params_dir>/d.
"""
import time
import os
import errno
import sys
import shutil
import fcntl
import tempfile
import threading
from enum import Enum
def mkdirs_exists_ok(path):
try:
os.makedirs(path)
except OSError:
if not os.path.isdir(path):
raise
class TxType(Enum):
PERSISTENT = 1
CLEAR_ON_MANAGER_START = 2
CLEAR_ON_PANDA_DISCONNECT = 3
class UnknownKeyName(Exception):
pass
keys = {
"AccessToken": [TxType.PERSISTENT],
"AthenadPid": [TxType.PERSISTENT],
"CalibrationParams": [TxType.PERSISTENT],
"CarParams": [TxType.CLEAR_ON_MANAGER_START, TxType.CLEAR_ON_PANDA_DISCONNECT],
"CarVin": [TxType.CLEAR_ON_MANAGER_START, TxType.CLEAR_ON_PANDA_DISCONNECT],
"CompletedTrainingVersion": [TxType.PERSISTENT],
"ControlsParams": [TxType.PERSISTENT],
"DoUninstall": [TxType.CLEAR_ON_MANAGER_START],
"DongleId": [TxType.PERSISTENT],
"GitBranch": [TxType.PERSISTENT],
"GitCommit": [TxType.PERSISTENT],
"GitRemote": [TxType.PERSISTENT],
"GithubSshKeys": [TxType.PERSISTENT],
"HasAcceptedTerms": [TxType.PERSISTENT],
"HasCompletedSetup": [TxType.PERSISTENT],
"IsGeofenceEnabled": [TxType.PERSISTENT],
"IsMetric": [TxType.PERSISTENT],
"IsRHD": [TxType.PERSISTENT],
"IsUpdateAvailable": [TxType.PERSISTENT],
"IsUploadRawEnabled": [TxType.PERSISTENT],
"IsUploadVideoOverCellularEnabled": [TxType.PERSISTENT],
"LastUpdateTime": [TxType.PERSISTENT],
"LimitSetSpeed": [TxType.PERSISTENT],
"LimitSetSpeedNeural": [TxType.PERSISTENT],
"LiveParameters": [TxType.PERSISTENT],
"LongitudinalControl": [TxType.PERSISTENT],
"OpenpilotEnabledToggle": [TxType.PERSISTENT],
"PandaFirmware": [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],
#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],
"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],
"DragonEnableSlowOnCurve": [TxType.PERSISTENT],
"DragonEnableLeadCarMovingAlert": [TxType.PERSISTENT],
"DragonToyotaSnGMod": [TxType.PERSISTENT],
"DragonIsEON": [TxType.PERSISTENT],
"DragonHWChecked": [TxType.PERSISTENT],
}
def fsync_dir(path):
fd = os.open(path, os.O_RDONLY)
try:
os.fsync(fd)
finally:
os.close(fd)
class FileLock():
def __init__(self, path, create):
self._path = path
self._create = create
self._fd = None
def acquire(self):
self._fd = os.open(self._path, os.O_CREAT if self._create else 0)
fcntl.flock(self._fd, fcntl.LOCK_EX)
def release(self):
if self._fd is not None:
os.close(self._fd)
self._fd = None
class DBAccessor():
def __init__(self, path):
self._path = path
self._vals = None
def keys(self):
self._check_entered()
return self._vals.keys()
def get(self, key):
self._check_entered()
try:
return self._vals[key]
except KeyError:
return None
def _get_lock(self, create):
lock = FileLock(os.path.join(self._path, ".lock"), create)
lock.acquire()
return lock
def _read_values_locked(self):
"""Callers should hold a lock while calling this method."""
vals = {}
try:
data_path = self._data_path()
keys = os.listdir(data_path)
for key in keys:
with open(os.path.join(data_path, key), "rb") as f:
vals[key] = f.read()
except (OSError, IOError) as e:
# Either the DB hasn't been created yet, or somebody wrote a bug and left the DB in an
# inconsistent state. Either way, return empty.
if e.errno == errno.ENOENT:
return {}
return vals
def _data_path(self):
return os.path.join(self._path, "d")
def _check_entered(self):
if self._vals is None:
raise Exception("Must call __enter__ before using DB")
class DBReader(DBAccessor):
def __enter__(self):
try:
lock = self._get_lock(False)
except OSError as e:
# Do not create lock if it does not exist.
if e.errno == errno.ENOENT:
self._vals = {}
return self
try:
# Read everything.
self._vals = self._read_values_locked()
return self
finally:
lock.release()
def __exit__(self, type, value, traceback): pass
class DBWriter(DBAccessor):
def __init__(self, path):
super(DBWriter, self).__init__(path)
self._lock = None
self._prev_umask = None
def put(self, key, value):
self._vals[key] = value
def delete(self, key):
self._vals.pop(key, None)
def __enter__(self):
mkdirs_exists_ok(self._path)
# Make sure we can write and that permissions are correct.
self._prev_umask = os.umask(0)
try:
os.chmod(self._path, 0o777)
self._lock = self._get_lock(True)
self._vals = self._read_values_locked()
except:
os.umask(self._prev_umask)
self._prev_umask = None
raise
return self
def __exit__(self, type, value, traceback):
self._check_entered()
try:
# data_path refers to the externally used path to the params. It is a symlink.
# old_data_path is the path currently pointed to by data_path.
# tempdir_path is a path where the new params will go, which the new data path will point to.
# new_data_path is a temporary symlink that will atomically overwrite data_path.
#
# The current situation is:
# data_path -> old_data_path
# We're going to write params data to tempdir_path
# tempdir_path -> params data
# Then point new_data_path to tempdir_path
# new_data_path -> tempdir_path
# Then atomically overwrite data_path with new_data_path
# data_path -> tempdir_path
old_data_path = None
new_data_path = None
tempdir_path = tempfile.mkdtemp(prefix=".tmp", dir=self._path)
try:
# Write back all keys.
os.chmod(tempdir_path, 0o777)
for k, v in self._vals.items():
with open(os.path.join(tempdir_path, k), "wb") as f:
f.write(v)
f.flush()
os.fsync(f.fileno())
fsync_dir(tempdir_path)
data_path = self._data_path()
try:
old_data_path = os.path.join(self._path, os.readlink(data_path))
except (OSError, IOError):
# NOTE(mgraczyk): If other DB implementations have bugs, this could cause
# copies to be left behind, but we still want to overwrite.
pass
new_data_path = "{}.link".format(tempdir_path)
os.symlink(os.path.basename(tempdir_path), new_data_path)
os.rename(new_data_path, data_path)
fsync_dir(self._path)
finally:
# If the rename worked, we can delete the old data. Otherwise delete the new one.
success = new_data_path is not None and os.path.exists(data_path) and (
os.readlink(data_path) == os.path.basename(tempdir_path))
if success:
if old_data_path is not None:
shutil.rmtree(old_data_path)
else:
shutil.rmtree(tempdir_path)
# Regardless of what happened above, there should be no link at new_data_path.
if new_data_path is not None and os.path.islink(new_data_path):
os.remove(new_data_path)
finally:
os.umask(self._prev_umask)
self._prev_umask = None
# Always release the lock.
self._lock.release()
self._lock = None
def read_db(params_path, key):
path = "%s/d/%s" % (params_path, key)
try:
with open(path, "rb") as f:
return f.read()
except IOError:
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()
try:
tmp_path = tempfile.mktemp(prefix=".tmp", dir=params_path)
with open(tmp_path, "wb") as f:
f.write(value)
f.flush()
os.fsync(f.fileno())
path = "%s/d/%s" % (params_path, key)
os.rename(tmp_path, path)
fsync_dir(os.path.dirname(path))
finally:
os.umask(prev_umask)
lock.release()
class Params():
def __init__(self, db='/data/params'):
self.db = db
# create the database if it doesn't exist...
if not os.path.exists(self.db+"/d"):
with self.transaction(write=True):
pass
def transaction(self, write=False):
if write:
return DBWriter(self.db)
else:
return DBReader(self.db)
def _clear_keys_with_type(self, tx_type):
with self.transaction(write=True) as txn:
for key in keys:
if tx_type in keys[key]:
txn.delete(key)
def manager_start(self):
self._clear_keys_with_type(TxType.CLEAR_ON_MANAGER_START)
def panda_disconnect(self):
self._clear_keys_with_type(TxType.CLEAR_ON_PANDA_DISCONNECT)
def delete(self, key):
with self.transaction(write=True) as txn:
txn.delete(key)
def get(self, key, block=False, encoding=None):
if key not in keys:
raise UnknownKeyName(key)
while 1:
ret = read_db(self.db, key)
if not block or ret is not None:
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:
params.put(sys.argv[1], sys.argv[2])
else:
for k in keys:
pp = params.get(k)
if pp is None:
print("%s is None" % k)
elif all(ord(c) < 128 and ord(c) >= 32 for c in pp):
print("%s = %s" % (k, pp))
else:
print("%s = %s" % (k, pp.encode("hex")))
# Test multiprocess:
# seq 0 100000 | xargs -P20 -I{} python common/params.py DongleId {} && sleep 0.05
# while python common/params.py DongleId; do sleep 0.05; done

46
common/profiler.py Normal file
View File

@@ -0,0 +1,46 @@
import time
class Profiler():
def __init__(self, enabled=False):
self.enabled = enabled
self.cp = {}
self.cp_ignored = []
self.iter = 0
self.start_time = time.time()
self.last_time = self.start_time
self.tot = 0.
def reset(self, enabled=False):
self.enabled = enabled
self.cp = {}
self.cp_ignored = []
self.iter = 0
self.start_time = time.time()
self.last_time = self.start_time
def checkpoint(self, name, ignore=False):
# ignore flag needed when benchmarking threads with ratekeeper
if not self.enabled:
return
tt = time.time()
if name not in self.cp:
self.cp[name] = 0.
if ignore:
self.cp_ignored.append(name)
self.cp[name] += tt - self.last_time
if not ignore:
self.tot += tt - self.last_time
self.last_time = tt
def display(self):
if not self.enabled:
return
self.iter += 1
print("******* Profiling *******")
for n, ms in sorted(self.cp.items(), key=lambda x: -x[1]):
if n in self.cp_ignored:
print("%30s: %7.2f percent: %3.0f IGNORED" % (n, ms*1000.0, ms/self.tot*100))
else:
print("%30s: %7.2f percent: %3.0f" % (n, ms*1000.0, ms/self.tot*100))
print("Iter clock: %2.6f TOTAL: %2.2f" % (self.tot/self.iter, self.tot))

82
common/realtime.py Normal file
View File

@@ -0,0 +1,82 @@
"""Utilities for reading real time clocks and keeping soft real time constraints."""
import os
import time
import platform
import subprocess
import multiprocessing
from cffi import FFI
# Build and load cython module
import pyximport
installer = pyximport.install(inplace=True, build_dir='/tmp')
from common.clock import monotonic_time, sec_since_boot # pylint: disable=no-name-in-module, import-error
pyximport.uninstall(*installer)
assert monotonic_time
assert sec_since_boot
# time step for each process
DT_CTRL = 0.01 # controlsd
DT_PLAN = 0.05 # mpc
DT_MDL = 0.05 # model
DT_RDR = 0.05 # radar
DT_DMON = 0.1 # driver monitoring
DT_TRML = 0.5 # thermald and manager
ffi = FFI()
ffi.cdef("long syscall(long number, ...);")
libc = ffi.dlopen(None)
def set_realtime_priority(level):
if os.getuid() != 0:
print("not setting priority, not root")
return
if platform.machine() == "x86_64":
NR_gettid = 186
elif platform.machine() == "aarch64":
NR_gettid = 178
else:
raise NotImplementedError
tid = libc.syscall(NR_gettid)
return subprocess.call(['chrt', '-f', '-p', str(level), str(tid)])
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
self._next_frame_time = sec_since_boot() + self._interval
self._print_delay_threshold = print_delay_threshold
self._frame = 0
self._remaining = 0
self._process_name = multiprocessing.current_process().name
@property
def frame(self):
return self._frame
@property
def remaining(self):
return self._remaining
# Maintain loop rate by calling this at the end of each loop
def keep_time(self):
lagged = self.monitor_time()
if self._remaining > 0:
time.sleep(self._remaining)
return lagged
# this only monitor the cumulative lag, but does not enforce a rate
def monitor_time(self):
lagged = False
remaining = self._next_frame_time - sec_since_boot()
self._next_frame_time += self._interval
if self._print_delay_threshold is not None and remaining < -self._print_delay_threshold:
print("%s lagging by %.2f ms" % (self._process_name, -remaining * 1000))
lagged = True
self._frame += 1
self._remaining = remaining
return lagged

28
common/spinner.py Normal file
View File

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

73
common/stat_live.py Normal file
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():

81
common/sympy_helpers.py Normal file
View File

@@ -0,0 +1,81 @@
#!/usr/bin/env python3
import sympy as sp
import numpy as np
def cross(x):
ret = sp.Matrix(np.zeros((3,3)))
ret[0,1], ret[0,2] = -x[2], x[1]
ret[1,0], ret[1,2] = x[2], -x[0]
ret[2,0], ret[2,1] = -x[1], x[0]
return ret
def euler_rotate(roll, pitch, yaw):
# make symbolic rotation matrix from eulers
matrix_roll = sp.Matrix([[1, 0, 0],
[0, sp.cos(roll), -sp.sin(roll)],
[0, sp.sin(roll), sp.cos(roll)]])
matrix_pitch = sp.Matrix([[sp.cos(pitch), 0, sp.sin(pitch)],
[0, 1, 0],
[-sp.sin(pitch), 0, sp.cos(pitch)]])
matrix_yaw = sp.Matrix([[sp.cos(yaw), -sp.sin(yaw), 0],
[sp.sin(yaw), sp.cos(yaw), 0],
[0, 0, 1]])
return matrix_yaw*matrix_pitch*matrix_roll
def quat_rotate(q0, q1, q2, q3):
# make symbolic rotation matrix from quat
return sp.Matrix([[q0**2 + q1**2 - q2**2 - q3**2, 2*(q1*q2 + q0*q3), 2*(q1*q3 - q0*q2)],
[2*(q1*q2 - q0*q3), q0**2 - q1**2 + q2**2 - q3**2, 2*(q2*q3 + q0*q1)],
[2*(q1*q3 + q0*q2), 2*(q2*q3 - q0*q1), q0**2 - q1**2 - q2**2 + q3**2]]).T
def quat_matrix_l(p):
return sp.Matrix([[p[0], -p[1], -p[2], -p[3]],
[p[1], p[0], -p[3], p[2]],
[p[2], p[3], p[0], -p[1]],
[p[3], -p[2], p[1], p[0]]])
def quat_matrix_r(p):
return sp.Matrix([[p[0], -p[1], -p[2], -p[3]],
[p[1], p[0], p[3], -p[2]],
[p[2], -p[3], p[0], p[1]],
[p[3], p[2], -p[1], p[0]]])
def sympy_into_c(sympy_functions):
from sympy.utilities import codegen
routines = []
for name, expr, args in sympy_functions:
r = codegen.make_routine(name, expr, language="C99")
# argument ordering input to sympy is broken with function with output arguments
nargs = []
# reorder the input arguments
for aa in args:
if aa is None:
nargs.append(codegen.InputArgument(sp.Symbol('unused'), dimensions=[1,1]))
continue
found = False
for a in r.arguments:
if str(aa.name) == str(a.name):
nargs.append(a)
found = True
break
if not found:
# [1,1] is a hack for Matrices
nargs.append(codegen.InputArgument(aa, dimensions=[1,1]))
# add the output arguments
for a in r.arguments:
if type(a) == codegen.OutputArgument:
nargs.append(a)
#assert len(r.arguments) == len(args)+1
r.arguments = nargs
# add routine to list
routines.append(r)
[(c_name, c_code), (h_name, c_header)] = codegen.get_code_generator('C', 'ekf', 'C99').write(routines, "ekf")
c_code = '\n'.join(x for x in c_code.split("\n") if len(x) > 0 and x[0] != '#')
c_header = '\n'.join(x for x in c_header.split("\n") if len(x) > 0 and x[0] != '#')
return c_header, c_code

9
common/testing.py Normal file
View File

@@ -0,0 +1,9 @@
import os
from nose.tools import nottest
def phone_only(x):
if os.path.isfile("/init.qcom.rc"):
return x
else:
return nottest(x)

28
common/timeout.py Normal file
View File

@@ -0,0 +1,28 @@
import signal
class TimeoutException(Exception):
pass
class Timeout:
"""
Timeout context manager.
For example this code will raise a TimeoutException:
with Timeout(seconds=5, error_msg="Sleep was too long"):
time.sleep(10)
"""
def __init__(self, seconds, error_msg=None):
if error_msg is None:
error_msg = 'Timed out after {} seconds'.format(seconds)
self.seconds = seconds
self.error_msg = error_msg
def handle_timeout(self, signume, frame):
raise TimeoutException(self.error_msg)
def __enter__(self):
signal.signal(signal.SIGALRM, self.handle_timeout)
signal.alarm(self.seconds)
def __exit__(self, exc_type, exc_val, exc_tb):
signal.alarm(0)

View File

View File

@@ -0,0 +1,250 @@
import numpy as np
import common.transformations.orientation as orient
import math
FULL_FRAME_SIZE = (1164, 874)
W, H = FULL_FRAME_SIZE[0], FULL_FRAME_SIZE[1]
eon_focal_length = FOCAL = 910.0
# aka 'K' aka camera_frame_from_view_frame
eon_intrinsics = np.array([
[FOCAL, 0., W/2.],
[ 0., FOCAL, H/2.],
[ 0., 0., 1.]])
leon_dcam_intrinsics = np.array([
[650, 0, 816//2],
[ 0, 650, 612//2],
[ 0, 0, 1]])
eon_dcam_intrinsics = np.array([
[860, 0, 1152//2],
[ 0, 860, 864//2],
[ 0, 0, 1]])
# aka 'K_inv' aka view_frame_from_camera_frame
eon_intrinsics_inv = np.linalg.inv(eon_intrinsics)
# device/mesh : x->forward, y-> right, z->down
# view : x->right, y->down, z->forward
device_frame_from_view_frame = np.array([
[ 0., 0., 1.],
[ 1., 0., 0.],
[ 0., 1., 0.]
])
view_frame_from_device_frame = device_frame_from_view_frame.T
def get_calib_from_vp(vp):
vp_norm = normalize(vp)
yaw_calib = np.arctan(vp_norm[0])
pitch_calib = -np.arctan(vp_norm[1]*np.cos(yaw_calib))
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):
device_from_road = orient.rot_from_euler([roll, pitch, yaw]).dot(np.diag([1, -1, -1]))
view_from_road = view_frame_from_device_frame.dot(device_from_road)
return np.hstack((view_from_road, [[0], [height], [0]]))
def vp_from_ke(m):
"""
Computes the vanishing point from the product of the intrinsic and extrinsic
matrices C = KE.
The vanishing point is defined as lim x->infinity C (x, 0, 0, 1).T
"""
return (m[0, 0]/m[2,0], m[1,0]/m[2,0])
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]),
-(m[0, 0] - m[0, 1] * m[2, 0] / m[2, 1]))
def normalize(img_pts, intrinsics=eon_intrinsics):
# normalizes image coordinates
# accepts single pt or array of pts
intrinsics_inv = np.linalg.inv(intrinsics)
img_pts = np.array(img_pts)
input_shape = img_pts.shape
img_pts = np.atleast_2d(img_pts)
img_pts = np.hstack((img_pts, np.ones((img_pts.shape[0],1))))
img_pts_normalized = img_pts.dot(intrinsics_inv.T)
img_pts_normalized[(img_pts < 0).any(axis=1)] = np.nan
return img_pts_normalized[:,:2].reshape(input_shape)
def denormalize(img_pts, intrinsics=eon_intrinsics):
# denormalizes image coordinates
# accepts single pt or array of pts
img_pts = np.array(img_pts)
input_shape = img_pts.shape
img_pts = np.atleast_2d(img_pts)
img_pts = np.hstack((img_pts, np.ones((img_pts.shape[0],1))))
img_pts_denormalized = img_pts.dot(intrinsics.T)
img_pts_denormalized[img_pts_denormalized[:,0] > W] = np.nan
img_pts_denormalized[img_pts_denormalized[:,0] < 0] = np.nan
img_pts_denormalized[img_pts_denormalized[:,1] > H] = np.nan
img_pts_denormalized[img_pts_denormalized[:,1] < 0] = np.nan
return img_pts_denormalized[:,:2].reshape(input_shape)
def device_from_ecef(pos_ecef, orientation_ecef, pt_ecef):
# device from ecef frame
# device frame is x -> forward, y-> right, z -> down
# accepts single pt or array of pts
input_shape = pt_ecef.shape
pt_ecef = np.atleast_2d(pt_ecef)
ecef_from_device_rot = orient.rotations_from_quats(orientation_ecef)
device_from_ecef_rot = ecef_from_device_rot.T
pt_ecef_rel = pt_ecef - pos_ecef
pt_device = np.einsum('jk,ik->ij', device_from_ecef_rot, pt_ecef_rel)
return pt_device.reshape(input_shape)
def img_from_device(pt_device):
# img coordinates from pts in device frame
# first transforms to view frame, then to img coords
# accepts single pt or array of pts
input_shape = pt_device.shape
pt_device = np.atleast_2d(pt_device)
pt_view = np.einsum('jk,ik->ij', view_frame_from_device_frame, pt_device)
# This function should never return negative depths
pt_view[pt_view[:,2] < 0] = np.nan
pt_img = pt_view/pt_view[:,2:3]
return pt_img.reshape(input_shape)[:,:2]
#TODO please use generic img transform below
def rotate_img(img, eulers, crop=None, intrinsics=eon_intrinsics):
import cv2 # pylint: disable=no-name-in-module, import-error
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,
augment_trans=np.array([0,0,0]),
augment_eulers=np.array([0,0,0]),
from_intr=eon_intrinsics,
to_intr=eon_intrinsics,
output_size=None,
pretransform=None,
top_hacks=False,
yuv=False,
alpha=1.0,
beta=0,
blur=0):
import cv2 # pylint: disable=no-name-in-module, import-error
cv2.setNumThreads(1)
if yuv:
base_img = cv2.cvtColor(base_img, cv2.COLOR_YUV2RGB_I420)
size = base_img.shape[:2]
if not output_size:
output_size = size[::-1]
cy = from_intr[1,2]
def get_M(h=1.22):
quadrangle = np.array([[0, cy + 20],
[size[1]-1, cy + 20],
[0, size[0]-1],
[size[1]-1, size[0]-1]], dtype=np.float32)
quadrangle_norm = np.hstack((normalize(quadrangle, intrinsics=from_intr), np.ones((4,1))))
quadrangle_world = np.column_stack((h*quadrangle_norm[:,0]/quadrangle_norm[:,1],
h*np.ones(4),
h/quadrangle_norm[:,1]))
rot = orient.rot_from_euler(augment_eulers)
to_extrinsics = np.hstack((rot.T, -augment_trans[:,None]))
to_KE = to_intr.dot(to_extrinsics)
warped_quadrangle_full = np.einsum('jk,ik->ij', to_KE, np.hstack((quadrangle_world, np.ones((4,1)))))
warped_quadrangle = np.column_stack((warped_quadrangle_full[:,0]/warped_quadrangle_full[:,2],
warped_quadrangle_full[:,1]/warped_quadrangle_full[:,2])).astype(np.float32)
M = cv2.getPerspectiveTransform(quadrangle, warped_quadrangle.astype(np.float32))
return M
M = get_M()
if pretransform is not None:
M = M.dot(pretransform)
augmented_rgb = cv2.warpPerspective(base_img, M, output_size, borderMode=cv2.BORDER_REPLICATE)
if top_hacks:
cyy = int(math.ceil(to_intr[1,2]))
M = get_M(1000)
if pretransform is not None:
M = M.dot(pretransform)
augmented_rgb[:cyy] = cv2.warpPerspective(base_img, M, (output_size[0], cyy), borderMode=cv2.BORDER_REPLICATE)
# 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=no-name-in-module, import-error
rgb = cv2.cvtColor(frame, cv2.COLOR_YUV2RGB_I420)
if not center:
center = (rgb.shape[0]/2, rgb.shape[1]/2)
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)

View File

@@ -0,0 +1,108 @@
import numpy as np
"""
Coordinate transformation module. All methods accept arrays as input
with each row as a position.
"""
a = 6378137
b = 6356752.3142
esq = 6.69437999014 * 0.001
e1sq = 6.73949674228 * 0.001
def geodetic2ecef(geodetic, radians=False):
geodetic = np.array(geodetic)
input_shape = geodetic.shape
geodetic = np.atleast_2d(geodetic)
ratio = 1.0 if radians else (np.pi / 180.0)
lat = ratio*geodetic[:,0]
lon = ratio*geodetic[:,1]
alt = geodetic[:,2]
xi = np.sqrt(1 - esq * np.sin(lat)**2)
x = (a / xi + alt) * np.cos(lat) * np.cos(lon)
y = (a / xi + alt) * np.cos(lat) * np.sin(lon)
z = (a / xi * (1 - esq) + alt) * np.sin(lat)
ecef = np.array([x, y, z]).T
return ecef.reshape(input_shape)
def ecef2geodetic(ecef, radians=False):
"""
Convert ECEF coordinates to geodetic using ferrari's method
"""
# Save shape and export column
ecef = np.atleast_1d(ecef)
input_shape = ecef.shape
ecef = np.atleast_2d(ecef)
x, y, z = ecef[:, 0], ecef[:, 1], ecef[:, 2]
ratio = 1.0 if radians else (180.0 / np.pi)
# Conver from ECEF to geodetic using Ferrari's methods
# https://en.wikipedia.org/wiki/Geographic_coordinate_conversion#Ferrari.27s_solution
r = np.sqrt(x * x + y * y)
Esq = a * a - b * b
F = 54 * b * b * z * z
G = r * r + (1 - esq) * z * z - esq * Esq
C = (esq * esq * F * r * r) / (pow(G, 3))
S = np.cbrt(1 + C + np.sqrt(C * C + 2 * C))
P = F / (3 * pow((S + 1 / S + 1), 2) * G * G)
Q = np.sqrt(1 + 2 * esq * esq * P)
r_0 = -(P * esq * r) / (1 + Q) + np.sqrt(0.5 * a * a*(1 + 1.0 / Q) - \
P * (1 - esq) * z * z / (Q * (1 + Q)) - 0.5 * P * r * r)
U = np.sqrt(pow((r - esq * r_0), 2) + z * z)
V = np.sqrt(pow((r - esq * r_0), 2) + (1 - esq) * z * z)
Z_0 = b * b * z / (a * V)
h = U * (1 - b * b / (a * V))
lat = ratio*np.arctan((z + e1sq * Z_0) / r)
lon = ratio*np.arctan2(y, x)
# stack the new columns and return to the original shape
geodetic = np.column_stack((lat, lon, h))
return geodetic.reshape(input_shape)
class LocalCoord():
"""
Allows conversions to local frames. In this case NED.
That is: North East Down from the start position in
meters.
"""
def __init__(self, init_geodetic, init_ecef):
self.init_ecef = init_ecef
lat, lon, _ = (np.pi/180)*np.array(init_geodetic)
self.ned2ecef_matrix = np.array([[-np.sin(lat)*np.cos(lon), -np.sin(lon), -np.cos(lat)*np.cos(lon)],
[-np.sin(lat)*np.sin(lon), np.cos(lon), -np.cos(lat)*np.sin(lon)],
[np.cos(lat), 0, -np.sin(lat)]])
self.ecef2ned_matrix = self.ned2ecef_matrix.T
@classmethod
def from_geodetic(cls, init_geodetic):
init_ecef = geodetic2ecef(init_geodetic)
return LocalCoord(init_geodetic, init_ecef)
@classmethod
def from_ecef(cls, init_ecef):
init_geodetic = ecef2geodetic(init_ecef)
return LocalCoord(init_geodetic, init_ecef)
def ecef2ned(self, ecef):
ecef = np.array(ecef)
return np.dot(self.ecef2ned_matrix, (ecef - self.init_ecef).T).T
def ned2ecef(self, ned):
ned = np.array(ned)
# Transpose so that init_ecef will broadcast correctly for 1d or 2d ned.
return (np.dot(self.ned2ecef_matrix, ned.T).T + self.init_ecef)
def geodetic2ned(self, geodetic):
ecef = geodetic2ecef(geodetic)
return self.ecef2ned(ecef)
def ned2geodetic(self, ned):
ecef = self.ned2ecef(ned)
return ecef2geodetic(ecef)

View File

@@ -0,0 +1,150 @@
import numpy as np
from common.transformations.camera import (FULL_FRAME_SIZE, eon_focal_length,
get_view_frame_from_road_frame,
vp_from_ke)
# segnet
SEGNET_SIZE = (512, 384)
segnet_frame_from_camera_frame = np.array([
[float(SEGNET_SIZE[0])/FULL_FRAME_SIZE[0], 0., ],
[ 0., float(SEGNET_SIZE[1])/FULL_FRAME_SIZE[1]]])
# model
MODEL_INPUT_SIZE = (320, 160)
MODEL_YUV_SIZE = (MODEL_INPUT_SIZE[0], MODEL_INPUT_SIZE[1] * 3 // 2)
MODEL_CX = MODEL_INPUT_SIZE[0]/2.
MODEL_CY = 21.
model_zoom = 1.25
model_height = 1.22
# canonical model transform
model_intrinsics = np.array(
[[ eon_focal_length / model_zoom, 0. , MODEL_CX],
[ 0. , eon_focal_length / model_zoom, MODEL_CY],
[ 0. , 0. , 1.]])
# MED model
MEDMODEL_INPUT_SIZE = (512, 256)
MEDMODEL_YUV_SIZE = (MEDMODEL_INPUT_SIZE[0], MEDMODEL_INPUT_SIZE[1] * 3 // 2)
MEDMODEL_CY = 47.6
medmodel_zoom = 1.
medmodel_intrinsics = np.array(
[[ eon_focal_length / medmodel_zoom, 0. , 0.5 * MEDMODEL_INPUT_SIZE[0]],
[ 0. , eon_focal_length / medmodel_zoom, MEDMODEL_CY],
[ 0. , 0. , 1.]])
# BIG model
BIGMODEL_INPUT_SIZE = (864, 288)
BIGMODEL_YUV_SIZE = (BIGMODEL_INPUT_SIZE[0], BIGMODEL_INPUT_SIZE[1] * 3 // 2)
bigmodel_zoom = 1.
bigmodel_intrinsics = np.array(
[[ eon_focal_length / bigmodel_zoom, 0. , 0.5 * BIGMODEL_INPUT_SIZE[0]],
[ 0. , eon_focal_length / bigmodel_zoom, 0.2 * BIGMODEL_INPUT_SIZE[1]],
[ 0. , 0. , 1.]])
bigmodel_border = np.array([
[0,0,1],
[BIGMODEL_INPUT_SIZE[0], 0, 1],
[BIGMODEL_INPUT_SIZE[0], BIGMODEL_INPUT_SIZE[1], 1],
[0, BIGMODEL_INPUT_SIZE[1], 1],
])
model_frame_from_road_frame = np.dot(model_intrinsics,
get_view_frame_from_road_frame(0, 0, 0, model_height))
bigmodel_frame_from_road_frame = np.dot(bigmodel_intrinsics,
get_view_frame_from_road_frame(0, 0, 0, model_height))
medmodel_frame_from_road_frame = np.dot(medmodel_intrinsics,
get_view_frame_from_road_frame(0, 0, 0, model_height))
model_frame_from_bigmodel_frame = np.dot(model_intrinsics, np.linalg.inv(bigmodel_intrinsics))
# 'camera from model camera'
def get_model_height_transform(camera_frame_from_road_frame, height):
camera_frame_from_road_ground = np.dot(camera_frame_from_road_frame, np.array([
[1, 0, 0],
[0, 1, 0],
[0, 0, 0],
[0, 0, 1],
]))
camera_frame_from_road_high = np.dot(camera_frame_from_road_frame, np.array([
[1, 0, 0],
[0, 1, 0],
[0, 0, height - model_height],
[0, 0, 1],
]))
road_high_from_camera_frame = np.linalg.inv(camera_frame_from_road_high)
high_camera_from_low_camera = np.dot(camera_frame_from_road_ground, road_high_from_camera_frame)
return high_camera_from_low_camera
# camera_frame_from_model_frame aka 'warp matrix'
# was: calibration.h/CalibrationTransform
def get_camera_frame_from_model_frame(camera_frame_from_road_frame, height=model_height):
vp = vp_from_ke(camera_frame_from_road_frame)
model_camera_from_model_frame = np.array([
[model_zoom, 0., vp[0] - MODEL_CX * model_zoom],
[ 0., model_zoom, vp[1] - MODEL_CY * model_zoom],
[ 0., 0., 1.],
])
# This function is super slow, so skip it if height is very close to canonical
# TODO: speed it up!
if abs(height - model_height) > 0.001: #
camera_from_model_camera = get_model_height_transform(camera_frame_from_road_frame, height)
else:
camera_from_model_camera = np.eye(3)
return np.dot(camera_from_model_camera, model_camera_from_model_frame)
def get_camera_frame_from_medmodel_frame(camera_frame_from_road_frame):
camera_frame_from_ground = camera_frame_from_road_frame[:, (0, 1, 3)]
medmodel_frame_from_ground = medmodel_frame_from_road_frame[:, (0, 1, 3)]
ground_from_medmodel_frame = np.linalg.inv(medmodel_frame_from_ground)
camera_frame_from_medmodel_frame = np.dot(camera_frame_from_ground, ground_from_medmodel_frame)
return camera_frame_from_medmodel_frame
def get_camera_frame_from_bigmodel_frame(camera_frame_from_road_frame):
camera_frame_from_ground = camera_frame_from_road_frame[:, (0, 1, 3)]
bigmodel_frame_from_ground = bigmodel_frame_from_road_frame[:, (0, 1, 3)]
ground_from_bigmodel_frame = np.linalg.inv(bigmodel_frame_from_ground)
camera_frame_from_bigmodel_frame = np.dot(camera_frame_from_ground, ground_from_bigmodel_frame)
return camera_frame_from_bigmodel_frame
def get_model_frame(snu_full, camera_frame_from_model_frame, size):
idxs = camera_frame_from_model_frame.dot(np.column_stack([np.tile(np.arange(size[0]), size[1]),
np.tile(np.arange(size[1]), (size[0],1)).T.flatten(),
np.ones(size[0] * size[1])]).T).T.astype(int)
calib_flat = snu_full[idxs[:,1], idxs[:,0]]
if len(snu_full.shape) == 3:
calib = calib_flat.reshape((size[1], size[0], 3))
elif len(snu_full.shape) == 2:
calib = calib_flat.reshape((size[1], size[0]))
else:
raise ValueError("shape of input img is weird")
return calib

View File

@@ -0,0 +1,295 @@
import numpy as np
from numpy import dot, inner, array, linalg
from common.transformations.coordinates import LocalCoord
'''
Vectorized functions that transform between
rotation matrices, euler angles and quaternions.
All support lists, array or array of arrays as inputs.
Supports both x2y and y_from_x format (y_from_x preferred!).
'''
def euler2quat(eulers):
eulers = array(eulers)
if len(eulers.shape) > 1:
output_shape = (-1,4)
else:
output_shape = (4,)
eulers = np.atleast_2d(eulers)
gamma, theta, psi = eulers[:,0], eulers[:,1], eulers[:,2]
q0 = np.cos(gamma / 2) * np.cos(theta / 2) * np.cos(psi / 2) + \
np.sin(gamma / 2) * np.sin(theta / 2) * np.sin(psi / 2)
q1 = np.sin(gamma / 2) * np.cos(theta / 2) * np.cos(psi / 2) - \
np.cos(gamma / 2) * np.sin(theta / 2) * np.sin(psi / 2)
q2 = np.cos(gamma / 2) * np.sin(theta / 2) * np.cos(psi / 2) + \
np.sin(gamma / 2) * np.cos(theta / 2) * np.sin(psi / 2)
q3 = np.cos(gamma / 2) * np.cos(theta / 2) * np.sin(psi / 2) - \
np.sin(gamma / 2) * np.sin(theta / 2) * np.cos(psi / 2)
quats = array([q0, q1, q2, q3]).T
for i in range(len(quats)):
if quats[i,0] < 0:
quats[i] = -quats[i]
return quats.reshape(output_shape)
def quat2euler(quats):
quats = array(quats)
if len(quats.shape) > 1:
output_shape = (-1,3)
else:
output_shape = (3,)
quats = np.atleast_2d(quats)
q0, q1, q2, q3 = quats[:,0], quats[:,1], quats[:,2], quats[:,3]
gamma = np.arctan2(2 * (q0 * q1 + q2 * q3), 1 - 2 * (q1**2 + q2**2))
theta = np.arcsin(2 * (q0 * q2 - q3 * q1))
psi = np.arctan2(2 * (q0 * q3 + q1 * q2), 1 - 2 * (q2**2 + q3**2))
eulers = array([gamma, theta, psi]).T
return eulers.reshape(output_shape)
def quat2rot(quats):
quats = array(quats)
input_shape = quats.shape
quats = np.atleast_2d(quats)
Rs = np.zeros((quats.shape[0], 3, 3))
q0 = quats[:, 0]
q1 = quats[:, 1]
q2 = quats[:, 2]
q3 = quats[:, 3]
Rs[:, 0, 0] = q0 * q0 + q1 * q1 - q2 * q2 - q3 * q3
Rs[:, 0, 1] = 2 * (q1 * q2 - q0 * q3)
Rs[:, 0, 2] = 2 * (q0 * q2 + q1 * q3)
Rs[:, 1, 0] = 2 * (q1 * q2 + q0 * q3)
Rs[:, 1, 1] = q0 * q0 - q1 * q1 + q2 * q2 - q3 * q3
Rs[:, 1, 2] = 2 * (q2 * q3 - q0 * q1)
Rs[:, 2, 0] = 2 * (q1 * q3 - q0 * q2)
Rs[:, 2, 1] = 2 * (q0 * q1 + q2 * q3)
Rs[:, 2, 2] = q0 * q0 - q1 * q1 - q2 * q2 + q3 * q3
if len(input_shape) < 2:
return Rs[0]
else:
return Rs
def rot2quat(rots):
input_shape = rots.shape
if len(input_shape) < 3:
rots = array([rots])
K3 = np.empty((len(rots), 4, 4))
K3[:, 0, 0] = (rots[:, 0, 0] - rots[:, 1, 1] - rots[:, 2, 2]) / 3.0
K3[:, 0, 1] = (rots[:, 1, 0] + rots[:, 0, 1]) / 3.0
K3[:, 0, 2] = (rots[:, 2, 0] + rots[:, 0, 2]) / 3.0
K3[:, 0, 3] = (rots[:, 1, 2] - rots[:, 2, 1]) / 3.0
K3[:, 1, 0] = K3[:, 0, 1]
K3[:, 1, 1] = (rots[:, 1, 1] - rots[:, 0, 0] - rots[:, 2, 2]) / 3.0
K3[:, 1, 2] = (rots[:, 2, 1] + rots[:, 1, 2]) / 3.0
K3[:, 1, 3] = (rots[:, 2, 0] - rots[:, 0, 2]) / 3.0
K3[:, 2, 0] = K3[:, 0, 2]
K3[:, 2, 1] = K3[:, 1, 2]
K3[:, 2, 2] = (rots[:, 2, 2] - rots[:, 0, 0] - rots[:, 1, 1]) / 3.0
K3[:, 2, 3] = (rots[:, 0, 1] - rots[:, 1, 0]) / 3.0
K3[:, 3, 0] = K3[:, 0, 3]
K3[:, 3, 1] = K3[:, 1, 3]
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 range(len(rots)):
_, eigvecs = linalg.eigh(K3[i].T)
eigvecs = eigvecs[:,3:]
q[i, 0] = eigvecs[-1]
q[i, 1:] = -eigvecs[:-1].flatten()
if q[i, 0] < 0:
q[i] = -q[i]
if len(input_shape) < 3:
return q[0]
else:
return q
def euler2rot(eulers):
return rotations_from_quats(euler2quat(eulers))
def rot2euler(rots):
return quat2euler(quats_from_rotations(rots))
quats_from_rotations = rot2quat
quat_from_rot = rot2quat
rotations_from_quats = quat2rot
rot_from_quat= quat2rot
rot_from_quat= quat2rot
euler_from_rot = rot2euler
euler_from_quat = quat2euler
rot_from_euler = euler2rot
quat_from_euler = euler2quat
'''
Random helpers below
'''
def quat_product(q, r):
t = np.zeros(4)
t[0] = r[0] * q[0] - r[1] * q[1] - r[2] * q[2] - r[3] * q[3]
t[1] = r[0] * q[1] + r[1] * q[0] - r[2] * q[3] + r[3] * q[2]
t[2] = r[0] * q[2] + r[1] * q[3] + r[2] * q[0] - r[3] * q[1]
t[3] = r[0] * q[3] - r[1] * q[2] + r[2] * q[1] + r[3] * q[0]
return t
def rot_matrix(roll, pitch, yaw):
cr, sr = np.cos(roll), np.sin(roll)
cp, sp = np.cos(pitch), np.sin(pitch)
cy, sy = np.cos(yaw), np.sin(yaw)
rr = array([[1,0,0],[0, cr,-sr],[0, sr, cr]])
rp = array([[cp,0,sp],[0, 1,0],[-sp, 0, cp]])
ry = array([[cy,-sy,0],[sy, cy,0],[0, 0, 1]])
return ry.dot(rp.dot(rr))
def rot(axis, angle):
# Rotates around an arbitrary axis
ret_1 = (1 - np.cos(angle)) * array([[axis[0]**2, axis[0] * axis[1], axis[0] * axis[2]], [
axis[1] * axis[0], axis[1]**2, axis[1] * axis[2]
], [axis[2] * axis[0], axis[2] * axis[1], axis[2]**2]])
ret_2 = np.cos(angle) * np.eye(3)
ret_3 = np.sin(angle) * array([[0, -axis[2], axis[1]], [axis[2], 0, -axis[0]],
[-axis[1], axis[0], 0]])
return ret_1 + ret_2 + ret_3
def ecef_euler_from_ned(ned_ecef_init, ned_pose):
'''
Got it from here:
Using Rotations to Build Aerospace Coordinate Systems
-Don Koks
'''
converter = LocalCoord.from_ecef(ned_ecef_init)
x0 = converter.ned2ecef([1, 0, 0]) - converter.ned2ecef([0, 0, 0])
y0 = converter.ned2ecef([0, 1, 0]) - converter.ned2ecef([0, 0, 0])
z0 = converter.ned2ecef([0, 0, 1]) - converter.ned2ecef([0, 0, 0])
x1 = rot(z0, ned_pose[2]).dot(x0)
y1 = rot(z0, ned_pose[2]).dot(y0)
z1 = rot(z0, ned_pose[2]).dot(z0)
x2 = rot(y1, ned_pose[1]).dot(x1)
y2 = rot(y1, ned_pose[1]).dot(y1)
z2 = rot(y1, ned_pose[1]).dot(z1)
x3 = rot(x2, ned_pose[0]).dot(x2)
y3 = rot(x2, ned_pose[0]).dot(y2)
#z3 = rot(x2, ned_pose[0]).dot(z2)
x0 = array([1, 0, 0])
y0 = array([0, 1, 0])
z0 = array([0, 0, 1])
psi = np.arctan2(inner(x3, y0), inner(x3, x0))
theta = np.arctan2(-inner(x3, z0), np.sqrt(inner(x3, x0)**2 + inner(x3, y0)**2))
y2 = rot(z0, psi).dot(y0)
z2 = rot(y2, theta).dot(z0)
phi = np.arctan2(inner(y3, z2), inner(y3, y2))
ret = array([phi, theta, psi])
return ret
def ned_euler_from_ecef(ned_ecef_init, ecef_poses):
'''
Got the math from here:
Using Rotations to Build Aerospace Coordinate Systems
-Don Koks
Also accepts array of ecef_poses and array of ned_ecef_inits.
Where each row is a pose and an ecef_init.
'''
ned_ecef_init = array(ned_ecef_init)
ecef_poses = array(ecef_poses)
output_shape = ecef_poses.shape
ned_ecef_init = np.atleast_2d(ned_ecef_init)
if ned_ecef_init.shape[0] == 1:
ned_ecef_init = np.tile(ned_ecef_init[0], (output_shape[0], 1))
ecef_poses = np.atleast_2d(ecef_poses)
ned_poses = np.zeros(ecef_poses.shape)
for i, ecef_pose in enumerate(ecef_poses):
converter = LocalCoord.from_ecef(ned_ecef_init[i])
x0 = array([1, 0, 0])
y0 = array([0, 1, 0])
z0 = array([0, 0, 1])
x1 = rot(z0, ecef_pose[2]).dot(x0)
y1 = rot(z0, ecef_pose[2]).dot(y0)
z1 = rot(z0, ecef_pose[2]).dot(z0)
x2 = rot(y1, ecef_pose[1]).dot(x1)
y2 = rot(y1, ecef_pose[1]).dot(y1)
z2 = rot(y1, ecef_pose[1]).dot(z1)
x3 = rot(x2, ecef_pose[0]).dot(x2)
y3 = rot(x2, ecef_pose[0]).dot(y2)
#z3 = rot(x2, ecef_pose[0]).dot(z2)
x0 = converter.ned2ecef([1, 0, 0]) - converter.ned2ecef([0, 0, 0])
y0 = converter.ned2ecef([0, 1, 0]) - converter.ned2ecef([0, 0, 0])
z0 = converter.ned2ecef([0, 0, 1]) - converter.ned2ecef([0, 0, 0])
psi = np.arctan2(inner(x3, y0), inner(x3, x0))
theta = np.arctan2(-inner(x3, z0), np.sqrt(inner(x3, x0)**2 + inner(x3, y0)**2))
y2 = rot(z0, psi).dot(y0)
z2 = rot(y2, theta).dot(z0)
phi = np.arctan2(inner(y3, z2), inner(y3, y2))
ned_poses[i] = array([phi, theta, psi])
return ned_poses.reshape(output_shape)
def ecef2car(car_ecef, psi, theta, points_ecef, ned_converter):
"""
TODO: add roll rotation
Converts an array of points in ecef coordinates into
x-forward, y-left, z-up coordinates
Parameters
----------
psi: yaw, radian
theta: pitch, radian
Returns
-------
[x, y, z] coordinates in car frame
"""
# input is an array of points in ecef cocrdinates
# output is an array of points in car's coordinate (x-front, y-left, z-up)
# convert points to NED
points_ned = []
for p in points_ecef:
points_ned.append(ned_converter.ecef2ned_matrix.dot(array(p) - car_ecef))
points_ned = np.vstack(points_ned).T
# n, e, d -> x, y, z
# Calculate relative postions and rotate wrt to heading and pitch of car
invert_R = array([[1., 0., 0.], [0., -1., 0.], [0., 0., -1.]])
c, s = np.cos(psi), np.sin(psi)
yaw_R = array([[c, s, 0.], [-s, c, 0.], [0., 0., 1.]])
c, s = np.cos(theta), np.sin(theta)
pitch_R = array([[c, 0., -s], [0., 1., 0.], [s, 0., c]])
return dot(pitch_R, dot(yaw_R, dot(invert_R, points_ned)))

21
dragonpilot/LICENSE.md Normal file
View File

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

View File

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

Binary file not shown.

Binary file not shown.

Binary file not shown.

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>

View File

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

View File

@@ -1,255 +0,0 @@
VERSION ""
NS_ :
NS_DESC_
CM_
BA_DEF_
BA_
VAL_
CAT_DEF_
CAT_
FILTER
BA_DEF_DEF_
EV_DATA_
ENVVAR_DATA_
SGTYPE_
SGTYPE_VAL_
BA_DEF_SGTYPE_
BA_SGTYPE_
SIG_TYPE_REF_
VAL_TABLE_
SIG_GROUP_
SIG_VALTYPE_
SIGTYPE_VALTYPE_
BO_TX_BU_
BA_DEF_REL_
BA_REL_
BA_DEF_DEF_REL_
BU_SG_REL_
BU_EV_REL_
BU_BO_REL_
SG_MUL_VAL_
BS_:
BU_: K109_FCM B233B_LRR NEO K124_ASCM
VAL_TABLE_ RangeMode 1 "Active" 0 "Inactive" ;
VAL_TABLE_ TrkConf 3 "Confident" 2 "Speculative" 1 "Highly speculative" 0 "Invalid" ;
VAL_TABLE_ TrkMeasStatus 3 "Measured current cycle" 2 "Latent track not detected " 1 "New object" 0 "No object" ;
VAL_TABLE_ TrkDynProp 4 "Moving in opposite direction" 3 "Moving in same direction " 2 "Has moved but currenty stopped" 1 "Has never moved," 0 "Unkown" ;
BO_ 3221225472 VECTOR__INDEPENDENT_SIG_MSG: 0 Vector__XXX
SG_ Always12 : 0|8@0+ (1,0) [0|0] "" Vector__XXX
SG_ TimeStatusChecksum : 0|12@0+ (1,0) [0|0] "" Vector__XXX
BO_ 161 ASCMTimeStatus: 7 NEO
SG_ TimeStatus : 7|28@0+ (1,0) [0|0] "" B233B_LRR
SG_ RollingCounter : 27|2@0+ (1,0) [0|0] "" B233B_LRR
BO_ 774 ASCMSteeringStatus: 8 NEO
SG_ ASCMSterringStatusChecksum : 55|16@0+ (1,0) [0|0] "" B233B_LRR
SG_ AlwaysF0 : 15|8@0+ (1,0) [0|0] "" B233B_LRR
SG_ Always20 : 23|8@0+ (1,0) [0|0] "" B233B_LRR
SG_ RollingCounter : 7|2@0+ (1,0) [0|0] "" B233B_LRR
BO_ 784 ASCMHeadlight: 2 NEO
SG_ Always42 : 7|8@0+ (1,0) [0|0] "" B233B_LRR
SG_ Always4 : 15|8@0+ (1,0) [0|0] "" B233B_LRR
BO_ 776 ASCMAccSpeedStatus: 7 NEO
SG_ AccSpeedChecksum : 42|11@0+ (1,0) [0|0] "" B233B_LRR
SG_ RollingCounter : 46|2@0+ (1,0) [0|0] "" B233B_LRR
SG_ NearRangeMode : 43|1@0+ (1,0) [0|0] "" B233B_LRR
SG_ FarRangeMode : 44|1@0+ (1,0) [0|0] "" B233B_LRR
SG_ VehicleAcceleration : 19|12@0+ (1,0) [0|0] "" B233B_LRR
SG_ VehicleSpeed : 15|12@0+ (1,0) [0|0] "" B233B_LRR
SG_ AlwaysOne : 3|1@0+ (1,0) [0|0] "" B233B_LRR
BO_ 1120 LRRNumObjects: 8 B233B_LRR
SG_ LRRNumObjects : 20|5@0+ (1,0) [0|0] "" NEO
BO_ 1134 LRRObject14: 8 B233B_LRR
SG_ TrkRange : 5|11@0+ (0.125,0) [0|255.875] "m" NEO
SG_ TrkRangeRate : 10|11@0- (0.125,0) [-128|127.875] "m/s" NEO
SG_ TrkRangeAccel : 31|9@0- (0.125,0) [-32|31.875] "m/s^2" NEO
SG_ TrkAzimuth : 35|12@0- (0.125,0) [-256|255.875] "deg" NEO
SG_ TrkWidth : 55|6@0+ (0.25,0) [0|15.75] "m" NEO
SG_ TrkObjectID : 61|6@0+ (1,0) [0|63] "" NEO
BO_ 1132 LRRObject12: 8 B233B_LRR
SG_ TrkRange : 5|11@0+ (0.125,0) [0|255.875] "m" NEO
SG_ TrkRangeRate : 10|11@0- (0.125,0) [-128|127.875] "m/s" NEO
SG_ TrkRangeAccel : 31|9@0- (0.125,0) [-32|31.875] "m/s^2" NEO
SG_ TrkAzimuth : 35|12@0- (0.125,0) [-256|255.875] "deg" NEO
SG_ TrkWidth : 55|6@0+ (0.25,0) [0|15.75] "m" NEO
SG_ TrkObjectID : 61|6@0+ (1,0) [0|63] "" NEO
BO_ 1131 LRRObject11: 8 B233B_LRR
SG_ TrkRange : 5|11@0+ (0.125,0) [0|255.875] "m" NEO
SG_ TrkRangeRate : 10|11@0- (0.125,0) [-128|127.875] "m/s" NEO
SG_ TrkRangeAccel : 31|9@0- (0.125,0) [-32|31.875] "m/s^2" NEO
SG_ TrkAzimuth : 35|12@0- (0.125,0) [-256|255.875] "deg" NEO
SG_ TrkWidth : 55|6@0+ (0.25,0) [0|15.75] "m" NEO
SG_ TrkObjectID : 61|6@0+ (1,0) [0|63] "" NEO
BO_ 1130 LRRObject10: 8 B233B_LRR
SG_ TrkRange : 5|11@0+ (0.125,0) [0|255.875] "m" NEO
SG_ TrkRangeRate : 10|11@0- (0.125,0) [-128|127.875] "m/s" NEO
SG_ TrkRangeAccel : 31|9@0- (0.125,0) [-32|31.875] "m/s^2" NEO
SG_ TrkAzimuth : 35|12@0- (0.125,0) [-256|255.875] "deg" NEO
SG_ TrkWidth : 55|6@0+ (0.25,0) [0|15.75] "m" NEO
SG_ TrkObjectID : 61|6@0+ (1,0) [0|63] "" NEO
BO_ 1129 LRRObject09: 8 B233B_LRR
SG_ TrkRange : 5|11@0+ (0.125,0) [0|255.875] "m" NEO
SG_ TrkRangeRate : 10|11@0- (0.125,0) [-128|127.875] "m/s" NEO
SG_ TrkRangeAccel : 31|9@0- (0.125,0) [-32|31.875] "m/s^2" NEO
SG_ TrkAzimuth : 35|12@0- (0.125,0) [-256|255.875] "deg" NEO
SG_ TrkWidth : 55|6@0+ (0.25,0) [0|15.75] "m" NEO
SG_ TrkObjectID : 61|6@0+ (1,0) [0|63] "" NEO
BO_ 1128 LRRObject08: 8 B233B_LRR
SG_ TrkRange : 5|11@0+ (0.125,0) [0|255.875] "m" NEO
SG_ TrkRangeRate : 10|11@0- (0.125,0) [-128|127.875] "m/s" NEO
SG_ TrkRangeAccel : 31|9@0- (0.125,0) [-32|31.875] "m/s^2" NEO
SG_ TrkAzimuth : 35|12@0- (0.125,0) [-256|255.875] "deg" NEO
SG_ TrkWidth : 55|6@0+ (0.25,0) [0|15.75] "m" NEO
SG_ TrkObjectID : 61|6@0+ (1,0) [0|63] "" NEO
BO_ 1127 LRRObject07: 8 B233B_LRR
SG_ TrkRange : 5|11@0+ (0.125,0) [0|255.875] "m" NEO
SG_ TrkRangeRate : 10|11@0- (0.125,0) [-128|127.875] "m/s" NEO
SG_ TrkRangeAccel : 31|9@0- (0.125,0) [-32|31.875] "m/s^2" NEO
SG_ TrkAzimuth : 35|12@0- (0.125,0) [-256|255.875] "deg" NEO
SG_ TrkWidth : 55|6@0+ (0.25,0) [0|15.75] "m" NEO
SG_ TrkObjectID : 61|6@0+ (1,0) [0|63] "" NEO
BO_ 1126 LRRObject06: 8 B233B_LRR
SG_ TrkRange : 5|11@0+ (0.125,0) [0|255.875] "m" NEO
SG_ TrkRangeRate : 10|11@0- (0.125,0) [-128|127.875] "m/s" NEO
SG_ TrkRangeAccel : 31|9@0- (0.125,0) [-32|31.875] "m/s^2" NEO
SG_ TrkAzimuth : 35|12@0- (0.125,0) [-256|255.875] "deg" NEO
SG_ TrkWidth : 55|6@0+ (0.25,0) [0|15.75] "m" NEO
SG_ TrkObjectID : 61|6@0+ (1,0) [0|63] "" NEO
BO_ 1125 LRRObject05: 8 B233B_LRR
SG_ TrkRange : 5|11@0+ (0.125,0) [0|255.875] "m" NEO
SG_ TrkRangeRate : 10|11@0- (0.125,0) [-128|127.875] "m/s" NEO
SG_ TrkRangeAccel : 31|9@0- (0.125,0) [-32|31.875] "m/s^2" NEO
SG_ TrkAzimuth : 35|12@0- (0.125,0) [-256|255.875] "deg" NEO
SG_ TrkWidth : 55|6@0+ (0.25,0) [0|15.75] "m" NEO
SG_ TrkObjectID : 61|6@0+ (1,0) [0|63] "" NEO
BO_ 1124 LRRObject04: 8 B233B_LRR
SG_ TrkRange : 5|11@0+ (0.125,0) [0|255.875] "m" NEO
SG_ TrkRangeRate : 10|11@0- (0.125,0) [-128|127.875] "m/s" NEO
SG_ TrkRangeAccel : 31|9@0- (0.125,0) [-32|31.875] "m/s^2" NEO
SG_ TrkAzimuth : 35|12@0- (0.125,0) [-256|255.875] "deg" NEO
SG_ TrkWidth : 55|6@0+ (0.25,0) [0|15.75] "m" NEO
SG_ TrkObjectID : 61|6@0+ (1,0) [0|63] "" NEO
BO_ 1123 LRRObject03: 8 B233B_LRR
SG_ TrkRange : 5|11@0+ (0.125,0) [0|255.875] "m" NEO
SG_ TrkRangeRate : 10|11@0- (0.125,0) [-128|127.875] "m/s" NEO
SG_ TrkRangeAccel : 31|9@0- (0.125,0) [-32|31.875] "m/s^2" NEO
SG_ TrkAzimuth : 35|12@0- (0.125,0) [-256|255.875] "deg" NEO
SG_ TrkWidth : 55|6@0+ (0.25,0) [0|15.75] "m" NEO
SG_ TrkObjectID : 61|6@0+ (1,0) [0|63] "" NEO
BO_ 1140 LRRObject20: 8 B233B_LRR
SG_ TrkRange : 5|11@0+ (0.125,0) [0|255.875] "m" NEO
SG_ TrkRangeRate : 10|11@0- (0.125,0) [-128|127.875] "m/s" NEO
SG_ TrkRangeAccel : 31|9@0- (0.125,0) [-32|31.875] "m/s^2" NEO
SG_ TrkAzimuth : 35|12@0- (0.125,0) [-256|255.875] "deg" NEO
SG_ TrkWidth : 55|6@0+ (0.25,0) [0|15.75] "m" NEO
SG_ TrkObjectID : 61|6@0+ (1,0) [0|63] "" NEO
BO_ 1139 LRRObject19: 8 B233B_LRR
SG_ TrkRange : 5|11@0+ (0.125,0) [0|255.875] "m" NEO
SG_ TrkRangeRate : 10|11@0- (0.125,0) [-128|127.875] "m/s" NEO
SG_ TrkRangeAccel : 31|9@0- (0.125,0) [-32|31.875] "m/s^2" NEO
SG_ TrkAzimuth : 35|12@0- (0.125,0) [-256|255.875] "deg" NEO
SG_ TrkWidth : 55|6@0+ (0.25,0) [0|15.75] "m" NEO
SG_ TrkObjectID : 61|6@0+ (1,0) [0|63] "" NEO
BO_ 1138 LRRObject18: 8 B233B_LRR
SG_ TrkRange : 5|11@0+ (0.125,0) [0|255.875] "m" NEO
SG_ TrkRangeRate : 10|11@0- (0.125,0) [-128|127.875] "m/s" NEO
SG_ TrkRangeAccel : 31|9@0- (0.125,0) [-32|31.875] "m/s^2" NEO
SG_ TrkAzimuth : 35|12@0- (0.125,0) [-256|255.875] "deg" NEO
SG_ TrkWidth : 55|6@0+ (0.25,0) [0|15.75] "m" NEO
SG_ TrkObjectID : 61|6@0+ (1,0) [0|63] "" NEO
BO_ 1137 LRRObject17: 8 B233B_LRR
SG_ TrkRange : 5|11@0+ (0.125,0) [0|255.875] "m" NEO
SG_ TrkRangeRate : 10|11@0- (0.125,0) [-128|127.875] "m/s" NEO
SG_ TrkRangeAccel : 31|9@0- (0.125,0) [-32|31.875] "m/s^2" NEO
SG_ TrkAzimuth : 35|12@0- (0.125,0) [-256|255.875] "deg" NEO
SG_ TrkWidth : 55|6@0+ (0.25,0) [0|15.75] "m" NEO
SG_ TrkObjectID : 61|6@0+ (1,0) [0|63] "" NEO
BO_ 1136 LRRObject16: 8 B233B_LRR
SG_ TrkRange : 5|11@0+ (0.125,0) [0|255.875] "m" NEO
SG_ TrkRangeRate : 10|11@0- (0.125,0) [-128|127.875] "m/s" NEO
SG_ TrkRangeAccel : 31|9@0- (0.125,0) [-32|31.875] "m/s^2" NEO
SG_ TrkAzimuth : 35|12@0- (0.125,0) [-256|255.875] "deg" NEO
SG_ TrkWidth : 55|6@0+ (0.25,0) [0|15.75] "m" NEO
SG_ TrkObjectID : 61|6@0+ (1,0) [0|63] "" NEO
BO_ 1135 LRRObject15: 8 B233B_LRR
SG_ TrkRange : 5|11@0+ (0.125,0) [0|255.875] "m" NEO
SG_ TrkRangeRate : 10|11@0- (0.125,0) [-128|127.875] "m/s" NEO
SG_ TrkRangeAccel : 31|9@0- (0.125,0) [-32|31.875] "m/s^2" NEO
SG_ TrkAzimuth : 35|12@0- (0.125,0) [-256|255.875] "deg" NEO
SG_ TrkWidth : 55|6@0+ (0.25,0) [0|15.75] "m" NEO
SG_ TrkObjectID : 61|6@0+ (1,0) [0|63] "" NEO
BO_ 1133 LRRObject13: 8 B233B_LRR
SG_ TrkRange : 5|11@0+ (0.125,0) [0|255.875] "m" NEO
SG_ TrkRangeRate : 10|11@0- (0.125,0) [-128|127.875] "m/s" NEO
SG_ TrkRangeAccel : 31|9@0- (0.125,0) [-32|31.875] "m/s^2" NEO
SG_ TrkAzimuth : 35|12@0- (0.125,0) [-256|255.875] "deg" NEO
SG_ TrkWidth : 55|6@0+ (0.25,0) [0|15.75] "m" NEO
SG_ TrkObjectID : 61|6@0+ (1,0) [0|63] "" NEO
BO_ 1122 LRRObject02: 8 B233B_LRR
SG_ TrkRange : 5|11@0+ (0.125,0) [0|255.875] "m" NEO
SG_ TrkRangeRate : 10|11@0- (0.125,0) [-128|127.875] "m/s" NEO
SG_ TrkRangeAccel : 31|9@0- (0.125,0) [-32|31.875] "m/s^2" NEO
SG_ TrkAzimuth : 35|12@0- (0.125,0) [-256|255.875] "deg" NEO
SG_ TrkWidth : 55|6@0+ (0.25,0) [0|15.75] "m" NEO
SG_ TrkObjectID : 61|6@0+ (1,0) [0|63] "" NEO
BO_ 1121 LRRObject01: 8 B233B_LRR
SG_ TrkRange : 5|11@0+ (0.125,0) [0|255.875] "m" NEO
SG_ TrkRangeRate : 10|11@0- (0.125,0) [-128|127.875] "m/s" NEO
SG_ TrkRangeAccel : 31|9@0- (0.125,0) [-32|31.875] "m/s^2" NEO
SG_ TrkAzimuth : 35|12@0- (0.125,0) [-256|255.875] "deg" NEO
SG_ TrkWidth : 55|6@0+ (0.25,0) [0|15.75] "m" NEO
SG_ TrkObjectID : 61|6@0+ (1,0) [0|63] "" NEO
BO_TX_BU_ 161 : K124_ASCM,NEO;
BO_TX_BU_ 774 : K124_ASCM,NEO;
BO_TX_BU_ 784 : K124_ASCM,NEO;
BO_TX_BU_ 776 : K124_ASCM,NEO;
CM_ BU_ K109_FCM "Frontview Camera Module ";
CM_ BU_ B233B_LRR "Radar Sensor Module Long Range";
CM_ BU_ NEO "Comma NEO";
CM_ BU_ K124_ASCM "Active Safety Control Module";
CM_ BO_ 3221225472 "This is a message for not used signals, created by Vector CANdb++ DBC OLE DB Provider.";
BA_DEF_ "UseGMParameterIDs" INT 0 0;
BA_DEF_ "ProtocolType" STRING ;
BA_DEF_ "BusType" STRING ;
BA_DEF_DEF_ "UseGMParameterIDs" 1;
BA_DEF_DEF_ "ProtocolType" "GMLAN";
BA_DEF_DEF_ "BusType" "";
BA_ "BusType" "CAN";
BA_ "ProtocolType" "GMLAN";
BA_ "UseGMParameterIDs" 0;
VAL_ 776 NearRangeMode 1 "Active" 0 "Inactive" ;
VAL_ 776 FarRangeMode 1 "Active" 0 "Inactive" ;

View File

@@ -0,0 +1,98 @@
CC = clang
CXX = clang++
PHONELIBS = ../../phonelibs
WARN_FLAGS = -Werror=implicit-function-declaration \
-Werror=incompatible-pointer-types \
-Werror=int-conversion \
-Werror=return-type \
-Werror=format-extra-args
CFLAGS = -std=gnu11 -g -fPIC -O2 $(WARN_FLAGS)
CXXFLAGS = -std=c++11 -g -fPIC -O2 $(WARN_FLAGS)
CURL_FLAGS = -I$(PHONELIBS)/curl/include
CURL_LIBS = $(PHONELIBS)/curl/lib/libcurl.a \
$(PHONELIBS)/zlib/lib/libz.a
BORINGSSL_FLAGS = -I$(PHONELIBS)/boringssl/include
BORINGSSL_LIBS = $(PHONELIBS)/boringssl/lib/libssl_static.a \
$(PHONELIBS)/boringssl/lib/libcrypto_static.a \
NANOVG_FLAGS = -I$(PHONELIBS)/nanovg
JSON11_FLAGS = -I$(PHONELIBS)/json11
OPENGL_LIBS = -lGLESv3
FRAMEBUFFER_LIBS = -lutils -lgui -lEGL
.PHONY: all
all: updater
OBJS = opensans_regular.ttf.o \
opensans_semibold.ttf.o \
opensans_bold.ttf.o \
../../selfdrive/common/touch.o \
../../selfdrive/common/framebuffer.o \
$(PHONELIBS)/json11/json11.o \
$(PHONELIBS)/nanovg/nanovg.o
DEPS := $(OBJS:.o=.d)
updater: updater.o $(OBJS)
@echo "[ LINK ] $@"
$(CXX) $(CPPFLAGS) -fPIC -o 'updater' $^ \
$(FRAMEBUFFER_LIBS) \
$(CURL_LIBS) \
$(BORINGSSL_LIBS) \
-L/system/vendor/lib64 \
$(OPENGL_LIBS) \
-lcutils -lm -llog
strip updater
opensans_regular.ttf.o: ../../selfdrive/assets/fonts/opensans_regular.ttf
@echo "[ bin2o ] $@"
cd '$(dir $<)' && ld -r -b binary '$(notdir $<)' -o '$(abspath $@)'
opensans_bold.ttf.o: ../../selfdrive/assets/fonts/opensans_bold.ttf
@echo "[ bin2o ] $@"
cd '$(dir $<)' && ld -r -b binary '$(notdir $<)' -o '$(abspath $@)'
opensans_semibold.ttf.o: ../../selfdrive/assets/fonts/opensans_semibold.ttf
@echo "[ bin2o ] $@"
cd '$(dir $<)' && ld -r -b binary '$(notdir $<)' -o '$(abspath $@)'
%.o: %.c
mkdir -p $(@D)
@echo "[ CC ] $@"
$(CC) $(CPPFLAGS) $(CFLAGS) \
-I../.. \
-I$(PHONELIBS)/android_frameworks_native/include \
-I$(PHONELIBS)/android_system_core/include \
-I$(PHONELIBS)/android_hardware_libhardware/include \
$(NANOVG_FLAGS) \
-c -o '$@' '$<'
%.o: %.cc
mkdir -p $(@D)
@echo "[ CXX ] $@"
$(CXX) $(CPPFLAGS) $(CXXFLAGS) \
-I../../selfdrive \
-I../../ \
-I$(PHONELIBS)/android_frameworks_native/include \
-I$(PHONELIBS)/android_system_core/include \
-I$(PHONELIBS)/android_hardware_libhardware/include \
$(NANOVG_FLAGS) \
$(JSON11_FLAGS) \
$(CURL_FLAGS) \
$(BORINGSSL_FLAGS) \
-c -o '$@' '$<'
.PHONY: clean
clean:
rm -f $(OBJS) $(DEPS)
-include $(DEPS)

View File

@@ -0,0 +1,7 @@
{
"ota_url": "http://dpp.cool/neosupdate/ota-signed-7a0117425bc4a6673958d265312994e124654a566228f3cec2f0f9bc8120a9ab.zip",
"ota_hash": "7a0117425bc4a6673958d265312994e124654a566228f3cec2f0f9bc8120a9ab",
"recovery_url": "http://dpp.cool/neosupdate/recovery-3dc234d868c29a3739f6ca3bd47b1c2d3c570d9f478b6849a4fada129ee4af76.img",
"recovery_len": 15848748,
"recovery_hash": "3dc234d868c29a3739f6ca3bd47b1c2d3c570d9f478b6849a4fada129ee4af76"
}

BIN
installer/updater/updater Executable file

Binary file not shown.

View File

@@ -0,0 +1,770 @@
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/statvfs.h>
#include <string>
#include <sstream>
#include <fstream>
#include <mutex>
#include <thread>
#include <curl/curl.h>
#include <openssl/sha.h>
#include <GLES3/gl3.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include "nanovg.h"
#define NANOVG_GLES3_IMPLEMENTATION
#include "nanovg_gl.h"
#include "nanovg_gl_utils.h"
#include "json11.hpp"
#include "common/framebuffer.h"
#include "common/touch.h"
#include "common/utilpp.h"
#define USER_AGENT "NEOSUpdater-0.2"
#define MANIFEST_URL_EON_STAGING "https://github.com/commaai/eon-neos/raw/master/update.staging.json"
#define MANIFEST_URL_EON_LOCAL "http://192.168.5.1:8000/neosupdate/update.local.json"
#define MANIFEST_URL_EON "https://github.com/commaai/eon-neos/raw/master/update.json"
const char *manifest_url = MANIFEST_URL_EON;
#define RECOVERY_DEV "/dev/block/bootdevice/by-name/recovery"
#define RECOVERY_COMMAND "/cache/recovery/command"
#define UPDATE_DIR "/data/neoupdate"
extern const uint8_t bin_opensans_regular[] asm("_binary_opensans_regular_ttf_start");
extern const uint8_t bin_opensans_regular_end[] asm("_binary_opensans_regular_ttf_end");
extern const uint8_t bin_opensans_semibold[] asm("_binary_opensans_semibold_ttf_start");
extern const uint8_t bin_opensans_semibold_end[] asm("_binary_opensans_semibold_ttf_end");
extern const uint8_t bin_opensans_bold[] asm("_binary_opensans_bold_ttf_start");
extern const uint8_t bin_opensans_bold_end[] asm("_binary_opensans_bold_ttf_end");
namespace {
std::string sha256_file(std::string fn, size_t limit=0) {
SHA256_CTX ctx;
SHA256_Init(&ctx);
FILE *file = fopen(fn.c_str(), "rb");
if (!file) return "";
const size_t buf_size = 8192;
std::unique_ptr<char[]> buffer( new char[ buf_size ] );
bool read_limit = (limit != 0);
while (true) {
size_t read_size = buf_size;
if (read_limit) read_size = std::min(read_size, limit);
size_t bytes_read = fread(buffer.get(), 1, read_size, file);
if (!bytes_read) break;
SHA256_Update(&ctx, buffer.get(), bytes_read);
if (read_limit) {
limit -= bytes_read;
if (limit == 0) break;
}
}
uint8_t hash[SHA256_DIGEST_LENGTH];
SHA256_Final(hash, &ctx);
fclose(file);
return util::tohex(hash, sizeof(hash));
}
size_t download_string_write(void *ptr, size_t size, size_t nmeb, void *up) {
size_t sz = size * nmeb;
((std::string*)up)->append((char*)ptr, sz);
return sz;
}
std::string download_string(CURL *curl, std::string url) {
std::string os;
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
curl_easy_setopt(curl, CURLOPT_USERAGENT, USER_AGENT);
curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);
curl_easy_setopt(curl, CURLOPT_RESUME_FROM, 0);
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, download_string_write);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &os);
CURLcode res = curl_easy_perform(curl);
if (res != CURLE_OK) {
return "";
}
return os;
}
size_t download_file_write(void *ptr, size_t size, size_t nmeb, void *up) {
return fwrite(ptr, size, nmeb, (FILE*)up);
}
int battery_capacity() {
std::string bat_cap_s = util::read_file("/sys/class/power_supply/battery/capacity");
return atoi(bat_cap_s.c_str());
}
int battery_current() {
std::string current_now_s = util::read_file("/sys/class/power_supply/battery/current_now");
return atoi(current_now_s.c_str());
}
bool check_battery() {
int bat_cap = battery_capacity();
int current_now = battery_current();
return bat_cap > 35 || (current_now < 0 && bat_cap > 10);
}
bool check_space() {
struct statvfs stat;
if (statvfs("/data/", &stat) != 0) {
return false;
}
size_t space = stat.f_bsize * stat.f_bavail;
return space > 2000000000ULL; // 2GB
}
static void start_settings_activity(const char* name) {
char launch_cmd[1024];
snprintf(launch_cmd, sizeof(launch_cmd),
"am start -W --ez :settings:show_fragment_as_subsetting true -n 'com.android.settings/.%s'", name);
system(launch_cmd);
}
struct Updater {
bool do_exit = false;
TouchState touch;
int fb_w, fb_h;
EGLDisplay display;
EGLSurface surface;
FramebufferState *fb = NULL;
NVGcontext *vg = NULL;
int font_regular;
int font_semibold;
int font_bold;
std::thread update_thread_handle;
std::mutex lock;
// i hate state machines give me coroutines already
enum UpdateState {
CONFIRMATION,
LOW_BATTERY,
RUNNING,
ERROR,
};
UpdateState state;
std::string progress_text;
float progress_frac;
std::string error_text;
std::string low_battery_text;
std::string low_battery_title;
std::string low_battery_context;
std::string battery_cap_text;
int min_battery_cap = 35;
// button
int b_x, b_w, b_y, b_h;
int balt_x;
CURL *curl = NULL;
Updater() {
touch_init(&touch);
fb = framebuffer_init("updater", 0x00001000, false,
&display, &surface, &fb_w, &fb_h);
assert(fb);
vg = nvgCreateGLES3(NVG_ANTIALIAS | NVG_STENCIL_STROKES | NVG_DEBUG);
assert(vg);
font_regular = nvgCreateFontMem(vg, "opensans_regular", (unsigned char*)bin_opensans_regular, (bin_opensans_regular_end - bin_opensans_regular), 0);
assert(font_regular >= 0);
font_semibold = nvgCreateFontMem(vg, "opensans_semibold", (unsigned char*)bin_opensans_semibold, (bin_opensans_semibold_end - bin_opensans_semibold), 0);
assert(font_semibold >= 0);
font_bold = nvgCreateFontMem(vg, "opensans_bold", (unsigned char*)bin_opensans_bold, (bin_opensans_bold_end - bin_opensans_bold), 0);
assert(font_bold >= 0);
b_w = 640;
balt_x = 200;
b_x = fb_w-b_w-200;
b_y = 720;
b_h = 220;
state = CONFIRMATION;
}
int download_file_xferinfo(curl_off_t dltotal, curl_off_t dlno,
curl_off_t ultotal, curl_off_t ulnow) {
{
std::lock_guard<std::mutex> guard(lock);
if (dltotal != 0) {
progress_frac = (float) dlno / dltotal;
}
}
// printf("info: %ld %ld %f\n", dltotal, dlno, progress_frac);
return 0;
}
bool download_file(std::string url, std::string out_fn) {
FILE *of = fopen(out_fn.c_str(), "ab");
assert(of);
CURLcode res;
long last_resume_from = 0;
fseek(of, 0, SEEK_END);
int tries = 4;
bool ret = false;
while (true) {
long resume_from = ftell(of);
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
curl_easy_setopt(curl, CURLOPT_USERAGENT, USER_AGENT);
curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);
curl_easy_setopt(curl, CURLOPT_RESUME_FROM, resume_from);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, download_file_write);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, of);
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);
curl_easy_setopt(curl, CURLOPT_XFERINFODATA, this);
curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, &Updater::download_file_xferinfo);
CURLcode res = curl_easy_perform(curl);
long response_code = 0;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response_code);
// double content_length = 0.0;
// curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &content_length);
printf("download %s res %d, code %ld, resume from %ld\n", url.c_str(), res, response_code, resume_from);
if (res == CURLE_OK) {
ret = true;
break;
} else if (res == CURLE_HTTP_RETURNED_ERROR && response_code == 416) {
// failed because the file is already complete?
ret = true;
break;
} else if (resume_from == last_resume_from) {
// failed and dind't make make forward progress. only retry a couple times
tries--;
if (tries <= 0) {
break;
}
}
last_resume_from = resume_from;
}
// printf("res %d\n", res);
// printf("- %ld %f\n", response_code, content_length);
fclose(of);
return ret;
}
void set_progress(std::string text) {
std::lock_guard<std::mutex> guard(lock);
progress_text = text;
}
void set_error(std::string text) {
std::lock_guard<std::mutex> guard(lock);
error_text = text;
state = ERROR;
}
void set_battery_low() {
std::lock_guard<std::mutex> guard(lock);
state = LOW_BATTERY;
}
void set_running() {
std::lock_guard<std::mutex> guard(lock);
state = RUNNING;
}
std::string stage_download(std::string url, std::string hash, std::string name) {
std::string out_fn = UPDATE_DIR "/" + util::base_name(url);
set_progress("Downloading " + name + "...");
bool r = download_file(url, out_fn);
if (!r) {
set_error("failed to download " + name);
return "";
}
set_progress("Verifying " + name + "...");
std::string fn_hash = sha256_file(out_fn);
printf("got %s hash: %s\n", name.c_str(), hash.c_str());
if (fn_hash != hash) {
set_error(name + " was corrupt");
unlink(out_fn.c_str());
return "";
}
return out_fn;
}
void run_stages() {
curl = curl_easy_init();
assert(curl);
if (!check_battery()) {
set_battery_low();
int battery_cap = battery_capacity();
while(battery_cap < min_battery_cap) {
battery_cap = battery_capacity();
battery_cap_text = std::to_string(battery_cap);
usleep(1000000);
}
set_running();
}
if (!check_space()) {
set_error("2GB of free space required to update");
return;
}
mkdir(UPDATE_DIR, 0777);
const int EON = (access("/EON", F_OK) != -1);
set_progress("Finding latest version...");
std::string manifest_s;
if (EON) {
manifest_s = download_string(curl, manifest_url);
} else {
// don't update NEO
exit(0);
}
printf("manifest: %s\n", manifest_s.c_str());
std::string err;
auto manifest = json11::Json::parse(manifest_s, err);
if (manifest.is_null() || !err.empty()) {
set_error("failed to load update manifest");
return;
}
std::string ota_url = manifest["ota_url"].string_value();
std::string ota_hash = manifest["ota_hash"].string_value();
std::string recovery_url = manifest["recovery_url"].string_value();
std::string recovery_hash = manifest["recovery_hash"].string_value();
int recovery_len = manifest["recovery_len"].int_value();
// std::string installer_url = manifest["installer_url"].string_value();
// std::string installer_hash = manifest["installer_hash"].string_value();
if (ota_url.empty() || ota_hash.empty()) {
set_error("invalid update manifest");
return;
}
// std::string installer_fn = stage_download(installer_url, installer_hash, "installer");
// if (installer_fn.empty()) {
// //error'd
// return;
// }
std::string recovery_fn;
if (recovery_url.empty() || recovery_hash.empty() || recovery_len == 0) {
set_progress("Skipping recovery flash...");
} else {
// only download the recovery if it differs from what's flashed
set_progress("Checking recovery...");
std::string existing_recovery_hash = sha256_file(RECOVERY_DEV, recovery_len);
printf("existing recovery hash: %s\n", existing_recovery_hash.c_str());
if (existing_recovery_hash != recovery_hash) {
recovery_fn = stage_download(recovery_url, recovery_hash, "recovery");
if (recovery_fn.empty()) {
// error'd
return;
}
}
}
std::string ota_fn = stage_download(ota_url, ota_hash, "update");
if (ota_fn.empty()) {
//error'd
return;
}
if (!check_battery()) {
set_battery_low();
int battery_cap = battery_capacity();
while(battery_cap < min_battery_cap) {
battery_cap = battery_capacity();
battery_cap_text = std::to_string(battery_cap);
usleep(1000000);
}
set_running();
}
if (!recovery_fn.empty()) {
// flash recovery
set_progress("Flashing recovery...");
FILE *flash_file = fopen(recovery_fn.c_str(), "rb");
if (!flash_file) {
set_error("failed to flash recovery");
return;
}
FILE *recovery_dev = fopen(RECOVERY_DEV, "w+b");
if (!recovery_dev) {
fclose(flash_file);
set_error("failed to flash recovery");
return;
}
const size_t buf_size = 4096;
std::unique_ptr<char[]> buffer( new char[ buf_size ] );
while (true) {
size_t bytes_read = fread(buffer.get(), 1, buf_size, flash_file);
if (!bytes_read) break;
size_t bytes_written = fwrite(buffer.get(), 1, bytes_read, recovery_dev);
if (bytes_read != bytes_written) {
fclose(recovery_dev);
fclose(flash_file);
set_error("failed to flash recovery: write failed");
return;
}
}
fclose(recovery_dev);
fclose(flash_file);
set_progress("Verifying flash...");
std::string new_recovery_hash = sha256_file(RECOVERY_DEV, recovery_len);
printf("new recovery hash: %s\n", new_recovery_hash.c_str());
if (new_recovery_hash != recovery_hash) {
set_error("recovery flash corrupted");
return;
}
}
// write arguments to recovery
FILE *cmd_file = fopen(RECOVERY_COMMAND, "wb");
if (!cmd_file) {
set_error("failed to reboot into recovery");
return;
}
fprintf(cmd_file, "--update_package=%s\n", ota_fn.c_str());
fclose(cmd_file);
set_progress("Rebooting");
// remove the continue.sh so we come back into the setup.
// maybe we should go directly into the installer, but what if we don't come back with internet? :/
//unlink("/data/data/com.termux/files/continue.sh");
// TODO: this should be generic between android versions
// IPowerManager.reboot(confirm=false, reason="recovery", wait=true)
system("service call power 16 i32 0 s16 recovery i32 1");
while(1) pause();
// execl("/system/bin/reboot", "recovery");
// set_error("failed to reboot into recovery");
}
void draw_ack_screen(const char *title, const char *message, const char *button, const char *altbutton) {
nvgFillColor(vg, nvgRGBA(255,255,255,255));
nvgTextAlign(vg, NVG_ALIGN_CENTER | NVG_ALIGN_BASELINE);
nvgFontFace(vg, "opensans_bold");
nvgFontSize(vg, 120.0f);
nvgTextBox(vg, 110, 220, fb_w-240, title, NULL);
nvgFontFace(vg, "opensans_regular");
nvgFontSize(vg, 86.0f);
nvgTextBox(vg, 130, 380, fb_w-260, message, NULL);
// draw button
if (button) {
nvgBeginPath(vg);
nvgFillColor(vg, nvgRGBA(8, 8, 8, 255));
nvgRoundedRect(vg, b_x, b_y, b_w, b_h, 20);
nvgFill(vg);
nvgFillColor(vg, nvgRGBA(255, 255, 255, 255));
nvgFontFace(vg, "opensans_semibold");
nvgTextAlign(vg, NVG_ALIGN_CENTER | NVG_ALIGN_MIDDLE);
nvgText(vg, b_x+b_w/2, b_y+b_h/2, button, NULL);
nvgBeginPath(vg);
nvgStrokeColor(vg, nvgRGBA(255, 255, 255, 50));
nvgStrokeWidth(vg, 5);
nvgRoundedRect(vg, b_x, b_y, b_w, b_h, 20);
nvgStroke(vg);
}
// draw button
if (altbutton) {
nvgBeginPath(vg);
nvgFillColor(vg, nvgRGBA(8, 8, 8, 255));
nvgRoundedRect(vg, balt_x, b_y, b_w, b_h, 20);
nvgFill(vg);
nvgFillColor(vg, nvgRGBA(255, 255, 255, 255));
nvgFontFace(vg, "opensans_semibold");
nvgTextAlign(vg, NVG_ALIGN_CENTER | NVG_ALIGN_MIDDLE);
nvgText(vg, balt_x+b_w/2, b_y+b_h/2, altbutton, NULL);
nvgBeginPath(vg);
nvgStrokeColor(vg, nvgRGBA(255, 255, 255, 50));
nvgStrokeWidth(vg, 5);
nvgRoundedRect(vg, balt_x, b_y, b_w, b_h, 20);
nvgStroke(vg);
}
}
void draw_battery_screen() {
low_battery_title = "Low Battery";
low_battery_text = "Please connect EON to your charger. Update will continue once EON battery reaches 35%.";
low_battery_context = "Current battery charge: " + battery_cap_text + "%";
nvgFillColor(vg, nvgRGBA(255,255,255,255));
nvgTextAlign(vg, NVG_ALIGN_CENTER | NVG_ALIGN_BASELINE);
nvgFontFace(vg, "opensans_bold");
nvgFontSize(vg, 120.0f);
nvgTextBox(vg, 110, 220, fb_w-240, low_battery_title.c_str(), NULL);
nvgFontFace(vg, "opensans_regular");
nvgFontSize(vg, 86.0f);
nvgTextBox(vg, 130, 380, fb_w-260, low_battery_text.c_str(), NULL);
nvgFontFace(vg, "opensans_bold");
nvgFontSize(vg, 86.0f);
nvgTextBox(vg, 130, 700, fb_w-260, low_battery_context.c_str(), NULL);
}
void draw_progress_screen() {
// draw progress message
nvgFontSize(vg, 64.0f);
nvgFillColor(vg, nvgRGBA(255,255,255,255));
nvgTextAlign(vg, NVG_ALIGN_CENTER | NVG_ALIGN_BASELINE);
nvgFontFace(vg, "opensans_bold");
nvgFontSize(vg, 86.0f);
nvgTextBox(vg, 0, 380, fb_w, progress_text.c_str(), NULL);
// draw progress bar
{
int progress_width = 1000;
int progress_x = fb_w/2-progress_width/2;
int progress_y = 520;
int progress_height = 50;
int powerprompt_y = 312;
nvgFontFace(vg, "opensans_regular");
nvgFontSize(vg, 64.0f);
nvgText(vg, fb_w/2, 740, "Ensure EON is connected to power.", NULL);
NVGpaint paint = nvgBoxGradient(
vg, progress_x + 1, progress_y + 1,
progress_width - 2, progress_height, 3, 4, nvgRGB(27, 27, 27), nvgRGB(27, 27, 27));
nvgBeginPath(vg);
nvgRoundedRect(vg, progress_x, progress_y, progress_width, progress_height, 12);
nvgFillPaint(vg, paint);
nvgFill(vg);
float value = std::min(std::max(0.0f, progress_frac), 1.0f);
int bar_pos = ((progress_width - 2) * value);
paint = nvgBoxGradient(
vg, progress_x, progress_y,
bar_pos+1.5f, progress_height-1, 3, 4,
nvgRGB(245, 245, 245), nvgRGB(105, 105, 105));
nvgBeginPath(vg);
nvgRoundedRect(
vg, progress_x+1, progress_y+1,
bar_pos, progress_height-2, 12);
nvgFillPaint(vg, paint);
nvgFill(vg);
}
}
void ui_draw() {
std::lock_guard<std::mutex> guard(lock);
nvgBeginFrame(vg, fb_w, fb_h, 1.0f);
switch (state) {
case CONFIRMATION:
draw_ack_screen("An update to NEOS is required.",
"Your device will now be reset and upgraded. You may want to connect to wifi as download is around 1 GB. Existing data on device should not be lost.",
"Continue",
"Connect to WiFi");
break;
case LOW_BATTERY:
draw_battery_screen();
break;
case RUNNING:
draw_progress_screen();
break;
case ERROR:
draw_ack_screen("There was an error", (error_text).c_str(), NULL, "Reboot");
break;
}
nvgEndFrame(vg);
}
void ui_update() {
std::lock_guard<std::mutex> guard(lock);
switch (state) {
case ERROR:
case CONFIRMATION: {
int touch_x = -1, touch_y = -1;
int res = touch_poll(&touch, &touch_x, &touch_y, 0);
if (res == 1 && !is_settings_active()) {
if (touch_x >= b_x && touch_x < b_x+b_w && touch_y >= b_y && touch_y < b_y+b_h) {
if (state == CONFIRMATION) {
state = RUNNING;
update_thread_handle = std::thread(&Updater::run_stages, this);
}
}
if (touch_x >= balt_x && touch_x < balt_x+b_w && touch_y >= b_y && touch_y < b_y+b_h) {
if (state == CONFIRMATION) {
start_settings_activity("Settings$WifiSettingsActivity");
} else if (state == ERROR) {
do_exit = 1;
}
}
}
}
default:
break;
}
}
void go() {
while (!do_exit) {
ui_update();
glClearColor(0.08, 0.08, 0.08, 1.0);
glClear(GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
// background
nvgBeginPath(vg);
NVGpaint bg = nvgLinearGradient(vg, fb_w, 0, fb_w, fb_h,
nvgRGBA(0, 0, 0, 0), nvgRGBA(0, 0, 0, 255));
nvgFillPaint(vg, bg);
nvgRect(vg, 0, 0, fb_w, fb_h);
nvgFill(vg);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
ui_draw();
glDisable(GL_BLEND);
eglSwapBuffers(display, surface);
assert(glGetError() == GL_NO_ERROR);
// no simple way to do 30fps vsync with surfaceflinger...
usleep(30000);
}
if (update_thread_handle.joinable()) {
update_thread_handle.join();
}
system("service call power 16 i32 0 i32 0 i32 1");
}
bool is_settings_active() {
FILE *fp;
char sys_output[4096];
fp = popen("/bin/dumpsys window windows", "r");
if (fp == NULL) {
return false;
}
bool active = false;
while (fgets(sys_output, sizeof(sys_output), fp) != NULL) {
if (strstr(sys_output, "mCurrentFocus=null") != NULL) {
break;
}
if (strstr(sys_output, "mCurrentFocus=Window") != NULL) {
active = true;
break;
}
}
pclose(fp);
return active;
}
};
}
int main(int argc, char *argv[]) {
if (argc > 1) {
if (strcmp(argv[1], "local") == 0) {
manifest_url = MANIFEST_URL_EON_LOCAL;
} else if (strcmp(argv[1], "staging") == 0) {
manifest_url = MANIFEST_URL_EON_STAGING;
} else {
manifest_url = argv[1];
}
}
printf("updating from %s\n", manifest_url);
Updater updater;
updater.go();
return 0;
}

File diff suppressed because it is too large Load Diff

67
launch_chffrplus.sh Executable file
View File

@@ -0,0 +1,67 @@
#!/usr/bin/bash
export OMP_NUM_THREADS=1
export MKL_NUM_THREADS=1
export NUMEXPR_NUM_THREADS=1
export OPENBLAS_NUM_THREADS=1
export VECLIB_MAXIMUM_THREADS=1
if [ -z "$PASSIVE" ]; then
export PASSIVE="1"
fi
function launch {
# apply update
# if [ "$(git rev-parse HEAD)" != "$(git rev-parse @{u})" ]; then
# git reset --hard @{u} &&
# git clean -xdf &&
#
# # Touch all files on release2 after checkout to prevent rebuild
# BRANCH=$(git rev-parse --abbrev-ref HEAD)
# if [[ "$BRANCH" == "release2" ]]; then
# touch **
# fi
#
# exec "${BASH_SOURCE[0]}"
# fi
chmod 700 reset_update.sh
chmod 700 update_panda_firmware.sh
# no cpu rationing for now
echo 0-3 > /dev/cpuset/background/cpus
echo 0-3 > /dev/cpuset/system-background/cpus
echo 0-3 > /dev/cpuset/foreground/boost/cpus
echo 0-3 > /dev/cpuset/foreground/cpus
echo 0-3 > /dev/cpuset/android/cpus
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
# Remove old NEOS update file
if [ -d /data/neoupdate ]; then
rm -rf /data/neoupdate
fi
# Check for NEOS update
if [ $(< /VERSION) != "12" ]; then
if [ -f "$DIR/scripts/continue.sh" ]; then
cp "$DIR/scripts/continue.sh" "/data/data/com.termux/files/continue.sh"
fi
git clean -xdf
"$DIR/installer/updater/updater" "file://$DIR/installer/updater/update.json"
fi
# handle pythonpath
ln -s /data/openpilot /data/pythonpath
export PYTHONPATH="$PWD"
# start manager
cd selfdrive
./manager.py
# if broken, keep on screen error
while true; do sleep 1; done
}
launch

6
launch_openpilot.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/usr/bin/bash
/usr/bin/sh /data/openpilot/dragonpilot/chinese-fonts/installer.sh &
export PASSIVE="0"
exec ./launch_chffrplus.sh

BIN
models/driving_model.dlc Normal file

Binary file not shown.

BIN
models/monitoring_model.dlc Normal file

Binary file not shown.

BIN
models/posenet.dlc Normal file

Binary file not shown.

2
opendbc/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
*.pyc
.*.swp

1080
opendbc/ESR.dbc Normal file

File diff suppressed because it is too large Load Diff

53
opendbc/README.md Normal file
View File

@@ -0,0 +1,53 @@
opendbc
======
The project to democratize access to the decoder ring of your car.
### DBC file basics
A DBC file encodes, in a humanly readable way, the information needed to understand a vehicle's CAN bus traffic. A vehicle might have multiple CAN buses and every CAN bus is represented by its own dbc file.
Wondering what's the DBC file format? [Here](http://www.socialledge.com/sjsu/index.php?title=DBC_Format) and [Here](https://github.com/stefanhoelzl/CANpy/blob/master/docs/DBC_Specification.md) a couple of good overviews.
### How to start reverse engineering cars
[opendbc](https://github.com/commaai/opendbc) is integrated with [cabana](https://community.comma.ai/cabana/).
Use [panda](https://github.com/commaai/panda) to connect your car to a computer.
### DBC file preprocessor
DBC files for different models of the same brand have a lot of overlap. Therefore, we wrote a preprocessor to create DBC files from a brand DBC file and a model specific DBC file. The source DBC files can be found in the generator folder. After changing one of the files run the generator.py script to regenerate the output files. These output files will be placed in the root of the opendbc repository and are suffixed by _generated.
### Good practices for contributing to opendbc
- Comments: the best way to store comments is to add them directly to the DBC files. For example:
```
CM_ SG_ 490 LONG_ACCEL "wheel speed derivative, noisy and zero snapping";
```
is a comment that refers to signal `LONG_ACCEL` in message `490`. Using comments is highly recommended, especially for doubts and uncertainties. [cabana](https://community.comma.ai/cabana/) can easily display/add/edit comments to signals and messages.
- Units: when applicable, it's recommended to convert signals into physical units, by using a proper signal factor. Using a SI unit is preferred, unless a non-SI unit rounds the signal factor much better.
For example:
```
SG_ VEHICLE_SPEED : 7|15@0+ (0.00278,0) [0|70] "m/s" PCM
```
is better than:
```
SG_ VEHICLE_SPEED : 7|15@0+ (0.00620,0) [0|115] "mph" PCM
```
However, the cleanest option is really:
```
SG_ VEHICLE_SPEED : 7|15@0+ (0.01,0) [0|250] "kph" PCM
```
- Signal's size: always use the smallest amount of bits possible. For example, let's say I'm reverse engineering the gas pedal position and I've determined that it's in a 3 bytes message. For 0% pedal position I read a message value of `0x00 0x00 0x00`, while for 100% of pedal position I read `0x64 0x00 0x00`: clearly, the gas pedal position is within the first byte of the message and I might be tempted to define the signal `GAS_POS` as:
```
SG_ GAS_POS : 7|8@0+ (1,0) [0|100] "%" PCM
```
However, I can't be sure that the very first bit of the message is referred to the pedal position: I haven't seen it changing! Therefore, a safer way of defining the signal is:
```
SG_ GAS_POS : 6|7@0+ (1,0) [0|100] "%" PCM
```
which leaves the first bit unallocated. This prevents from very erroneous reading of the gas pedal position, in case the first bit is indeed used for something else.

View File

@@ -6,15 +6,15 @@ BO_ 512 GAS_COMMAND: 6 EON
SG_ GAS_COMMAND : 7|16@0+ (0.253984064,-83.3) [0|1] "" INTERCEPTOR
SG_ GAS_COMMAND2 : 23|16@0+ (0.126992032,-83.3) [0|1] "" INTERCEPTOR
SG_ ENABLE : 39|1@0+ (1,0) [0|1] "" INTERCEPTOR
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" INTERCEPTOR
SG_ CHECKSUM : 43|4@0+ (1,0) [0|3] "" INTERCEPTOR
SG_ COUNTER_PEDAL : 35|4@0+ (1,0) [0|15] "" INTERCEPTOR
SG_ CHECKSUM_PEDAL : 47|8@0+ (1,0) [0|255] "" INTERCEPTOR
BO_ 513 GAS_SENSOR: 6 INTERCEPTOR
SG_ INTERCEPTOR_GAS : 7|16@0+ (0.253984064,-83.3) [0|1] "" EON
SG_ INTERCEPTOR_GAS2 : 23|16@0+ (0.126992032,-83.3) [0|1] "" EON
SG_ STATE : 39|8@0+ (1,0) [0|255] "" EON
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 43|4@0+ (1,0) [0|3] "" EON
SG_ STATE : 39|4@0+ (1,0) [0|15] "" EON
SG_ COUNTER_PEDAL : 35|4@0+ (1,0) [0|15] "" EON
SG_ CHECKSUM_PEDAL : 47|8@0+ (1,0) [0|255] "" EON
VAL_ 513 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND" 1 "FAULT_BAD_CHECKSUM" 0 "NO_FAULT" ;
@@ -76,6 +76,16 @@ BO_ 380 POWERTRAIN_DATA: 8 PCM
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
BO_ 420 VSA_STATUS: 8 VSA
SG_ USER_BRAKE : 7|16@0+ (0.015625,-1.609375) [0|1000] "" EON
SG_ COMPUTER_BRAKING : 23|1@0+ (1,0) [0|1] "" EON
SG_ ESP_DISABLED : 28|1@0+ (1,0) [0|1] "" EON
SG_ BRAKE_HOLD_RELATED : 52|1@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_HOLD_ACTIVE : 46|1@0+ (1,0) [0|1] "" EON
SG_ BRAKE_HOLD_ENABLED : 45|1@0+ (1,0) [0|1] "" EON
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EON
BO_ 432 STANDSTILL: 7 VSA
SG_ CONTROLLED_STANDSTILL : 0|1@0+ (1,0) [0|1] "" EON
SG_ WHEELS_MOVING : 12|1@0+ (1,0) [0|1] "" EON
@@ -98,21 +108,24 @@ BO_ 490 VEHICLE_DYNAMICS: 8 VSA
BO_ 506 BRAKE_COMMAND: 8 ADAS
SG_ COMPUTER_BRAKE : 7|10@0+ (1,0) [0|1] "" EBCM
SG_ ZEROS_BOH : 13|5@0+ (1,0) [0|1] "" EBCM
SG_ SET_ME_X00 : 13|5@0+ (1,0) [0|1] "" EBCM
SG_ BRAKE_PUMP_REQUEST : 8|1@0+ (1,0) [0|1] "" EBCM
SG_ CRUISE_BOH2 : 23|3@0+ (1,0) [0|1] "" EBCM
SG_ SET_ME_X00_2 : 23|3@0+ (1,0) [0|1] "" EBCM
SG_ CRUISE_OVERRIDE : 20|1@0+ (1,0) [0|1] "" EBCM
SG_ CRUISE_BOH3 : 19|1@0+ (1,0) [0|1] "" EBCM
SG_ SET_ME_X00_3 : 19|1@0+ (1,0) [0|1] "" EBCM
SG_ CRUISE_FAULT_CMD : 18|1@0+ (1,0) [0|1] "" EBCM
SG_ CRUISE_CANCEL_CMD : 17|1@0+ (1,0) [0|1] "" EBCM
SG_ COMPUTER_BRAKE_REQUEST : 16|1@0+ (1,0) [0|1] "" EBCM
SG_ SET_ME_0X80 : 31|8@0+ (1,0) [0|1] "" EBCM
SG_ SET_ME_1 : 31|1@0+ (1,0) [0|1] "" EBCM
SG_ AEB_REQ_1 : 29|1@0+ (1,0) [0|1] "" XXX
SG_ AEB_REQ_2 : 26|3@0+ (1,0) [0|7] "" XXX
SG_ BRAKE_LIGHTS : 39|1@0+ (1,0) [0|1] "" EBCM
SG_ CRUISE_STATES : 38|7@0+ (1,0) [0|1] "" EBCM
SG_ CHIME : 47|3@0+ (1,0) [0|7] "" EBCM
SG_ ZEROS_BOH6 : 44|1@0+ (1,0) [0|1] "" EBCM
SG_ SET_ME_X00_4 : 44|1@0+ (1,0) [0|1] "" EBCM
SG_ FCW : 43|2@0+ (1,0) [0|3] "" EBCM
SG_ ZEROS_BOH4 : 55|8@0+ (1,0) [0|0] "" EBCM
SG_ AEB_STATUS : 41|2@0+ (1,0) [0|3] "" XXX
SG_ SET_ME_X00_5 : 55|8@0+ (1,0) [0|0] "" EBCM
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EBCM
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EBCM
@@ -155,14 +168,15 @@ BO_ 780 ACC_HUD: 8 ADAS
SG_ FCM_PROBLEM : 34|1@0+ (1,0) [0|1] "" BDY
SG_ RADAR_OBSTRUCTED : 33|1@0+ (1,0) [0|1] "" BDY
SG_ ENABLE_MINI_CAR : 32|1@0+ (1,0) [0|1] "" BDY
SG_ SET_ME_X03 : 47|2@0+ (1,0) [0|3] "" BDY
SG_ HUD_DISTANCE : 47|2@0+ (1,0) [0|3] "" BDY
SG_ HUD_LEAD : 45|2@0+ (1,0) [0|3] "" BDY
SG_ BOH_3 : 43|1@0+ (1,0) [0|3] "" BDY
SG_ BOH_4 : 42|1@0+ (1,0) [0|3] "" BDY
SG_ BOH_5 : 41|1@0+ (1,0) [0|3] "" BDY
SG_ CRUISE_CONTROL_LABEL : 40|1@0+ (1,0) [0|3] "" BDY
SG_ HUD_DISTANCE_3 : 52|1@0+ (1,0) [0|1] "" BDY
SG_ SET_ME_X03_2 : 55|2@0+ (1,0) [0|3] "" BDY
SG_ IMPERIAL_UNIT : 54|1@0+ (1,0) [0|1] "" BDY
SG_ SET_ME_X01_2 : 55|1@0+ (1,0) [0|1] "" BDY
SG_ SET_ME_X01 : 48|1@0+ (1,0) [0|1] "" BDY
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" BDY
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" BDY
@@ -213,6 +227,7 @@ BO_ 1029 DOORS_STATUS: 8 BDY
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
CM_ SG_ 490 LONG_ACCEL "wheel speed derivative, noisy and zero snapping";
CM_ SG_ 506 AEB_REQ_1 "set for duration of suspected AEB event";
CM_ SG_ 773 PASS_AIRBAG_ON "Might just be indicator light";
CM_ SG_ 773 PASS_AIRBAG_OFF "Might just be indicator light";
CM_ SG_ 780 CRUISE_SPEED "255 = no speed";
@@ -222,6 +237,7 @@ CM_ SG_ 829 BEEP "beeps are pleasant, chimes are for warnngs etc...";
VAL_ 506 FCW 3 "fcw" 2 "fcw" 1 "fcw" 0 "no_fcw" ;
VAL_ 506 CHIME 4 "double_chime" 3 "single_chime" 2 "continuous_chime" 1 "repeating_chime" 0 "no_chime" ;
VAL_ 506 AEB_STATUS 3 "aeb_prepare" 2 "aeb_ready" 1 "aeb_braking" 0 "no_aeb" ;
VAL_ 780 CRUISE_SPEED 255 "no_speed" 252 "stopped" ;
VAL_ 780 HUD_LEAD 3 "acc_off" 2 "solid_car" 1 "dashed_car" 0 "no_car" ;
VAL_ 829 BEEP 3 "single_beep" 2 "triple_beep" 1 "repeated_beep" 0 "no_beep" ;
@@ -268,12 +284,6 @@ BO_ 419 GEARBOX: 8 PCM
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
BO_ 420 VSA_STATUS: 8 VSA
SG_ USER_BRAKE : 7|16@0+ (0.015625,-1.609375) [0|1000] "" EON
SG_ ESP_DISABLED : 28|1@0+ (1,0) [0|1] "" EON
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
BO_ 422 SCM_BUTTONS: 8 SCM
SG_ CRUISE_BUTTONS : 7|3@0+ (1,0) [0|7] "" EON
SG_ LIGHTS_SETTING : 1|2@0+ (1,0) [0|3] "" EON
@@ -293,7 +303,7 @@ CM_ SG_ 780 CRUISE_SPEED "255 = no speed";
CM_ SG_ 804 CRUISE_SPEED_PCM "255 = no speed";
CM_ SG_ 829 BEEP "beeps are pleasant, chimes are for warnngs etc...";
VAL_ 399 STEER_STATUS 5 "fault" 4 "no_torque_alert_2" 2 "no_torque_alert_1" 0 "normal" ;
VAL_ 399 STEER_STATUS 6 "tmp_fault" 5 "fault_1" 4 "no_torque_alert_2" 3 "low_speed_lockout" 2 "no_torque_alert_1" 0 "normal" ;
VAL_ 419 GEAR_SHIFTER 10 "S" 4 "D" 3 "N" 2 "R" 1 "P" ;
VAL_ 422 CRUISE_BUTTONS 7 "tbd" 6 "tbd" 5 "tbd" 4 "accel_res" 3 "decel_set" 2 "cancel" 1 "main" 0 "none" ;
VAL_ 422 LIGHTS_SETTING 3 "high_beam" 2 "low_beam" 1 "position" 0 "no_lights" ;

View File

@@ -6,15 +6,15 @@ BO_ 512 GAS_COMMAND: 6 EON
SG_ GAS_COMMAND : 7|16@0+ (0.253984064,-83.3) [0|1] "" INTERCEPTOR
SG_ GAS_COMMAND2 : 23|16@0+ (0.126992032,-83.3) [0|1] "" INTERCEPTOR
SG_ ENABLE : 39|1@0+ (1,0) [0|1] "" INTERCEPTOR
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" INTERCEPTOR
SG_ CHECKSUM : 43|4@0+ (1,0) [0|3] "" INTERCEPTOR
SG_ COUNTER_PEDAL : 35|4@0+ (1,0) [0|15] "" INTERCEPTOR
SG_ CHECKSUM_PEDAL : 47|8@0+ (1,0) [0|255] "" INTERCEPTOR
BO_ 513 GAS_SENSOR: 6 INTERCEPTOR
SG_ INTERCEPTOR_GAS : 7|16@0+ (0.253984064,-83.3) [0|1] "" EON
SG_ INTERCEPTOR_GAS2 : 23|16@0+ (0.126992032,-83.3) [0|1] "" EON
SG_ STATE : 39|8@0+ (1,0) [0|255] "" EON
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 43|4@0+ (1,0) [0|3] "" EON
SG_ STATE : 39|4@0+ (1,0) [0|15] "" EON
SG_ COUNTER_PEDAL : 35|4@0+ (1,0) [0|15] "" EON
SG_ CHECKSUM_PEDAL : 47|8@0+ (1,0) [0|255] "" EON
VAL_ 513 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND" 1 "FAULT_BAD_CHECKSUM" 0 "NO_FAULT" ;
@@ -76,6 +76,16 @@ BO_ 380 POWERTRAIN_DATA: 8 PCM
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
BO_ 420 VSA_STATUS: 8 VSA
SG_ USER_BRAKE : 7|16@0+ (0.015625,-1.609375) [0|1000] "" EON
SG_ COMPUTER_BRAKING : 23|1@0+ (1,0) [0|1] "" EON
SG_ ESP_DISABLED : 28|1@0+ (1,0) [0|1] "" EON
SG_ BRAKE_HOLD_RELATED : 52|1@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_HOLD_ACTIVE : 46|1@0+ (1,0) [0|1] "" EON
SG_ BRAKE_HOLD_ENABLED : 45|1@0+ (1,0) [0|1] "" EON
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EON
BO_ 432 STANDSTILL: 7 VSA
SG_ CONTROLLED_STANDSTILL : 0|1@0+ (1,0) [0|1] "" EON
SG_ WHEELS_MOVING : 12|1@0+ (1,0) [0|1] "" EON
@@ -98,21 +108,24 @@ BO_ 490 VEHICLE_DYNAMICS: 8 VSA
BO_ 506 BRAKE_COMMAND: 8 ADAS
SG_ COMPUTER_BRAKE : 7|10@0+ (1,0) [0|1] "" EBCM
SG_ ZEROS_BOH : 13|5@0+ (1,0) [0|1] "" EBCM
SG_ SET_ME_X00 : 13|5@0+ (1,0) [0|1] "" EBCM
SG_ BRAKE_PUMP_REQUEST : 8|1@0+ (1,0) [0|1] "" EBCM
SG_ CRUISE_BOH2 : 23|3@0+ (1,0) [0|1] "" EBCM
SG_ SET_ME_X00_2 : 23|3@0+ (1,0) [0|1] "" EBCM
SG_ CRUISE_OVERRIDE : 20|1@0+ (1,0) [0|1] "" EBCM
SG_ CRUISE_BOH3 : 19|1@0+ (1,0) [0|1] "" EBCM
SG_ SET_ME_X00_3 : 19|1@0+ (1,0) [0|1] "" EBCM
SG_ CRUISE_FAULT_CMD : 18|1@0+ (1,0) [0|1] "" EBCM
SG_ CRUISE_CANCEL_CMD : 17|1@0+ (1,0) [0|1] "" EBCM
SG_ COMPUTER_BRAKE_REQUEST : 16|1@0+ (1,0) [0|1] "" EBCM
SG_ SET_ME_0X80 : 31|8@0+ (1,0) [0|1] "" EBCM
SG_ SET_ME_1 : 31|1@0+ (1,0) [0|1] "" EBCM
SG_ AEB_REQ_1 : 29|1@0+ (1,0) [0|1] "" XXX
SG_ AEB_REQ_2 : 26|3@0+ (1,0) [0|7] "" XXX
SG_ BRAKE_LIGHTS : 39|1@0+ (1,0) [0|1] "" EBCM
SG_ CRUISE_STATES : 38|7@0+ (1,0) [0|1] "" EBCM
SG_ CHIME : 47|3@0+ (1,0) [0|7] "" EBCM
SG_ ZEROS_BOH6 : 44|1@0+ (1,0) [0|1] "" EBCM
SG_ SET_ME_X00_4 : 44|1@0+ (1,0) [0|1] "" EBCM
SG_ FCW : 43|2@0+ (1,0) [0|3] "" EBCM
SG_ ZEROS_BOH4 : 55|8@0+ (1,0) [0|0] "" EBCM
SG_ AEB_STATUS : 41|2@0+ (1,0) [0|3] "" XXX
SG_ SET_ME_X00_5 : 55|8@0+ (1,0) [0|0] "" EBCM
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EBCM
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EBCM
@@ -155,14 +168,15 @@ BO_ 780 ACC_HUD: 8 ADAS
SG_ FCM_PROBLEM : 34|1@0+ (1,0) [0|1] "" BDY
SG_ RADAR_OBSTRUCTED : 33|1@0+ (1,0) [0|1] "" BDY
SG_ ENABLE_MINI_CAR : 32|1@0+ (1,0) [0|1] "" BDY
SG_ SET_ME_X03 : 47|2@0+ (1,0) [0|3] "" BDY
SG_ HUD_DISTANCE : 47|2@0+ (1,0) [0|3] "" BDY
SG_ HUD_LEAD : 45|2@0+ (1,0) [0|3] "" BDY
SG_ BOH_3 : 43|1@0+ (1,0) [0|3] "" BDY
SG_ BOH_4 : 42|1@0+ (1,0) [0|3] "" BDY
SG_ BOH_5 : 41|1@0+ (1,0) [0|3] "" BDY
SG_ CRUISE_CONTROL_LABEL : 40|1@0+ (1,0) [0|3] "" BDY
SG_ HUD_DISTANCE_3 : 52|1@0+ (1,0) [0|1] "" BDY
SG_ SET_ME_X03_2 : 55|2@0+ (1,0) [0|3] "" BDY
SG_ IMPERIAL_UNIT : 54|1@0+ (1,0) [0|1] "" BDY
SG_ SET_ME_X01_2 : 55|1@0+ (1,0) [0|1] "" BDY
SG_ SET_ME_X01 : 48|1@0+ (1,0) [0|1] "" BDY
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" BDY
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" BDY
@@ -213,6 +227,7 @@ BO_ 1029 DOORS_STATUS: 8 BDY
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
CM_ SG_ 490 LONG_ACCEL "wheel speed derivative, noisy and zero snapping";
CM_ SG_ 506 AEB_REQ_1 "set for duration of suspected AEB event";
CM_ SG_ 773 PASS_AIRBAG_ON "Might just be indicator light";
CM_ SG_ 773 PASS_AIRBAG_OFF "Might just be indicator light";
CM_ SG_ 780 CRUISE_SPEED "255 = no speed";
@@ -222,6 +237,7 @@ CM_ SG_ 829 BEEP "beeps are pleasant, chimes are for warnngs etc...";
VAL_ 506 FCW 3 "fcw" 2 "fcw" 1 "fcw" 0 "no_fcw" ;
VAL_ 506 CHIME 4 "double_chime" 3 "single_chime" 2 "continuous_chime" 1 "repeating_chime" 0 "no_chime" ;
VAL_ 506 AEB_STATUS 3 "aeb_prepare" 2 "aeb_ready" 1 "aeb_braking" 0 "no_aeb" ;
VAL_ 780 CRUISE_SPEED 255 "no_speed" 252 "stopped" ;
VAL_ 780 HUD_LEAD 3 "acc_off" 2 "solid_car" 1 "dashed_car" 0 "no_car" ;
VAL_ 829 BEEP 3 "single_beep" 2 "triple_beep" 1 "repeated_beep" 0 "no_beep" ;
@@ -257,12 +273,6 @@ BO_ 404 STEERING_CONTROL: 4 EON
SG_ COUNTER : 29|2@0+ (1,0) [0|15] "" EPS
SG_ CHECKSUM : 27|4@0+ (1,0) [0|3] "" EPS
BO_ 420 VSA_STATUS: 8 VSA
SG_ USER_BRAKE : 7|16@0+ (0.015625,-1.609375) [0|1000] "" EON
SG_ ESP_DISABLED : 28|1@0+ (1,0) [0|1] "" EON
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EON
BO_ 422 SCM_BUTTONS: 8 SCM
SG_ CRUISE_BUTTONS : 7|3@0+ (1,0) [0|7] "" EON
SG_ LIGHTS_SETTING : 1|2@0+ (1,0) [0|3] "" EON
@@ -288,6 +298,7 @@ BO_ 660 SCM_FEEDBACK: 8 SCM
CM_ SG_ 422 PARKING_BRAKE_LIGHT "Believe this is just the dash light for the parking break";
VAL_ 392 GEAR_SHIFTER 0 "S" 1 "P" 2 "R" 4 "N" 8 "D" ;
VAL_ 392 GEAR 26 "S" 4 "D" 3 "N" 2 "R" 1 "P" ;
VAL_ 399 STEER_STATUS 6 "tmp_fault" 5 "fault_1" 4 "no_torque_alert_2" 3 "low_speed_lockout" 2 "no_torque_alert_1" 0 "normal" ;
VAL_ 422 CRUISE_BUTTONS 7 "tbd" 6 "tbd" 5 "tbd" 4 "accel_res" 3 "decel_set" 2 "cancel" 1 "main" 0 "none" ;
CM_ "CHFFR_METRIC 342 STEER_ANGLE STEER_ANGLE 0.36 180; CHFFR_METRIC 380 ENGINE_RPM ENGINE_RPM 1 0; CHFFR_METRIC 804 ENGINE_TEMPERATURE ENGINE_TEMPERATURE 1 0";

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