Skip to content

Commit

Permalink
autotest: correct auto-fence tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andyp1per committed Jan 19, 2024
1 parent 7b48abe commit 34b5f35
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Tools/autotest/arducopter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1700,7 +1700,6 @@ def FenceFloorAutoDisableLanding(self):
"FENCE_TYPE": 11,
"FENCE_ALT_MIN": 10,
"FENCE_ALT_MAX": 20,
"FENCE_ENABLE" : 1,
"FENCE_AUTOENABLE" : 1,
})

Expand All @@ -1710,7 +1709,6 @@ def FenceFloorAutoDisableLanding(self):
self.user_takeoff(alt_min=15)

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

# Change to RC controlled mode
Expand All @@ -1725,15 +1723,11 @@ def FenceFloorAutoDisableLanding(self):
self.wait_landed_and_disarmed(0)
# the breach should have cleared since we auto-disable the
# fence on landing
self.assert_fence_enabled()

# 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()
self.assert_fence_disabled()

# Assert fences have gone now that we have landed and disarmed
self.assert_sensor_state(fence_bit, present=True, enabled=False)

def FenceFloorAutoEnableOnArming(self):
"""Ensures we can auto-enable fences on arming and still takeoff and land"""

Expand Down

0 comments on commit 34b5f35

Please sign in to comment.