Skip to content

getSwitchIndex

getSwitchIndex(positionName)

Parameters

Name Req Type Description
positionName yes string naming a switch position as it is shown on radio menus where you can select a switch. Notice that many names have special characters in them like arrow up/down etc.

Returns

Name Type Description
value integer . The switchIndex, which can be used as input for getSwitchName(switchIndex) and getSwitchValue(switchIndex). Also corresponds to the fields in the table returned by model.getLogicalSwitch(switch) identifying switches.

Availability

  • Since: 2.6
  • Radio support: all

Source

radio/src/lua/api_general.cpp