File tree Expand file tree Collapse file tree 6 files changed +27
-18
lines changed
Expand file tree Collapse file tree 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
1616
1717Part V covers advanced topics with examples
1818
19-
19+ [ // ] : < > ( LUADOC-BEGIN:timestamp )
20+ <div class =" footer " >last updated on 2016/12/17 20:14:31 UTC</div >
21+ [ // ] : < > ( LUADOC-END:timestamp )
2022
Original file line number Diff line number Diff line change 5151 * [ model.deleteMixes()] ( model/deleteMixes.md )
5252 * [ model.getCurve(curve)] ( model/getCurve.md )
5353 * [ model.getCustomFunction(function)] ( model/getCustomFunction.md )
54- * [ model.getGlobalVariable(index [ , phase ] )] ( model/getGlobalVariable.md )
54+ * [ model.getGlobalVariable(index [ , flight_mode ] )] ( model/getGlobalVariable.md )
5555 * [ model.getInfo()] ( model/getInfo.md )
5656 * [ model.getInput(input, line)] ( model/getInput.md )
5757 * [ model.getInputsCount(input)] ( model/getInputsCount.md )
6565 * [ model.insertMix(channel, line, value)] ( model/insertMix.md )
6666 * [ model.resetTimer(timer)] ( model/resetTimer.md )
6767 * [ 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 )
6969 * [ model.setInfo(value)] ( model/setInfo.md )
7070 * [ model.setLogicalSwitch(switch, value)] ( model/setLogicalSwitch.md )
7171 * [ 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:
1818 * to get the current altitude use the source "Alt"
1919 * to get the minimum altitude use the source "Alt-", to get the maximum use "Alt+"
2020
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
2223
2324
2425#### Parameters
@@ -53,6 +54,8 @@ case the returned value is 0):
5354
5455##### Notice
5556Getting 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.
5659
5760
5861
Original file line number Diff line number Diff line change 11<!-- This file was generated by the script. Do not edit it, any changes will be lost! -->
22
3- ## model.getGlobalVariable(index [ , phase ] )
3+ ## model.getGlobalVariable(index [ , flight_mode ] )
44
55
66
@@ -9,7 +9,7 @@ Return current global variable value
99Example:
1010
1111``` lua
12- -- get GV3 (index = 2) from flight phase 1 (phase = 0 )
12+ -- get GV3 (index = 2) from Flight mode 0 (FM0 )
1313 val = model .getGlobalVariable (2 , 0 )
1414```
1515
@@ -18,7 +18,7 @@ Example:
1818
1919* ` index ` zero based global variable index, use 0 for GV1, 8 for GV9
2020
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)
2222
2323
2424
Original file line number Diff line number Diff line change 11<!-- This file was generated by the script. Do not edit it, any changes will be lost! -->
22
3- ## model.setGlobalVariable(index, phase , value)
3+ ## model.setGlobalVariable(index, flight_mode , value)
44
55
66
@@ -11,24 +11,21 @@ Sets current global variable value. See also model.getGlobalVariable()
1111
1212* ` index ` zero based global variable index, use 0 for GV1, 8 for GV9
1313
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+
1616* ` value ` new value for global variable. Permitted range is
17- from -1024 to 1024.
18-
17+ from -1024 to 1024.
18+
1919
2020
2121#### Return value
2222
2323none
2424
2525##### 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.
3229
3330
3431
Original file line number Diff line number Diff line change 1818 color : white !important ;
1919 padding : 0.5em ;
2020}
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