Jump to content
The simFlight Network Forums

Extracted PMDG parameters from Linda action.lua, what to do next?


mtjoeng

Recommended Posts

How do I/what's the simplest to create PMDG events functions list/file/luas/mcro to assign in Fsuipc (I'm a bit confused and rusty)
extracting is possible from LINDA PMDG action.lua, the ipc.control parameters for PDMG rotor brake (PMDG_EVT 66587)

useful f.i.:
PMDG_GLSD_MCP_AP_VNAV    38601
PMDG_GLSD_MCP_AP_LVLCHG    39101
PMDG_GLSD_MCP_AP_HDGSEL    39201
PMDG_GLSD_MCP_AP_LNAV    39701
PMDG_GLSD_MCP_AP_VORLOC    39601
PMDG_GLSD_MCP_AP_APP    39301
PMDG_GLSD_MCP_AP_ALTHLD    39401
PMDG_GLSD_MCP_AP_VS    39501
PMDG_GLSD_MCP_AP_CMDA    40201
PMDG_GLSD_MCP_AP_CMDB    40301
PMDG_GLSD_MCP_AP_CWSA    40401
PMDG_GLSD_MCP_AP_CWSB    40501
PMDG_GLSD_MCP_AP_TOGA    68401
PMDG_GLSD_MCP_AP_MASTER_on    40601 (toggle)
PMDG_PED_ENG1_cutoff    68801
PMDG_PED_ENG2_cutoff    68901
etc

I don't think I have to read the LVar state, just want push the button

 

Link to comment
Share on other sites

As I responded to your other post on this...are you sure that isn't for the P3D PMDG 737?

As @adnanso pointed out in this post, you should look in this file for the MSFS Rotor Brake control parameters: 
     ..\pmdg-aircraft-737\Documentation\PMDG\PMDG_NG3_VC_700.xml

You can then assign to the Rotor Brake control with the appropriate parameter, or create a preset. Also check the MF preset list (https://hubhop.mobiflight.com/) as one may already be available.

Link to comment
Share on other sites

..\pmdg-aircraft-737\Documentation\PMDG\PMDG_NG3_VC_700.xml
is too complex

the action.lua is a lot easier to extract from

The parameters are from the yesterday released LINDA module Beta PMDG 737 for MSFS v0.3 (17 May 2020) action.lua
"<X>:\FSUIPC7\LINDA\aircrafts\PMDG 737\actions.lua"

https://www.avsim.com/forums/topic/618937-beta-pmdg-737-for-msfs-v03-17-may-2020/
by ScotFlieger

 

 

 

Link to comment
Share on other sites

 

 

1 hour ago, mtjoeng said:

How do I/what's the simplest to create PMDG events functions list/file/luas/mcro to assign in Fsuipc (I'm a bit confused and rusty)
extracting is possible from LINDA PMDG action.lua, the ipc.control parameters for PDMG rotor brake (PMDG_EVT 66587)

useful f.i.:
PMDG_GLSD_MCP_AP_VNAV    38601
PMDG_GLSD_MCP_AP_LVLCHG    39101
PMDG_GLSD_MCP_AP_HDGSEL    39201
PMDG_GLSD_MCP_AP_LNAV    39701
PMDG_GLSD_MCP_AP_VORLOC    39601
PMDG_GLSD_MCP_AP_APP    39301
PMDG_GLSD_MCP_AP_ALTHLD    39401
PMDG_GLSD_MCP_AP_VS    39501
PMDG_GLSD_MCP_AP_CMDA    40201
PMDG_GLSD_MCP_AP_CMDB    40301
PMDG_GLSD_MCP_AP_CWSA    40401
PMDG_GLSD_MCP_AP_CWSB    40501
PMDG_GLSD_MCP_AP_TOGA    68401
PMDG_GLSD_MCP_AP_MASTER_on    40601 (toggle)
PMDG_PED_ENG1_cutoff    68801
PMDG_PED_ENG2_cutoff    68901
etc

I don't think I have to read the LVar state, just want push the button

 

 

I'v just checked against the XML file and cofirm that your Rotor Brake control parameters are correct😉

ie, I took here a snippet from the VNAV part : left click = (386 + 100)  + 1 = 38601

<!-- 386 - VNAV Switch Collins ############################# -->
		<Component ID="ngx_switch_386_a" Node="ngx_switch_386_a">
			<UseTemplate Name="ASOBO_GT_Emissive_Gauge">
				<EMISSIVE_CODE>(L:switch_3861_73X, number)</EMISSIVE_CODE>
			</UseTemplate>
			<UseTemplate Name="ASOBO_GT_Anim_Code">
				<ANIM_NAME>ngx_switch_386_a</ANIM_NAME>
				<PART_ID>NGX_SWITCH_386_A</PART_ID>
				<ANIM_LENGTH>100</ANIM_LENGTH>
				<ANIM_CODE>
						(L:switch_386_73X, number)
				</ANIM_CODE>
				<ANIM_LAG>0</ANIM_LAG>
			</UseTemplate>
			<UseTemplate Name="ASOBO_GT_MouseRect">
				<TOOLTIPID>VNAV</TOOLTIPID>
				<MOUSEFLAGS>LeftSingle+RightSingle+Move+LeftRelease+RightRelease+MiddleSingle+WheelUp+WheelDown</MOUSEFLAGS>
				<CURSOR>Hand</CURSOR>
				<CALLBACKCODE>
						386 100 * (&gt;L:SwitchID, number)

						(M:Event) 'LeftSingle' scmp 0 ==
						if{
						   (L:SwitchID, number) 1 + (&gt;L:SwitchID, number)
						}
						(M:Event) 'RightSingle' scmp 0 ==
						if{
						   (L:SwitchID, number) 2 + (&gt;L:SwitchID, number)
						}
						(...)

the advatage here is that you get also the name and type of the lvar that receives the actual state of the switch L:switch_386_73X, number

Link to comment
Share on other sites

11 hours ago, mtjoeng said:

The parameters are from the yesterday released LINDA module Beta PMDG 737 for MSFS v0.3

Ah, ok - I didn't know that had been released.

12 hours ago, mtjoeng said:

How do I/what's the simplest to create PMDG events functions list/file/luas/mcro to assign in Fsuipc (I'm a bit confused and rusty)
extracting is possible from LINDA PMDG action.lua, the ipc.control parameters for PDMG rotor brake (PMDG_EVT 66587)

useful f.i.:
PMDG_GLSD_MCP_AP_VNAV    38601
PMDG_GLSD_MCP_AP_LVLCHG    39101
PMDG_GLSD_MCP_AP_HDGSEL    39201
PMDG_GLSD_MCP_AP_LNAV    39701
PMDG_GLSD_MCP_AP_VORLOC    39601
PMDG_GLSD_MCP_AP_APP    39301
PMDG_GLSD_MCP_AP_ALTHLD    39401
PMDG_GLSD_MCP_AP_VS    39501
PMDG_GLSD_MCP_AP_CMDA    40201
PMDG_GLSD_MCP_AP_CMDB    40301
PMDG_GLSD_MCP_AP_CWSA    40401
PMDG_GLSD_MCP_AP_CWSB    40501
PMDG_GLSD_MCP_AP_TOGA    68401
PMDG_GLSD_MCP_AP_MASTER_on    40601 (toggle)
PMDG_PED_ENG1_cutoff    68801
PMDG_PED_ENG2_cutoff    68901

As they are rotor brake parameters, you can assign a button directly to the Rotor Brake control/event, and give the number as the parameter.

Alternatively, if you want to use them as presets, you can create a file called myevents.txt, and add them as follows:
    PMDG_GLSD_MCP_AP_VNAV#38601 (>K:ROTOR_BRAKE)
    PMDG_GLSD_MCP_AP_LVLCHG#39101 (>K:ROTOR_BRAKE)
    ...etc

Note however that most of these (if not all) already exist as MobiFlight presets but with different names:
    PMDG_GLSD_MCP_AP_VNAV    === PMDG_B737_MCP_VNAV_SWITCH
    PMDG_GLSD_MCP_AP_LVLCHG === PMDG_B737_MCP_LVL_CHG_SWITCH
    ...etc

These MF presets are not available in the current events.txt file included with FSUIPC7, but will be included in the next release (in the next few days). I've attached it below.

John

events.txt 

Link to comment
Share on other sites

Figured out how this events.txt file works (by comparing notes with the Mobiflight website). PMDG 737 is too WIP so some controls were missing but the solutions rather simple (if you know it it's simple) and added to the bottom of the events.txt f.i
 

//PMDG/B737-700/MPNL
PMDG_MPNL_AUTOBRAKE_inc#46007 (>K:ROTOR_BRAKE)
PMDG_MPNL_AUTOBRAKE_dec#46008 (>K:ROTOR_BRAKE)
//PMDG/B737-700/Additonal
PMDG_GLSD_AP_P_reset#33901 (>K:ROTOR_BRAKE)
PMDG_GLSD_AT_P_reset#34001 (>K:ROTOR_BRAKE)
PMDG_GLSD_FMC_P_reset#34101 (>K:ROTOR_BRAKE)
PMDG_GLSD_MCP_AP_BANK_inc#38902 (>K:ROTOR_BRAKE)
PMDG_GLSD_MCP_AP_BANK_dec#38901 (>K:ROTOR_BRAKE)
PMDG_GLSD_EFIS_FPV#36301 (>K:ROTOR_BRAKE)
PMDG_OVHD_EXTLT_TURNOFF_LEFT_on#11501 (>K:ROTOR_BRAKE)
PMDG_OVHD_EXTLT_TURNOFF_RIGHT_on#11601 (>K:ROTOR_BRAKE)

This events.txt you said is going to be part of a next release. Please consider like Mobiflight does, to allow for a events.user.txt (or something) so to read a separate user added controls file.

BTW the right modifier version FSuipc you let me test works like a charm, then again MSFS has the awful habit of having single key bindings 'bleed though' so most of right modifier bindings don't work because the single keystroke bleeds through, f.i. 12345..0 with right modifiers don't work for they will activate ATC option presses, and most alphabet do not either.

The available somewhat 'free' keystrokes that work with rights bindings I found were
F9 F10 F11 F12 ` ] [ \ ;

mixed with RALT (fortunately Ralt works) RCTRL RSHFT this creates 60 something options for my Voiceattack PMDG macro commands, and I used them all.

 
 
 
 
 
 
 
 
 
Link to comment
Share on other sites

11 hours ago, mtjoeng said:

This events.txt you said is going to be part of a next release. Please consider like Mobiflight does, to allow for a events.user.txt (or something) so to read a separate user added controls file.

This is already provided and is called myevents.txt - it is recommended to use thus file to add your own presets as the events.txt file will be updated/replaced when you re-install FSUIPC7. It is also recommended to submit any presets derived to the community-led MobiFlight HubHop preset list. Please see the Advanced user guide on using presets for details.

11 hours ago, mtjoeng said:

BTW the right modifier version FSuipc you let me test works like a charm

This was released yesterday in v7.3.4 (as well as including the latest MF events.txt file, amongst other updates/bug fixes).

11 hours ago, mtjoeng said:

then again MSFS has the awful habit of having single key bindings 'bleed though' so most of right modifier bindings don't work because the single keystroke bleeds through, f.i. 12345..0 with right modifiers don't work for they will activate ATC option presses, and most alphabet do not either.

Can you check this with the latest version as I think I have made further changes, but this does sound like an MSFS issue. If you don't want to use the MSFS key bindings, you can remove them - or set-up an empty profile for the keyboard as you would for other controllers if/when assigning in FSUIPC.

 

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.