File tree 6 files changed +27
-18
lines changed
6 files changed +27
-18
lines changed Original file line number Diff line number Diff line change @@ -16,5 +16,7 @@ Part IV addresses common issues in converting Lua scripts that were originally w
16
16
17
17
Part V covers advanced topics with examples
18
18
19
-
19
+ [ // ] : < > ( LUADOC-BEGIN:timestamp )
20
+ <div class =" footer " >last updated on 2016/12/17 20:14:31 UTC</div >
21
+ [ // ] : < > ( LUADOC-END:timestamp )
20
22
Original file line number Diff line number Diff line change 51
51
* [ model.deleteMixes()] ( model/deleteMixes.md )
52
52
* [ model.getCurve(curve)] ( model/getCurve.md )
53
53
* [ model.getCustomFunction(function)] ( model/getCustomFunction.md )
54
- * [ model.getGlobalVariable(index [ , phase ] )] ( model/getGlobalVariable.md )
54
+ * [ model.getGlobalVariable(index [ , flight_mode ] )] ( model/getGlobalVariable.md )
55
55
* [ model.getInfo()] ( model/getInfo.md )
56
56
* [ model.getInput(input, line)] ( model/getInput.md )
57
57
* [ model.getInputsCount(input)] ( model/getInputsCount.md )
65
65
* [ model.insertMix(channel, line, value)] ( model/insertMix.md )
66
66
* [ model.resetTimer(timer)] ( model/resetTimer.md )
67
67
* [ model.setCustomFunction(function, value)] ( model/setCustomFunction.md )
68
- * [ model.setGlobalVariable(index, phase , value)] ( model/setGlobalVariable.md )
68
+ * [ model.setGlobalVariable(index, flight_mode , value)] ( model/setGlobalVariable.md )
69
69
* [ model.setInfo(value)] ( model/setInfo.md )
70
70
* [ model.setLogicalSwitch(switch, value)] ( model/setLogicalSwitch.md )
71
71
* [ model.setModule(index, value)] ( model/setModule.md )
Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ To get a telemetry value simply use it's sensor name. For example:
18
18
* to get the current altitude use the source "Alt"
19
19
* to get the minimum altitude use the source "Alt-", to get the maximum use "Alt+"
20
20
21
- @status current Introduced in 2.0.0, changed in 2.1.0
21
+ @status current Introduced in 2.0.0, changed in 2.1.0, ` Cels+ ` and
22
+ ` Cels- ` added in 2.1.9
22
23
23
24
24
25
#### Parameters
@@ -53,6 +54,8 @@ case the returned value is 0):
53
54
54
55
##### Notice
55
56
Getting a value by its numerical identifier is faster then by its name.
57
+ While ` Cels ` sensor returns current values of all cells in a table, a ` Cels+ ` or
58
+ ` Cels- ` will return a single value - the maximum or minimum Cels value.
56
59
57
60
58
61
Original file line number Diff line number Diff line change 1
1
<!-- This file was generated by the script. Do not edit it, any changes will be lost! -->
2
2
3
- ## model.getGlobalVariable(index [ , phase ] )
3
+ ## model.getGlobalVariable(index [ , flight_mode ] )
4
4
5
5
6
6
@@ -9,7 +9,7 @@ Return current global variable value
9
9
Example:
10
10
11
11
``` lua
12
- -- get GV3 (index = 2) from flight phase 1 (phase = 0 )
12
+ -- get GV3 (index = 2) from Flight mode 0 (FM0 )
13
13
val = model .getGlobalVariable (2 , 0 )
14
14
```
15
15
@@ -18,7 +18,7 @@ Example:
18
18
19
19
* ` index ` zero based global variable index, use 0 for GV1, 8 for GV9
20
20
21
- * ` phase ` zero based phase index, use 0 for Phase 1, 5 for Phase 6
21
+ * ` flight_mode ` Flight mode number (0 = FM0, 8 = FM8)
22
22
23
23
24
24
Original file line number Diff line number Diff line change 1
1
<!-- This file was generated by the script. Do not edit it, any changes will be lost! -->
2
2
3
- ## model.setGlobalVariable(index, phase , value)
3
+ ## model.setGlobalVariable(index, flight_mode , value)
4
4
5
5
6
6
@@ -11,24 +11,21 @@ Sets current global variable value. See also model.getGlobalVariable()
11
11
12
12
* ` index ` zero based global variable index, use 0 for GV1, 8 for GV9
13
13
14
- * ` phase ` zero based phase index, use 0 for Phase 1, 5 for Phase 6
15
-
14
+ * ` flight_mode ` Flight mode number (0 = FM0, 8 = FM8)
15
+
16
16
* ` value ` new value for global variable. Permitted range is
17
- from -1024 to 1024.
18
-
17
+ from -1024 to 1024.
18
+
19
19
20
20
21
21
#### Return value
22
22
23
23
none
24
24
25
25
##### Notice
26
- If a parameter is missing from the value, then
27
- that parameter remains unchanged.
28
-
29
-
30
- Global variable can only store integer values,
31
- any floating point value is converted (todo check how) into integer value.
26
+ Global variable can only store integer values,
27
+ any floating point value is converted into integer value
28
+ by truncating everything behind a floating point.
32
29
33
30
34
31
Original file line number Diff line number Diff line change 18
18
color : white !important ;
19
19
padding : 0.5em ;
20
20
}
21
+
22
+ .footer {
23
+ text-align : center;
24
+ font-size : 70% ;
25
+ color : grey;
26
+ padding : 0.5em ;
27
+ }
You can’t perform that action at this time.
0 commit comments