autotest: reboot after reverting rangefinder settings

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.
This commit is contained in:
Peter Barker 2024-07-08 12:21:33 +10:00 committed by Peter Barker
parent c986d93894
commit 96a78456bf
1 changed files with 2 additions and 0 deletions

View File

@ -382,6 +382,7 @@ class AutoTestSub(vehicle_test_suite.TestSuite):
self.disarm_vehicle()
self.context_pop()
self.reboot_sitl() # e.g. revert rangefinder configuration
def SimTerrainMission(self):
"""Mission at a constant height above synthetic sea floor"""
@ -421,6 +422,7 @@ class AutoTestSub(vehicle_test_suite.TestSuite):
self.disarm_vehicle()
self.context_pop()
self.reboot_sitl() # e.g. revert rangefinder configuration
def ModeChanges(self, delta=0.2):
"""Check if alternating between ALTHOLD, STABILIZE, POSHOLD and SURFTRAK (mode 21) affects altitude"""