Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi,

I am using the FSUIPC .net wrapper and have FSUIPC beta 7.3.0.8 installed. I have latest version of PMDG 737-700 installed

I have this code (to enable Hdg Mode):

const uint MOUSE_FLAG_LEFTSINGLE		= 0x20000000;
FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_MCP_HDG_SEL_SWITCH, (int)MOUSE_FLAG_LEFTSINGLE);

But it does nothing. NOTE: The following works just fine:

FSUIPCConnection.SendControlToFS(66587, 39201)

So does this:

FSUIPCConnection.SendControlToFS(FsControl.AP_HDG_HOLD_ON, 0);
// or
FSUIPCConnection.SendControlToFS(FsControl.AP_HDG_HOLD, 1);

I would like to know why using the PMDG 737 NGX control enum it doesn't work? Again, using FSUIPC beta 7.3.0.8.

FYI- On another note:

The unlocked mapped offsets from PMDG 737 don't seem to work. When I try to read current heading (offset: 65CC), I get 0 back. I am referencing Offset Mapping for PMDG 737-700.pdf, dated JULY 2022.

lk

  • activex changed the title to PMDG 737 FSUIPC - Sending Hdg sel Switch event (Control)
Posted

Hi,

The PMDG_737_NGX_Control enum will not work with the MSFS PMDG aircraft. It was written for the FSX and P3D aircraft.

PMDG changed the way they handle controls in the new MSFS aircraft. Everything gets sent as a parameter to the built-in ROTOR BRAKE control.

As far as I know they have not finalised the SDK for the MSFS version. When they do I can build helpers into my DLL. Until then you can use this conversion code below to convert the old P3D control numbers into the new Rotor Brake parameters:

 

        public enum PMDGMouseCode
        {
            LeftClick = 1,
            RightClick = 2,
            MouseMove = 3,
            LeftRelease = 4,
            RightRelease = 5,
            MiddleClick = 6,
            WheelUp = 7,
            WheelDown = 8
        }

        private void sendPMDGControl(PMDG_737_NGX_Control control, PMDGMouseCode mouseCode)
        {
            // Convert P3D control to MSFS equivalent
            int msfsControl = (((int)control - (int)PMDG_737_NGX_Control.THIRD_PARTY_EVENT_ID_MIN) * 100) + (int)mouseCode;
            // Send converted control via RotorBrake 
            FSUIPCConnection.SendControlToFS(FsControl.ROTOR_BRAKE, msfsControl);
        }

E.g. Then you can send your control like this:

sendPMDGControl(PMDG_737_NGX_Control.EVT_MCP_HDG_SEL_SWITCH, PMDGMouseCode.LeftClick);

As for the PMDG offsets, you will need to ask @John Dowsonabout that. Usually the problem is that you haven't enabled the SDK broadcast in the PMDG .ini file.

Paul

Posted
17 minutes ago, Paul Henty said:

As for the PMDG offsets, you will need to ask @John Dowsonabout that. Usually the problem is that you haven't enabled the SDK broadcast in the PMDG .ini file.

As Paul suggests, check that you have enabled SDK broadcasts in the 737_Options.ini file. If that is the case, I am not sure why the offset isn't populated correctly, but it may be because the offsets have changed and the PMDG SDK still hasn't been updated to reflect this. Note the SDK still hasn't been published and the last confirmation I got from PMDG was for release 3.0.25, so I have had no updates on any changes since that version (current version is 3.0.31.

John

Posted

@Paul HentyThanks, your examples work.

@Jon Dowson I did enable the broadcast option, but somehow the change got overwritten once I launched the sim. Nevertheless, I fixed the ini file and the offsets I tried seem to work now.

 

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.