ark1320 Posted October 17, 2022 Report Posted October 17, 2022 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
John Dowson Posted October 17, 2022 Report Posted October 17, 2022 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
ark1320 Posted October 17, 2022 Author Report Posted October 17, 2022 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
John Dowson Posted October 17, 2022 Report Posted October 17, 2022 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 1
John Dowson Posted October 18, 2022 Report Posted October 18, 2022 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 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now