Commit Graph

202 Commits

Author SHA1 Message Date
Peter Barker 86fef47dc2 AC_Fence: specify storage type for AC_PolyFenceType
we allocate RAM based on the size of this structure
2024-11-25 11:37:38 +11:00
Peter Barker 8b8bc026db AC_Fence: correct handling of more than 256 fence items 2024-11-25 11:37:38 +11:00
Peter Barker a65b9ad831 AC_Fence: stop compiling old fencepoint protocol in by default
We're gradually removing support for this protocol.

Still available on the custom build server
2024-11-18 08:34:08 +11:00
Peter Barker 5db0eecb99 AC_Fence: use GCS_SEND_TEXT rather than gcs().send_text
Co-authored-by: muramura <ma2maru@gmail.com>
2024-08-07 18:33:16 +10:00
Henry Wurzburg e4fc9b0b58 AC_Fence:Add AUTOENABLE deprecation warning
Co-authored-by: Peter Barker <pb-gh@barker.dropbear.id.au>
2024-08-01 09:39:41 +10:00
Henry Wurzburg 9b041be8a1 AC_Fence: correct prearm message 2024-07-31 17:01:07 +10:00
Andy Piper ccfbfddf7e AC_Fence: address minor review comments 2024-07-24 08:24:06 +10:00
Andrew Tridgell 68f2593089 AC_Fence: fixed FENCE_AUTOENABLE=2
needs to auto-enable on takeoff complete
2024-07-24 08:24:06 +10:00
Andy Piper 5bc3727145 AC_Fence: support FENCE_OPTIONS on copter 2024-07-24 08:24:06 +10:00
Andy Piper f0456f29dd AC_Fence: always disable Min Alt fence on landing
allow precise pre-arm messages
2024-07-24 08:24:06 +10:00
Andy Piper 04dd7de1ed AC_Fence: disable fences for landing by suppressing in the fence check rather than using a state machine
simplify takeoff auto-enablement
2024-07-24 08:24:06 +10:00
Andy Piper d5c6f3fe06 AC_Fence: add reset_fence_floor_enable() and use it in plane when landing is aborted 2024-07-24 08:24:06 +10:00
Peter Barker a4c7819117 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
2024-07-24 08:24:06 +10:00
Andy Piper 174d5f07bb AC_Fence: ensure fence enablement on arming is inverted on disarming
correct detection of polyfence
2024-07-24 08:24:06 +10:00
Andy Piper f0f8187c7f AC_Fence: add ability to auto-enable fence floor while doing fence checks
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
2024-07-24 08:24:06 +10:00
Peter Barker c5f902919e AC_Fence: warn on use of old fence point / rally point protocols 2024-06-11 09:39:56 +10:00
Andrew Tridgell c95624a040 AC_Fence: use NEW_NOTHROW for new(std::nothrow) 2024-06-04 09:20:21 +10:00
Andrew Tridgell 0e6a32a3e2 AC_Fence: allow for fence storage on microSD 2024-03-12 11:43:36 +11:00
Peter Barker 0e742fe51c AC_Fence: ensure fencepoint protocol not compiled in if not HAL_GCS_ENABLED
also use GCS_SEND_TEXT a bit
2024-02-20 11:47:32 +11:00
muramura f6d0f52876 AC_Fence: Replace with GCS_SEND_TEXT 2024-02-20 11:47:32 +11:00
Henry Wurzburg dfc1b84186 AC_Fence: fix autofence enable in takeoff mode 2024-02-13 10:45:39 +11:00
Peter Barker 78daf8911b AC_Fence: allow compilation with HAL_LOGGING_ENABLED false 2024-01-17 18:25:55 +11:00
Henry Wurzburg f02973b454 AC_Fence:expand FENCE_AUTOENABLE description 2024-01-02 10:52:45 +11:00
Mykhailo Kuznietsov 567dedf3e3 AC_Fence: Fix some typos
Fixed some typos found in the code.
2023-10-12 18:30:42 +11:00
muramura 78e9846f4e AC_Fence: Change the description to match the actual value(NFC) 2023-10-05 08:22:22 +11:00
Peter Barker 0311aea4a5 AC_Fence: allow more libraries to compile with no HAL_GCS_ENABLED 2023-09-05 22:23:51 +10:00
Peter Barker 4d3e7bd3da AC_Fence: remove old polygon fence conversion code 2023-08-16 17:13:31 +10:00
Peter Barker c300beae69 AC_Fence: add build_options.py option to remove fencepoint protocol
also gate more code on defines

