From e71ced798486bbee47247e1f2c8a15b7b6a6e11f Mon Sep 17 00:00:00 2001 From: Maxim Buzdalov Date: Thu, 19 May 2022 00:14:24 +0300 Subject: [PATCH] AP_Scripting: Fix parameter name in find_serial, add description The argument to find_serial is not the protocol name, but the number of instance that can run the Scripting protocol (28). The matching doc update is in https://github.com/ArduPilot/ardupilot_wiki/pull/4346. --- libraries/AP_Scripting/docs/docs.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libraries/AP_Scripting/docs/docs.lua b/libraries/AP_Scripting/docs/docs.lua index 0c2bf4e0066..10307c13f5a 100644 --- a/libraries/AP_Scripting/docs/docs.lua +++ b/libraries/AP_Scripting/docs/docs.lua @@ -1116,10 +1116,12 @@ function baro:get_pressure() end ---@class serial serial = {} --- desc ----@param protocol integer ----@return AP_HAL__UARTDriver_ud -function serial:find_serial(protocol) end +-- Returns the UART instance that allows connections from scripts (those with SERIALx_PROTOCOL = 28`). +-- For instance = 0, returns first such UART, second for instance = 1, and so on. +-- If such an instance is not found, returns nil. +---@param instance integer -- the 0-based index of the UART instance to return. +---@return AP_HAL__UARTDriver_ud -- the requested UART instance available for scripting, or nil if none. +function serial:find_serial(instance) end -- desc