Commit Graph

39 Commits

Author SHA1 Message Date
Dean Lee 8faada0494
refactor CANParser to improve performance (#795)
* reduce the const of copying signal values in CANParser::query_latest

* pass by reference

* use for range loop

* update_strings

* use assign

* track all signals

* use iterator & pointer to avoid copy SignalValue from vector

* use normal dict for vl_all

* update tests

* fix error in merge master

* change thresholds

reduce thresholds

* Trigger CI

* Trigger CI

* Trigger CI

* cleanup ctor

* reduce threshold

* revert changes to test_parser.py

* change thresholds

* remove update_string() from cython

* comment out test_performance_one_signal

* reduce thresholds

* test

* update

* update

* revert that for now

* update

* update

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-04-22 17:54:36 -07:00
Adeeb Shihadeh f50e9d78bd
CANParser: add msg name to debug prints (#813) 2023-04-13 14:48:00 -07:00
Dean Lee 9a1de83e4b
CANParser: use emplace_back to reduce the cost of copying values (#797) 2023-03-31 13:51:14 -07:00
Shane Smiskol d103b156b3
CANParser: add timestamp field (#779)
* add timestamp back, logMonoTime

* rename ts_nanos
2023-02-07 23:00:22 -08:00
Adeeb Shihadeh 06a3e7db6f
add cpplint (#773)
* add cpplint

* passes

* bump cereal

* here's a real hash
2022-12-31 16:49:26 -08:00
Greg Hogan 738e8aaeac
CAN-FD messages can be 64 bytes (#711) 2022-09-25 08:31:57 -07:00
martinl e95ed311c1
Add test for Subaru Brake_Status Signal1 large value (#702)
* Add test for Subaru Brake_Status Signal1 large value

* fix

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-09-07 20:37:36 -07:00
Comma Device d588872218 can parser: reduce spammy debug messages 2022-09-02 19:00:25 -04:00
Shane Smiskol b913296c91
CANParser: message counters affect can_valid (#688)
* use can_valid flag from parser and make it consider counter checks

* clean up

* don't show incorrect messages

* add comments

* move threshold to cpp parser

* fix
2022-08-19 18:11:45 -07:00
Shane Smiskol 1c4deed968
CANParser: move can valid threshold into parser (#690)
* use can_valid flag from parser and make it consider counter checks

* clean up

* don't show incorrect messages

* add comments

* move threshold to cpp parser

* only the refactor in this pr

* fix bug and same logic as old cython wrapper can invalid

* still print everything

* clean up

* whoops

* make these properties

revert that
2022-08-19 16:19:36 -07:00
Adeeb Shihadeh dd5c3f1bbd
packer/parser: generic counter handling (#659)
* packer/parser: generic counter handling

* pedal isn't special
2022-07-11 12:36:43 -07:00
Jason Young fe6241dcc6
refactor per-manufacturer checksum calculation (#650)
* synchronize function signatures

* if-spaghetti reduction

* add to cython

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-06-30 11:31:58 -07:00
Adeeb Shihadeh 28a40983d9 wait a little longer before printing 2022-06-23 21:18:57 -07:00
Adeeb Shihadeh 82be71072c
CANParser: invalid until valid (#648)
* CANParser: invalid until valid

* small test
2022-06-22 15:13:59 -07:00
Adeeb Shihadeh 87af8c4ac1 CANParser: wait a couple seconds printing misisng 2022-05-16 21:56:14 -07:00
Adeeb Shihadeh 1599f2e370
Kia EV6 (#567) 2022-05-15 18:26:19 -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
Adeeb Shihadeh 3f41058f49 not needed most of the time 2022-03-18 20:22:24 -07: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 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 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 eea4ba1cba
CANParser: remove configurable default values (#527) 2022-01-27 17:02:12 -08:00
Greg Hogan 5f4dc594bd
log missing addrs that are validated (#343) 2021-04-25 02:45:27 -07: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 ec13e51c90
CANParser::update_string :use const std::string& as paramater (#344) 2021-01-30 22:26:30 -08:00
vanillagorillaa fb90ff7a46
Fix all typos in opendbc (#299) 2020-09-29 11:59:26 -07:00
Adeeb Shihadeh 3cfb5c7778
enable -Wunused (#280) 2020-07-08 00:39:35 -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
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