Doh! I meant to post that here so it's archived here as well.
Here’s the changes I made for COM1 and NAV1 radio panels to work with a single rotary encoder. You’ll need to adjust the Device and Input numbers for your hardware, and possibly the rotation value, adding a negative (-) or not, 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 showing it in action:
https://www.youtube.com/watch?v=jpovN2mLImQ