From fda6d23fab484595274948e1a5c41713568e65e3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 25 Aug 2022 13:45:28 +1000 Subject: [PATCH] Tools: fixed sim_vehicle.py with -n fixed path to parameter file --- Tools/autotest/sim_vehicle.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tools/autotest/sim_vehicle.py b/Tools/autotest/sim_vehicle.py index e620f39d71..b0cfc0e63a 100755 --- a/Tools/autotest/sim_vehicle.py +++ b/Tools/autotest/sim_vehicle.py @@ -715,6 +715,9 @@ def start_vehicle(binary, opts, stuff, spawns=None): print("The parameter file (%s) does not exist" % (x,)) sys.exit(1) path = ",".join(paths) + if cmd_opts.count > 1: + # we are in a subdirectory when using -n + path = os.path.join("..", path) progress("Using defaults from (%s)" % (path,)) if opts.flash_storage: cmd.append("--set-storage-flash-enabled 1")