Interfacing the real buttons and LEDs with the simulator Apr 9, 2020 10:57:02 GMT
Post by PapaLima on Apr 9, 2020 10:57:02 GMT
Like you can see in My DHC-6 TwinOtter homecockpit thread, I have buttons and leds ready for the show.
My configuration is :
P3D (actually v4.5)
the DHC-6 Twin Otter extended aerosoft addon (with last update 1.2)
FSUIPC v5.155 (registered)
LINDA (latest v3.1.1 64b) completed with the TwinOtter library Aerosoft Twin Otter Extended (module 1.3)
SIOC V7.03B2 for the opencockpit compatibles IOcards I have
The goal is to link all of this with the simulator
From my understanding of "now" here is what I know and how I will implement. Please stop me if I am wrong
- That with SIOC, I can program scripts to handle actions to the LEDs and from the buttons linked to the IO cards and then act on a FSUIPC OFFSETs
- On the FSUIPC side, the particular OFFSET can trig an action to the simulator BUT it is using the common regular FSUIPC offsets and with the TwinOtter addon (like most) we arrive quickly out of capacity using only those OFFSETs.
- It is why cockpit builders are using LVARs implemented in the ADDON to better fine tune the interface with the simulator.
- LVARs can be kicked from a LUA script implemented in FSUIPC or in LINDA
- A LINDA dedicated library for the TwinOtter (my addon) is available and could be used BUT LINDA can only interface joystick like cards.... Thus as is my IO opencockpits cards are "not seen".
How I forecast the implementation of my setup:
- I will write one SIOC script per panel (to make it easy to develop and test) and merge all the scripts together after using the "group files" SIOC editor function
- The SIOC script will link to spare FSUIPC offset called "virtual joystick OFFSETs" to use this dedicated memory area for my own purpose putting bits on/off for buttons pressed/unpressed and LED on/off state
- I keep FSUIPC as a transporter to/from the simulator
- on the LINDA side, I can implement the user.lua script method Timer inside the aircraft linda folder to loop on the FSUIPC offsets to see if any state changed. If so, the appropriate LUA function in the TwinOtter library will be called
Does it makes sense ?