Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hello Peter!

 

I'm still working on the MCP. There are some problems.

 

I transfer data to PMDG 737NGX by FSUIPC. And the offset is 3110.

 

3110: Operates a facility to send any ‘controls’ to Flight simulator.

This works with all versions of FS & CFS. Write all 8 bytes for
controls which use a value (axes and all _SET controls), but just
4 will do for ‘button’ types.
This is really two 32-bit integers. The first contains the Control
number (normally 65536 upwards), as seen in my FS Controls
lists. The second integer is used for the parameter, such as the
scaled axis value, where this is appropriate. Always write all 8
bytes in one IPC block if a parameter is used, as FSUIPC will
fire the control when you write to 3110.
Since version 3.40, FSUIPC-added controls (other than the offset
ones) can be used via these offsets too. See the Advanced User’s
Guide for a current list.

 
 
And I found the SDK about 737NGX. There are two ways to send MCP data.
 
Texts in PMDG_NGX_SDK.h
 
#define THIRD_PARTY_EVENT_ID_MIN         0x00011000 // equals to 69632

#define EVT_MCP_COURSE_SELECTOR_L (THIRD_PARTY_EVENT_ID_MIN + 376)                          //this is the first one
#define EVT_MCP_CRS_L_SET (THIRD_PARTY_EVENT_ID_MIN + 14500)               // Sets MCP course specified by the event parameter    the second one
Problem is I can add numbers to the MCP course selector But I can not minus it.
 
My program is (VB.net)
 
Dim senderfs As Offset(Of Int64) = New FSUIPC.Offset(Of Int64)(&H3110)

senderfs.Value = &HFFFFFFFF00000000 + &H11000 + 376
FSUIPCConnection.Process()
How can I minus or tranfer value directly to 737 ?

 

Posted

Sorry I do not have or know much about the PMDG aircraft. If its own controls do not accept negative values then you will need to find another way. But looking at the descriptions of the controls you are using:

 

#define EVT_MCP_COURSE_SELECTOR_L (THIRD_PARTY_EVENT_ID_MIN + 376) //this is the first one

 

What do you think this actually does?  Most things in the list seem to operate by using the mouse system, so the parameter is probably a set of mouse flags. I expect you need left mouse click or right there. You are proably lucky that a +1 parameter looks enough like the correct mouse click for an increment.

 

The second one looks more useful:

 

#define EVT_MCP_CRS_L_SET (THIRD_PARTY_EVENT_ID_MIN + 14500) // Sets MCP course specified by the event parameter

 

This seems to say it sets the course value directly, by parameter.

 

Pete

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.