// ***************************************************************************** // * Config_SIOC ver 1.98 - By Manolo Vélez - www.opencockpits.com // ***************************************************************************** // // ** Transponder using 2 rotary encoders // ** 1 for High digits and 1 for Low // ** Sourced from the Opencockpits Forum website // Var 0121, Value 12 // High digits { CALL &XPNDRCALC } Var 0122, Value 0 // Low digits { CALL &XPNDRCALC } Var 0125, name INPXPNDRHigh, Link IOCARD_ENCODER, Input 10, Aceleration 1, Type 2 // Input High { L0 = &INPXPNDRHigh * 1 // -1 will change direction of rotation V0121 = V0121 + L0 V0121 = ROTATE 0 ,77 ,L0 } Var 0126, name INPXPNDRLow, Link IOCARD_ENCODER, Input 5, Aceleration 1, Type 2 // Input Low { L0 = &INPXPNDRLow * 1 // -1 will change direction of rotation V0122 = V0122 + L0 V0122 = ROTATE 0 ,77 ,L0 // numbers will range from 0 to 77 then back to 0 } Var 0129, Link IOCARD_SW, Input 63 // VFR button { &XPNDRDISP = 1200 // VFR Code (CH 7000, USA 1200, Germany 0021) &XPNDRTOFS = TOBCD &XPNDRDISP } Var 0130, name XPNDRDISP, Link IOCARD_DISPLAY, Digit 0, Numbers 4 // Display { L0 = &XPNDRDISP } Var 0131, name XPNDRTOFS, Link FSUIPC_INOUT, Offset $0354, Length 2 // XPNDR { L0 = &XPNDRDISP } Var 0132, name XPNDRIN, Value 7000 // XPNDR Input from FS Var 0133, Link FSUIPC_OUT, Offset $7b93, Length 4 // IDT button for Squawkbox Var 0134, Link IOCARD_SW, Input 7 // IDT button { V0133 = V0134 } Var 0138, name XPNDRCALC, Link SUBRUTINE // Code calculation { L0 = V0121 * 100 L1 = V0122 + L0 &XPNDRTOFS = TOBCD L0 &XPNDRDISP = L0 }