diff --git a/libraries/AP_Scripting/docs/docs.lua b/libraries/AP_Scripting/docs/docs.lua index 8a8db7001b..f348194728 100644 --- a/libraries/AP_Scripting/docs/docs.lua +++ b/libraries/AP_Scripting/docs/docs.lua @@ -1691,6 +1691,19 @@ function sub:is_button_pressed(index) end ---@return integer function sub:get_and_clear_button_count(index) end +-- Return true if rangefinder is healthy, includes a check for good signal quality +---@return boolean +function sub:rangefinder_alt_ok() end + +-- SURFTRAK mode: return the rangefinder target in cm +---@return float +function sub:get_rangefinder_target_cm() end + +-- SURFTRAK mode: set the rangefinder target in cm, return true if successful +---@param new_target_cm float +---@return boolean +function sub:set_rangefinder_target_cm(new_target_cm) end + -- desc ---@class quadplane diff --git a/libraries/AP_Scripting/generator/description/bindings.desc b/libraries/AP_Scripting/generator/description/bindings.desc index 5f4458985f..a5d1729c47 100644 --- a/libraries/AP_Scripting/generator/description/bindings.desc +++ b/libraries/AP_Scripting/generator/description/bindings.desc @@ -539,6 +539,9 @@ singleton Sub rename sub singleton Sub depends APM_BUILD_TYPE(APM_BUILD_ArduSub) singleton Sub method get_and_clear_button_count uint8_t uint8_t 1 4 singleton Sub method is_button_pressed boolean uint8_t 1 4 +singleton Sub method rangefinder_alt_ok boolean +singleton Sub method get_rangefinder_target_cm float +singleton Sub method set_rangefinder_target_cm boolean float'skip_check include AP_Motors/AP_MotorsMatrix.h depends APM_BUILD_TYPE(APM_BUILD_ArduPlane)||APM_BUILD_COPTER_OR_HELI singleton AP_MotorsMatrix depends APM_BUILD_TYPE(APM_BUILD_ArduPlane)||APM_BUILD_COPTER_OR_HELI