Commit Graph

34 Commits

Author SHA1 Message Date
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
muramura f6d0f52876 AC_Fence: Replace with GCS_SEND_TEXT 2024-02-20 11:47:32 +11:00
Peter Barker 78daf8911b AC_Fence: allow compilation with HAL_LOGGING_ENABLED false 2024-01-17 18:25:55 +11: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 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
Iampete1 3d5bbb72ab AC_PolyFence_loader: log fence on sucsesful write 2022-08-30 09:07:27 +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 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
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
Andrew Tridgell 8a95a7d80d AC_Fence: fixed fence count for old upload
when uploading a fence that is smaller than an old fence we were not
correctly setting the inclusion fence size.
2021-11-30 20:50:32 +11:00
Peter Barker af92c9679f AC_Fence: make invalid polygon vertex count clearer 2021-11-30 20:50:32 +11:00
Peter Barker 76408c77dd AC_Fence: provide compatability with bad integer-stored radii 2021-06-06 11:41:30 +10:00
Peter Barker e3db030d7a AC_Fence: load and store fence radii in floats
These were simply being cast down to integers
2021-06-06 11:41:30 +10:00
James O'Shannessy 43e06e9040 AC_Fence: Fix int32_t overflow with large longitude values 2021-03-05 14:52:46 +11:00
James O'Shannessy f6231db618 AC_Fence: Add breach calculation variant to use LLA
Adds a parameter to make selection between vector pos_cm from origin and lat/lng.
2021-03-04 10:31:58 +11:00
Patrick José Pereira 345fe1a9e4 AC_Fence: Add missing const in member functions
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2021-02-03 18:45:14 +11:00
Peter Barker c787231435 AC_Fence: remove timeout for waiting on fence semaphore, make nonblocking
Also move where we indicate we've attempted a load.
2020-11-11 18:46:22 +09:00
Peter Barker 53553c7c71 AC_Fence: remove dead and misleading assignment
This is never used again.  Presumably this was factored out of something
else where it might have mattered.
2020-08-06 17:02:12 +10:00
Rishabh 85692312ac AC_Fence: Add Pre-Arm check for margin < radius 2020-08-05 15:37:04 +09:00
Peter Barker 069bd04bdc AC_Fence: create and use INTERNAL_ERROR macro so we get line numbers 2020-04-30 13:21:36 +10:00
Randy Mackay 9e51731bae AC_Fence: turn off debug msg re memory allocation 2019-12-10 08:51:19 +11:00
Peter Barker 714a3e2462 AC_Fence: support for multiple polygon fences
AC_Fence: add interface for retrieving exclusion polygons

AC_Fence: add interface to get exlusion polygons to polyfence loader

AC_Fence: add suport for inclusion circles

AC_Fence: add option for compiling-out FENCE_POINT protocol support

AC_Fence: get_exclusion_polygon and get_boundary_points set num_points to zero on failure

AC_Fence: use Debug(...) to hide debug messages

AC_PolyFence_loader: add methods to retrieve all inclusion zones

AC_PolyFence_loader: valid simply returns true if a polygon boundary can be returned

AC_Fence: add get_exclusion_circle

AC_Fence: add get_exclusion_circle_update_ms accessor

AC_Fence: PolyFence_loader gets inclusion circle accessors

AC_PolyFence_loader: add and use semaphore to protect loaded fence

AC_Fence: move fence breach check below fence type checks

This allows us to provide more information to the user about why they
are breached.

For example, if the radius is negative you are considered in breach of
it - but we'd tell you you were breached, not that your radius was
invalid

AC_Fence: clear the fence if we discover the user has set the fence count to zero
2019-09-28 07:58:48 +09:00
Peter Barker ff37590776 AC_Fence: move polygon points into AC_Fence_Polygon 2019-09-28 07:58:48 +09:00
Peter Barker 5448cfda80 AC_Fence: remove always-true contains_return_point parameter 2019-02-04 16:52:42 +09:00
Michael du Breuil 983a330cd5 AC_Fence: Remove unused duplicate methods
The Vector2l methods completely duplicate the code of the Vector2f
methods, but aren't used anywhere. They are therefore subject to bitrot
and aren't adding any value. (Also shrinks the build by 8 bytes for some
reason, given that it's unused code I expected to see no difference in
binary size).
2017-11-21 17:04:11 +09:00
murata c808ee2f49 Global: To nullptr from NULL.
RC_Channel: To nullptr from NULL.

AC_Fence: To nullptr from NULL.

AC_Avoidance: To nullptr from NULL.

AC_PrecLand: To nullptr from NULL.

DataFlash: To nullptr from NULL.

SITL: To nullptr from NULL.

GCS_MAVLink: To nullptr from NULL.

DataFlash: To nullptr from NULL.

AP_Compass: To nullptr from NULL.

Global: To nullptr from NULL.

Global: To nullptr from NULL.
2016-11-02 16:04:47 -02:00
murata b6c27b58a8 AC_Fence: magic number 4 changed to size of uint32_t 2016-08-04 15:26:18 +09:00
Randy Mackay f0bb1ac1d2 AC_Fence: AC_Polygon_loader loads points from eeprom
Thanks to Peter Barker for his work to library-ify Plane's geofence which was the basis for this work.
2016-06-25 15:55:55 +09:00