Update docstrings and usage examples
This commit is contained in:
@@ -4,7 +4,7 @@ from pathlib import Path
|
||||
|
||||
def parse_can_log(input_path: str | Path, out_bus1: str | Path, out_bus2: str | Path) -> None:
|
||||
"""
|
||||
Parses a CAN bus log file and saves valid frames to separate CSV files for Bus 1 and Bus 2.
|
||||
Parses a CAN bus log file from CANdigger and saves valid frames to separate CSV files for Bus 1 and Bus 2.
|
||||
Corrupted, incomplete, or debug frames are silently discarded.
|
||||
"""
|
||||
input_file = Path(input_path)
|
||||
@@ -65,7 +65,7 @@ if __name__ == '__main__':
|
||||
# Example usage:
|
||||
# parse_can_log('can_traffic.txt', 'bus1_output.csv', 'bus2_output.csv')
|
||||
# or on CLI:
|
||||
# python3 can_parser.py your_log.txt bus1_output.csv bus2_output.csv
|
||||
# python3 can_parser.py can_traffic.txt' bus1_output.csv bus2_output.csv
|
||||
|
||||
if __name__ == '__main__':
|
||||
import argparse
|
||||
|
||||
Reference in New Issue
Block a user