Search the Community
Showing results for tags 'custom output vars'.
Found 1 result
Hi Pete and anyone else that can help, I've had a thought today whilst at work and just wondered if someone could confirm if this is possible or not, I understand that offsets 66c0 -> 66FF can be used for personal use. I currently use a payware aircraft that does not have any output offsets that I know about - I've decoded all the VC buttons to LVAR values and have written a .lua script to handle the buttons that I am programming through my BU0863X card so for example... if ipcPARAM == 1 then ipc.writeLVARS("example_lvar", 1); end So I configure my button on my joystick (or in this case connected to the BU0863X card) and choose the action from the drop-down menu in FSUIPC and then specify the parameter as '1' as I want to set the above LVAR as to mimic pushing a button in the cockpit and this works great for 'inputs' but I want to also have some LED's in my cockpit too :) Am I right in assume that if I was to add for example ipc.writeSB() like so:- -- Turn ON my example button if ipcPARAM == 1 then ipc.writeLVARS("example_lvar", 1); // The switch in the aircraft is now turned ON! ipc.writeSB("66C0", 1); // The 'output' LED is now turned ON! end That I could then use my OpenCockpits USBOutputs card to 'READ' the value of the 66C0 offset and it would read '1' or when turned off like in my next example (below) would read '0'.... -- Turn OFF my example button if ipcPARAM == 2 then ipc.writeLVARS("example_lvar", 0); // The switch in the aircraft is now turned OFF! ipc.writeSB("66C0", 0); // The 'output' LED is now turned OFF! end I hope this makes sense and even better, if it is possible to both read and write to these offsets that would be amazing!! - I only hope that I haven't misunderstood the 66C0 -> 66FF offset range's purpose :S Many thanks in advance, Bobby