From 80be66484f4af84bd315f3e64aec22c2f74eb2fc Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 31 May 2022 22:10:11 -0700 Subject: [PATCH] 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 --- selfdrive/car/car_helpers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/selfdrive/car/car_helpers.py b/selfdrive/car/car_helpers.py index 46991bb4d2..85fcfa1fad 100644 --- a/selfdrive/car/car_helpers.py +++ b/selfdrive/car/car_helpers.py @@ -122,10 +122,13 @@ def fingerprint(logcan, sendcan): finger = gen_empty_fingerprint() candidate_cars = {i: all_legacy_fingerprint_cars() for i in [0, 1]} # attempt fingerprint on both bus 0 and 1 frame = 0 - frame_fingerprint = 10 # 0.1s + frame_fingerprint = 25 # 0.25s car_fingerprint = None done = False + # drain CAN socket so we always get the latest messages + messaging.drain_sock_raw(logcan) + while not done: a = get_one_can(logcan)