Commit Graph

128 Commits

Author SHA1 Message Date
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
Shane Smiskol 7e095a90af
Remove Toyota counter exception (#687)
* ignore PRE_COLLISION counter

* remove toyota exception
2022-08-18 22:05:26 -07:00
Adeeb Shihadeh 1619c9a40f
Hyundai: add HDA1 singals (#686)
* Hyundai: Car Port for Tucson Hybrid 2022

* Button send attempt

* Fix bit

* Send button fixed bits

* Define all bytes and only send PAUSE/RESUME

* Use CRUISE_INFO to cancel cruise and resume

* LFA and HDA icons

* Send LFA and HDA icons based on engageability

* Update hyundai_tucson_hev_2022.dbc

* GEAR has 24 bytes only

* Fix CRUISE_INFO copy

* Combine LFA_GREY and LFA_GREEN

* LKAS_BTN -> LFA_BTN

* Little endian

* add to ev6 dbc

* rm old stuff

* another val

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: Jason Wen <47793918+sunnyhaibin@users.noreply.github.com>
2022-08-18 17:33:00 -07:00
Adeeb Shihadeh 4885685171 fix that 2022-08-08 19:08:04 -07:00
Adeeb Shihadeh 8016dd43ac CANParser: better error for undefined messages 2022-08-08 18:58:35 -07:00
Adeeb Shihadeh d9a55f4f7c remove one more duplicate 2022-07-29 15:31:08 -07:00
Adeeb Shihadeh 4195e8f4c9 enabling this broke a bunch of stuff, revert for now 2022-07-21 20:22:52 -07:00
Adeeb Shihadeh 31bb1832fc always set checksum 2022-07-21 19:47:20 -07:00
Adeeb Shihadeh 1cf2f5b512 counters are all the same 2022-07-21 18:49:50 -07:00
Adeeb Shihadeh 387dcf9628
teach the packer how to count (#669)
* teach the packer how to count

* fix tests

* same as checksum

* little test
2022-07-21 17:51:49 -07:00
Jason Young 72d3f935e6
VW PQ: More cleanup and message updates (#668)
* checksum/counter support for ACC_System

* add CHECKSUM to Motor_5

* minor cleanup
2022-07-21 10:58:19 -07:00
Adeeb Shihadeh e2465cc701
Subaru: Counter -> COUNTER (#666)
* Subaru: Counter -> COUNTER

* run generator

* update tests

* revert that
2022-07-19 16:55:59 -07:00
Jason Young 2afccacd52
VW PQ: Message updates, checksum and counter support (#633)
* refactor MQB checksum/counter to prep for PQ

* first pass at PQ checksums and counters

* remove checksum and counter alignment checks

* forgot HCA_1

* Revert "remove checksum and counter alignment checks"

This reverts commit 0d30ee9b854c933bf12ee9ca26ad0b0f29956cea.

* don't check counter offset

* tweak comment

* handle checksum not starting at zero

* remove unused argument

* add LDW_Textbits to LDW_1

* Update can/common.cc

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

* fix counter again; minimize diff

* additional door-open signals

* add trunk lid state

* update LDW_Status message and signals

* typo

* make XOR checksum generic

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-07-15 10:29:12 -07:00
Comma Device 3fb3f5e821 ev6: update button message 2022-07-12 15:24:06 -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 f4b182dae4 Support arbitrary DBC paths 2022-06-22 14:17:22 -07:00
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