sim_vehicle.py: roughly fix auto-sysid functionality

This commit is contained in:
Peter Barker 2023-07-14 13:49:35 +10:00 committed by Peter Barker
parent f288ba7cd0
commit 9b7b376016

View File

@ -769,7 +769,7 @@ 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:
if cmd_opts.count > 1 or opts.auto_sysid:
# we are in a subdirectory when using -n
path = os.path.join("..", path)
progress("Using defaults from (%s)" % (path,))