lua-preview
OpenTX 2.1 Lua Reference Guide
1.
Introduction
1.1.
Acknowledgments
1.2.
Getting Started
2.
Part I - Script Type Overview
2.1.
Mix Scripts
2.2.
Telemetry Scripts
2.3.
One-Time Scripts
2.4.
Wizard Script
2.5.
Function Scripts
3.
Part II - OpenTX Lua API Programming Guide
3.1.
Input Table Syntax
3.2.
Output Table Syntax
3.3.
Init Function Syntax
3.4.
Run Function Syntax
3.5.
Return Statement Syntax
3.6.
Included Lua Libraries
3.6.1.
io Library
3.6.1.1.
io.open()
3.6.1.2.
io.close()
3.6.1.3.
io.read()
3.6.1.4.
io.write()
3.6.1.5.
io.seek()
4.
Part III - OpenTX Lua API Reference
4.1.
Constants
4.1.1.
Key Event Constants
4.2.
General Functions
4.2.1.
getTime()
4.2.2.
getDateTime()
4.2.3.
getVersion()
4.2.4.
getGeneralSettings()
4.2.5.
getValue()
4.2.6.
getFieldInfo()
4.2.7.
playFile()
4.2.8.
playNumber()
4.2.9.
playDuration()
4.2.10.
playTone()
4.2.11.
popupInput()
4.2.12.
defaultStick()
4.2.13.
defaultChannel()
4.2.14.
killEvents()
4.2.15.
GREY()
4.3.
Model Functions
4.3.1.
model.getInfo()
4.3.2.
model.setInfo()
4.3.3.
model.getModule()
4.3.4.
model.setModule()
4.3.5.
model.getTimer()
4.3.6.
model.setTimer()
4.3.7.
model.resetTimer()
4.3.8.
model.getInputsCount()
4.3.9.
model.getInput()
4.3.10.
model.insertInput()
4.3.11.
model.deleteInput()
4.3.12.
model.deleteInputs()
4.3.13.
model.getMixesCount()
4.3.14.
model.getMix()
4.3.15.
model.insertMix()
4.3.16.
model.deleteMix()
4.3.17.
model.deleteMixes()
4.3.18.
model.getLogicalSwitch()
4.3.19.
model.setLogicalSwitch()
4.3.20.
model.getCustomFunction()
4.3.21.
model.setCustomFunction()
4.3.22.
model.getCurve()
4.3.23.
model.getOutput()
4.3.24.
model.setOutput()
4.3.25.
model.getGlobalVariable()
4.3.26.
model.setGlobalVariable()
4.4.
Display Functions
4.4.1.
lcd.lock()
4.4.2.
lcd.clear()
4.4.3.
lcd.getLastPos()
4.4.4.
lcd.drawPoint()
4.4.5.
lcd.drawLine()
4.4.6.
lcd.drawRectangle()
4.4.7.
lcd.drawFilledRectangle()
4.4.8.
lcd.drawGauge()
4.4.9.
lcd.drawText()
4.4.10.
lcd.drawTimer()
4.4.11.
lcd.drawNumber()
4.4.12.
lcd.drawChannel()
4.4.13.
lcd.drawSwitch()
4.4.14.
lcd.drawSource()
4.4.15.
lcd.drawPixmap()
4.4.16.
lcd.drawScreenTitle()
4.4.17.
lcd.drawCombobox()
5.
Part IV - Converting OpenTX 2.0 Scripts
5.1.
General Issues
5.2.
Handling GPS Sensor data
5.3.
Handling Lipo Sensor Data
Powered by
GitBook
lua-preview
model.setInfo()