Skip to content

model.getInput

model.getInput(input, line)

Return input data for given input and line number

Parameters

Name Req Type Description
input yes integer input number (use 0 for Input1)
line yes integer input line (use 0 for first line)

Returns

NameTypeDescription
-nilrequested input or line does not exist
-tableinput data:
FieldTypeDescription
namestringinput line name
inputNamestringinput input name
sourcenumberinput source index
scalenumberinput scaling (for telemetry)
weightnumberinput weight
offsetnumberinput offset
switchnumberinput switch index
curveTypenumbercurve type (function, expo, custom curve)
curveValuenumbercurve index
carryTrim-deprecated, please use trimSource instead. WARNING: carryTrim was getting negative values (carryTrim = - trimSource)
trimSourcenumbera positive number representing trim source
sidenumberinput side (positive, negative or all)
flightModesnumberbit-mask of active flight modes

Availability

  • Since: 2.0.0
  • Radio support: all

Source

radio/src/lua/api_model.cpp