for reasons I can't fathom, defaulting the rangefinder state causes problems with the vehicle orientation in SITL - probably a state update fix somewhere.
This test was kind of broken anyway - the RangeFinder was pointing latterally out from the vehicle, but is displayed forward of the vehicle (ther RANGEFINDER mavlink message conveys no orientation information)
autotest: tidy WheelEncoders test
autotest: rover: tidy PolyFenceObjectAvoidance code
autotest: add load_fence_using_mavwp
Also corrects the mission item types being returned by the mission-item-to-misison-item-int converter
autotest: fix Rover PolyFenceAvoidanceBendyRulerEasier test
these tests weren't being run becausethey were disabled based on support for loading fence items from QGC files.
autotest: fix Rover PolyFenceAvoidanceBendyRuler test
Autotests for takeoffs have been added for Plane, covering AUTO and
TAKEOFF mode takeoffs.
An auxiliary `set_servo` method has been added to `vehicle_test_suite.py`.
autotest: tidy PosHoldTakeoff heli test
autotest: tidy StabilizeTakeoff heli test
autotest: tidy SplineWaypoint heli test
autotest: tidy ManAutoRotation heli test
autotest: tidy AirspeedDrivers heli test
autotest: tidy PIDNotches heli test
autotest: clean MotorVibration test for new infrastructure
autotest: clean VisionPosition test for new infrastructure
autotest: clean MotorFail test for new infrastructure
autotest: clean OpticalFlowLimits test for new infrastructure
autotest: tidy OpticalFlow test for new infrastructure
autotest: tidy SetModeViaModeSwitch test for new infrastructure
autotest: tidy SetModesViaAuxSwitch test for new infrastructure
autotest: tidy SplineLastWaypoint test for new infrastructure
autotest: tidy PIDNotches test for new infrastructure
autotest: tidy ThrottleGainBoost test for new infrastructure
autotest: tidy PrecisionLoiterCompanion test for new infrastructure
autotest: tidy BeaconPosition test for new infrastructure
autotest: simplify AutoDock test
autotest: tidy AP_Proximity_MAV test
autotest: tidy DriveSquare test
autotest: tidy BatteryFailsafe test
autotest: tidy GPSViconSwitching test
autotest: tidy RangeFinder test
clean-up fence manipulation functions and add test for auto-enablement on copter
update tests to have some FENCE_ENABLE tests
add avoidance minimum and maximum altitude fence
add fence switch test while flying
add FenceAutoEnableDisableSwitch for auto mode 2
add more scenarios for plane fence auto-enable
validate fence rc switch behaviour
check fence autoenable by taking off in guided mode
more FENCE_AUTOENABLE tests
add FenceEnableDisableAux and FenceMinAltAutoEnableAbort
this makes the assumption that any reboot done within a SITL was because some parameter changes only take effect after a reboot.
... so after we have reverted the parameters, reboot again to make the reverted parameter values take effect
we're running at large speedups; 5 simulated seconds might not be enough time for MAVProxy to accumulate statistics. So get MAVProxy to emit the rate each second instead
Co-authored-by: Thomas Watson <twatson52@icloud.com>
Thomas noted that tests prior to RngFndQuality were leaving a LUA rangefinder hanging around in https://github.com/ArduPilot/ardupilot/pull/27484
Thomas' patch fixes RngFndQuality to only collect context messages after a reboot, which will fix the problem.
But tests should *not* leave the vehicle in this state, so this patch fixes that.
allows state to be encapsulated within the object rather than simply in the same scope / closure of the method being called.
Will allow easier re-use of these blocks