Comments on: TimedProcessing https:/code-sample/timedprocessing/ Developer resources for the X-Plane flight simulator Sun, 14 Feb 2021 11:14:49 +0000 hourly 1 https://wordpress.org/?v=6.6.1 By: Fox Jo https:/code-sample/timedprocessing/#comment-39639 Sun, 14 Feb 2021 11:14:49 +0000 http://developer.x-plane.com/?post_type=code-sample&p=8060#comment-39639 Hi Rok Dolenc, can you contact me to: foxjojofox@gmail.com ?
Regards.

]]>
By: foxjojofox https:/code-sample/timedprocessing/#comment-39638 Sun, 14 Feb 2021 10:50:14 +0000 http://developer.x-plane.com/?post_type=code-sample&p=8060#comment-39638 In reply to Rok Dolenc.

Hi Rok Dolenc,

1) About gOutputFile = fopen(outputPath, “w”);
From http://www.cplusplus.com/reference/cstdio/fopen/
you can read: “w” write: Create an empty file for output operations. If a file with the same name already exists, its contents are discarded and the file is treated as a new empty file.

-> I don’t even understand why it doesn’t overwrite, but append. Strange and not logical ..

2) Here: https:/sdk/XPLMRegisterFlightLoopCallback/
you can read: inInterval defines when you will be called:
– Positive number to specify seconds from registration time to the next callback
– Negative number to indicate when you will be called (e.g. pass -1 to be called at the next cylcle)
– 0 to not be called; your callback will be inactive.

-> But for me the file (TimedProcessing.txt) is written about every 60/70 seconds instead of every second.

Have you found a solution?
Contact me on: foxjojofox@gmail.com

Regards.

]]>
By: Rok Dolenc https:/code-sample/timedprocessing/#comment-39447 Wed, 20 Jan 2021 09:17:15 +0000 http://developer.x-plane.com/?post_type=code-sample&p=8060#comment-39447 Hello!
This code works great. I am a student and I am making a project for myself to save data of X-plane in .txt file. Now I am editing this code but I couldn’t figure out where to set intervals how often Plugin saves data to .txt file. I know that sim data is recorded in 1 sec and it’s written in 241 lines every time in approximately 5 sec, but I want to record just one line of data and write it to .txt file every 0.1 sec. Can anyone help me with that? Basically what I need is code that saves data to .txt file every 0.1 sec, is this even possible?
Best regards
Rok

]]>