plotjuggler: support relative paths (#35054)

* Support relative paths

* Abspath for rlog too
pull/35056/head
Kacper Rączy 3 days ago committed by GitHub
parent 754f5aa955
commit 7b5468b2e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      tools/plotjuggler/juggle.py

@ -61,13 +61,15 @@ def start_juggler(fn=None, dbc=None, layout=None, route_or_segment_name=None, pl
env["BASEDIR"] = BASEDIR env["BASEDIR"] = BASEDIR
env["PATH"] = f"{INSTALL_DIR}:{os.getenv('PATH', '')}" env["PATH"] = f"{INSTALL_DIR}:{os.getenv('PATH', '')}"
if dbc: if dbc:
if os.path.exists(dbc):
dbc = os.path.abspath(dbc)
env["DBC_NAME"] = dbc env["DBC_NAME"] = dbc
extra_args = "" extra_args = ""
if fn is not None: if fn is not None:
extra_args += f" -d {fn}" extra_args += f" -d {os.path.abspath(fn)}"
if layout is not None: if layout is not None:
extra_args += f" -l {layout}" extra_args += f" -l {os.path.abspath(layout)}"
if route_or_segment_name is not None: if route_or_segment_name is not None:
extra_args += f" --window_title \"{route_or_segment_name}{f' ({platform})' if platform is not None else ''}\"" extra_args += f" --window_title \"{route_or_segment_name}{f' ({platform})' if platform is not None else ''}\""

Loading…
Cancel
Save