Commit Graph

128 Commits

Author SHA1 Message Date
Shane Smiskol 6770f1cdfb
CANParser: remove ts field (#557)
more usages
2022-02-09 11:59:15 -08:00
Shane Smiskol da47fe5e45
CANParser: add field for all updated values (#548)
* add updated field

* rename to updated

* draft

* clean up

* function for resetting

* *minor* refactor

* clean up names

* keep track of updated vals in the cc parser

* remove extra lines

* remove ts

* match parser_pyx

* cleaner to just call the cpp function as we don't need to aggregate updated values

* draft

* some tests

* fix test

* clean up

clean up

* test clean up

* add clarifying comments

* Revert "remove ts"

This reverts commit fd4558289d6667a42ab41c4511b0d8fe54eb7fc8.

* fix order

* use vals

* fix dup
2022-02-07 15:36:00 -08:00
Shane Smiskol 60a246c0a8
tests: remove CANParser default values (#550)
* remove default vals

* remove default vals
2022-02-03 00:24:45 -08:00
Shane Smiskol eea4ba1cba
CANParser: remove configurable default values (#527) 2022-01-27 17:02:12 -08:00
Adeeb Shihadeh 51e327947a update test 2022-01-27 08:58:43 -08:00
Jacob 1e655cc6ad
CANParser: reduce repeated dictionary creations (#506)
Co-authored-by: Jian Cheng <jian.cheng@mindcruise.ai>
2022-01-24 15:46:00 -08:00
Jason Young fedaf7eb31
VW MQB: Longitudinal support prereqs (#469) 2021-11-15 21:42:03 -08:00
Marc Wimmershoff 8a62233a83
Python DBC CAN encoder, fix scale/offset (#428)
* Bugfix in dbc CAN encoder

While encoding, we need to subtract the offset first before we apply the factor.

* Update dbc.py

* Forgot to add import for assert_almost_equal

* test against C++ can packer

* turn into unittest

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-10-20 16:05:43 +02:00
Willem Melching c7caba4a5c
C++ CAN Packer, add test for scale/offset (#455) 2021-10-20 15:48:15 +02:00
Jason Young d8ad386e40
Stellantis: RAM 1500 DBC, wave 1 (#424)
* Stellantis: Initial WIP DBC

* add more SWCM signals

* ABS yaw rate and accels, auto high beam passthru

* fix STEER_ANGLE signal

* official Stellantis control module names
2021-09-14 23:08:42 -07:00
Dean Lee b6ceded26b
use std::string for SignalPackValue::name (#390) 2021-09-02 14:25:47 -07:00
John Belmonte ac37f4885f
clean up CANDefine constructor (#417)
* clean up CANDefine constructor

explicit `d[foo] = {}` not needed if `d` is `defaultdict(dict)`

* cleanup

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-09-02 13:53:06 -07:00
Chris Souers a76084eddc
Honda Bosch: Add new LKAS HUG messages for 2021+ models (#372)
* Support checksum for extended IDs on 2021 Honda Bosch

Add 2021 Honda Accord Hybrid 2.0T Touring

Update can/common.cc

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

Yield a proper 4 bit value.

less space

Revert odyssey changes

Remove RDM signal def

Add new BRAKE_HOLD bits

- From route: 085ac1d942c35910|2021-05-08--17-44-16

Update can/common.cc

* just move to _bosch_2018

* delete that

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-07-07 13:13:37 -07:00
Greg Hogan 5f4dc594bd
log missing addrs that are validated (#343) 2021-04-25 02:45:27 -07:00
Adeeb Shihadeh 79530d3038
CANParser: add option to enforce message checks (#385)
* CANParser: add option to enforce message checks

* fix testss

* nice error msg

* fix tests
2021-04-24 23:09:56 -07:00
Jason Young 7196dcec9c
VW MQB: Updated message and signal data, round 2 (#358)
* Canonical signal data for ACC_02 and ACC_04

* Add CRC support for ACC_04

Co-authored-by: Comma Device <device@comma.ai>
2021-03-15 13:16:39 -07:00
Jason Young d3a793e619
VW MQB: Updated message and signal data, round 1 (#357)
* Updated LDW_02 signal data

* Updated EPS_01/LH_EPS_03 signal data

* Match driver input torque to prior scale

* More EPS_01 -> LH_EPS_03

Co-authored-by: Comma Device <device@comma.ai>
2021-03-10 17:14:54 -08:00
Joost Wooning f133708455
Modified can parser to run it from PlotJuggler (#352)
* Modified can parser to run it from PlotJuggler

* Assert for parsing DynamicStruct, can ignore checksum/counter messages

* Only write processed dbc on changes, to prevent cmake compiling

* Do not fail on creating new DBC outputs

* Remove print statement

* outer ignore_checksum and ignore_counter

* whitespace
2021-03-09 16:33:37 +01:00
Dean Lee ae058828cf
init message_states map without making copies (#355) 2021-03-09 16:11:09 +01:00
Dean Lee 419471253a
update_string: use cached buffer (#356) 2021-03-09 16:10:39 +01:00
Dean Lee b1fe8b1292
packer.cc: const Signal& (#354) 2021-03-08 19:34:17 +01:00
Jason Young 5a92a64b4f
VW MQB: Corrected CRC pad byte for ACC_10 (#353) 2021-03-04 16:55:12 -08:00
Dean Lee ec13e51c90
CANParser::update_string :use const std::string& as paramater (#344) 2021-01-30 22:26:30 -08:00
Willem Melching ab0095dcf7 static library doesnt work due to constructor hacks 2021-01-05 13:40:13 +01:00
Willem Melching ecb1d137c6 fix parser/packer python build dependency 2021-01-05 13:06:07 +01:00
Adeeb Shihadeh 652348a3be
fix generator test and linter (#323)
* fix generator test

* generator cleanup
2020-12-03 13:07:09 -08:00
grekiki 699dc63a88
Scons cython builder (#316)
* migrate to home pc

* style

* this works

* this is hacky

* why doesn't this work

* this should work

* no lint

* link against libdbc wtih abs path

* new env

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-11-26 16:11:23 -08:00
Adeeb Shihadeh c072d9e8df remove redundant linter checks 2020-11-26 11:36:10 -08:00
Adeeb Shihadeh 244e8807df
ubuntu 16.04 -> 20.04 (#309) 2020-10-29 13:53:48 -07:00
Willem Melching 25dc12a87b
c++17 (#305) 2020-10-17 12:41:35 -07:00
vanillagorillaa fb90ff7a46
Fix all typos in opendbc (#299) 2020-09-29 11:59:26 -07:00
grekiki ccd7d3e438
Fix 222 (#296)
* Added exceptions to packer and parser

* added exception tests

* improve style

* linter is annoying

* static analysis fix

* static analysis fix2

* static analysis fix3

* clean up the code

* update exceptions

* style1

* style2
2020-09-10 15:01:34 +02:00
Willem Melching 42e105ec1c fix mac build 2020-09-09 17:40:14 +02:00
Adeeb Shihadeh a59f03c179 cleanup parser_pyx 2020-08-02 13:02:07 -07:00
Adeeb Shihadeh 3ba0a7f1e2 parallel cythonize extension build 2020-08-02 13:01:37 -07:00
Adeeb Shihadeh c50d4bf1d5 add packer.cc and parser.cc dependencies on their cython extensions 2020-08-01 23:47:57 -07:00
martinl efb1e38aec
Subaru DBC update (#277)
* Add Subaru Global 2020 dbc

* Rename duplicate Cruise_Status to Cruise_Status_2

* Unify Subaru Crosstrek 2018 and Subaru Global 2017 dbc

* Add ES_DashState Cruise_On, initial Crosstrek 2020 Hybrid Transmission Gear

* dbc syntax fix

* Add R to gear values

* Add Throttle_Hybrid signal

* Use DBC generator for Subaru Global

* Remove Gear from _subaru_global_2017 template

* Fix packer parser test

* Add Checksum and Counter signals to Throttle_Hybrid

* Add filler signal to Brake_Pedal

* Correct dbc min-max values for subaru global 2017 template

* Correct Subaru global min|max values vol2

* Run generator

* rename _subaru_global_2017.dbc template to _subaru_global.dbc
2020-07-23 11:44:14 -07:00
Adeeb Shihadeh 9ee0069ecc rebuild cython extensions when python/cython/distuils change 2020-07-16 13:36:28 -07:00
Adeeb Shihadeh 2265c9c3dc
Build cython extensions in common setup.py (#281)
* build packer and parser with same setup

* fix build

* remove packer setup

* extra compile args
2020-07-08 14:05:16 -07:00
Adeeb Shihadeh 3cfb5c7778
enable -Wunused (#280) 2020-07-08 00:39:35 -07:00
Adeeb Shihadeh 55e9af71fc fix warnings in parser_pyx build 2020-06-29 16:18:45 -07:00
Willem Melching b875f970fc Stricter pylint 2020-06-02 15:14:04 -07:00
Adeeb Shihadeh 1f1ff225bd enable almost all flake8 checks 2020-06-01 02:03:03 -07:00
Adeeb Shihadeh 4c59163aa3 two spaces before inline comment 2020-05-31 14:06:11 -07:00
Adeeb Shihadeh e92e74311a whitespace after comma 2020-05-31 12:48:54 -07:00
Adeeb Shihadeh 5d33ec0f18 two spaces before inline comment 2020-05-31 00:56:04 -07:00
Adeeb Shihadeh 73685b609d fix linter complaint about whitespace around operators 2020-05-31 00:33:53 -07:00
Adeeb Shihadeh b15edbc1b5 fix linter complaint about inline comment whitespace 2020-05-30 19:44:56 -07:00
Adeeb Shihadeh 4ac30725b6 clean up blank lines 2020-05-30 04:30:07 -07:00
martinl 472aabb4fb
Subaru preglobal update (#260)
* Add Subaru preglobal Gear values

* Update subaru global checksum matching

* fix Steer_Torque_Sensor range

* Add Units signals

* Add preglobal Forester DBC

* Removed unknown signals and reordered known signals

* Units values syntax fix

* Remove whitespace
2020-05-21 10:13:22 -07:00
Willem Melching 11343c1086
Library cleanup (#261)
* library cleanup

* actually run install command

* Installing ubuntu capnproto is useless

* use ubuntu capnp
2020-05-12 18:50:31 -07:00
Adeeb Shihadeh 7456061a71 add checksum check to can parser for subaru 2020-04-30 14:17:07 -07:00
Adeeb 7f3b1774dd
Chrysler: calculate checksum in can packer/parser (#255)
* calculate chrysler checksum in can packer/parser

* remove comment
2020-04-30 14:06:26 -07:00
Adeeb a57e7ddbd7
CANPacker: Subaru checksum support (#241)
* subaru global: use standard checksum signal naming convention

* subaru checksum

* ignore first byte

* update other subaru dbcs

* revert outback changes, checksum is in a different byte
2020-04-13 15:06:28 -07:00
Jason Young 47db9238f4
Add SWA_01 message detail and CRC support for VW MQB (#236)
* Add canonical SWA_01 message and signal info

* SWA_01 CRC validation

* Decimal to int, to match the rest of the file
2020-04-02 12:23:05 -07:00
Jason Young a62d5dd847
Add TSK_06 CRC validation for VW MQB (#234)
* Add TSK_06 CRC validation to OP

* Activate TSK_06 CRC/counter checks via signal naming
2020-03-15 20:46:43 -07:00
Jason Young d1f76d609f
Add Motor_20 CRC support (#229) 2020-03-05 19:26:09 -08:00
rbiasini 53fc4487a5
added generator test (#207)
* added generator test
2019-12-16 21:53:38 +01:00
George Hotz 6e6779f993 build on mac AND linux, also gotta not use these python files 2019-12-14 19:48:56 -08:00
George Hotz 79dbfc1aec build on mac 2019-12-14 19:31:38 -08:00
rbiasini d309cdce78
Added linter to opendbc (#203)
* Added linter to opendbc

* this?

* This should work

* another try

* added pylintrc
2019-12-03 14:50:23 -08:00
Willem Melching ec3b459587 deterministic dependency order 2019-12-03 12:06:52 -08:00
Willem Melching a265d3512c
Azure pipelines ci (#202)
* add docker file and sconstruct

* this should work in ci

* remove branch name
2019-12-03 19:45:33 +01:00
Willem Melching bce9a2e1c0 packer depends on libdbc 2019-12-03 09:17:34 -08:00
Willem Melching 5d5fdd6ae2 no more python version of libdbc, everything through cython 2019-12-03 09:16:11 -08:00
Willem Melching 541705bf33 move CANDefine to parser code 2019-12-03 09:13:37 -08:00
Willem Melching da25c52a8e add test for can define 2019-12-03 09:05:02 -08:00
Willem Melching 0ba7926bfe unify can packer and parser 2019-12-03 08:43:05 -08:00
Willem Melching 25d88009b6 consistent naming 2019-12-03 08:22:16 -08:00
Willem Melching a5c640a51b fix linter 2019-12-03 08:02:19 -08:00
Riccardo be210fef62 remove obsolete make file 2019-12-02 15:52:51 -08:00
George Hotz ffd9dca7de opendbc needs cereal 2019-12-01 16:05:17 -08:00
George Hotz b559f63d6e remove more make 2019-12-01 15:54:51 -08:00
Comma Device d09294966f seems to work now 2019-12-01 15:54:51 -08:00
Comma Device 41e80836bc don't make 2019-12-01 15:54:51 -08:00
Comma Device 3254d1fc67 think scons works 2019-12-01 15:54:51 -08:00
Comma Device eb78f6aa1b scons sort of working 2019-12-01 15:54:51 -08:00
rbiasini e155e01748
Can migration (#199)
* moved CAN to opendbc

* also dbc was needed

* dbc test also added
2019-11-22 21:46:33 -08:00