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

Copter Fence Fixes #25875

Merged
merged 49 commits into from
Jul 23, 2024
Merged

Copter Fence Fixes #25875

merged 49 commits into from
Jul 23, 2024

Commits on Jul 17, 2024

  1. Copter: notify when fence breach has cleared

    output fence breach type
    when switching mode without a fence action do not go into manual recovery
    only recover if there is a fence action
    implement auto-takeoff fence options
    output user-friendly fence names
    auto-enable fences on auto-takeoff
    use fence enable_configured()
    simplify message printing
    andyp1per committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    a0a81de View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9817344 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4ce89c8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5f51be6 View commit details
    Browse the repository at this point in the history
  5. AP_Arming: do not enable minimim altitude fence on arming

    call appropriate fence method for auto-enablement
    andyp1per committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    694c6a0 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fe40fbb View commit details
    Browse the repository at this point in the history
  7. AP_Common: fix initialization of ExpandingString so that it can be us…

    …ed on the stack
    
    zero out passed in buffers for ExpandingString
    andyp1per committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    427e81e View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a540f1d View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ae95da6 View commit details
    Browse the repository at this point in the history
  10. Plane: use fence enable_configured()

    avoid fence breach clearing spam
    andyp1per committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    a433d74 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    642ebab View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    ead7383 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    9b5890a View commit details
    Browse the repository at this point in the history
  14. AC_Fence: add ability to auto-enable fence floor while doing fence ch…

    …ecks
    
    control copter floor fence with autoenable
    autoenable floor fence with a margin
    check for manual recovery only after having checked the fences
    make auto-disabling for minimum altitude fence an option
    output message when fence floor auto-enabled
    re-use fence floor auto-enable/disable from plane
    auto-disable on landing
    do not update enable parameter when controlling through mavlink
    make sure get_enabled_fences() actually returns enabled fences.
    make current fences enabled internal state rather than persistent
    implement auto options correctly and on copter
    add fence names utility
    use ExpandingString for constructing fence names
    correctly check whether fences are enabled or not and disable min alt for landing in all auto modes
    add enable_configured() for use by mavlink and rc
    add events for all fence types
    make sure that auto fences are no longer candidates after manual updates
    add fence debug
    make sure rc switch is the ultimate authority on fences
    reset auto mask when enabling or disabling fencing
    ensure auto-enable on arming works as intended
    simplify printing fence notices
    reset autofences when auot-enablement is changed
    andyp1per committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    e00be28 View commit details
    Browse the repository at this point in the history
  15. AC_Fence: ensure fence enablement on arming is inverted on disarming

    correct detection of polyfence
    andyp1per committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    1aebd67 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    cda9de2 View commit details
    Browse the repository at this point in the history
  17. AC_Fence: clear breach of disabled fence

    skip breach checks if no fences
    correct initialisation of _num_fences in the case of no fences in eeprom
    peterbarker authored and andyp1per committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    4117288 View commit details
    Browse the repository at this point in the history
  18. autotest: add test for auto-disabling min alt fence breaches on disar…

    …ming
    
    clean-up fence manipulation functions and add test for auto-enablement on copter
    update tests to have some FENCE_ENABLE tests
    add avoidance minimum and maximum altitude fence
    add fence switch test while flying
    add FenceAutoEnableDisableSwitch for auto mode 2
    add more scenarios for plane fence auto-enable
    validate fence rc switch behaviour
    check fence autoenable by taking off in guided mode
    more FENCE_AUTOENABLE tests
    add FenceEnableDisableAux and FenceMinAltAutoEnableAbort
    andyp1per committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    7b57930 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    bb8f98f View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    5c9deab View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    cbd8c60 View commit details
    Browse the repository at this point in the history
  22. AC_Fence: disable fences for landing by suppressing in the fence chec…

    …k rather than using a state machine
    
    simplify takeoff auto-enablement
    andyp1per committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    d19fd9c View commit details
    Browse the repository at this point in the history
  23. Plane: disable fences for landing by suppressing in the fence check r…

    …ather than using a state machine
    andyp1per committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    ef8f182 View commit details
    Browse the repository at this point in the history
  24. Copter: disable fences for landing by suppressing in the fence check …

    …rather than using a state machine
    andyp1per committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    807b1d0 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    24ec111 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    e94dcf2 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    4c06ac5 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    d64f5ea View commit details
    Browse the repository at this point in the history
  29. AC_Fence: always disable Min Alt fence on landing

    allow precise pre-arm messages
    andyp1per committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    11441b3 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    a42d7ae View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    6cbbd88 View commit details
    Browse the repository at this point in the history
  32. autotest: fix fence autotests

    add Plane.FenceMinAltEnableAutoland
    test that vehicle can be landed manually after descending below fence floor
    andyp1per committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    0963060 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    bb7384e View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    b12c39b View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    d338e3e View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    df04765 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    0f98294 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    4c6ef82 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    61f462b View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    43566e0 View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2024

  1. AC_Fence: fixed FENCE_AUTOENABLE=2

    needs to auto-enable on takeoff complete
    tridge authored and andyp1per committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    f676d41 View commit details
    Browse the repository at this point in the history
  2. Plane: reset previous mode fence breach when disarmed

    when we are disarmed or we are not in fence breach and we are not
    flying then reset the previous mode fence reason state so that a new
    flight will get the correct fence breach action behaviour
    tridge authored and andyp1per committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    fdae0dd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d0b7aff View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2024

  1. Plane: fixed re-enable of fence for FENCE_AUTOENABLE=1

    the is an adjustment to the previous fix which only worked when we had
    at least one fence element enabled when we were not flying or disarmed
    tridge authored and andyp1per committed Jul 21, 2024
    Configuration menu
    Copy the full SHA
    398fe33 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    89e7220 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    768f780 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    96d9985 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8d7db72 View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2024

  1. Copter: fully honour FENCE_OPTION to disable mode changes

    when the user has chosen to disallow mode change during fence breach
    it should be fully implemented, without a landing exception.
    
    as requested by Pete, and discussed on dev call
    tridge authored and andyp1per committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    166cb48 View commit details
    Browse the repository at this point in the history