Previously we stopped the simulation to ensure parameter changes are
applied to the simulated vehicle. We can now reboot the simulated
autopilot, so these patches make use of those changes.
One big advantage is that the --gdb option is in play for the applying
of the parameters to the vehicle.
RTL may disarm the vehicle on completion. We RTL at several times in
the testing, and the subsequent tests were not rearming. This means we
had a race condition.
We now explicitly wait to be disarmed by the RTL mode, and rearm the
vehicle.
This is an interim patch until we decide whether to make each "test"
self-contained, and have a precondition of "on ground and disarmed".
This function is called from every vehicle to run a test. If any of the tests throws an exception, it will be caught here, and the name of the test and the exception that got raised will be added to the fail_list
Three of our models start a SITL instance to apply parameters
then restart it so that the parameter changes can take effect.
Factor that functionality out.
Autotest: common.py add new base class and test
Autotest : Common add heartbeat handling on wait_mode timeout
Autotest: common.py add reach_heading_manual and reach_distance_manual
Autotest: new autotest implementation for Rover
Autotest : rover add drive_square test
Autotest: new autotest implementation for Copter
Autotest: new autotest implementation for Plane
Autotest: new autotest implementation for Sub
Autotest: new autotest implementation
Autotest: new autotest implementation for QuadPlane
Autotest : Sub disable GCS_Failsafe on autotest to prevent timeout. The failsafe aren't currently tested on Sub
Tools: don't need to pass option on first mavproxy
Tools: reformat common.py and add commun function
Tools: use new common functions
Tools: move functions from rover to commun and reorder
Tools: add and use set_rc function with timeout
Tools: fix style for pep8
Based on work done by khancir
(https://github.com/ArduPilot/ardupilot/pull/6360)
Tools: arduplane.py change print to progress function
Tools: quadplane.py change print to progress function
Tools: ardusub.py change print to progress function
common.py:wait_altitude contained an if statement that, if the plane was changing altitude at all would reset tstart, making the timeout effectively useless. Removing this line allows wait_altitude to respect the timeout the user sets.