Jump to content
The simFlight Network Forums

One_Shot2011

Members
  • Posts

    6
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    From NJ, in Berlin Germany

One_Shot2011's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Pete, nevermind. I'm having a different issue, which until I can figure it out, it doesn't make sense to try and figure out the above. I tried with an on/off/on switch, but can't get the button (in the sim) to work in both directions. It presses in, but I can't get it back out. If I make any headway on my problem, I'll let you know. Jack
  2. Hey Pete, I tried working through your answers to see if I could solve my issue. I think I've come up with a slight solution, but I'm still having a problem. First off though, the Parking Brake works. It was only an example to SIOC. The picture is from within FSX and shows which switch in the Q400 I'm try to work with. In using the following code, I can get a button press out of FSUIPC in the buttons and switches. Where I'm having an issue though is getting the switch to turn off. "Var 1 Link IOCARD_SW Input 2 Type I { &FO_JoyStick64 = CHANGEBIT 0 v1 // toggle bit 0 of joystick 64 } Var 2 name FO_JoyStick64 Link FSUIPC_OUT Offset $3340 Length 4" I realize that this works like any other toggle switch, but do you know if there's a way to select the "off" of the switch using the above code? I was assuming that the changebit 0, if set to 1, would work... but it doesn't. If I can figure out how to get the button to turn off, I think I'm on the right track. Again, the above code is read by FSUIPC as a switch (Joy#64, Btn#0) in the "on" position, but what can I use for the "Off" position of the switch? Hope that makes sense. Jack
  3. I think my head spinning got the information screwed up. The parking brake and 0BC8 works fine, and was only an example of how I can get it to work with SIOC. Ignoring the Brake and 0BC8 from now on, I can make SIOC read a switch and make an LED interact with it. What I'm trying to do is to get that command (switch position = 1 or 0) and have FSX respond. In the default FSX commands, I can do that, but what about a custom switch or button? If you look at the picture from the Sim that I attached, I'm trying to control the two Korry switches. The left switch is "in", and the right switch is "Out". I can make SIOC change the LED state depending on how I have the switch, but getting the information from the sim, or sending the switch position to the sim is another story. If I use any other joystick type interface card, I can get the switches to work from mouse macros, but trying to get that information into SIOC for the use with my Opencockpits interface is something I'm really struggling with. Thanks again for your time.
  4. Thanks for the reply Pete... a lot faster than I thought with your busy schedule. The values (correct word?) are correct for the parking brake in my example from SIOC as all seems to work fine in that regards. I'm hoping that I can somehow change it so that instead of it being the Parking Brake (0BC8) I can use something from the LUA to correlate with the switch in the Q400 - ipc.writeLvar("MJC_VAR_WRITE_CODE", 70232) - something from that. As you see by V0001 = 32767 which is the parking brake output ( Parking brake: 0=off, 32767=on ), is there a way to take the Lvar 70232 to input it somehow into an offset like the way the others are working, or am I way off here? I know that I can make a mouse macro for each and every switch in the Q400 cockpit, but not sure how I can then make that into an offset... When clicking on the button for the Left Engine Intake Door, it shows a function of RX87820*X55cc. I also know that if connecting a joystick, I can then put that to a button or switch. The issue is that the Opencockpits cards are not joystick cards, and need the FSUIPC offset. Once again, my head is spinning. I'll try contacting the LINDA support team to see if they can help, but I know they are no where near as quick to respond as you are. Many Thanks, Jack
  5. Greetings Pete, I hope this is the correct area of your forum to ask this. My head has been spinning the last few weeks trying to search for the answer (I'm seriously lacking in programming knowledge), with no luck so far... and I figured you would know the answer. I have an Opencockpits Mastercard, which I'm sure you know deals with SIOC. I've been able to figure out how to get a simple command of, say the parking brake, to connect to one of my Korry switches. The bottom LED is on when the switch is off (brakes off) and when the switch is in/on the top LED turns on. That's all well and fine, as there is the FSUIPC_INOUT, Offset $0BC8, Length 2... portion of the coding. Where I have an issue with is getting commands from LUA into that type of code. As an example, the LINDA software offers about 90% of the switch actions for the Majestic Simulations Q400. Using my Korry switch which is for the Left Engine Intake door with a Leo-Bodnar card as a joystick, I can set the switch to that door as either Open or Closed, but the LEDs don't work.. hence me doing it with SIOC. The only thing is that I can't figure out where or how to get the information from LINDA into SIOC. Here's the LUA lines from LINDA regarding the door, and also the SIOC I used for the parking brake, which you can see I put the offset in bold, if that helps... If you can help, it would be greatly appreciated! -Thanks, Jack function ICE_EngIntake_L_open () ipc.writeLvar("MJC_VAR_WRITE_VALUE", 1) ipc.writeLvar("MJC_VAR_WRITE_CODE", 70232) DspShow ("IntL", "open") end function ICE_EngIntake_L_close () ipc.writeLvar("MJC_VAR_WRITE_VALUE", 0) ipc.writeLvar("MJC_VAR_WRITE_CODE", 70232) DspShow ("IntL", "clse") end Var 0400, Value 0 // Inicialización / Var init Var 0001, Link FSUIPC_INOUT, Offset $0BC8, Length 2 // Var 0002, Link IOCARD_SW, Input 2 Type I // { IF V0002 = 1 { V0001 = 32767 V0003 = 0 V0004 = DELAY 1 700 } ELSE { V0001 = 0 V0003 = DELAY 1 700 V0004 = 0 } } Var 0003, Link IOCARD_OUT, Output 11 Var 0004, Link IOCARD_OUT, Output 12
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.