Skip to content

Commit c4736aa

Browse files
peterbarkerrobertlong13MichelleRos
committed
mavproxy_misc.py: add configerror_autopilot command
we need new and interesting ways to torture our autopilots. Understand a new command which asks the autopilot to enter its config error loop. This can be useful for testing GCS behaviour while autopilot is in this state. Co-authored-by: Bob Long <[email protected]> Co-authored-by: Michelle Rossouw <[email protected]>
1 parent efd6720 commit c4736aa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: MAVProxy/modules/mavproxy_misc.py

+5
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ def __init__(self, mpstate):
102102
self.add_command('hardfault_autopilot', self.cmd_hardfault_autopilot, "hardfault autopilot")
103103
self.add_command('panic_autopilot', self.cmd_panic_autopilot, "panic autopilot")
104104
self.add_command('longloop_autopilot', self.cmd_longloop_autopilot, "cause long loop in autopilot")
105+
self.add_command('configerror_autopilot', self.cmd_config_error_autopilot, "ask autopilot to jump to its config error loop") # noqa:E501
105106
self.add_command('internalerror_autopilot', self.cmd_internalerror_autopilot, "cause internal error in autopilot")
106107
self.add_command('dfu_boot', self.cmd_dfu_boot, "boot into DFU mode")
107108
self.add_command('deadlock', self.cmd_deadlock, "trigger deadlock")
@@ -260,6 +261,10 @@ def cmd_dfu_boot(self, args):
260261
'''boot into DFU bootloader without hold'''
261262
self.cmd_dosomethingreallynastyto_autopilot(args, 'DFU-boot-without-hold', 99)
262263

264+
def cmd_config_error_autopilot(self, args):
265+
'''Ask the autopilot to jump into its config error loop'''
266+
self.cmd_dosomethingreallynastyto_autopilot(args, 'config-loop', 101)
267+
263268
def cmd_deadlock(self, args):
264269
'''trigger a mutex deadlock'''
265270
self.cmd_dosomethingreallynastyto_autopilot(args, 'mutex-deadlock', 100)

0 commit comments

Comments
 (0)