Skip to content

Pressing the cdu buttons. #79

Answered by EvenAR
alptugidin asked this question in Q&A
Discussion options

You must be logged in to vote

In the PMDG SDK docs they use SimConnect_SetClientData for writing control events. With node-simconnect that would be something like this:

const PMDG_NG3_CONTROL_NAME = "PMDG_NG3_Control"
const PMDG_NG3_CONTROL_ID = 0x4E473333
const PMDG_NG3_CONTROL_DEFINITION = 0x4E473334

const dataToSet = new RawBuffer(0);
dataToSet.clear();
dataToSet.writeInt32(THIRD_PARTY_EVENT_ID_MIN + 573); // EVT_CDU_L_A found in PMDG_NG3_SDK.h
dataToSet.writeInt32(1); // 100 gave me a SIMCONNECT_EXCEPTION_OUT_OF_BOUNDS 

handle.mapClientDataNameToID(PMDG_NG3_CONTROL_NAME, PMDG_NG3_CONTROL_ID)
handle.addToClientDataDefinition(PMDG_NG3_CONTROL_DEFINITION, 0, 64, 0, 0) // 64 bits
handle.setClientData(PMDG_NG3_CONTRO…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by EvenAR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #77 on May 31, 2023 19:47.