sharedflight / issues-tracker

Public Issues Tracker For Shared Flight
0 stars 0 forks source link

SYNC MODIFIERS for TriggerLua (and CommandLua) #59

Open justinsnapp opened 2 years ago

justinsnapp commented 2 years ago

Sync modifiers are normally used for determining whether we transmit a change. But with these LUA triggers we don't transmit. Should consider applying these sync modifiers for whether or not we call the lua function.

For example:

TriggerLUA sim/cockpit2/engine/actuators/throttle_beta_rev_ratio[0:1] @ 0 reverserToggle SYNC_AXIS_throttle

Right now we have to add this check into the LUA:

function reverserToggle()

    if readDataRef("SharedFlight/is_controlling_throttle") ~= 2 then return end

    . . .