Skip to content

Commit a1de0d0

Browse files
Auto generated docs updated
1 parent eed3159 commit a1de0d0

File tree

11 files changed

+65
-30
lines changed

11 files changed

+65
-30
lines changed

SUMMARY.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
* [Key Event Constants](key_events.md)
2929
* [General Functions](general_functions.md)
3030
* [GREY()](general/GREY.md)
31+
* [defaultChannel()](general/defaultChannel.md)
32+
* [defaultStick()](general/defaultStick.md)
3133
* [getDateTime()](general/getDateTime.md)
3234
* [getFieldInfo()](general/getFieldInfo.md)
3335
* [getGeneralSettings()](general/getGeneralSettings.md)
@@ -39,8 +41,15 @@
3941
* [playFile()](general/playFile.md)
4042
* [playNumber()](general/playNumber.md)
4143
* [playTone()](general/playTone.md)
44+
* [popupInput()](general/popupInput.md)
4245
* [Model Functions](model/model_functions.md)
46+
* [model.defaultInputs()](model/defaultInputs.md)
47+
* [model.deleteInput()](model/deleteInput.md)
48+
* [model.deleteInputs()](model/deleteInputs.md)
4349
* [model.getGlobalVariable()](model/getGlobalVariable.md)
50+
* [model.getInput()](model/getInput.md)
51+
* [model.getInputsCount()](model/getInputsCount.md)
52+
* [model.insertInput()](model/insertInput.md)
4453
* [model.setGlobalVariable()](model/setGlobalVariable.md)
4554
* [model.setOutput()](model/setOutput.md)
4655
* [Display Functions](lcd/display_functions.md)

general/getFieldInfo.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,25 @@
44

55

66

7-
Returns detailed information about a field
7+
Returns detailed information about field (source)
8+
9+
@status current Introduced in 2.0.8
810

911

1012
#### Parameters
1113

12-
* `name` name of the field (string)
14+
* `name` (string) name of the field
1315

1416

1517

1618
#### Return value
1719

1820
* `table` information about requested field, table elements:
19-
* `id` field identifier (number)
20-
* `name` field name (string)
21-
* `desc` field description (string)
21+
* `id` (number) field identifier
22+
* `name` (string) field name
23+
* `desc` (string) field description
2224

23-
* `nil` the requested filed was not found
25+
* `nil` the requested field was not found
2426

2527

2628

general/getGeneralSettings.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66

77
Returns (some of) the general radio settings
88

9+
@status current Introduced in 2.0.6, `imperial` added in TODO
910

10-
#### Parameters
1111

12-
* `index` zero based global variable index, use 0 for GV1, 8 for GV9
1312

13+
#### Parameters
1414

15+
none
1516

1617
#### Return value
1718

@@ -23,4 +24,3 @@ Returns (some of) the general radio settings
2324

2425

2526

26-

general/getTime.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55

66

7-
Returns current system time
7+
Returns the time since the radio was started in multiple of 10ms
8+
9+
@status current Introduced in 2.0.0
810

911

1012
#### Parameters
@@ -13,10 +15,8 @@ none
1315

1416
#### Return value
1517

16-
* `number` current system time. Returned value is the
17-
number of 10ms periods since the radio start. Example:
18+
* `number` Number of 10ms ticks since the radio was started Example:
1819
run time: 12.54 seconds, return value: 1254
1920

2021

2122

22-

general/getValue.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,36 @@
11
<!-- This file was generated by the script. Do not edit it, any changes will be lost! -->
22

3-
## getValue(name_or_id)
3+
## getValue(source)
44

55

66

7-
Returns current value of the requested field.
7+
Returns the value of a source.
8+
9+
The list of valid sources is available:
10+
* for OpenTX 2.0.x at http://downloads-20.open-tx.org/firmware/lua_fields.txt
11+
* for OpenTX 2.1.x at http://downloads-21.open-tx.org/firmware/lua_fields.txt
12+
13+
In OpenTX 2.1.x the telemetry sources no longer have a predefined name.
14+
To get a telemetry value simply use its sensor name. For example:
15+
* Altitude sensor has a name "Alt"
16+
* to get the current altitude use the source "Alt"
17+
* to get the minimum altitude use the source "Alt-", to get the maximum use "Alt+"
18+
19+
@status current Introduced in 2.0.0, changed in 2.1.0
820

921

1022
#### Parameters
1123

12-
* `name_or_id` identifier (number) or name (string) of the field
24+
* `source` can be an identifier (number) (which was obtained by the getFieldInfo())
25+
or a name (string) of the source.
1326

1427

1528

1629
#### Return value
1730

18-
* `value` current field value (number). Zero is returned for:
19-
* non-existing fields
20-
* for all telemetry fields when the telemetry stream is not received
31+
* `value` current source value (number). Zero is returned for:
32+
* non-existing sources
33+
* for all telemetry source when the telemetry stream is not received
2134

2235
* `table` GPS position is returned in a table:
2336
* `lat` latitude, positive is North (number)

general/getVersion.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
Returns OpenTX version
88

9+
@status current Introduced in 2.0.0, expanded in 2.1.7
10+
911
### Example
1012

1113
This example also runs in OpenTX versions where the radio version was not available:

general/killEvents.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
<!-- This file was generated by the script. Do not edit it, any changes will be lost! -->
22

3-
## killEvents(event)
3+
## killEvents(eventMask)
44

55

66

77
Cancels the key press propagation to the normal user interface algorithm.
88

9+
@status current Introduced in 2.0.0
10+
11+
TODO table of events/masks
12+
913

1014
#### Parameters
1115

12-
* `event` (number) event to be suppressed
16+
* `eventMask` (number) events to be suppressed
1317

1418

1519

general/playDuration.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55

66

7-
Plays a numerical value (text to speech)
7+
Plays a time value (text to speech)
8+
9+
@status current Introduced in 2.1.0
810

911

1012
#### Parameters
@@ -17,7 +19,6 @@ Plays a numerical value (text to speech)
1719

1820

1921

20-
2122
#### Return value
2223

2324
none

general/playFile.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@
44

55

66

7-
Plays a track with a given name
7+
Plays a file from the SD card
88

9+
@status current Introduced in 2.0.0, changed in 2.1.0
910

10-
#### Parameters
1111

12-
* `name` (string) file name (including path) to play. If the path is not
13-
absolute (name starts with the `/` character), then the given name is used relative to
14-
the current language path (example for English language: `/SOUNDS/en`)
12+
#### Parameters
1513

14+
* `path` (string) full path to wav file (i.e. “/SOUNDS/en/system/tada.wav”)
15+
Introduced in 2.1.0: If you use a relative path, the current language is appended
16+
to the path (example for English language: `/SOUNDS/en` is appended)
1617

1718

1819

general/playNumber.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,22 @@
66

77
Plays a numerical value (text to speech)
88

9+
@status current Introduced in 2.0.0
10+
911

1012
#### Parameters
1113

1214
* `value` (number) number to play. Value is interpreted as integer.
1315

1416
* `unit` (number) unit identifier (see table todo)
1517

16-
* `attributes` possible values:
18+
* `attributes` (unsigned number) possible values:
1719
* `0 or not present` plays integral part of the number (for a number 123 it plays 123)
1820
* `PREC1` plays a number with one decimal place (for a number 123 it plays 12.3)
1921
* `PREC2` plays a number with two decimal places (for a number 123 it plays 1.23)
2022

2123

2224

23-
2425
#### Return value
2526

2627
none

0 commit comments

Comments
 (0)