add some docs for selfdrive/debug
parent
729e4fa63f
commit
112df19d38
|
@ -0,0 +1,36 @@
|
|||
# debug scripts
|
||||
|
||||
## [can_printer.py](can_printer.py)
|
||||
|
||||
```
|
||||
usage: can_printer.py [-h] [--bus BUS] [--max_msg MAX_MSG] [--addr ADDR]
|
||||
|
||||
simple CAN data viewer
|
||||
|
||||
optional arguments:
|
||||
-h, --help show this help message and exit
|
||||
--bus BUS CAN bus to print out (default: 0)
|
||||
--max_msg MAX_MSG max addr (default: None)
|
||||
--addr ADDR
|
||||
```
|
||||
|
||||
## [dump.py](dump.py)
|
||||
|
||||
```
|
||||
usage: dump.py [-h] [--pipe] [--raw] [--json] [--dump-json] [--no-print] [--addr ADDR] [--values VALUES] [socket [socket ...]]
|
||||
|
||||
Dump communcation sockets. See cereal/services.py for a complete list of available sockets.
|
||||
|
||||
positional arguments:
|
||||
socket socket names to dump. defaults to all services defined in cereal
|
||||
|
||||
optional arguments:
|
||||
-h, --help show this help message and exit
|
||||
--pipe
|
||||
--raw
|
||||
--json
|
||||
--dump-json
|
||||
--no-print
|
||||
--addr ADDR
|
||||
--values VALUES values to monitor (instead of entire event)
|
||||
```
|
|
@ -32,7 +32,7 @@ def can_printer(bus, max_msg, addr):
|
|||
lp = sec_since_boot()
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description="can data viewer",
|
||||
parser = argparse.ArgumentParser(description="simple CAN data viewer",
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
||||
|
||||
parser.add_argument("--bus", type=int, help="CAN bus to print out", default=0)
|
||||
|
|
|
@ -13,7 +13,7 @@ from cereal.services import service_list
|
|||
|
||||
if __name__ == "__main__":
|
||||
|
||||
parser = argparse.ArgumentParser(description='Sniff a communcation socket')
|
||||
parser = argparse.ArgumentParser(description='Dump communcation sockets. See cereal/services.py for a complete list of available sockets.')
|
||||
parser.add_argument('--pipe', action='store_true')
|
||||
parser.add_argument('--raw', action='store_true')
|
||||
parser.add_argument('--json', action='store_true')
|
||||
|
@ -21,7 +21,7 @@ if __name__ == "__main__":
|
|||
parser.add_argument('--no-print', action='store_true')
|
||||
parser.add_argument('--addr', default='127.0.0.1')
|
||||
parser.add_argument('--values', help='values to monitor (instead of entire event)')
|
||||
parser.add_argument("socket", type=str, nargs='*', help="socket name")
|
||||
parser.add_argument("socket", type=str, nargs='*', help="socket names to dump. defaults to all services defined in cereal")
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.addr != "127.0.0.1":
|
||||
|
|
Loading…
Reference in New Issue