Function scripts are invoked via EdgeTX 'Lua Script' of Special Functions configuration page.
Typical uses of Function scripts are:
specialized handling in response to switch position changes
customized announcements
Function script is loded when model is selected. Script executes until
it misbehaves (e.g. run-time error or low memory)
One-time Script is running. When One-time script finishes execution, Wigdet Script resumes execution.
Function scripts DO NOT HAVE ACCESS TO LCD DISPLAY
Function scripts are located on the SD card in the folder /SCRIPTS/FUNCTIONS/
File name length (without extension) must be 6 characters or less
Every Function script must include a return
statement at the end, defining its interface to EdgeTX.
This statement returns a table with the following fields:
Parameters none
Return values none
Parameters none
Return Values none
Parameters none
Return Values none\
Field | Type | Required | Desctiption |
---|---|---|---|
Field | Type | Required | Desctiption |
---|---|---|---|
Field | Type | Required | Desctiption |
---|---|---|---|
run
function
This function is called periodicaly when switch assiociated the Special Function is ON.
init
function
This function is called once when Function script is loaded and executed for the first time
background
function
This function is called periodicaly when switch assiociated the Special Function is OFF