mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-25 22:13:53 +08:00
06958e42 Fix pedal bootstub build f5817e6b Fix Pedal bootstub version c00fe867 CircleCI needs to check bootstub doesn't break too 9b5b696e Subaru: remove GM leftover 20c76ad5 Power Saving (#169) c6eeaad6 Subaru: added last engage/disengage regression test 37d46e0c Subaru: added subaru safety tests 5686dae2 Subaru updated driver factor a6193a82 Dcp remove (#168) e437b9b4 Subaru: fixed bug and added safety tests 176f1325 Subaru: added proper safety model 0b10bb70 Subaru safety: move camera to bus 2 bce279a6 Pedal: only one firmware (#164) 4f73cb48 Toyota pedal: checking for no pedal being commanded when openpilot is off 0b2327e5 Merge pull request #160 from commaai/capture_make_failure 7b504d2f panda safety test that replays drives of saved CAN messages (#151) d7d08892 Capture make failure so it can be logged to sentry git-subtree-dir: panda git-subtree-split: 06958e424cad7efa3fb35d262480c29817733059
22 lines
630 B
Python
Executable File
22 lines
630 B
Python
Executable File
#!/usr/bin/env python2
|
|
|
|
# This trims CAN message CSV files to just the messages relevant for Panda testing.
|
|
# Usage:
|
|
# cat input.csv | ./trim_csv.py > output.csv
|
|
import fileinput
|
|
|
|
addr_to_keep = [544, 0x1f4, 0x292] # For Chrysler, update to the addresses that matter for you.
|
|
|
|
for line in fileinput.input():
|
|
line = line.strip()
|
|
cols = line.split(',')
|
|
if len(cols) != 4:
|
|
continue # malformed, such as at the end or every 60s.
|
|
(_, addr, bus, _) = cols
|
|
if (addr == 'addr'):
|
|
continue
|
|
if (int(bus) == 128): # Keep all messages sent by OpenPilot.
|
|
print line
|
|
elif (int(addr) in addr_to_keep):
|
|
print line
|