tools: auto plotjuggler install
parent
f006e392ad
commit
f295d51fe9
|
@ -23,6 +23,7 @@ juggle_dir = os.path.dirname(os.path.realpath(__file__))
|
|||
DEMO_ROUTE = "4cf7a6ad03080c90|2021-09-29--13-46-36"
|
||||
RELEASES_URL="https://github.com/commaai/PlotJuggler/releases/download/latest"
|
||||
INSTALL_DIR = os.path.join(juggle_dir, "bin")
|
||||
PLOTJUGGLER_BIN = os.path.join(juggle_dir, "bin/plotjuggler")
|
||||
|
||||
|
||||
def install():
|
||||
|
@ -70,7 +71,7 @@ def start_juggler(fn=None, dbc=None, layout=None):
|
|||
if layout is not None:
|
||||
extra_args += f" -l {layout}"
|
||||
|
||||
cmd = f'plotjuggler --plugin_folders {INSTALL_DIR}{extra_args}'
|
||||
cmd = f'{PLOTJUGGLER_BIN} --plugin_folders {INSTALL_DIR}{extra_args}'
|
||||
subprocess.call(cmd, shell=True, env=env, cwd=juggle_dir)
|
||||
|
||||
|
||||
|
@ -149,6 +150,10 @@ if __name__ == "__main__":
|
|||
install()
|
||||
sys.exit()
|
||||
|
||||
if not os.path.exists(PLOTJUGGLER_BIN):
|
||||
print("PlotJuggler is missing. Downloading...")
|
||||
install()
|
||||
|
||||
if args.stream:
|
||||
start_juggler(layout=args.layout)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue