Search the Community
Showing results for tags 'controls'.
-
NOTE: This guide references an out-dated method for controlling the PMDG aircraft in MSFS. While it might still work, a better method is explained in this linked FAQ: Background PMDG Aircraft for MSFS do not use the normal controls provided by the flight sim. This means that many of the aircraft's switches cannot be assigned to buttons and keys using the list of controls in the FSUIPC dropdown boxes. Assigning a standard control in FSUIPC will likely do nothing in the PMDG aircraft when the button or key is pressed. Solution Instead of using the standard list of controls shown in the FSUIPC dropdown box, users must send codes as a parameter to the standard MSFS 'Rotor Brake' control. The parameter code specifies which switch to operate and what type of mouse click to simulate. The control numbers vary for each aircraft and are listed in the SDK that is installed alongside the aircraft. This guide will show you, step-by-step: How to find the SDK files How to calculate the 'Rotor Brake' parameter codes How to assign the code to buttons/keys in FSUIPC The specific examples shown will be taken from the PMDG 737-700, but the same method works for any PMDG aircraft with an SDK. 1. Locating the SDK From your main Flight Sim install folder, open the PMDG folder. Then select the folder belonging to the aircraft you want to use. e.g. PMDG 737 NGXu Then select the SDK folder Locate the file with the .h extension. For the 737 it's called PMDG_NG3_SDK.h You can open this file with Notepad or your favourite text editor. As an example, the document you need for the 737 will be: [FlightSimInstallFolder]\PMDG\PMDG 737 NGXu\SDK\PMDG_NG3_SDK.h 2. Calculating the 'Rotor Brake' Parameter Code 2.1. Find the control you want to use. Search for the control by name, or look through the listed controls to find the one you want. They are helpfully grouped together by panel. The controls are listed under a comment: // Control Events You can search for this to find where the list of control numbers starts. As an example we'll use the "Autopilot CMD A" switch on the MCP. This is the relevant line in the 737 SDK: #define EVT_MCP_CMD_A_SWITCH (THIRD_PARTY_EVENT_ID_MIN + 402) To calculate the control number for this switch we ignore THIRD_PARTY_EVENT_ID_MIN and take the number after it. In this case 402. NOTE: Some controls reference other controls. For example: #define EVT_EFB_L_BACK (EVT_EFB_L_START + 1) For this you need to find the value of EVT_EFB_L_START and add 1. Searching for EVT_EFB_L_START we find this: #define EVT_EFB_L_START (THIRD_PARTY_EVENT_ID_MIN + 1700) As before, THIRD_PARTY_EVENT_ID_MIN is always ignored. So we get the value of 1700. Adding 1 to this will give us the value for EVT_EFB_L_BACK. Therefore EVT_EFB_L_BACK would be 1700 + 1 = 1701. We have now calculated the control number. 2.2. Adding the Mouse Action Code You now need to add a number to tell the aircraft what kind of mouse interaction you want to simulate. (e.g. left click, right click, scroll wheel up). First multiply the control number you have so far by 100. In our example for EVT_MCP_CMD_A_SWITCH we get: 402 * 100 = 40200 Now you ADD the following number, depending on the mouse operation you want: 1 for left mouse click 2 for right mouse click 3 for mouse move 4 for left mouse button release 5 for right mouse button release 6 for middle mouse button click 7 for mouse wheel up 8 for mouse wheel down For our example, we'll have our key assignment simulate the left mouse button clicking on the CMD A autopilot button. So we'll need to add 1: 40200 + 1 = 40201 Now we have the final code number. 3. Assigning the control to a button or key in FSUIPC Select [Assignments] -> [buttons + switches] or [key presses] in the FSUIPC7 menu. Then select the button or key to program. From the "control sent..." dropdown select Rotor Brake In the Parameter field below type in your calculated code number from the previous step. For our 'Autopilot CMD A' example, we enter 40201 If you're programming a key press, remember to press the [confirm] button. Here is our example control assigned to a button in FSUIPC: Your button or key press should now operate the switch in your PMDG aircraft.
-
Background PMDG Aircraft for FSX and P3D do not typically use the normal controls provided by the flight sim. This means that many of the aircraft's switches cannot be assigned to buttons and keys using the list of controls in the FSUIPC dropdown boxes. Assigning a standard control in FSUIPC will likely do nothing in the PMDG aircraft when the button or key is pressed. Solution Instead of using the standard list of controls shown in the FSUIPC dropdown box, users must use a different set of controls provided by PMDG for the specific aircraft. These are known as custom controls (or custom events). The custom controls vary for each aircraft and are listed in the SDK that is installed alongside the aircraft. This guide will show you, step-by-step: How to find the SDK files How to calculate the custom control numbers How to work out the parameter value How to assign the control to buttons/keys in FSUIPC The specific examples shown will be taken from the PMDG 737NGX, but the same method works for any PMDG aircraft with an SDK and custom controls (e.g. 777, 747). 1. Locating the SDK From your main Flight Sim install folder, or your MSFS Community folder, and open the PMDG aircraft folder Then select the folder belonging to the aircraft you want to use. e.g. PMDG 737 NG3 or pmdg-aircraft-737 Then select the SDK folder or Documentation\SDK folder for MSFS2020 Locate the file with the .h extension. For the 737 it's called PMDG_NG3_SDK.h (or maybe PMDG_NGX_SDK.h, depending on the sim and variant you are using) You can open this file with Notepad or your favourite text editor. As an example, the document you need for the 737 in MSFS2020 will be: [Community]\pmdg-aircraft-737\Documentation\SDK\PMDG_NG3_SDK.h 2. Calculating the control numbers 2.1. Find THIRD_PARTY_EVENT_ID_MIN The first thing to find is the definition of THIRD_PARTY_EVENT_ID_MIN. Search for the following text: #define THIRD_PARTY_EVENT_ID_MIN You will find a line like this (from the 737 file): #define THIRD_PARTY_EVENT_ID_MIN 0x00011000 // equals to 69632 Note the decimal value at the end. In the case above it's 69632. You will need this value to calculate the control number in the next step. 2.2. Find the control you want to use. Search for the control by name, or look through the listed controls to find the one you want. They are helpfully grouped together by panel. The controls are listed under a comment: // Control Events You can search for this to find where the list of control numbers starts. As an example we'll use the Autopilot CMD A swtich on the MCP. This is the relevant line in the 737 SDK: #define EVT_MCP_CMD_A_SWITCH (THIRD_PARTY_EVENT_ID_MIN + 402) To calculate the control number for this switch we just add 402 to the value of THIRD_PARTY_EVENT_ID_MIN we found earlier. 69632 + 402 = 70034 We have now calculated the control number. We will use this in step 4 to program the button/key. 3. Finding the parameter value PMDG controls need a parameter value. These can one of type types: 3.1. Mouse Click Codes (Shown in the example) You can use these to simulate a mouse click on the particular switch. Mainly it will be the left mouse button, but other clicks types are available (e.g. Right button, left double click etc). To find the codes for each type of click, search for MOUSE_FLAG You'll find a block of #define statements for each type of mouse click. Here are a couple of examples from the 737 sdk: #define MOUSE_FLAG_RIGHTSINGLE 0x80000000 #define MOUSE_FLAG_LEFTSINGLE 0x20000000 Find the click that you want to simulate and get the code. For example, we'll have our key assignment simulate the left mouse button clicking on the CMD A autopilot button. So we'll need 0x20000000 as the parameter value for the control. 3.2. Direct Values (Not shown in the example) Alternatively, some controls can accept a direct value to set the switch to a specific position. To find the direct values you need to look at the top part of the .h file to find the switch definition. These are named differently than the events so you need to search. Taking the battery selector switch as an example, we find the control: #define EVT_OH_ELEC_BATTERY_SWITCH (THIRD_PARTY_EVENT_ID_MIN + 1) For the parameter value we can find the same switch in the top part of the .h file: unsigned char ELEC_BatSelector; // 0: OFF 1: BAT 2: ON This tells us that in addition to mouse clicks, we can also send direct values. In this case: 0 for the OFF position, 1 for the BAT position and 2 for the ON position. It's possible to make a key or button set the Battery Selector directly to the ON position by setting the parameter value to 2 instead of a mouse click code. Simple ON/OFF switches will not have values listed (and will be declared as 'bool'). For these types of switches you can just pass the value 0 for OFF and 1 for ON. 4. Assigning the control to a button or key in FSUIPC Select the [buttons + swtiches] or [key presses] tab in FSUIPC and select the button or key to program. From the "control sent..." dropdown select <custom control> (it's near the top of the list) A popup window appears asking for the control number. Type in the control number you calculated in step 2. For our 'autopilot CMD A' example, we enter 70034 and click OK. The controls dropdown box will now show the control number in angled brackets. In the "parameter" box (below the controls dropdown), enter the parameter value from step 3. This can be a mouse click code or a direct value. Mouse Click Codes: Do not include the first 0 from the number listed in the PMDG SDK. Start with the x. With our example, we would enter x20000000 for the left-button single-click. Note that this code is in hexadecimal. FSUIPC will convert it to the equivalent decimal value. This is nothing to worry about. It's the same number. Entering the value in Hex is more convenient. Direct Values: Just enter the value as a number. Do not add the x at the start like mouse codes. If you're programming a key press, remember to press the [confirm] button. Here is our example control assigned to a button in FSUIPC: Your button or key press should now operate the switch in your PMDG aircraft.
-
Hello, I came across the problem where i binded my settings up just like in P3D V5 assigned the axis and etc. however when i closed FS2020 last night and open it this morning the sim recognized the hardware but nothing works in the sim itself. (keyboard, mouses (other than pan movement), saitek yoke and throttle and logitech rudders. FSUIPC7 is open and connected and still get no response out of the sim. Went into P3D v5 to make sure it wasnt my drivers and it wasnt. its odd this happened. Could it have something to do with the new update they just released for the sim?
-
Hi! I am having a strange issue with FSUIPC and P3D v4.3. I have browsed for solution, but haven't found anyone with the same issue. When I have FSUIPC installed, non registered version, the controls of the aircraft get stuck, I can't move them. I have tried with different aircraft, for example, on the FSLabs A320 I lost all controls. On the PMDG NGX I lost all controls, and also the trim wheel on the pedestral moves, but the trim value doesn't. On the PMDG 777 I can use the yoke, but can't move the thrust levers. If I remove FSUIPC, everything gets normal, however, I need it for the ACARS of my VA. This issue is happening after buying a new computer. Kind regards, Joao Nunes.
-
Hello Pete, This is the first time I can not properly operate your module in 10 years of use. I can not find the problem. 1. I recently uninstalled P3DV3 and fully installed P3DV4 on another hard drive. Everything works well. I can use widefs with planG on my remote PC for example. But when FSUIPC is present in the directory "modules", I can not open the doors of my A320 anymore (same for all planes), even with the keyboard and controls at the MCDU. Only the main door works. I also lost the operation of the auto-start engine right and left on the 2 buttons of my throttle (saitek yoke system). Same for gear toggle : Yoke button works fine only with a direct assignment into P3D. In fact, when installed, FSUIPC perfectly recognizes the button but nothing happens, while it works on the keyboard or P3D controls assignment. And worse, about the cargo door problem, I ask myself about many controls totally locked with their offsets invisibly forced. FSUIPC and wideFS are Registered (with an old mail adress, but it doesn't mind I hope) and installed as administrator with Windows defender disabled (not sure at each test). Joystick assignment is Inside P3D... I didn't tried with FSUIPC: Perhaps I would. Of course all the drivers are upgraded. My fps average is up than 80. 2. Here is all the files you probably need for a diagnostic. But everything seems to be correct. 3. I've noticed for exemple (Gear) : offset 3360 has no effect when tried with the LINDA console or FSUIPC button affected to FScontrol: Watching new offset: 3360:UB:DEC = 0 btn 06A30D670-1=00000000000001000010>>>00000000000001000001 rl: 06A30D670-1=00000000000001000010>>>00000000000001000001 bit 19 2 pr: 06A30D670-1=00000000000001000010>>>00000000000001000001 bit 20 [EVNT] OnPress Button detected PR:06A30D670:20 ++++++++ [hHID] Button OnPress 06A30D670_20/G: 0 [hHID] Button Repeat Cancel 06A30D670_20/nil ***** [hHID] Button Repeat Cancel 06A30D670_20/nil ***** [hHID] Button Repeat Cancel 06A30D670_20/nil ***** [hHID] Action unshifted 06A30D670/20 press call: nil [hHID] Button Execute 06A30D670/Gears_down btn 06A30D670-1=00000000000001000001>>>00000000000001000010 pr: 06A30D670-1=00000000000001000001>>>00000000000001000010 bit 19 rl: 06A30D670-1=00000000000001000001>>>00000000000001000010 bit 20 2 [EVNT] OnPress Button detected PR:06A30D670:19 ++++++++ [hHID] Button OnPress 06A30D670_19/G: 0 [hHID] Button Repeat Cancel 06A30D670_19/nil ***** [hHID] Button Repeat Cancel 06A30D670_19/nil ***** [hHID] Button Repeat Cancel 06A30D670_19/nil ***** [hHID] Action unshifted 06A30D670/19 press call: nil [hHID] Button Execute 06A30D670/Gears_up And Inside FSUIPC log I can read : 1482360 Button changed: bRef=0, Joy=2, Btn=19, Pressed 1482360 [Buttons] 1=P2,19,C65570,0 1482360 FS Control Sent: Ctrl=65570, Param=0 GEAR_TOGGLE 1482703 Button changed: bRef=0, Joy=2, Btn=19, Released Best regards. Christophe LEONARD (LFRC) FSUIPC5.ini FSUIPC5 Install.log
-
Hi Pete, Until a few days ago I was running P3D V2.3 with unregistered FSUIPC and the A2A C172 and all was good. I then registered FSUIPC, at which point it seems to have started to cause problems with the A2A C172, which no longer responds to control inputs, with the green bar message saying FSX Simconnect has encountered an error and will be restarted. I'm not sure where to start looking, as this error seems to be related to the FSUIPC activation (the error only started at registration) and all other aircraft (Q400, Realair Legacy, Carenado Bonanza, QW 146) seem to be completely unaffected. Any ideas? Thanks, Jamie p.s. I've also posted on the A2A forum to see if they have any ideas.