Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autotest: fix FenceFloorEnabledLanding test #27858

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading