Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Dear Pete

 

I got a problem about PMDG 737NGX. Long time ago, I found a document called "Offset_Mapping_PMDG737NGX". It provides some ways to read data from FSUIPC.

But now I'm making the MCP, I can't write data to NGX through the issue.

 

Today, I heard a new way to send data to NGX and I took a try. Through FSUIPC's offset "3110", I can send data to NGX.

 

For Example:

 

The 737NGX's SDK defines EVT_MCP_AT_ARM_SWITCH (THIRD_PARTY_EVENT_ID_MIN + 380)

So my program is(VB.net):

 

Try
            FSUIPCConnection.Process()
            senderfs.Value = &H11000 + 380  '(THIRD_PARTY_EVENT_ID_MIN=0x000011000,senderfs is "offset 3110")
        Catch
 End Try
 
It works, but I can turn the switch on, I can not turn the switch off.
 
How can I return the value to 0? Can you show me the code?
 
Thank you every much!
 
Peter·Shen
Posted

This probably won't solve your problem but it needs correcting anyway:

 
You need to set the data before you call Process(), not after. You should set the values of all variables you want to change and then the last thing is to call Process() to actually write that data. Like this:

    senderfs.Value = &H11000 + 380  '(THIRD_PARTY_EVENT_ID_MIN=0x000011000,senderfs is "offset 3110")
    ' Set other values here
    FSUIPCConnection.Process()

Paul
Posted

 

This probably won't solve your problem but it needs correcting anyway:

 
You need to set the data before you call Process(), not after. You should set the values of all variables you want to change and then the last thing is to call Process() to actually write that data. Like this:

    senderfs.Value = &H11000 + 380  '(THIRD_PARTY_EVENT_ID_MIN=0x000011000,senderfs is "offset 3110")
    ' Set other values here
    FSUIPCConnection.Process()

Paul

 

Oh, Thank you very much. But indeed the data sending is the biggest problem.    Thank you again!

Posted

Pete I figure this out, But there is a problem.

 

Such as the selector(Course_Selector), How can I transport data to NGX?

 

 

I don't use PMDG aircraft so I don't know the answer. It will either be by using one of the Events they support and listed in the PMDG SDK document, or possible by writing to local panel variables (L:Vars) if the aircraft uses such things. If neither way is possible, then it probably cannot be done directly. Maybe you can ask folks over in the PMDG support forum?

 

There are defined events for operating the course selectors with parameters identifying the mouse operation to be made, thus simulating the user doing it with the mouse on screen. So one solution is to use the appropriate event, in a loop, reading the value from the relevant offset, until the desired value is reached.

 

Pete

Posted

I don't use PMDG aircraft so I don't know the answer. It will either be by using one of the Events they support and listed in the PMDG SDK document, or possible by writing to local panel variables (L:Vars) if the aircraft uses such things. If neither way is possible, then it probably cannot be done directly. Maybe you can ask folks over in the PMDG support forum?

 

There are defined events for operating the course selectors with parameters identifying the mouse operation to be made, thus simulating the user doing it with the mouse on screen. So one solution is to use the appropriate event, in a loop, reading the value from the relevant offset, until the desired value is reached.

 

Pete

Thank you, Pete. I will try that!

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.