From 6cc40c65b22ca90302d992ea91ed0577d61ce978 Mon Sep 17 00:00:00 2001 From: Damjan Adamic Date: Sun, 27 Aug 2017 16:45:56 +0200 Subject: [PATCH] Lua docs update (CrossfireTelemetryPush and crossfireTelemetryPop and some small spelling fixes) --- radio/src/lua/api_general.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/radio/src/lua/api_general.cpp b/radio/src/lua/api_general.cpp index 81ad22c3e..265112ca0 100644 --- a/radio/src/lua/api_general.cpp +++ b/radio/src/lua/api_general.cpp @@ -108,7 +108,7 @@ Return the time since the radio was started in multiple of 10ms @retval number Number of 10ms ticks since the radio was started Example: run time: 12.54 seconds, return value: 1254 -The timer internally uses a 32-bit counter which is enough for 30year so +The timer internally uses a 32-bit counter which is enough for 30 years so overflows will not happen. @status current Introduced in 2.0.0 @@ -311,7 +311,9 @@ Pops a received SPORT packet from the queue. Please note that only packets using (frame ID == 0x10), as well as packets with a frame ID equal 0x32 (regardless of the data ID) will be passed to the LUA telemetry receive queue. -@retval SPORT paket as a quadruple: +@retval nil queue does not contain any (or enough) bytes to form a whole packet + +@retval multiple returns 4 values: * sensor ID (number) * frame ID (number) * data ID (number) @@ -359,7 +361,7 @@ uint8_t getDataId(uint8_t physicalId) This functions allows for sending SPORT telemetry data toward the receiver, and more generally, to anything connected SPORT bus on the receiver or transmitter. -When called without parameters, it will only return the status of the ouput buffer without sending anything. +When called without parameters, it will only return the status of the output buffer without sending anything. @param sensorId physical sensor ID @@ -396,11 +398,13 @@ static int luaSportTelemetryPush(lua_State * L) /*luadoc @function crossfireTelemetryPop() -@retval SPORT paket as a quadruple: - * sensor ID (number) - * frame ID (number) - * data ID (number) - * value (number) +Pops a received Crossfire Telemetry packet from the queue. + +@retval nil queue does not contain any (or enough) bytes to form a whole packet + +@retval multiple returns 2 values: + * command (number) + * packet (table) data bytes @status current Introduced in 2.2.0 */ @@ -437,15 +441,11 @@ static int luaCrossfireTelemetryPop(lua_State * L) This functions allows for sending telemetry data toward the TBS Crossfire link. -When called without parameters, it will only return the status of the ouput buffer without sending anything. +When called without parameters, it will only return the status of the output buffer without sending anything. -@param sensorId physical sensor ID +@param command command -@param frameId frame ID - -@param dataId data ID - -@param value value +@param data table of data bytes @retval boolean data queued in output buffer or not.