Skip to content

Commit aed07bc

Browse files
Added some auto-generated docs
1 parent cbfd239 commit aed07bc

12 files changed

+285
-41
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
/_book/
2+
/node_modules/
3+
/book.pdf

SUMMARY.md

Lines changed: 9 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -27,48 +27,16 @@
2727
* [Constants](constants.md)
2828
* [Key Event Constants](key_events.md)
2929
* [General Functions](general_functions.md)
30-
* [getTime()](gettime.md)
31-
* [getDateTime()](getdatetime.md)
32-
* [getVersion()](getversion.md)
33-
* [getGeneralSettings()](getgeneralsettings.md)
34-
* [getValue()](getvalue_function.md)
35-
* [getFieldInfo()](getfieldinfo_function.md)
36-
* [playFile()](playfile.md)
37-
* [playNumber()](playnumber.md)
38-
* [playDuration()](playduration.md)
39-
* [playTone()](playtone.md)
40-
* [popupInput()](popupinput.md)
41-
* [defaultStick()](defaultstick.md)
42-
* [defaultChannel()](defaultchannel.md)
43-
* [killEvents()](killevents.md)
44-
* [GREY()](grey.md)
30+
* [general.getDateTime()](general/getDateTime.md)
31+
* [general.getFieldInfo()](general/getFieldInfo.md)
32+
* [general.getTime()](general/getTime.md)
33+
* [general.getValue()](general/getValue.md)
34+
* [general.getVersion()](general/getVersion.md)
35+
* [general.playFile()](general/playFile.md)
4536
* [Model Functions](model/model_functions.md)
46-
* [model.getInfo()](model/modelgetinfo.md)
47-
* [model.setInfo()](model/modelsetinfo.md)
48-
* [model.getModule()](model/modelgetmodule.md)
49-
* [model.setModule()](model/modelsetmodule.md)
50-
* [model.getTimer()](model/modelgettimer.md)
51-
* [model.setTimer()](model/modelsettimer.md)
52-
* [model.resetTimer()](model/modelresettimer.md)
53-
* [model.getInputsCount()](model/modelgetinputscount.md)
54-
* [model.getInput()](model/modelgetinput.md)
55-
* [model.insertInput()](model/modelinsertinput.md)
56-
* [model.deleteInput()](model/modeldeleteinput.md)
57-
* [model.deleteInputs()](model/modeldeleteinputs.md)
58-
* [model.getMixesCount()](model/modelgetmixescount.md)
59-
* [model.getMix()](model/modelgetmix.md)
60-
* [model.insertMix()](model/modelinsertmix.md)
61-
* [model.deleteMix()](model/modeldeletemix.md)
62-
* [model.deleteMixes()](model/modeldeletemixes.md)
63-
* [model.getLogicalSwitch()](model/modelgetlogicalswitch.md)
64-
* [model.setLogicalSwitch()](model/modelsetlogicalswitch.md)
65-
* [model.getCustomFunction()](model/modelgetcustomfunction.md)
66-
* [model.setCustomFunction()](model/modelsetcustomfunction.md)
67-
* [model.getCurve()](model/modelgetcurve.md)
68-
* [model.getOutput()](model/modelgetoutput.md)
69-
* [model.setOutput()](model/modelsetoutput.md)
70-
* [model.getGlobalVariable()](model/modelgetglobalvariable.md)
71-
* [model.setGlobalVariable()](model/modelsetglobalvariable.md)
37+
* [model.getGlobalVariable()](model/getGlobalVariable.md)
38+
* [model.setGlobalVariable()](model/setGlobalVariable.md)
39+
* [model.setOutput()](model/setOutput.md)
7240
* [Display Functions](lcd/display_functions.md)
7341
* [lcd.lock()](lcd/lcdlock.md)
7442
* [lcd.clear()](lcd/lcdclear.md)

general/getDateTime.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!-- This file was generated by the script. Do not edit it, any changes will be lost! -->
2+
3+
## getDateTime()
4+
5+
6+
7+
#### Parameters
8+
9+
none
10+
11+
#### Return
12+
13+
* `table` current date and time, table elements:
14+
* `year` year
15+
* `mon` month
16+
* `day` day of month
17+
* `hour` hours
18+
* `min` minutes
19+
* `sec` seconds
20+
21+
22+
23+
---
24+
Returns current system date and time that is kept by the RTC unit
25+
26+

