Lua Scripting in OpenTX
Reference Guide
popupInput(title, event, input, min, max)
playDuration(duration,playtime)
playTone(frequency, length, pause, attr, frequnecyInc)
model.insertInput(input, line, value)
model.deleteInput(input, line)
model.insertMix(channel, mix, value)
model.getLogicalSwitch(switch)
model.setLogicalSwitch(switch, value)
model.getCustomFunction(function)
model.getGlobalVariable(gvar, flightmode)
model.setGlobalVariable(gvar, flightmode, value)
model.getTelemetryChannel(idx)
model.setTelemetryChannel(idx, value)
lcd.drawRectangle(x, y, width, height)
lcd.drawSwitch(x, y, switch, att)
lcd.drawScreenTitle(title, idx, cnt)
lcd.drawGauge(x1, y1, w, h, fill, maxfill)
lcd.drawChannel(x, y, source, att)
lcd.drawNumber(x, y, number ,att)
lcd.drawTimer(x, y, value, att)
lcd.drawFilledRectangle(x, y, w, h, att)
lcd.drawSource(x, y, source, att)
lcd.drawCombobox(x, y, w, list, idx, flag)
One-Time Script Example: Hello World
One-Time Script Example: Generic Template
Model Script Example: Delta Mixer
Telemetry Script Example: Screen #1
Telemetry Script Example: Screen #2
Model Script Example: Automatic Battery Cell Detection
Links to external documentation:
OpenTX 2.0 added support for Lua (current version 5.2.2) user scripts.
Lua is a lightweight multi-paradigm programming language designed as a scripting language. More at Wikipedia
There are several types of Lua scripts used in openTX. More general information about Lua scripts can be found on page http://www.open-tx.org/lua-instructions.html
Lua scripts must be placed on SD card in correct folders and have an extension .lua. Maximum Lua script file name length is TODO characters. The script folders have been reorganized in OpenTX 2.0.3. The folder structure looks like this:
Lua Standard Libraries | Included |
package | no |
coroutine | no |
table | no |
io | no |
os | no |
string | no |
bit | Future 2.1.0? |
math | Available from 2.0.0 |
debug | no |
WARNING Do not use Lua model scripts for controlling any aspect of your model that could cause a crash if script stops executing. |
Each model can have several model scripts associated with it. These scripts are run periodically for entire time that model is selected/active. These scripts behave similar to standard OpenTX mixers but at the same time provide much more flexible and powerful tool.
Typically model scripts take several values as inputs, do some calculation or logic processing based on them and output one or more values. Each run of scripts should be as short as possible. Exceeding certain script execution runtime will result in script being forcefully stopped and disabled.
See also:
Examples of typical use of model scripts
Place them on SD card in folder /SCRIPTS/MIXES/
Every script must include a return statement at the end, that defines its interface to the rest of OpenTX code. This statement defines:
For example:
-- script body would be here |
This example defines:
Parameters init, input and output are optional. If model script doesn't use them, they can be omitted from return statement. Example without init and output:
local inputs = { { "Aileron", SOURCE }, { "Ail. ratio", VALUE, -100, 100, 0 } } |
If defined, init function is called right after the script is loaded from SD card and begins execution. Init is called only once before the run function is called for the first time.
local <init_function_name>()
called once before first call to run function
|
The run function is the function that is periodically called for the entire lifetime of script. Syntax of run function is different between model scripts and one-time scripts.
local <run_function_name>([first input, [second input], …])
These scripts start when called upon by a specific radio function or when the user selects them from a contextual menu. They do their task and are then terminated and unloaded. Please note that all persistent scripts are halted during the execution of one time scripts. They are automatically restarted once the one time script is finished. This is done to provide enough system resources to execute the one time script.
See also:
Examples of typical use of one-time scripts
Limitations of one-time scripts
Place them anywhere on SD card, the folder /SCRIPTS/ is recommended. The only exception is official model wizard script, that should be put into /SCRIPTS/WIZARD/ folder - that way it will start automatically when new model is created.
Every script must include a return statement at the end, that defines its interface to the rest of OpenTX code. This statement defines:
For example:
-- script body would be here |
This example defines:
Parameter init is optional.
The run function is the function that is periodically called for the entire lifetime of script. Syntax of run function is different between model scripts and one-time scripts.
local <run_function_name>(event)
|
TODO (blank in Wiki)
These scripts are used for building customized telemetry screens. Theoretically it is possible to have up to 7 custom telemetry screens, all written in Lua. It is possible to use different scripts on a per model basis.
Place them on SD card in the folder /SCRIPTS/«modelname»/telemX.lua where X is a number from 0 to 6.
Example: /SCRIPTS/Extra/telem0.lua would be first custom telemetry screen for model Extra.
Every script must include a return statement at the end, that defines its interface to the rest of OpenTX code. This statement defines:
For example:
-- script body would be here |
This example defines:
Parameter init is optional.
The run or background function is the function that is periodically called for the entire lifetime of script. Which one is called depends on the visibility of custom telemetry screen:
local <background_function_name>()
|
local <run_function_name>(event)
|
Examples
All Lua model scripts in OpenTX exist in same Lua environment. This means, that they share global functions and variables. Using global variable with the same name from two different scripts could lead to unpredictable results. Therefore the use of global variables and functions should be avoided!
TODO: how to share data between scripts
Warning
Even variables defined inside local functions without local keyword are global. For example if we have two scripts, script1:
local function run() |
and script 2:
local function run() |
If we execute both scripts, we would hear "Whoopsie.wav" (if it is present on SD card). This means that variable global_var is actually global even if it is first defined in some local function in other script.
Script can have any number (limited by memory usage) of local variables, their value is preserved between each call to run function. They are defined as:
local simple_number = 4 |
Local variables are only visible to the script that defined them. Two scripts can define a local variable with the same name. These two variables don't share anything, each script has his own instance of variable.
Script can have any number (limited by memory usage) of local functions:
local function some_function(a, b, c) |
Local functions are only visible to the script that defined them. Two scripts can define a local function with the same name. These two functions don't share anything, each script has his own instance of function.
Input are only used in model scripts. However the same number format is returned by function getValue().
Inputs are analogue values from opentTX that are converted to 16 bit signed integers before they reach Lua scripts.
Analogue values such as sticks and sliders have value in percent multiplied by 10.24:
Aileron Stick Value | Input Value to Script |
0% | 0 |
60.6% | 620 |
100.0% | 1024 |
-100.0% | -1024 |
Switches (real and logical) are represented as:
Switch Position | Input Value to Script |
down (-100%) | -1024 |
middle | 0 |
up (100%) | 1024 |
Telemetry values are returned as proper values:
Telemetry Value | Input Value to Script |
altitude 120.5m | 120.5 |
A1 voltage 5.47V | 5.47 |
Consumption 1260mAh | 1260 |
Source
Source type provides current value of selected OpenTX variable (stick position, slider, channel). User assigns assigns actual source for this input in Custom script menu. Source can be any value OpenTX knows about (inputs, channels, telemetry values, switches, custom functions,...).
Syntax: { name, SOURCE }
Example: { "Aileron", SOURCE }
Defines SOURCE type input with name Aileron. Name length is limited to TODO.
Value
Value type provides constant value that user sets in Custom script menu
Syntax: { name, VALUE, min, max, default }
Example: { "Ratio", VALUE, -100, 100, 0 }
Defines VALUE input with name Ratio that has limits -100 and 100 and default value of 0. Name length is limited to TODO.
Outputs are only used in model scripts.
Syntax: { name1, name2 }
Example: { "Calc", "Out" }
Output name is limited to four characters.
Outputs are 16 bit signed integers when they leave Lua script and are then divided by 10.24 to produce output value in percent:
Output from Script | Output as seen from OpenTX |
0 | 0% |
996 | 97.2% |
1024 | 100% |
-1024 | -100% |
Returns the time since the radio was started in multiple of 10ms
|
Returns OpenTX version
|
Example: Display Version Number
local function run_func(event) lcd.lock() lcd.clear() lcd.drawScreenTitle("getVersion",1,1) lcd.drawText(10,20,getVersion(),MIDSIZE) if event == EVT_EXIT_BREAK then -- Test for Exit Key return 1 -- Exit else return 0 end end return { run=run_func } |
Returns the value of a source
|
supported source constants
name |
MIXSRC_FIRST_INPUT |
MIXSRC_Rud |
MIXSRC_Ele |
MIXSRC_Thr |
MIXSRC_Ail |
MIXSRC_SA |
MIXSRC_SB |
MIXSRC_SC |
MIXSRC_SD |
MIXSRC_SE |
MIXSRC_SF |
MIXSRC_CH1 |
This may be a beter reference point until 2.0.6 http://www.rcgroups.com/forums/showpost.php?p=28897780&postcount=298
Supported source names are:
name | value | example |
"altitude" | barometric altitude in meters | 120.56 |
"altitude-max" | max barometric altitude in meters | 120.56 |
"vario" | vario speed in m/s | 120.56 |
"tx-voltage" | Tx voltage in V | 120.56 |
"rpm" | RPMs | 120.56 |
"latitude" | GPS latitude in degrees, North is positive | 45.5667 |
"longitude" | GPS longitude in degrees, East is positive | 120.5677 |
"pilot-latitude" | first GPS value (usually pilot position) format same as "latitude" | -12.567 |
"pilot-longitude" | first GPS value (usually pilot position) format same as "longitude" | -0.567 |
Names are case sensitive eg getValue("altitude")
Plays a file from the SD card
|
Introduced in 2.1.0
If you use a relative path, will append current language to the path.
Raises a popup on screen that allows uses input
|
Example: Pressing +/- will increment/decrement number.
local result = 0 local swtch = 0 local function run_func(event) lcd.lock() lcd.clear() lcd.drawScreenTitle("popupInput",1,1) result = popupInput("Input", event, swtch, -10, 10) lcd.drawNumber(62,24,swtch,0) if result == "OK" then return 0 -- ignore elseif result == "CANCEL" then return 1 -- exit program else swtch = result -- it is number return 0 end end return { run=run_func } |
Returns a table containing battMin and battMax
|
General Table Format
|
Example: Display Min and Max Battery volatge
local settings=getGeneralSettings() lcd.drawNumber(10,20,settings.battMin,LEFT+MIDSIZE) lcd.drawNumber(100,20,settings.battMax,LEFT+MIDSIZE) |
|
Unit table
Unit | Sound | Description |
0 | ||
1 | Volts | 0115.wav |
2 | Amperes | 0118.wav |
3 | Meters per Second | 0120.wav |
4 | ||
5 | Speed | KMH or Knots depending on radio setting (imperial/metric) |
6 | Height | Number is meters. Converted to feet for Imperial. |
7 | Temperature | Number is celcius. converted to F if radio is in Imperial. |
8 | Percent | |
9 | Millions | |
10 | MH | |
11 | Watts | |
12 | DB | |
13 | Feet | |
14 | Speed | KMH or Knots depending on radio setting (imperial/metric) |
15 | Hours | |
16 | Minutes | |
17 | Seconds | |
18 | RPM | |
19 | Gee | |
20 | Degrees | |
21 | ||
22 | ||
23 | Point Zero | |
24 | Point two | |
25 | Point four | |
26 | Point six | |
27 | Point eight | |
Attr
ATTR | |
PREC1 | Add decimal place to number. ie if number is 58, will announce 5.8 |
Get stick that is assigned to a channel. See Default Channel Order in General Settings
|
Get channel assigned to stick. See Default Channel Order in General Settings
|
Removes key-event from event
|
Key Events | comments |
EVT_MENU_BREAK | |
EVT_PAGE_BREAK | |
EVT_PAGE_LONG | |
EVT_ENTER_BREAK | |
EVT_ENTER_LONG | |
EVT_EXIT_BREAK | |
EVT_PLUS_BREAK | |
EVT_MINUS_BREAK | |
EVT_PLUS_FIRST | |
EVT_MINUS_FIRST | |
EVT_PLUS_RPT | |
EVT_MINUS_RPT |
Gets detailed information about field.
|
Field Table Format
|
|
|
Attr | Description |
PLAY_NOW | Play immediately |
PLAY_BACKGROUND | Place in background queue |
Please note that writing (even the same value) to model settings will cause the a write to EEPROM. This could occur within 5 seconds of the change or when model is unloaded or radio switched off.
Returns model timer
|
Timer Table Format
|
Example:
--get timer data into tim1 |
Sets model timer
|
see model.getTimer(timer) for timer table format
Returns number of lines for given input
|
Returns input data for given input and line number
|
Input-Table Format
|
Inserts an Input at specified line
|
Delete line from specified input
|
Delete all Inputs
|
Set all inputs to Defaults.
|
Example:
local function run_func(event) model.defaultInputs() return 1 end return { run=run_func} |
Radio before script is run
Radio after script is run
Get the number of Mixer lines that the specified Channel has
|
Example
mix = model.getMixesCount(0) lcd.drawNumber(10,20,mix,LEFT+MIDSIZE) |
Radio Configuration
Result
Get configuration for specified Mix
|
Mix-Table Format
|
Insert a mixer line into Channel
|
Delete mixer line from specified Channel
|
Removes ALL lines from ALL channels
|
Get Logical Switch parameters
|
Switch-Table Format
|
Set Logical Switch parameters
|
Get Special Functions
|
Function-Table Format
|
Function Table. Caution, table behavior changes depending on the function. Need to determine a good way to show this information. The sound orientated functions in particular affect the usages of fields.
Unused variables will contain values from a previous function i.e. if you change a function and value is no longer used, it will still contain the value from the old function.
Action | Parameter | func | value | mode | param |
Safety CHx | 125..-125 | 0 | Parameter Value | Channel 0-21 | |
Trainer | 1 | 0 | |||
Trainer RUD | 1 | 1 | |||
Trainer ELE | 1 | 2 | |||
Trainer THR | 1 | 3 | |||
Trainer AIL | 1 | 4 | |||
Instant Trim | 2 | ||||
Play Sound | 10 | ||||
Reset | Timer1 | 3 | 0 | ||
Reset | Timer2 | 3 | 1 | ||
Reset | All | 3 | 2 | ||
Reset | Telemetry | 3 | 3 | ||
Set Timer 1 | 0..n | 4 | Parameter Value | 0 | |
Set Timer 2 | 0..n | 4 | 1 | ||
Vario | 18 | ||||
Play Value | - - - | 12 | |||
Start Logs | 0.0..25.5 | 20 | Parameter value * 10 | ||
Volume | source | 6 | See source table | ||
Backlight | 21 | ||||
Background Music | |||||
Background Music Pause | 17 | ||||
Adjust GV1..9 | Value | 5 | Parameter Value | 0 | GV 0..8 |
Adjust GV1..9 | Source | 5 | See source table | 1 | GV 0..8 |
Adjust GV1..9 | GVAR | 5 | GV 0.8 | 2 | GV 0..8 |
Adjust GV1..9 | Increment | 5 | 0 = -1, 1 = +1 | 3 | GV 0..8 |
|
Get servo details
|
Output-Table Format
|
Set servo properties
|
Get current Model information
|
Model-Table Format
|
Example:
Get the Model name and Number of current Model
modelinfo = model.getInfo() lcd.drawText(10,20,modelinfo.name,MIDSIZE) lcd.drawNumber(10,30,modelinfo.id,MIDSIZE) |
Current Models in Radio
Script Output
Set the current Model Name and Number
|
Example:
Get value of Gvar for specified Flight Mode
|
|
|
Telemetry-Table Format
|
Unit Table
Unit | index |
Volts (V) | 0 |
Amps (A) | 1 |
Speed (m/s or ft/s) | 2 |
Raw (-) | 3 |
Speed (km/h or miles/h) | 4 |
Meters (m or ft) | 5 |
Temp () | 6 |
Fule (%) | 7 |
mAmps (mA) | 8 |
|
Prevents main OpenTX code from modifying LCD screen. This lock is reset every time script is run and must be set again if script wants LCD to be locked on each iteration.
|
Clears the LCD screen
|
Draws a single pixel at (x,y) position
|
Note: Taranis has an LCD display width of 212 pixels and height of 64 pixels. Position (0,0) is at top left. Y axis is negative, top line is 0, bottom line is 63.
Draws a line from (x1,y1) to (x2,y2)
|
Draws a rectangle from top left corner (x,y) of specified width and height
|
Draws a text beginning at (x,y)
|
Text Attributes:
All att values can be combined together using the + character. ie BLINK + DBLSIZE. See the Appendix for available characters in each font set.
value | font | companion version | Note |
0 | normal font | ||
DBLSIZE | double size font | ||
MIDSIZE | mid sized font | ||
SMLSIZE | small font | ||
INVERS | inverted display | ||
BLINK | blinking text | ||
XXLSIZE | jumbo font | 2.0.6 | |
LEFT | left justify | 2.0.6 | Only for drawNumber |
Special Characters
Hex | Decimal | Function | Example |
0x1D | 29 | Tab | local string = 'hello\31\110world' tab inserted btween hello and world |
0x1E | 30 | Newline | local string = 'hello\30world' world will print on next line |
0x1F | 31 | x co-ord prefix. | local string = 'hello\31\110world' world will print from x=110 |
< 0x20 | all other codes will insert an extended space |
Draws a text representation of switch at (x,y)
|
Note: Testing shows that as of 2.0.8, only the SMLSIZE BLINK & INVERS attribute works correctly.
Draws a bitmap at (x,y)
|
Draws a title bar
|
Example: lcd.drawScreenTitle("DEMONSTRATION",1,3)
Draws a simple gauge that is filled based upon fill value.
|
Example: lcd.drawGauge(50, 42, 100, 18, 25, 100)
Draw the value of a source. Equivalent to lcd.drawText(x, y, model.getValue(source), att)
|
Draw a number on the display
|
To display a floating point number, use the PREC1 or PREC2 attributes.
lcd.drawNumber(62,15,312,DBLSIZE + PREC2 + LEFT)
Display a value formatted as time
|
Returns the last X position from previous output
|
Draw a rectangle on the screen as a solid block
|
Example: lcd.drawFilledRectangle(50,42,100,18,0)
Displays the name of the corresponding input as defined by the source.
|
Example: lcd.drawSource(10,20,2,LEFT+MIDSIZE)
Radio configuration Screen, showing that Input 02 is AIL
|
Example: table[1] = "mustang"
table[2] = "corsair"
table[3] = “spitfire”
lcd.drawCombobox(10,20,100,table,2,1)
A simple demonstration script to display “Hello World” on the screen. Script closes when you use the momentary switch SH.
local function init_func() local switch_value = 0 end local function run_func(event) lcd.lock() lcd.clear() lcd.drawText(10,10,"Hello World",MIDSIZE) switch_value = getValue(99) if switch_value > 100 then return 1 -- Exit else return 0 end end return { run=run_func, init=init_func } |
This is a template that I made for somebody who wanted to use a switch in order to check the limits of each channel (without any dual rates, expos, offsets etc. applied).
The inserted lines in the mixes are named "A-CAL", which allows the user either to change the switch by calling again the Lua script with another switch, or to remove all inserted lines by selecting "---" as a switch.
local swtch = 0 |
This example shows how to setup a single delta mix, with its configuration pages (2 sources with a weight on each). It should not be used for real model! This example has four inputs and two outputs:
-- this is comment in LUA |
See also:
This is the first Lua telemetry screen script. It can be used to add an additional telemetry screen to any model. OpenTX firmware version 2.0.4 or greater is needed to use the script. You can edit the script yourself to change what information that is displayed.
To Install Script:
That is it. The new telemetry screen should now automatically appear for the model.
This is the second Lua telemetry screen example script. It can be used to add an additional telemetry screen to any model. OpenTX firmware version 2.0.6 or greater is needed to use the script. The script will display two timers, the battery value and the altitude. The altitude is displayed using a new very large font. You can edit the script yourself to change what information that is displayed.
To Install Script:
That is it. The new telemetry screen should now automatically appear for the model.
This model script calculates the number of LiPo cells in connected battery and outputs a voltage of one cell. It can be used for automatic setting of low battery alarm in models where different cell count batteries are used interchangeably.
Script algorithm:
Setup screens:
This script must be placed onto SD card into folder /SCRIPTS/MIXES/. Script must be activated and its inputs and outputs set in Model settings Custom scripts page.
This example shows battery voltage (A2) is 11.2 Volts, detected cell count was 3 and calculated voltage for one cell is 3.73 Volts. Script output Vcel is multiplied by 10, so 3.73V is outputted as 37.3.
Vcel output is then used in Logical switch L1, which becomes true when cell voltage drops below 3.3V (remember value is multiplied by 10).
Special function is added to play battery low warning when L1 is true.
Script cellv.lua:
-- cell voltage calculator |
This is a list of all index numbers that can be used as a SOURCE for getValue. As of 2.0.6 the names are not valid, only the number. This is currently under development so use with caution. Planned to be released in 2.0.8
number | name | description |
1 | input1 | Input [I1] |
2 | input2 | Input [I2] |
3 | input3 | Input [I3] |
4 | input4 | Input [I4] |
5 | input5 | Input [I5] |
6 | input6 | Input [I6] |
7 | input7 | Input [I7] |
8 | input8 | Input [I8] |
9 | input9 | Input [I9] |
10 | input10 | Input [I10] |
11 | input11 | Input [I11] |
12 | input12 | Input [I12] |
13 | input13 | Input [I13] |
14 | input14 | Input [I14] |
15 | input15 | Input [I15] |
16 | input16 | Input [I16] |
17 | input17 | Input [I17] |
18 | input18 | Input [I18] |
19 | input19 | Input [I19] |
20 | input20 | Input [I20] |
21 | input21 | Input [I21] |
22 | input22 | Input [I22] |
23 | input23 | Input [I23] |
24 | input24 | Input [I24] |
25 | input25 | Input [I25] |
26 | input26 | Input [I26] |
27 | input27 | Input [I27] |
28 | input28 | Input [I28] |
29 | input29 | Input [I29] |
30 | input30 | Input [I30] |
31 | input31 | Input [I31] |
32 | input32 | Input [I32] |
75 | rud | Rudder |
76 | ele | Elevator |
77 | thr | Throttle |
78 | ail | Aileron |
79 | s1 | Potentiometer 1 |
80 | s2 | Potentiometer 2 |
81 | s3 | Potentiometer 3 |
82 | ls | Left slider |
83 | rs | Right slider |
85 | cyc1 | Cyclic 1 |
86 | cyc2 | Cyclic 2 |
87 | cyc3 | Cyclic 3 |
88 | trim-rud | Rudder trim |
89 | trim-ele | Elevator trim |
90 | trim-thr | Throttle trim |
91 | trim-ail | Aileron trim |
92 | sa | Switch A |
93 | sb | Switch B |
94 | sc | Switch C |
95 | sd | Switch D |
96 | se | Switch E |
97 | sf | Switch F |
98 | sg | Switch G |
99 | sh | Switch H |
100 | ls1 | Logical switch L1 |
101 | ls2 | Logical switch L2 |
102 | ls3 | Logical switch L3 |
103 | ls4 | Logical switch L4 |
104 | ls5 | Logical switch L5 |
105 | ls6 | Logical switch L6 |
106 | ls7 | Logical switch L7 |
107 | ls8 | Logical switch L8 |
108 | ls9 | Logical switch L9 |
109 | ls10 | Logical switch L10 |
110 | ls11 | Logical switch L11 |
111 | ls12 | Logical switch L12 |
112 | ls13 | Logical switch L13 |
113 | ls14 | Logical switch L14 |
114 | ls15 | Logical switch L15 |
115 | ls16 | Logical switch L16 |
116 | ls17 | Logical switch L17 |
117 | ls18 | Logical switch L18 |
118 | ls19 | Logical switch L19 |
119 | ls20 | Logical switch L20 |
120 | ls21 | Logical switch L21 |
121 | ls22 | Logical switch L22 |
122 | ls23 | Logical switch L23 |
123 | ls24 | Logical switch L24 |
124 | ls25 | Logical switch L25 |
125 | ls26 | Logical switch L26 |
126 | ls27 | Logical switch L27 |
127 | ls28 | Logical switch L28 |
128 | ls29 | Logical switch L29 |
129 | ls30 | Logical switch L30 |
130 | ls31 | Logical switch L31 |
131 | ls32 | Logical switch L32 |
132 | trn1 | Trainer input 1 |
133 | trn2 | Trainer input 2 |
134 | trn3 | Trainer input 3 |
135 | trn4 | Trainer input 4 |
136 | trn5 | Trainer input 5 |
137 | trn6 | Trainer input 6 |
138 | trn7 | Trainer input 7 |
139 | trn8 | Trainer input 8 |
140 | trn9 | Trainer input 9 |
141 | trn10 | Trainer input 10 |
142 | trn11 | Trainer input 11 |
143 | trn12 | Trainer input 12 |
144 | trn13 | Trainer input 13 |
145 | trn14 | Trainer input 14 |
146 | trn15 | Trainer input 15 |
147 | trn16 | Trainer input 16 |
148 | ch1 | Channel CH1 |
149 | ch2 | Channel CH2 |
150 | ch3 | Channel CH3 |
151 | ch4 | Channel CH4 |
152 | ch5 | Channel CH5 |
153 | ch6 | Channel CH6 |
154 | ch7 | Channel CH7 |
155 | ch8 | Channel CH8 |
156 | ch9 | Channel CH9 |
157 | ch10 | Channel CH10 |
158 | ch11 | Channel CH11 |
159 | ch12 | Channel CH12 |
160 | ch13 | Channel CH13 |
161 | ch14 | Channel CH14 |
162 | ch15 | Channel CH15 |
163 | ch16 | Channel CH16 |
164 | ch17 | Channel CH17 |
165 | ch18 | Channel CH18 |
166 | ch19 | Channel CH19 |
167 | ch20 | Channel CH20 |
168 | ch21 | Channel CH21 |
169 | ch22 | Channel CH22 |
170 | ch23 | Channel CH23 |
171 | ch24 | Channel CH24 |
172 | ch25 | Channel CH25 |
173 | ch26 | Channel CH26 |
174 | ch27 | Channel CH27 |
175 | ch28 | Channel CH28 |
176 | ch29 | Channel CH29 |
177 | ch30 | Channel CH30 |
178 | ch31 | Channel CH31 |
179 | ch32 | Channel CH32 |
180 | gvar1 | Global variable 1 |
181 | gvar2 | Global variable 2 |
182 | gvar3 | Global variable 3 |
183 | gvar4 | Global variable 4 |
184 | gvar5 | Global variable 5 |
185 | gvar6 | Global variable 6 |
186 | gvar7 | Global variable 7 |
187 | gvar8 | Global variable 8 |
188 | gvar9 | Global variable 9 |
189 | tx-voltage | Transmitter battery voltage [volts] |
190 | clock | RTC clock [minutes from midnight] |
196 | timer1 | Timer 1 value [seconds] |
197 | timer2 | Timer 2 value [seconds] |
198 | swr | Transmitter antenna quality [less is better] |
200 | rssi | RSSI [more is better] |
202 | a1 | A1 analogue value [units as configured] |
203 | a2 | A2 analogue value [units as configured] |
204 | a3 | A3 analogue value [units as configured] |
205 | a4 | A4 analogue value [units as configured] |
206 | altitude | Variometer altitude [meters] |
207 | rpm | Rotational speed [revolutions per minute] |
208 | fuel | Fuel level [???] |
209 | temp1 | Temperature 1 [degrees celsius] |
210 | temp2 | Temperature 2 [degrees celsius] |
211 | gps-speed | GPS speed [???] |
212 | distance | GPS distance [meters] |
213 | gps-altitude | GPS altitude [meters] |
214 | cell-min | LiPo sensor - lowest current cell voltage [volts] |
215 | cell-sum | LiPo sensor - current summ of all cell voltages [volts] |
216 | vfas | Current sensor - voltage [volts] |
217 | current | Current sensor - current [ampers] |
218 | consumption | Current sensor - consumption [mili amper hours] |
219 | power | Current sensor - power [wats] |
220 | accx | G sensor - acceleration in X axis [g] |
221 | accy | G sensor - acceleration in Y axis [g] |
222 | accz | G sensor - acceleration in Z axis [g] |
223 | heading | GPS heading [degrees] |
224 | vertical-speed | Variometer vertical speed [m/s] |
225 | air-speed | Air speed [knots] |
226 | dte | Total energy [???] |
232 | a1-min | A1 analogue value minimum [units as configured] |
233 | a2-min | A2 analogue value minimum [units as configured] |
234 | a3-min | A3 analogue value minimum [units as configured] |
235 | a4-min | A4 analogue value minimum [units as configured] |
236 | altitude-min | Lowest altitude [meters] |
237 | altitude-max | Highest altitude [meters] |
238 | rpm-max | Highest rotational speed [revolutions per minute] [meters] |
239 | temp1-max | Highest temperature 1 [degrees celsius] |
240 | temp2-max | Highest temperature 2 [degrees celsius] |
241 | gps-speed-max | Highest GPS speed [???] |
242 | distance-max | Biggest GPS distance [meters] |
243 | air-speed-max | Highest air speed [knots] |
244 | cell-min-min | LiPo sensor - all time lowest cell voltage [volts] |
245 | cell-sum-min | LiPo sensor - all time lowest summ of all cell voltages [volts] |
246 | vfas-min | Current sensor - lowest voltage [volts] |
247 | current-max | Current sensor - highest current [ampers] |
248 | power-max | Current sensor - highest power [wats] |
Font file: font_04x06.png for characters below 0xC0
: font_04x06_extra.png for characters above 0xc0
Hex | Char | Hex | Char | Hex | Char | Hex | Char | Hex | Char |
20 | 3A | : | 54 | T | 6E | n | |||
21 | ! | 3B | ; | 55 | U | 6F | o | ||
22 | “ | 3C | < | 56 | V | 70 | p | ||
23 | # | 3D | = | 57 | W | 71 | q | ||
24 | $ | 3E | > | 58 | X | 72 | r | ||
25 | % | 3F | ? | 59 | Y | 73 | s | ||
26 | & | 40 | ⁰ | 5A | Z | 74 | t | ||
27 | ‘ | 41 | A | 5B | [ | 75 | u | ||
28 | ( | 42 | B | 5C | \ | 76 | v | ||
29 | ) | 43 | C | 5D | ] | 77 | w | ||
2A | * | 44 | D | 5E | ^ | 78 | x | ||
2B | + | 45 | E | 5F | _ | 79 | y | ||
2C | , | 46 | F | 60 | ~ | 7A | z | ||
2D | - | 47 | G | 61 | a | 7B | { | ||
2E | . | 48 | H | 62 | b | 7C | | | ||
2F | / | 49 | I | 63 | c | 7D | } | ||
30 | 0 | 4A | J | 64 | d | 7E | → | ||
31 | 1 | 4B | K | 65 | e | 7F | ← | ||
32 | 2 | 4C | L | 66 | f | ||||
22 | 3 | 4D | M | 67 | g | ||||
34 | 4 | 4E | N | 68 | h | C0 | ↑ | ||
35 | 5 | 4F | O | 69 | i | C1 | ↓ | ||
36 | 6 | 50 | P | 6A | j | C2 | ↗ | ||
37 | 7 | 51 | Q | 6B | k | C3 | ↘ | ||
37 | 8 | 52 | R | 6C | l | C4 | ↙ | ||
39 | 9 | 53 | S | 6D | m | C5 | ↘ |
default character set ( no constant so use att = 0 )
Font file: font_05x07.png & font_05x07_extra.png
Hex | Char | Hex | Char | Hex | Char | Hex | Char | Hex | Char |
20 | 3A | : | 54 | T | 6E | n | |||
21 | ! | 3B | ; | 55 | U | 6F | o | ||
22 | “ | 3C | < | 56 | V | 70 | p | ||
23 | # | 3D | = | 57 | W | 71 | q | ||
24 | $ | 3E | > | 58 | X | 72 | r | ||
25 | % | 3F | ? | 59 | Y | 73 | s | ||
26 | & | 40 | ⁰ | 5A | Z | 74 | t | ||
27 | ‘ | 41 | A | 5B | [ | 75 | u | ||
28 | ( | 42 | B | 5C | \ | 76 | v | ||
29 | ) | 43 | C | 5D | ] | 77 | w | ||
2A | * | 44 | D | 5E | ^ | 78 | x | ||
2B | + | 45 | E | 5F | _ | 79 | y | ||
2C | , | 46 | F | 60 | ~ | 7A | z | ||
2D | - | 47 | G | 61 | a | 7B | { | ||
2E | . | 48 | H | 62 | b | 7C | | | ||
2F | / | 49 | I | 63 | c | 7D | } | ||
30 | 0 | 4A | J | 64 | d | 7E | → | ||
31 | 1 | 4B | K | 65 | e | 7F | ← | ||
32 | 2 | 4C | L | 66 | f | ||||
22 | 3 | 4D | M | 67 | g | C0 | ↑ | ||
34 | 4 | 4E | N | 68 | h | C1 | ↓ | ||
35 | 5 | 4F | O | 69 | i | C2 | ↗ | ||
36 | 6 | 50 | P | 6A | j | C3 | ↘ | ||
37 | 7 | 51 | Q | 6B | k | C4 | ↙ | ||
37 | 8 | 52 | R | 6C | l | C5 | ↘ | ||
39 | 9 | 53 | S | 6D | m | C6 | △ |
Font file: font_08x10.png
Hex | Char | Hex | Char | Hex | Char | Hex | Char | Hex | Char |
20 | 3A | : | 54 | T | 6E | n | |||
21 | ! | 3B | ; | 55 | U | 6F | o | ||
22 | “ | 3C | < | 56 | V | 70 | p | ||
23 | # | 3D | = | 57 | W | 71 | q | ||
24 | $ | 3E | > | 58 | X | 72 | r | ||
25 | % | 3F | ? | 59 | Y | 73 | s | ||
26 | & | 40 | ⁰ | 5A | Z | 74 | t | ||
27 | ‘ | 41 | A | 5B | [ | 75 | u | ||
28 | ( | 42 | B | 5C | \ | 76 | v | ||
29 | ) | 43 | C | 5D | ] | 77 | w | ||
2A | * | 44 | D | 5E | ^ | 78 | x | ||
2B | + | 45 | E | 5F | _ | 79 | y | ||
2C | , | 46 | F | 60 | ~ | 7A | z | ||
2D | - | 47 | G | 61 | a | 7B | { | ||
2E | . | 48 | H | 62 | b | 7C | | | ||
2F | / | 49 | I | 63 | c | 7D | } | ||
30 | 0 | 4A | J | 64 | d | 7E | → | ||
31 | 1 | 4B | K | 65 | e | 7F | ← | ||
32 | 2 | 4C | L | 66 | f | ||||
22 | 3 | 4D | M | 67 | g | ||||
34 | 4 | 4E | N | 68 | h | ||||
35 | 5 | 4F | O | 69 | i | ||||
36 | 6 | 50 | P | 6A | j | ||||
37 | 7 | 51 | Q | 6B | k | ||||
37 | 8 | 52 | R | 6C | l | ||||
39 | 9 | 53 | S | 6D | m |
Font file: font_10x14.png
Uses font file font_22x38.png
Hex | Character | ||||
2C | , | ||||
2D | - | ||||
2E | . | ||||
2F | _ | ||||
30 | 0 | ||||
31 | 1 | ||||
32 | 2 | ||||
33 | 3 | ||||
34 | 4 | ||||
35 | 5 | ||||
36 | 6 | ||||
37 | 7 | ||||
38 | 8 | ||||
39 | 9 | ||||
3A | : |