Saves ~2kB
2023-08-09 17:53:54 +10:00
Andrew Tridgell a8c17873fc AC_Fence: added option bit for union of inclusion areas
this allows for treating total inclusion area as union of all
inclusion areas. This is useful for:

- circles with corridors between them
- a fence for each flying site all loaded at once
- temporary addition of an extra area to a complex fence
2023-08-01 10:40:17 +10:00
Peter Barker 3ee2d24f1c AC_Fence: clarify bit 2 in FENCE_ENABLE parameter
these aren't just polygon fences ('though they used to be)
2023-08-01 10:17:54 +10:00
Peter Barker 44d0172f83 AC_Fence: avoid using struct Location
clang reports this could be a problem when compiling under some EABIs.  Remove it from most places as it is just noise, replace with class where we want to avoid including Location.h
2023-02-04 22:51:54 +11:00
jackhong12 4a4f361a17 all: use CLASS_NO_COPY() macro 2022-10-04 11:23:04 +11:00
Peter Barker d2315fa4d0 AC_Fence: include required GCS.h header 2022-09-27 09:26:45 +10:00
Iampete1 d066588c91 AC_Fence: always clear breaches 2022-09-12 08:57:42 +09:00
Peter Barker 1fea941fdb AC_Fence: correct compilation when fence compiled out 2022-09-01 08:25:55 +10:00
Iampete1 fb86318848 AC_Fence: always declare AC_PolyFenceItem 2022-08-30 09:07:27 +10:00
Iampete1 3d5bbb72ab AC_PolyFence_loader: log fence on sucsesful write 2022-08-30 09:07:27 +10:00
Iampete1 d020dd2923 AC_Fence: add log structure 2022-08-30 09:07:27 +10:00
Iampete1 259e70b2b1 AC_Fence: add options param on plane 2022-08-17 17:21:30 +10:00
Iampete1 e7cb949f5f AC_Fence: plane needs larger circle backup distance 2022-08-17 17:21:30 +10:00
Iampete1 e141731146 AC_Fence: params always use set method 2022-08-03 13:43:48 +01:00
Iampete1 2fc9cf97d4 AC_Fence: defualt to AP_FENCE_ENABLED 2, 1 disables dummy methods 2022-07-27 19:04:56 +10:00
Iampete1 4b6a0f0b4f AC_Fence: change AC_FENCE to AP_FENCE_ENABLED 2022-07-27 19:04:56 +10:00
Iampete1 9dc318f0cc AC_Fence: move to config file and rename from AC_FENCE to AP_FENCE_ENABLED 2022-07-27 19:04:56 +10:00
Iampete1 fa440d532a AC_Fence: add dummy methods 2022-07-27 19:04:56 +10:00
Iampete1 6a6f3ec4e5 AC_Fence: add AC_FENCE define 2022-07-27 19:04:56 +10:00
Tatsuya Yamaguchi cb6c1a1c80 AC_Fence: Move {Plane} mark from Value to Param 2022-05-10 09:35:11 +10:00
Peter Barker 2398d16a5f AC_Fence: include cleanups 2022-03-01 11:21:33 +11:00
Peter Barker 965b03f143 AC_Fence: rename AP_AHRS::get_position to get_location 2022-01-25 10:47:22 +11:00
Peter Barker 56b0f8b218 AC_Fence: void index when overwriting fence count on fencepoint-close 2021-11-30 20:50:32 +11:00