Jump to content
The simFlight Network Forums

Offset3110 and ngx problem


Recommended Posts

Hi,pete

When I put 1 to offset3114 and 70193(EVT_CDU_L_1 , 69632 + 561,e.g.) to 3110,then white FSUIPCConnection.Process();(I use C# and FSUIPC Client DLL for .NET of course),the pmdg CDU just show me "1" once,and then I push the button again,no response.Here s the program:

... ...

private Offset<int> test1 = new Offset<int>(0x3110);

private Offset<int> test2 = new Offset<int>(0x3114);

... ...

private void button1_Click(object sender, EventArgs e)

{test2.Value=1;

test1.Value=70193;

FSUIPCConnection.Process();}

... ...

But,when I write the program like below,the CDU can display the number every time I press the button,BUT,the number isn t "1",it becomes "11",every time show me twice !

private void button1_Click(object sender, EventArgs e)

{test2.Value=1;

test1.Value=70193;

FSUIPCConnection.Process();

test2.Value=0;

test1.Value=70193;

FSUIPCConnection.Process();}

Please,help me to solve this problem.pmdg,fsuipc,c#client,which one I used in a wrong way,Thanks!

Best regards from far east

Link to comment
Share on other sites

When I put 1 to offset3114 and 70193(EVT_CDU_L_1 , 69632 + 561,e.g.) to 3110,then white FSUIPCConnection.Process();(I use C# and FSUIPC Client DLL for .NET of course),the pmdg CDU just show me "1" once,and then I push the button again,no response.Here s the program:

 

...

 

Please,help me to solve this problem.pmdg,fsuipc,c#client,which one I used in a wrong way,Thanks!

 

Are you sure it isn't a problem with the way the PMDG controls work? That would seem to be more likely to me.

 

I'm afraid I can't really help much more than that, because I don't use the NGX and I don't know C# or the DLL you are using -- for support of Paul Henty's DLL you should really post to the FSUIPC Client DLL for .NET subforum. For PMDG support try the PMDG support forum.

 

One other way to test would be using a Lua plug-in. Try this:

 

ipc.writeUD(0x3114, 1)

ipc.writeUD(0x3110, 70193)

 

Save that as, say, "test.lua" into the FS modules folder, then assign a keypress or button to "lua test" in order to execute it.

 

Using Lua to test and develop ideas is very useful. It is a good "prototyping" method.

 

[LATER]

I had a peek at the list of controls in the PMDG SDK header, and it appears there's a different control for each character you wish to enter into the scratchpad. I don't see there's a reason for the parameter in 3114. That would explain why your sequence:

 

{test2.Value=1;

test1.Value=70193;

FSUIPCConnection.Process();

test2.Value=0;

test1.Value=70193;

FSUIPCConnection.Process();}

 

displays '11'.

 

Why not just try writing to 3110 only, maybe clearing 3114 to 0 initially in case it does change the meaning of the function (i.e. in case the '1' was the reason it didn't work).

 

Regards

Pete

Link to comment
Share on other sites

hello,Pete

Although I don't know exactly which step I write wrong,I finally find a way,let pmdg do the right things,via fsuipc.(btw,sorry about my english)

I have tried these lua things you taught me,like ipc.writeUD or ipc.control or keypress section's [custom control] way.If I send a control event and a parameter 1,All these methods show me the same situation like we talked before,it's just show '1' one times and no response any more.

Then I go back to read the pmdgsdk PDF again,find out there is another way to control.Not write 1 or 0 to the parameter offset3114,but write 0x20000000 or 0x40000000 (etc)to 3114,these numbers mean some mouse operations ,like left click and so on.

So,finally,let the pmdg to do the right things.

Thank you Pete,just want to say thank you again.Thanks for writing such a great software!

Best Regards

Edited by Starken
Link to comment
Share on other sites

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.