Category: SIOC/FSUIPC

Single Encoder Radio Panels

My COM and NAV radio panels currently use a Single Rotary encoder instead of a Dual Rotary Encoder, so I had to modify the OC4BAv4 script to make this work.  I was able to set it up so pushing the encoder’s pushbutton toggles between changing the whole number and the decimal point.

Here’s the changes I made for COM1 and NAV1 radio panels.  You’ll need to adjust the Device and Input numbers for your hardware, and possibly the rotation value, adding a negative (-) or not, also depending on your hardware setup.

Find this block of code for the COM1 panel:

Var 0502, name ROT_COM1_SW, Link IOCARD_ENCODER, Device 31, Input 57, Aceleration 1, Type 2
{
L0 = &ROT_COM1_SW * 1 // change turning direction
&ST_COM1High = ROTATE 18 ,36 ,L0
CALL &Com1ToNGX
}

Var 0503, name ROT_COM1_SF, Link IOCARD_ENCODER, Device 8, Input 4, Aceleration 1, Type 2
{
L0 = &ROT_COM1_SF * 25 // instead of acceleration that doesn't wor
&ST_COM1Low = ROTATE 0 ,999 ,L0
CALL &Com1ToNGX
}

and replace with the following

Var 8600, name COM_SWITCH, Link IOCARD_SW, Device 31, Input 62 Type P // in the shaft

Var 8601, name ROT_COM1_SW, Link IOCARD_ENCODER, Device 31, Input 57, Aceleration 1, Type 2
{
L0 = v8601 // * -1 make sure turning right increments
IF v8600 = 0
{
L0 = &ROT_COM1_SW * 1 // change turning direction
&ST_COM1High = ROTATE 18 ,36 ,L0
CALL &Com1ToNGX
}
ELSE
{
L0 = &ROT_COM1_SW * 25 // instead of acceleration that doesn't wor
&ST_COM1Low = ROTATE 0 ,999 ,L0
CALL &Com1ToNGX
}
}

======

Find this block of code for the NAV1 panel:

Var 0524, name ROT_NAV1_SW, Link IOCARD_ENCODER, Device 31, Input 55, Aceleration 1, Type 2
{
L0 = &ROT_NAV1_SW * -1 // change turning direction
&ST_NAV1High = ROTATE 8 ,17 ,L0
CALL &Nav1ToNGX
}

Var 0525, name ROT_NAV1_SF, Link IOCARD_ENCODER, Device 9, Input 4, Aceleration 1, Type 2
{
L0 = &ROT_NAV1_SF * -5 // instead of acceleration that doesn't wor
&ST_NAV1Low = ROTATE 0 ,99 ,L0
CALL &Nav1ToNGX
}

and replace with the following

Var 8602, name NAV_SWITCH, Link IOCARD_SW, Device 31, Input 61 Type P // in the shaft

Var 8603, name ROT_NAV1_SW, Link IOCARD_ENCODER, Device 31, Input 55, Aceleration 1, Type 2
{
L0 = v8603 // * -1 make sure turning right increments
IF v8602 = 0
{
L0 = &ROT_NAV1_SW * -1 // change turning direction
&ST_NAV1High = ROTATE 8 ,17 ,L0
CALL &Nav1ToNGX
}
ELSE
{
L0 = &ROT_NAV1_SW * -5 // instead of acceleration that doesn't wor
&ST_NAV1Low = ROTATE 0 ,99 ,L0
CALL &Nav1ToNGX
}
}


Here’s a video of the panels in action:

Working Around the NGX SDK

If there’s one thing you learn when doing a hardware cockpit with the PMDG 737NGX is that the SDK isn’t perfect.  Namely it sends values that don’t match whats happening in the cockpit.

A perfect example of this is the ‘Cold and Dark’ Cockpit.  There’s no power so nothing is on in the VC, yet the SDK is pushing “on” values to various MIP indicators, such as the landing gear, sixpacks, and Master Caution. So my MIP would be lit up when it shouldn’t be.

This weekend I finally sat down and re-did my SIOC code using some subroutines to fix that.

Basically instead of just reading the state of the indicator, I first read the state of the battery switch on the Overhead.  If it’s off, all the indicators are turned off.  If it’s on, it then calls the Subroutine to check the indicator’s state.  So I know my hardware items finally match what really should be happening.

I’ve posted a copy of my updated code here.  As always, you’re welcome to use it but will need to update Device/Output numbers for your setup.

SIOC and FSUIPC Virtual Joysticks

When I hooked my ProSimParts ATC Panel, I tied all the switches to my OpenCockpits hardware thinking SIOC would take care of the functionality. But afterwards I realized getting SIOC to send 737NGX control codes was a nightmare.

I then discovered that FSUIPC has the ability to create virtual joystick buttons and that SIOC can trigger those virtual joystick buttons. This enabled me to set the control codes like all the other switches on my panel. Happy Happy Joy Joy!

So here’s an example of how I setup the ATC Rotary Encoder to work.

(more…)