general/getFieldInfo.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!-- This file was generated by the script. Do not edit it, any changes will be lost! -->
2+
3+
## getFieldInfo(name)
4+
5+
6+
7+
#### Parameters
8+
9+
* `name` name of the field (string)
10+
11+
12+
13+
#### Return
14+
15+
* `table` information about requested field, table elements:
16+
* `id` field identifier (number)
17+
* `name` field name (string)
18+
* `desc` field description (string)
19+
20+
* `nil` the requested filed was not found
21+
22+
23+
24+
---
25+
Returns detailed information about a field
26+
27+

general/getTime.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!-- This file was generated by the script. Do not edit it, any changes will be lost! -->
2+
3+
## getTime()
4+
5+
6+
7+
#### Parameters
8+
9+
none
10+
11+
#### Return
12+
13+
* `number` current system time. Returned value is the
14+
number of 10ms periods since the radio start. Example:
15+
*run time: 12.54 seconds, return value: 1254
16+
17+
18+
19+
20+
---
21+
Returns current system time
22+
23+

general/getValue.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<!-- This file was generated by the script. Do not edit it, any changes will be lost! -->
2+
3+
## getValue(name_or_id)
4+
5+
6+
7+
#### Parameters
8+
9+
* `name_or_id` identifier (number) or name (string) of the field
10+
11+
12+
13+
#### Return
14+
15+
* `value` current field value (number). Zero is returned for:
16+
* non-existing fields
17+
* for all telemetry fields when the telemetry stream is not received
18+
19+
* `table` GPS position is returned in a table:
20+
* `lat` latitude, positive is North (number)
21+
* `lon` longitude, positive is East (number)
22+
23+
* `table` GPS date/time is returned in a table, format is the same
24+
as is returned from getDateTime()
25+
26+
* `table` Cells are returned in a table
27+
(except where no cells were detected in which
28+
case the returned value is 0):
29+
* table has one item for each detected cell
30+
* each item name is a cell number (1 to number of cells)
31+
* each item value is the current cell voltage
32+
33+
34+
35+
---
36+
Returns current value of the requested field.
37+
38+
39+
##### Notice
40+
Getting a value by its numerical identifier is faster then by its name.
41+
42+

general/getVersion.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!-- This file was generated by the script. Do not edit it, any changes will be lost! -->
2+
3+
## getVersion()
4+
5+
6+
7+
#### Parameters
8+
9+
none
10+
11+
#### Return
12+
13+
* `string` OpenTX version (ie "2.1.5")
14+
15+
* `list` (available since OpenTX 2.1.7) returns two values:
16+
* `string` OpenTX version (ie "2.1.5")
17+
* `string` radio version (ie "Taranis", "TaranisPlus", if running in simulator the "-simu" is added)
18+
19+
20+
21+
---
22+
Returns OpenTX version
23+
24+

general/playFile.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!-- This file was generated by the script. Do not edit it, any changes will be lost! -->
2+
3+
## playFile(name)
4+
5+
6+
7+
#### Parameters
8+
9+
* `name` (string) file name (including path) to play. If the path is not
10+
absolute (name starts with the `/` character), then the given name is used relative to
11+
the current language path (example for English language: `/SOUNDS/en`)
12+
13+
14+
15+
16+
#### Return
17+
18+
none
19+
20+
---
21+
Plays a track with given name
22+
23+

model/getGlobalVariable.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!-- This file was generated by the script. Do not edit it, any changes will be lost! -->
2+
3+
## model.getGlobalVariable(index [, phase])
4+
5+
6+
7+
#### Parameters
8+
9+
* `index` zero based global variable index, use 0 for GV1, 8 for GV9
10+
11+
* `phase` zero based phase index, use 0 for Phase 1, 5 for Phase 6
12+
13+
14+
15+
#### Return
16+
17+
* `nil` requested global variable does not exist
18+
19+
* `number` current value of global variable
20+
21+
22+
23+
---
24+
Returns current global variable value.
25+
See also model.setGlobalVariable()
26+
27+
Example:
28+
29+
```lua
30+
-- get GV3 (index = 2) from flight phase 1 (phase = 0)
31+
val = model.getGlobalVariable(2, 0)
32+
```
33+
34+
35+
##### Notice
36+
a simple warning or notice
37+
38+

model/setGlobalVariable-example01.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Example
2+
3+
this is a sample example

0 commit comments

Comments
 (0)