forked from opentx/opentx
-
Notifications
You must be signed in to change notification settings - Fork 0
Lua Model Functions
Damjan Adamic edited this page Apr 23, 2014
·
5 revisions
Returns model timer
Parameters: timer (number) timer number
Return value: nil unknown timer number
value (table) timer data
Timer table format: { mode, start, value, countdownBeep, minuteBeep, persistent }
mode (number) timer trigger source: off, abs, stk,
stk%, sw/!sw, !m_sw/!m_sw
start (number) start value [seconds], 0 for up timer,
0> down timer
value (number) current value [seconds]
countdownBeep (number) count down beep
(0-silent, 1-beeps, 2-voice)
minuteBeep (boolean) minute beep
persistent (number) persistent timer
Sets model timer
Parameters: timer (number) timer number
data (table) new timer data
Return value: none
Timer table format: { mode, start, value, countdownBeep, minuteBeep, persistent }
mode (number) timer trigger source: off, abs, stk,
stk%, sw/!sw, !m_sw/!m_sw
start (number) start value [seconds], 0 for up timer,
0> down timer
value (number) current value [seconds]
countdownBeep (number) count down beep
(0-silent, 1-beeps, 2-voice)
minuteBeep (boolean) minute beep
persistent (number) persistent timer
Returns number of lines for given input
Parameters: input (unsigned number) input number (0 - max inputs-1)
Return value: value (unsigned number) number of configured lines
for given input
Returns input data for given input and line number
Parameters: input (unsigned number) input number (0 - max inputs-1)
line (unsigned number) input line (0 - max lines-1)
Return value: value (table) input data
input data table format: { name, source, weight, offset }
name (string) input line name
source (number) input source index
weight (number) input weight
offset (number) input offset