sim_vehicle.py: stack -A options in an array rather than splitting on…#31838
sim_vehicle.py: stack -A options in an array rather than splitting on…#31838peterbarker wants to merge 1 commit intoArduPilot:masterfrom
Conversation
… space e.g. ./Tools/autotest/sim_vehicle.py -v Copter --gdb --debug --map --console -A --serial5=sim:gps:3 -A --serial6=sim:gps:4
tpwrules
left a comment
There was a problem hiding this comment.
Looks decent overall.
Unfortunate this still works, but I think it needs to be fixed at another layer. ./Tools/autotest/sim_vehicle.py -v Copter --gdb --debug -A -"-serial5=uart:/tmp/x --serial6=uart:/tmp/y"
| @@ -771,7 +771,7 @@ def start_vehicle(binary, opts, stuff, spawns=None): | |||
| cmd.extend(["--enable-fgview"]) | |||
| if opts.sitl_instance_args: | |||
| # this could be a lot better: | |||
There was a problem hiding this comment.
Do we need this comment anymore?
|
On Fri, 9 Jan 2026, Thomas Watson wrote:
Do we need this comment anymore?
Removing the old option would count as better :-)
|
|
Which option is “the old one”? |
The option to stack everything into a single |
|
I don't think we have such an option in this script per se. I think something lower down is splitting on spaces now. It is better in this script so I think the comment should be removed. |
Oh, whoops! I forgot the shape of this PR. It's a bit rude to just up-and-break people's current scripts. I'm kind of OK with it as it's only going to be advanced users using I could add a little bit of code that detects spaces in the arguments and errors out as "compatability" code for a couple of years? |
|
I think adding that code to reject spaces would defeat the benefit of the new option! I think the comment should be removed, then later we can find and fix what else is breaking on spaces. At that time we can decide if there needs to be a warning period. |
… space
e.g. ./Tools/autotest/sim_vehicle.py -v Copter --gdb --debug --map --console -A --serial5=sim:gps:3 -A --serial6=sim:gps:4
Tested in SITL.
Stacking works, as does splitting with spaces... i.e. these both work:
and