Commit Graph

28 Commits

Author SHA1 Message Date
Shane Smiskol
29837b8728 IsoTpParallelQuery: log empty responses (#29014)
* check if None

* log instead

* clean up

* should mark done
2023-07-18 03:43:56 -07:00
Shane Smiskol
96905e52e2 IsoTpParallelQuery: remove spammy log (#28372)
* remove

* just a warning

* just comment out for now
2023-06-02 14:24:54 -07:00
Shane Smiskol
026c093d05 IsoTpParallelQuery: log all timeouts (#28325)
* log

* self explan

* clean up

* revert

* need a better name

* move

* bvack
2023-05-27 22:14:50 -07:00
Shane Smiskol
aa3490ac30 IsoTpParallelQuery: fixup comment and simpler response check (#28326)
* startswith works with bytes

* this comment only explained an exception, was confusing
2023-05-27 19:25:38 -07:00
Shane Smiskol
f5519fdca8 IsoTpParallelQuery: set timed out requests done (#27764)
* better ordering and comments

* remove

* mark done if timed out

* response_timeouts should be only for extending timeouts, not marking done

* so the print still works

* more clear comment

* that can be removed
2023-04-11 22:05:00 -07:00
Shane Smiskol
74f709a59f IsoTpParallelQuery: break earlier and add comment (#27883)
* better ordering and comments

* one comment one dream
2023-04-11 21:05:07 -07:00
Shane Smiskol
02798513af IsoTpParallelQuery: log response pending (#27881)
we really should log this
2023-04-11 20:59:03 -07:00
Shane Smiskol
a0f33658f2 IsoTpParallelQuery: extend timeouts when receiving consecutive frames (#27762)
* change to rx_in_progress

* bump panda

* bump panda
2023-03-31 20:57:32 -07:00
Dean Lee
fb03e225fd isotp_parallel_query: use drain_sock_raw (#27714)
use drain_sock_raw
2023-03-28 00:25:20 -07:00
Shane Smiskol
08b49e5671 IsoTpParallelQuery: log errors in qlogs (#26609)
log these in qlogs
2022-11-28 15:00:37 -08:00
Shane Smiskol
8b41d817e4 IsoTpParallelQuery: set separation time (#25978)
* Specify separation time in openpilot

* comment

* Update selfdrive/car/isotp_parallel_query.py

* Update selfdrive/car/isotp_parallel_query.py
2022-10-05 17:06:52 -07:00
Shane Smiskol
4d7f4b4c9d IsoTpParallelQuery: don't return rx_addr (#25934)
* revert isotpparallelquery returning rx addr for functional special case

* we don't really use the tx addr (and soon won't make sense with fun querying)
2022-09-30 16:01:22 -07:00
Shane Smiskol
bea960675f IsoTpParallelQuery: process all functional responses (#25939)
* stash

* process all functional addrs (stash)

* clean up

* rm

* simplify

* let user pass in tx for rx addrs

* revert panda

* simplify

* comment

order

* need to go by rx_addr now

* Revert "need to go by rx_addr now"

This reverts commit 1197ecfbc5b9e5df20b523a0623f644cd8cae1ef.

* stash

* should also work

* this seems pretty clean

* not used

* properly use

* comment

* some fixes

* some fixes

* send consecutive frames on physical addrs

* bump panda

* looks better

* setup_only

* Revert VIN changes

* rev

* bump panda to master

* Update selfdrive/car/isotp_parallel_query.py
2022-09-30 15:15:13 -07:00
Shane Smiskol
9e2cca23cf Revert "IsoTpParallelQuery: process all functional responses (#25930)"
This reverts commit c5514f3440.
2022-09-29 21:15:34 -07:00
Shane Smiskol
c5514f3440 IsoTpParallelQuery: process all functional responses (#25930)
* Revert "VIN: query physical addresses (#25122)"

This reverts commit 0697ca2239.

* try sending tester present

* do CAN fingerprinting first

* looks like we can get rid of this!

* remove import

* no cache for testing

* revert

* revert

* move function to fw_versions

* Exception

* Revert fp order, sleep to let PubSocket connect

* comment

comment

* space

* Update selfdrive/car/car_helpers.py

* at 0.06 is where it becomes more consistent

* treat functional addrs like physical addrs (process all responses)

* fixes and debugging

* fix

* revert other changes

* Update selfdrive/car/isotp_parallel_query.py

* caps
2022-09-29 19:07:28 -07:00
Shane Smiskol
870c5f383d IsoTpParallelQuery: extend timeout for each ISO-TP frame (#25897)
* raise timeouts

* extend timeout for each message/frame (not multi-frame full response)

* bump panda

* 100 ms timeout between frames (max I've seen is 20, should be good)

* bump panda

* remove unused

* Add tester present to HKG queries (temp)

* send tester present to all ecus first

* vin and fw_versions.py sleep, should figure out why sendcan drops packets

* None is wildcard (some ecus respond with negative code, that's fine)

* typing

* try bus 0

* revert brand-specific changes

* Update selfdrive/car/isotp_parallel_query.py
2022-09-27 18:13:13 -07:00
Shane Smiskol
29b9a07393 Log tx addr for IsoTpMessage exceptions 2022-09-26 23:22:50 -07:00
Jason Young
5d699a578c Clean up timers on receipt of a non-0x78 UDS error (#25398)
* clean up timers on receipt of a non-0x78 UDS error

* Update selfdrive/car/isotp_parallel_query.py

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-08-11 15:24:23 -07:00
Shane Smiskol
3a8f17111c Log VIN response address (#25148)
* log vin rx addr

* clean up
2022-07-13 01:10:56 -07:00
Adeeb Shihadeh
0fce5d9045 Move a bunch of stuff to system/ part 3 (#24829)
* move swaglog.py

* timezoned

* logmessaged

* version.py

* fix linter
2022-06-11 23:19:27 -07:00
Shane Smiskol
30e1f28213 IsoTpParallelQuery: handle response pending (#24724)
* handle response pending

* match commit

* remove total timeout, just keep track of individual response timeouts

* fix

* add back total timeout

* this isn't reliable enough

* keep track of pending responses to print warning

* tx_addr is (addr, subaddr)

* debug

only query hyundai

import time

reponse pending

no cache

all cars

no timeout to test before

* Revert "debug"

This reverts commit abe9cfc1b668034d7fa5ca5cbe9efe8834db3e7b.

* always print pending

always debug

* Only debug

* Update selfdrive/car/isotp_parallel_query.py

* remove variable only for debugging
2022-06-07 17:49:07 -07:00
Shane Smiskol
124f3f02d5 FPv2: log query request and response address (#24733)
* log fw query response offset

* one line still

* log request bytes as well

* bump cereal

* prettier order

* bump cereal

* I wonder if the radar sends a response pending...

debug

dont cache

fix

debug

* Revert "I wonder if the radar sends a response pending..."

This reverts commit 12a9552c27ac427c161c27f916fb4fd1a8e4b44c.

* log addr too

* bump cereal
2022-06-03 12:05:13 -07:00
Willem Melching
95957bc188 FW query: catch asserts from uds.py (#22456) 2021-10-07 10:34:59 +02:00
Willem Melching
2d7d8fba99 Improve Hyundai FW query stability (#22344)
* extend timeout on valid response

* extend total timeout in fw query

* redundant query

* cleanup

* add 2 new sonata fw

* add cloudlog

* total timeout always 10x

* update ref

* time.monotonic()

* more logging
2021-09-24 17:32:09 -07:00
Josh Smith
77321dbac4 Add type hints, small cleanups (#21080)
* improve tools.lib.kbhit and tools.sim.lib.keyboard_ctrl

* unpack more efficiently

* minor improvements

* agnos.py match spec better

* manual_ctrl test missing queue arg

* fix incorrect type annotation

* queues are generic

* varname reuse resulting in incorrect type inference

* bytes().hex() rather than bytes.hex(bytes())

* a bit of type hinting stuff
2021-06-03 12:21:04 +02:00
Jason Young
e7fc11c7fb VW MQB: UDS fingerprinting support (#20271)
* FPv2 support for MQB

* Comment touch-ups

* Trim extra newlines

* Add Atlas and Tiguan

* Update submodule ref

* Revert "Add Atlas and Tiguan"

This reverts commit a47bc1bca7a5b72df44578051379859eefa5fb39.

* Curb my enthusiasm

* Drop ABS/ESP from UDS fingerprinting for now

* Use multi-query to grab SW build ID and parameterization

* Resolve merge oops

* Resolve merge conflicts

* Make Ecu.fwdCamera optional for VW

* Where'd that come from?

* Propitiate process replay checks until ready for model dump

* FW values for Audi A3 Prestige

* Revert "Make Ecu.fwdCamera optional for VW"

This reverts commit 56852b99

* Don't try to FP fwdCamera for VW

* Remove FW comments

* Simplify RX offset handling

* Corrected scoping for MQB trans detection

* Add default response_offset

* Remove explicit list of MQB vehicles for now

* Deal with pylint warning

* Clarify and simplify comments

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-03-25 16:06:59 -07:00
Adeeb
367155168a Update Flake8 config (#1624)
* update flake8 checks

* add E502

* no whitespace warnings

* fix violations

* no W391

Co-authored-by: Jason Young <jason@comma.ai>
2020-06-03 16:13:34 -07:00
George Hotz
71ead9adea selfdrive/car 2020-01-17 10:58:43 -08:00