HondaCop
-
Posts
27 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Downloads
Posts posted by HondaCop
-
-
BTW guys, I just want to give props to Paul, not only for this awesome DLL which has been a blessing for me, but for the OUTSTANDING support he provides. It's something that really needs to be brought out in the open. He's always available no matter what the question is and is extremely professional. My hats off to you, sir.
-
Your refresh rate really depends on what type of data you are getting and how you are using it. For example a black box flight recorder will require a high refresh rate (e.g. 30 times per second) whereas a moving map may only need to measure the aircraft position every few seconds.
Also within the same application you might want to run different timers that work with different offset groups (see my UserGuide for more info on Offset groups) at different frequencies. Some data you might need to collect many times a second, some you only need maybe once per minute.
Another way of doing that would be to use one fast timer and only process() the slower groups on every 10 ticks or whatever.
Realistically you wouldn't need to update faster than the FS framerate because the data is only going to be different between frames.
FSUIPC and my DLL can handle refresh rates of around 30 times per second (Timer Interval = 33ms) without a problem and this would be plenty fast enough even for a glass cockpit. You may even be able to go faster.
The other thing you need to consider is the performance of your own program. If the contents of the timer tick() method takes say 60ms to run then this will be the fastest you can run the timer even if you give it a lower interval (e.g. 40ms).
Basically, the rule of thumb is go as slow as you can get away with. If your application works fine with getting data every 60 seconds then there's not much point having a 100ms timer.
Paul
Thanks for the explanation, Paul. I will just keep the timer that I use to process all FSUIPC offsets at 100ms... :-)
-
Hello Paul,
Is there any advantage in running a timer at 100ms instead of 200mn or even slower? What would be the fastest timing to set a timer and not cause issues with FSUIPC and this DLL client?
-
Paul, sent you a PM.
-
Gotcha, thanks Paul...
-
That did the trick, Paul! Thanks!
BTW, pardon my ignorance, but do we still need to have a reference to the fuel tank's FSUIPC offset in order for your Payload Services class to work or no? I want to update my code to use the PS instead of directly calling the offset and I was wondering if that offset still needs to be set.
-
Paul, that was exactly what I needed! Only thing is that I don't understand VB... Do you have those samples in C#?
BTW, I did contact the author of XPUIPC and there is indeed an offset that tells you if the sim is X-Plane or not... For those interested, it's 0x6FFF... If the sim is XP, then it returns a 1 otherwise it's a 0.
-
Paul,
I am having a little problem. How can I set the aircraft total payload to ZERO when connected to FS2004?
According to the FSUIPC SDK for FS2004, payload can be accessed via 0x1400 with a size of 48 x n, but I have no clue how to code it so that I can set the total payload to zero.
Any help would be greatly appreciated!
-
I'm not really sure. I think the whole point of XPUIPC is to spoof the FSUIPC interface and report that FSX is running. If it didn't then some FSUIPC applications would not work with it as they check for a specific version of FS. Also there doesn't seem to be an ID number reserved for XPlane in the FSUIPC SDK documentation.
I can only suggest contacting the makers of XPUIPC and see if they have a way you can detect it. They may have a way of reporting a different version number than FSX, or maybe they have some special offset you can check.
Paul
That makes sense, Paul... Will contact them. Thanks!
-
Paul, I loaded up X-Plane 10.21 along with XPUIPC and my App along with your client DLL worked very nicely! As far as I was able to see, everything worked as if it was FSX running! I do have a question though. How can I detect that it's X-Plane running and not FSX? My app displays FSX as the sim running. Any ideas?
-
I saved the Excel loaded version as an xlsx file, which is then recognised and loaded okay in Access, which includes the id and id2 fields.
That did the trick, Pete! Thanks!!
-
Thanks for the reply, Pete. I will try what you did with Excel and see how it goes.
-
Hello Pete,
I downloaded your MakeRunways utility and when I tried importing the runways.xml file into an Access database, it imports fine but with one issue. It will not create an ICAO ID column for the airports or runways.
It will show all airports, one per row, but the ICAO column is not displayed.
Is there a way to have the XML tell Access to create a coumn for ICAO ID as well?
-
Hi Paul, first of all, thanks for this client DLL!!!
Ok, I downloaded the .NET 4.0 version of your client and was wondering if it would still work if compiled with VS2012 and targeting .NET 4.5?
Reason being is that I need to make a Windows 8 compatible version of my application...
Thanks in advance...
-
No, other than the strange coincidence that it is almost identical to the one I found. Weird.
Try deleting that section altogether so it gets a default size and position.
The window used is the same one as used by FS's own ATIS and other notifications. Do you not see those either?
That is, unless you are using a mult-line message? I think that might mbe a different one. are there any more similar sections?
Pete
I deleted ALL FLT files and let FS rebuild one when I booted it up. Still the same issue. It will display the text when in windowed mode. But when it's in full-screen mode, it will not display the text. This is really weird. Don't know what else to check or do. And no, I'm not using a multi-line message. It's just a small text about 30 characters long. I even made sure the show ATC messages is ENABLED in the FS settings.
-
It's always worked okay in either mode. Are you sure it isn't there but sized wrongly or off-screen? FS keeps a record of the window size and position in the FLT files, so it could be different for each saved flight. See the section like
[Message Window]
Undocked=False
ScreenUniCoords=64, 200, 8064, 435
UndocCoords=0, 0, 0, 0
Note that you can't normally have an Undocked window in full screen mode -- maybe that's your problem?
Pete
Ok Pete,
I am using the PMDG 737 for FS9 and when I check the FLT file for the previous flight, it shows this entry:
[Message Window]
Undocked=False
ScreenUniCoords=64, 200, 8064, 100
UndocCoords=0, 0, 0, 0
Any thoughts?
-
I'm pretty certain it's not because of getting the offset size wrong. I can't say why it doesn't show in full screen though - Pete will have to address that.
Yes, it doesn't mean place a character '0' at the end, it means the last byte in the character array (string) must have the value 0. In any case, you don't need to worry about such things as my DLL takes care of all the string processing for you.
Paul
Oh ok, thanks for that info, Paul. I am all set, the text display works BUT only in windowed screen. Now I just need to figure out why it won't display in full screen. :-( Hopefully Pete will have a solution.
-
This won't solve your problem, but you need to take care with your offset sizing. Both 0x3302 and 0x32FA are marked a 2 Bytes in the FSUIPC documentation. You have declared them as 'int' which is 4 bytes. When you write to these offsets you are also writing data (0) into the adjacent offsets. Many times you won't notice, but such mistakes could have very bad effects.
See my User Guide supplied with the FSUIPC Client DLL for an explanation and table of what .NET types to use for each type of FSUIPC offset.
For 2 bytes integer data you need to declare the offset as 'short' or 'ushort', not 'int'.
BTW, The FSUIPC docs seems to suggest that 0x3302 is readonly:
Paul
Gotcha Paul! I will change those offsets from INT to SHORT. One thing I have noticed is that the text will ONLY appear when FS is in windowed mode. It will NOT display when in FULL-SCREEN mode. Could this be caused by the offset being set as INT and not SHORT? Or is this problem something else? Another thing... Docs say that the text string has to be terminated by a 0. How does one go about doing this? I figured that whatever text I send, the last character would be 0 but when I do this, the text itself shows a 0 on the text being displayed.
-
It sounds like you are using FSUIPC4 and FSX? As documented in the FSUIPC4 Offsets Status dicument, which should be the reference you are using, thast facility isn't implemented for FSX. I have no way to implement it.
Regards
Pete
Sorry Pete, I am using FSUIPC 3.99 and FS9... Should've told you that from the beginning.
-
Sorry I know nothing at all about C#. It doesn't look anything like C to me! I hope some other C# programmer can help you.
Regards
Pete
Pete,
This code:
Offset<int> displaytextcolor = new Offset<int>(0x3302);
Will allow me to write to the offset. So by doing the following:
displaytextcolor.Value = 0;
allow me to change the text from RED to WHITE?
I know you said you don't know C# but I just want to make sure that by writing a 0 to that offset, forces the display text to be white instead of the typical red.
UPDATE: Just tried it and the display still shows up as RED on a green, translucent background. Any ideas? Thanks.
-
Check the appropriate offsets list for your version of FS. They are all listed in the documents supplied in the FSUIPC SDK. Look initially at 32FA, the control word.
Regards
Pete
Hi Pete!
Ok, I found the offset which is 3380 and the control is 32FA. Would the following work in C#:
Offset<string> displaytext = new Offset<string>(0x3380);
Offset<int> displaytexttimer = new Offset<int>(0x32FA);
I placed the following inside a button click action just to test things out:
displaytext.Value = (string) "THIS IS A TEST0";
displaytexttimer.Value = 5;
When I try to debug the prgram, Visual Studio is giving a compile error like this:
$exception {"Must set a size set for ArrayOrStringLength for Byte[], BitArray or String."} System.Exception
Any ideas? It's been 3 years since I coded in C# and I am super rusty. Thanks for the help.
UPDATE: Nevermind, Pete... I figured it out. Just had to add the BYTE LENGTH to the string (0x3380, 128) and now it works. Thanks!
-
Hello all,
I have a C# program which interacts with FS and I was wondering what would be the offset to use, in order to display TEXT within FS's display? I want to show the pilot some information while he is flying. Thanks for any help.
-
I guess I'll have to wait till Pete is back from vacations, if I am going to get an answer on this.
-
FSUIPC Client DLL for .NET - Version 2.0
in FSUIPC Client DLL for .NET
Posted
Thanks, Ian... Well deserved for Paul!