fingerprinting: bump CAN fingerprinting time and drain socket (#24694)

* add debugging script

* debug

* remove

* add comment

* timestamp CAN fingerprinting (to get time needed to wait for radar)

* comment

* need this to log

* just in case, log first can packet logMonoTime

* clean up

* clean up

* bump fingerprint time to 250ms

bump fingerprint time to 250ms

* comment
pull/24697/head
Shane Smiskol 3 years ago committed by GitHub
parent 8be28b777a
commit 80be66484f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      selfdrive/car/car_helpers.py

@ -122,10 +122,13 @@ def fingerprint(logcan, sendcan):
finger = gen_empty_fingerprint() finger = gen_empty_fingerprint()
candidate_cars = {i: all_legacy_fingerprint_cars() for i in [0, 1]} # attempt fingerprint on both bus 0 and 1 candidate_cars = {i: all_legacy_fingerprint_cars() for i in [0, 1]} # attempt fingerprint on both bus 0 and 1
frame = 0 frame = 0
frame_fingerprint = 10 # 0.1s frame_fingerprint = 25 # 0.25s
car_fingerprint = None car_fingerprint = None
done = False done = False
# drain CAN socket so we always get the latest messages
messaging.drain_sock_raw(logcan)
while not done: while not done:
a = get_one_can(logcan) a = get_one_can(logcan)

Loading…
Cancel
Save