Skip to content

Commit

Permalink
autotest: assert fence breach while flying only
Browse files Browse the repository at this point in the history
  • Loading branch information
andyp1per committed Dec 22, 2023
1 parent 340634a commit 5d55085
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Tools/autotest/arducopter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1675,11 +1675,14 @@ def FenceFloorEnabledLanding(self):
self.set_rc(3, 1800)

self.wait_mode('RTL', timeout=120)
# Assert fence is not healthy now that we are in RTL
self.assert_sensor_state(fence_bit, healthy=False)

self.wait_landed_and_disarmed()
self.assert_fence_enabled()

# Assert fence is not healthy
self.assert_sensor_state(fence_bit, healthy=False)
# Assert fence is healthy now that we have landed disarmed
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 5d55085

Please sign in to comment.