Jump to content
The simFlight Network Forums

cwhelchel

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by cwhelchel

  1. Thanks for the advice. I'll try it. But I have a feeling the problem stems from my end of things. The lat/long only gets updated at an 8 Hz rate and I write out the position much faster than that. Anyway I'm looking somewhere else for a lat/long with a higher update rate. Thanks Again! Cainan
  2. I have a question that has probably been answered here before.... I'm using a seperate sim and want to move a plane in MSFS. Currently I do all the conversions and write latitude, longitude, alt, pitch, bank, etc. in a timer at 25ms. This way is exceptionally jerky. I've seen a post in this forum about this problem but it seems like the solution was to use two computers talking with WideFS. I am currently trying to use threads, but they don't seem to work much better. Does anyone know a way to get the jerkiness out of Flight Sim. Thanks, Cainan
  3. It's in a application seperate from FS9. My code, though, probably wouldn't work on a remote machine. Because the functions that send keystrokes will send to apps running on the local machine only (as far as I know they can't do it on local machines). Maybe sending Windows Messages with WM_KEYUP and WM_KEYDOWN might work over ethernet. I wouldn't know because I've never done anything like that. Sorry I can't help any further. Now it's time for someone else to chime in with their two cents. :D
  4. This is what I did to send some keypresses to fs. Its a very dirty approach but I finally got it to work. What it does is send Ctrl+2 to make active camera to change a preset view. if (fsStartedIdle) { counter += 1; keybd_event(0x11,0,0,0); SendKeys.Send("2"); if (counter > 25) { fsStartedIdle = false; counter = 0; keybd_event(0x11,0,2,0); } } the keybd_event function is in the user32.dll and SendKeys is part of .Net Framework. Note that the program has to have focus for these to work. This code will hold down Ctrl and spam 2 key. After a certain amount of time it releases the Ctrl and exits the loop. Code is kinda ugly too =]
  5. I used the offset at 0x3110 to send in FS Controls such as Pan_Right or Pan_Left. I disabled the joystick in FS and with my program can capture joystick hat switch movements and send in something like this: bReturn = f.FSUIPC_Write(0x3110, PAN_RIGHT,ref token, ref result); This makes FS pan right even though the joystick is disabled. PAN_RIGHT is equal to the value in the fs control list. You should be able to do the same sort of thing with your vr software if you have the correct FS Controls
  6. :lol: Thanks!!! I had just stumbled across that when my email poped up saying there was a reply to this topic. Guess I should learn to read! Keep up the good work! -cainan
  7. Thanks for you answer, Pete!! This makes sense. I didn't realize that the joystick wouldn't be creating messages whereas key presses will. Does it ever! :lol: Here's a follow up question. In your programming section in FSUIPC for buttons + switches, you can program a joystick button to Pan Right, Down, Up, etc. Is it possible to do a fsuipc_write to an offset like 0x3126 (view control) and make FS pan in whatever direction I want (in virtual cockpit)? Or is there any other way to send the Pan commands? What I want to do is have my application work like a aircraft TV or Infared sensor. Using the hatswitch I could move the virtual cockpit around acting as the sensor, but I don't want to be able to move it 360 degrees either up or down. This would not be realistic at all. If I could find a way to get the joystick under my control I could put in some "mechanical stops" and keep the "sensor" from being upside down. Thanks again! -cainan
  8. I've read part of the FSUIPC for programmers documentation and had a question I was hoping someone here could answer. In the Hot Key's for Applications, in byte 2 (bit 1), there is a flag that keeps a hot key from being passed onto Flight Sim. This traps the key and keeps it from being used in FS? Or does it work in some other way? Also, my main question, is there the same trapping support with the Hot Joystick Buttons? I have used FSInterrogate to monitor joystick buttons (specifically the hat switch) and found that it works to the extent that it will tell if a button is pushed, released, or both. Thanks, -cainan
×
×
  • 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.