Results 11 to 12 of 12
-
08-15-2010, 08:32 PM #11
- Join Date
- Apr 2009
- Location
- Toronto
- Posts
- 125
Re: Initializing LED to be Turned Off
Dave,
I had an error in my last post..should have read:
Code:Var 0138, Link IOCARD_SW, Input 13, Type P // Push Button for Transponder Mode { V0135 = CHANGEBITN 0 V0138 }
-
08-15-2010, 09:32 PM #12
- Join Date
- Oct 2008
- Location
- ontario
- Posts
- 95
Re: Initializing LED to be Turned Off
Jim,
Thanks for hanging in there with me. To the best of my knowledge the SB Offset isn't broke down further into bits. It is a value only (ie. 0 or 1)
However I am happy to report success. I went back to my original idea of using a rotary switch after finding a script at the OC forum. The script was much more complicated than I needed for a wide range of radio functions. Buried within it was the transponder and I was able to scrounge some code from the overall script. Modified it slightly and it worked. Rotary switch starts in off position and led is unlit ; switch to Standby position and led remains unlit ; switch to active (Mode C) and led lights up. Switching back to standby or off and led turns off.
FYI here is the piece of code that did the trick:
Code:Var 0304, Link IOCARD_SW, Input 13 // XPNDR Mode STBY { IF V0304 = 1 { V0399 = 1 } } Var 0305, Link IOCARD_SW, Input 14 // XPNDR Mode Normal { IF V0305 = 1 { V0399 = 0 } } Var 0399, Link FSUIPC_OUT, Offset $7B91, Length 1 // Squawkbox XPNDR Mode { CALL V0139 } Var 0139, Link SUBRUTINE // state of transponder to set led { IF v0399 = 0 { &XPONDER_LED = 1 } ELSE { &XPONDER_LED = 0 } } Var 0140, name XPONDER_LED, Link IOCARD_OUT Output 23 // led to indicate standby or Mode C
Dave Kemp
FS9-BU0836X-GoFlight 166-TH2GO-WideFS-FSUIPC-Opencockpits
This radio panel is advertised on Ebay. Does anybody know if I can use it with fs2004 Win7? It...
flightsim radio panel usbc....