Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi John,

I have an application using the code event.offset(0x6050, "DBL","gps_course_fcn").  My question is, with a high precision ( I assume) data type like DBL, is there some tolerance you use to determine if the value has changed, or will any change in the "DBL" value trigger event.offset?

Also, will a subsequent event.offset call to the function gps_course_fcn kill an existing instance of that function?

Thanks,

Al 

Posted

Hi Al,

Any change in the offset value will trigger the event. However, there is a delta specified on request of the simvars for each offset, and so only changed values that differ by more than this delta value will be received.  This delta value for offset 0x6050 (GPS WP BEARING) is 0.009.

John

Posted

Great info, thanks John. A delta of 0.009 radians equates to a bearing change of about 1/2 degree.

And do subsequent event.offset function calls kill the previous call if it is still running? I'm asking because I have a delay [ ipc.sleep() ] in the called function.

Al

 

Posted
4 minutes ago, ark1320 said:

And do subsequent event.offset function calls kill the previous call if it is still running? I'm asking because I have a delay [ ipc.sleep() ] built into the called function.

No - you can have multiple event.offset calls on different offsets. if its on the same offset, I'm not sure of that is added or replaced without checking, but a simple test should reveal the answer to this.

John

  • Like 1
Posted

Sorry, I think I misunderstood your question...you are asking if event.offset  calls for the same offset will be queued? I don't think they will be, but it should be easy enough to test for this.

John

  • Upvote 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.