Jump to content
The simFlight Network Forums
GeorgeLev

Display Message

Recommended Posts

Hello,

I have been working on a display message with in FSUPIC to display the landing rate. I have got the message to show, the issue I am getting is the message showing then closing and then it will never show again.

public Offset<string> messageWrite = new Offset<string>(0x3380, 128);
public Offset<short> messageDuration = new Offset<short>(0x32FA);

string Message = "my message test";
this.messageWrite.Value = Message;
this.messageDuration.Value = 2;
FSUIPCConnection.Process();

^ Here is my code.

Share this post


Link to post
Share on other sites

Hi George,

Apologies for the delay in replying.

The reason it won't show after the first time is that the values of the offsets have not changed since the first time Process() was called. The DLL will not write normal offsets unless their values change.

To solution is to mark the offsets as 'Write-Only'. These type of offsets will be written every time Process() is called, even if the offsets values have not been changed. The messaging offsets are a good example of write-only offsets. You would never have to read value from them.

Because they are written on every process, you should also put them in their own group so that you can control exactly when they are written. (You process that group only).

Here are the offset declarations, placing them in their own group called 'message' and marking them as write-only: (Last parameter is set to true).

        private Offset<string> messageWrite = new Offset<string>("message", 0x3380, 128, true); 
        private Offset<short> messageDuration = new Offset<short>("message", 0x32FA, true); 

Here is the code for writing. It's the same except we are now processing the specific group.

            string Message = "my message test";
            this.messageWrite.Value = Message;
            this.messageDuration.Value = 2;
            FSUIPCConnection.Process("message");

Paul

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • 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.