C.r2130 0 Posted January 1, 2021 Share Posted January 1, 2021 I have been messing about with LUA functions for the Airbus for a few months now and have got 2 questions which I can't find an answer to. The first is when I use a LUA function to control a switch on the overhead panel, the switch moves into the correct position, but the switch does not make a click sound as if it does when setting it using the mouse on the Over Head panel (code used is below) And my second problem is, I have the commands: function Battery1_on () LVarSet = "L:AB_OVH_ELECBAT1" ipc.writeLvar(LVarSet, 1) SmallOverheadPushButtons () DspShow ("BAT2", "on") end function Battery1_off () LVarSet = "L:AB_OVH_ELECBAT1" ipc.writeLvar(LVarSet, 0) SmallOverheadPushButtons () DspShow ("BAT2", "off") end function Battery2_on () LVarSet = "L:AB_OVH_ELECBAT2" ipc.writeLvar(LVarSet, 1) SmallOverheadPushButtons () DspShow ("BAT2", "on") end function Battery2_off () LVarSet = "L:AB_OVH_ELECBAT2" ipc.writeLvar(LVarSet, 0) SmallOverheadPushButtons () DspShow ("BAT2", "off") end function Battery_BOTH_on () Battery1_on () _sleep(100,200) Battery2_on () end In my LUA, the "Battery1_" & "Battery2_" work but the "Battery_BOTH_On" function does not. It only operates battery 1, not 1 & 2. I have not written the code but have taken it from a LUA file mentioned in a few posts on this forum and have very limited knowledge on this subject. If anyone if able to help i would appreciated. Thanks ! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.