Docs added

This commit is contained in:
Damjan Adamic
2015-11-13 18:50:43 +01:00
parent e6546af9b1
commit e5ef862729
+23 -1
View File
@@ -129,7 +129,29 @@ Returns OpenTX version
@retval list (available since OpenTX 2.1.7) returns two values:
* `string` OpenTX version (ie "2.1.5")
* `string` radio version (ie "Taranis", "TaranisPlus", if running in simulator the "-simu" is added)
* `string` radio version: `taranisx9e`, `taranisplus` or `taranis`.
If running in simulator the "-simu" is added
### Example
This example also runs in OpenTX versions where the radio version was not available:
```lua
local function run(event)
local ver, radio = getVersion()
print("version: "..ver)
if radio then print ("radio: "..radio) end
return 1
end
return { run=run }
```
Output of above script in simulator:
```
version: 2.1.7
radio: taranis-simu
Script finished with status 1
```
*/
static int luaGetVersion(lua_State *L)
{