Skip to content

Commit

Permalink
mavproxy.py: add option to not run startup scripts
Browse files Browse the repository at this point in the history
for future use in ArduPilot's autotest
  • Loading branch information
peterbarker committed Jun 16, 2024
1 parent 919a35e commit abe9500
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion MAVProxy/mavproxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1338,6 +1338,7 @@ def run_startup_scripts():
parser.add_option("--default-modules", default="log,signing,wp,rally,fence,ftp,param,relay,tuneopt,arm,mode,calibration,rc,auxopt,misc,cmdlong,battery,terrain,output,adsb,layout", help='default module list')
parser.add_option("--udp-timeout",dest="udp_timeout", default=0.0, type='float', help="Timeout for udp clients in seconds")
parser.add_option("--retries", type=int, help="number of times to retry connection", default=3)
parser.add_option("--no-startup-scripts", action='store_true', help="Do not run .mavinit.scr and other startup scripts")

(opts, args) = parser.parse_args()
if len(args) != 0:
Expand Down Expand Up @@ -1519,7 +1520,8 @@ def quit_handler(signum = None, frame = None):
elif opts.aircraft is not None:
mpstate.aircraft_dir = opts.aircraft

run_startup_scripts()
if not opts.no_startup_scripts:
run_startup_scripts()

if opts.cmd is not None:
for cstr in opts.cmd:
Expand Down

0 comments on commit abe9500

Please sign in to comment.