A friend of mine, who is also a cockpit builder, asked to try FSIO with Laminar Research X-Plane 11.
Here is a list of quick test environment components:
- X-Plane 11
- XPUIPC plugin: Datarefs, Offsets and Commands
- FSIO-CPU board
- FSIO-IOControl application
- Opencockpits SIOC
Edit the XPUIPCOffsets.cfg file and add the following lines:
Define Dataref (landing lights switch):
Dataref LandingLights sim/cockpit2/switches/landing_lights_on int
Define Offset with offset value corresponding to the Dataref of your choice (see FSUIPC Offsets for reference (light switches):
Offset 0x0D0C UINT16 4 rw $LandingLights 4 * +
Define action command:
Command 0x0D0C UINT16 1 3 sim/lights/landing_lights_toggle
Add to your SIOC script:
Var 3301, static, name LandLights Link FSUIPC_OUT Offset $0D0C Length 2
Var 3302, static, name LandLights_Sw, Link IOCARD_SW, Device 10, Input 239
IF V3302 = 1
V3301 = 3
V3301 = 0
Run SIOC, compile updated script, run FSIO-IOControl and finally run X-Plane. Press the switch to toggle landing lights on, release to toggle off.
Repeat this procedure for other offsets/actions in your sim.