Skip to content

Commit

Permalink
autotest: correct FenceFloorEnabledLanding test
Browse files Browse the repository at this point in the history
  • Loading branch information
andyp1per authored and peterbarker committed Aug 20, 2024
1 parent d3a1d51 commit dcc0be5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Tools/autotest/arducopter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1789,7 +1789,6 @@ def FenceFloorEnabledLanding(self):
self.user_takeoff(alt_min=25)

# Check fence is enabled
self.do_fence_enable()
self.assert_fence_enabled()

# Change to RC controlled mode
Expand All @@ -1810,11 +1809,14 @@ def FenceFloorEnabledLanding(self):
# lower throttle and try and land
self.set_rc(3, 1300)
self.wait_altitude(0, 2, relative=True)
self.wait_disarmed()
self.zero_throttle()
self.wait_landed_and_disarmed()
self.assert_fence_enabled()
# must not be in RTL
self.assert_mode("LOITER")

# Assert fence is not healthy since it was enabled manually
self.assert_sensor_state(fence_bit, healthy=False)
# Assert fence is healthy since it was enabled automatically
self.assert_sensor_state(fence_bit, healthy=True)

# Disable the fence using mavlink command to ensure cleaned up SITL state
self.do_fence_disable()
Expand Down

0 comments on commit dcc0be5

Please sign in to comment.