FSDeveloper Community

Go Back   FSDeveloper Community > Tools > Tools programming

Reply
 
Thread Tools Display Modes
  #1  
Old 01-02-2010, 16:08
Simon853 Simon853 is offline
 
Join Date: Jan 2007
Posts: 484
You can set up a Windows timer in your executable that calls a function every so many milliseconds and then put all your FSUIPC code in there to get the data and update your local variables, i.e.

This will setup a timer that runs every 55 milliseconds, which is roughly equivalent to the FS update rate or 1/18 seconds.
Code:
int timerId;
timerId = SetTimer(NULL,0,55,TimerCallbackProc);
This is the function that will be called:
Code:
static VOID CALLBACK TimerCallbackProc(          HWND hwnd,
    UINT uMsg,
    UINT_PTR idEvent,
    DWORD dwTime)
{
/* your code goes here */
}
Hope this helps.

Si
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ADE and FSUIPC dh84 Airport Design Editor 4 25-01-2010 11:56
Update on Failure Modes Dutch SimConnect 0 11-03-2009 09:10
Working Clock ubeulr BGLC tweaking 19 07-03-2008 21:09
SimConnect Simulator Variables FlapsOut SimConnect 3 12-06-2007 19:24


All times are GMT -4. The time now is 20:35.

Kirsch designed by Andrew & Austin


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.