Commit Graph

105 Commits

Author SHA1 Message Date
Shane Smiskol 567601da9a
DBC parser: add back checksum start bit and length checks (#636)
* Revert "remove checksum and counter alignment checks (#634)"

This reverts commit f3232cc32b.

* add logic to ignore checksum check if -1

* think we need size too
2022-06-13 12:11:56 -07:00
Jason Young f3232cc32b
remove checksum and counter alignment checks (#634) 2022-06-09 11:47:53 -07:00
Shane Smiskol fbd2e71c4a
tests: remove DBC parsing timing test (#626)
* instead test parsing all DBCs

* remove print

* add comment for what this tests

* Welcome back, guys. Only adjust good torque if maxLatAccel is set
2022-06-02 16:46:38 -07:00
Shane Smiskol c8a851618a
dbc parser: remove address check for interceptor check (#615)
* draft

* remove address

* don't see why this isn't fine
2022-05-25 23:49:48 -07:00
Adeeb Shihadeh 87af8c4ac1 CANParser: wait a couple seconds printing misisng 2022-05-16 21:56:14 -07:00
Shane Smiskol 16ef13cec5
DBC parser: add line number to errors (#614)
* add line number to errors

* spacing for backslashes
2022-05-16 16:58:45 -07:00
Adeeb Shihadeh 1599f2e370
Kia EV6 (#567) 2022-05-15 18:26:19 -07:00
Shane Smiskol 490ddedc59
comma body: add checksum state (#613)
* add checksum state for comma body dbc

* ohh these are per byte, nice
2022-05-13 15:55:56 -07:00
Shane Smiskol c53965dfbd
Remove dbc_template.cc (#612)
remove dbc_template
2022-05-13 15:29:32 -07:00
Willem Melching c699a06af5
dbc regex, do not escape underscore (#611) 2022-05-13 13:52:36 +02:00
Shane Smiskol bd7589b628 Remove dbc_out 2022-05-12 19:55:49 -07:00
Shane Smiskol b302f6934e
Dynamically parse DBCs (#602)
* initial commit, bring over from deanlee's PR based on newer commit

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* fix msb, lsb, size

* fix lsb

* clean up

* need this for CI

* add missing body checksum/counter

* get dir from BASEDIR first, then $HOME

* fix CI

* doesn't work

* just hardcode when compiling

* remove process_dbc

* add test for startup time

* test can parsing

* fix

* better

* bye bye dbc.py

* fix startswith

* add function to get dbc names for plotjuggler

* check DBC_FILE_PATH

* revert

* rename

* slightly more consistent at ~0.57 seconds

* make sure the tests make sense

* test ms per line

* use ctre

* Revert "use ctre"

This reverts commit 5e1a4440e465c901403a9717bbdef5b573e9838e.

* compile regex at import time

* add debug print and lower test time

* add comment

* 0.02 ms per line max

* better error messages

* only include what we need, and make it explicit

* check total time

check total time

* no global

* always a list

* not a c loop any more

* default to list

* use hex

* make static (only calculate path once)

* seems to be more consistent now (30-38 ms)

Co-authored-by: Dean Lee <deanlee3@gmail.com>
2022-05-12 17:59:33 -07:00
Adeeb Shihadeh 9564b74d80 remove extra new line 2022-05-11 16:27:09 -07:00
Adeeb Shihadeh 76b7f2e645
cloudlog support (#608)
* cloudlog support

* cleanup
2022-05-11 15:53:02 -07:00
Cameron Clough bdbf186962
add missing import for std::numeric_limits<...>::max() (#589) 2022-04-13 09:48:25 -07:00
Adeeb Shihadeh 004db342a8
CANParser: add flag for bus timeout (#586)
* CANParser: add flag for bus timeout

* bump to 500ms

* 10x most frequent msg

* little test

* per bus

* Update can/parser.cc
2022-04-12 22:34:27 -07:00
Chris Souers 5a51aa7dde
Fix Honda checksum for extended CAN IDs. Add test function. (#585)
* Fix checksum for Honda extended CAN. Add test.

* revert packer_parser test

* begin test_checksum

* todo and comments

* convention

* unused

* forgot the s

* again

* cleanup

* remove that too

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-04-06 21:33:57 -07:00
Jason Young 87ff863432
allow utf-8 encoded characters (#581) 2022-04-05 15:06:23 -07:00
Igor Biletskyy cc45cc1bc0
body: counter and crc (#583)
* add to signals

* revert

* add fault byte

* add checksum to packer

* move flags to bits
2022-04-04 17:48:56 -07:00
Adeeb Shihadeh 3f41058f49 not needed most of the time 2022-03-18 20:22:24 -07:00
Robbe Derks 908dc0d1f7
Put back parser::lookup_message (#578) 2022-03-07 16:18:23 +01:00
Adeeb Shihadeh 859fea7ded
CAN FD support in packer + parser (#568)
* can fd support in packer + parser

* don't need these anymore

* fix pedal crc

* fix dynamic parsing

* cleanup

* packer test
2022-02-28 09:10:34 -08:00
Adeeb Shihadeh 298c830739
Cleanup dead code in CAN parser + packer (#573)
* remove duplicate implementation

* Cleanup dead code in CAN parser + packer

* little more
2022-02-24 22:58:37 -08:00
Shane Smiskol c3d3c71aa7
CANParser: fix missing updated values (#561)
* test to make sure we don't throw away updated values if we get multiple can frames from boardd

* call cpp's update_string from update_strings

* fix test

* split in half

fix
2022-02-10 14:40:15 -08:00
Shane Smiskol 053a761244
CANParser: add field for all values from a cycle (#558)
* could work

* should be light-speed

* clean up

* clean up

* make sure updated is empty if nothing is updated

updating without a msg is undefined behavior

* should be fast enough

* more test

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-02-10 13:01:30 -08:00
Adeeb Shihadeh f74f93629b
CANParser: minor speedup (#560) 2022-02-09 22:46:28 -08:00
Adeeb Shihadeh 24538ceb04 Revert "CANParser: add field for all updated values (#548)"
This reverts commit da47fe5e45.
2022-02-09 22:01:25 -08:00
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