Search found 7 matches

by MikeLima
Sun Apr 28, 2024 7:18 am
Forum: Lua and API Scripting Help
Topic: xpl doesn't change state of switch
Replies: 9
Views: 3268

Re: xpl doesn't change state of switch

There was a problem within the documentation of VSKYLABS. Thank you for your input
by MikeLima
Tue Apr 23, 2024 6:16 pm
Forum: Lua and API Scripting Help
Topic: xpl doesn't change state of switch
Replies: 9
Views: 3268

Re: xpl doesn't change state of switch

I used the command AND the dataset for testing purposes. I removed either the command or the dataref for testing. Both do not work as expected. Please reread the code as I think I made the dataref_write correctly xpl_dataref_write("sim/cockpit2/electrical/strobe_lights_on","INT",1) Thanks in advance
by MikeLima
Tue Apr 23, 2024 6:29 am
Forum: Lua and API Scripting Help
Topic: xpl doesn't change state of switch
Replies: 9
Views: 3268

Re: xpl doesn't change state of switch

This code works: --MASTER D2 function master_callback(master_pos) if xpl_connected() then if master_pos == 0 then xpl_dataref_write("sim/cockpit2/electrical/battery_on","INT[8]",{0}) else xpl_dataref_write("sim/cockpit2/electrical/battery_on","INT[8]",{1}) end end end hw_switch_master = hw_switch ...
by MikeLima
Tue Apr 23, 2024 6:28 am
Forum: Lua and API Scripting Help
Topic: xpl doesn't change state of switch
Replies: 9
Views: 3268

Re: xpl doesn't change state of switch

Thank you. It's the Skylabs Cabri G2 and the document says "sim/cockpit2/switches/strobe_lights_on". It works with datarefs that have INT-Arrays, but all switches with just INT (Strobe, Pump, Nav, Ldg) do not work. I know it not needs the command and dataref. The code was for testing function strobe ...
by MikeLima
Mon Apr 22, 2024 1:56 pm
Forum: Lua and API Scripting Help
Topic: xpl doesn't change state of switch
Replies: 9
Views: 3268

xpl doesn't change state of switch

Hi I try to set the strobe lights on button Switch in XPlane. While it works with the master- and alt-switch, it doens't work with strobe, landing lights and pump. First buttons use an INT[8] and the not working ones use INT. Neither this code xpl_dataref_write("sim/cockpit2/electrical/strobe_lights ...
by MikeLima
Sun Nov 12, 2023 7:01 am
Forum: Lua and API Scripting Help
Topic: Using Input Events (B:Vars) in Air Manager
Replies: 4
Views: 2250

Re: Using Input Events (B:Vars) in Air Manager

Could you maybe assist with the NR-switch ? I think it's the last missing component...
by MikeLima
Sat Nov 11, 2023 7:01 pm
Forum: Lua and API Scripting Help
Topic: Using Input Events (B:Vars) in Air Manager
Replies: 4
Views: 2250

Re: Using Input Events (B:Vars) in Air Manager

You're my life saver. Thank you very much for sharing. (Trying to build a cockpit for the Guimbal Cabri G2).
Mike