Skip to content

model.getLogicalSwitch

model.getLogicalSwitch(switch)

Get Logical Switch parameters

Parameters

Name Req Type Description
switch yes integer logical switch number (use 0 for LS1)

Returns

NameTypeDescription
-nilrequested logical switch does not exist
-tablelogical switch data:
FieldTypeDescription
funcnumberfunction index
v1numberV1 value (index)
v2numberV2 value (index or value)
v3numberV3 value (index or value)
andnumberAND switch index
delaynumberdelay (time in 1/10 s)
durationnumberduration (time in 1/10 s)
statebooleancurrent state of the logical switch
persistentbooleanif true then the state is persistent across reboot of the radio

Availability

  • Since: 2.0.0
  • Radio support: all

Source

radio/src/lua/api_model.cpp