From 9fbfa49f3e054e648f224d43db385ebb6843e06f Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Thu, 12 Dec 2024 13:59:26 +0000 Subject: [PATCH] AP_Scripting: add get_breached_margins() --- libraries/AP_Scripting/docs/docs.lua | 8 ++++++++ .../AP_Scripting/generator/description/bindings.desc | 1 + 2 files changed, 9 insertions(+) diff --git a/libraries/AP_Scripting/docs/docs.lua b/libraries/AP_Scripting/docs/docs.lua index 660c1650fa18e..599f0132f0868 100644 --- a/libraries/AP_Scripting/docs/docs.lua +++ b/libraries/AP_Scripting/docs/docs.lua @@ -3906,6 +3906,14 @@ function fence:get_breach_time() end ---| 8 # Minimum altitude function fence:get_breaches() end +-- Returns the type bitmask of any fence whose margins have been crossed +---@return integer fence_type bitmask +---| 1 # Maximim altitude +---| 2 # Circle +---| 4 # Polygon +---| 8 # Minimum altitude +function fence:get_margin_breaches() end + -- desc ---@class (exact) stat_t_ud local stat_t_ud = {} diff --git a/libraries/AP_Scripting/generator/description/bindings.desc b/libraries/AP_Scripting/generator/description/bindings.desc index d0ff5b1e490b5..00f9507e3d756 100644 --- a/libraries/AP_Scripting/generator/description/bindings.desc +++ b/libraries/AP_Scripting/generator/description/bindings.desc @@ -992,6 +992,7 @@ singleton AC_Fence depends AP_FENCE_ENABLED singleton AC_Fence rename fence singleton AC_Fence method get_breaches uint8_t singleton AC_Fence method get_breach_time uint32_t +singleton AC_Fence method get_margin_breaches uint8_t include AP_Filesystem/AP_Filesystem.h depends AP_FILESYSTEM_FILE_READING_ENABLED include AP_Filesystem/AP_Filesystem_config.h