diff --git a/tools/README.md b/tools/README.md index e83ccb7589..601d2fabe1 100644 --- a/tools/README.md +++ b/tools/README.md @@ -191,7 +191,8 @@ Replay driving data `unlogger.py` replays data collected with [chffrplus](https://github.com/commaai/chffrplus) or [openpilot](https://github.com/commaai/openpilot). -Usage (Remote data): +Unlogger with remote data: + ``` # Log in via browser python lib/auth.py @@ -199,13 +200,13 @@ python lib/auth.py # Start unlogger python replay/unlogger.py #Example: -#python replay/unlogger.py '99c94dc769b5d96e|2018-11-14--13-31-42' +#python replay/unlogger.py '3533c53bb29502d1|2019-12-10--01-13-27' # In another terminal you can run a debug visualizer: python replay/ui.py # Define the environmental variable HORIZONTAL is the ui layout is too tall ``` -Usage (Local data downloaded from device or https://my.comma.ai): +Unlogger with local data downloaded from device or https://my.comma.ai: ``` python replay/unlogger.py @@ -221,6 +222,16 @@ python replay/unlogger.py ``` ![Imgur](https://i.imgur.com/Yppe0h2.png) +LogReader with remote data + +```python +from tools.lib.logreader import LogReader +from tools.lib.route import Route +route = Route('3533c53bb29502d1|2019-12-10--01-13-27') +log_paths = route.log_paths() +events_seg0 = list(LogReader(log_paths[0])) +print(len(events_seg0), 'events logged in first segment') +``` Debug car controls -------------