Files
sunnypilot/tools/auto_source.py
Dean Lee b920e2a998 tools: add --auto flag to replay and cabana for loading routes from auto source (#34863)
* add flag to auto load a route from the most suitable source

* split to functions

* early return

* add --auto to replay

* README

* cleanup

* remove prefix

* parse datetime

* cleanup

* improve help

* do not modify logreader.py

* fix seg_num

* cleanup
2025-05-05 16:48:15 -07:00

18 lines
349 B
Python
Executable File

#!/usr/bin/env python3
import sys
from openpilot.tools.lib.logreader import LogReader
def main():
if len(sys.argv) != 2:
print("Usage: python auto_source.py <log_path>")
sys.exit(1)
log_path = sys.argv[1]
lr = LogReader(log_path, sort_by_time=True)
print("\n".join(lr.logreader_identifiers))
if __name__ == "__main__":
main()