prius0304 Posted June 21, 2014 Report Posted June 21, 2014 Dear Pete I got a problem about PMDG 737NGX. Long time ago, I found a document called "Offset_Mapping_PMDG737NGX". It provides some ways to read data from FSUIPC. But now I'm making the MCP, I can't write data to NGX through the issue. Today, I heard a new way to send data to NGX and I took a try. Through FSUIPC's offset "3110", I can send data to NGX. For Example: The 737NGX's SDK defines EVT_MCP_AT_ARM_SWITCH (THIRD_PARTY_EVENT_ID_MIN + 380) So my program is(VB.net): Try FSUIPCConnection.Process() senderfs.Value = &H11000 + 380 '(THIRD_PARTY_EVENT_ID_MIN=0x000011000,senderfs is "offset 3110") Catch End Try It works, but I can turn the switch on, I can not turn the switch off. How can I return the value to 0? Can you show me the code? Thank you every much! Peter·Shen
Paul Henty Posted June 21, 2014 Report Posted June 21, 2014 This probably won't solve your problem but it needs correcting anyway: You need to set the data before you call Process(), not after. You should set the values of all variables you want to change and then the last thing is to call Process() to actually write that data. Like this: senderfs.Value = &H11000 + 380 '(THIRD_PARTY_EVENT_ID_MIN=0x000011000,senderfs is "offset 3110") ' Set other values here FSUIPCConnection.Process() Paul
prius0304 Posted June 22, 2014 Author Report Posted June 22, 2014 This probably won't solve your problem but it needs correcting anyway: You need to set the data before you call Process(), not after. You should set the values of all variables you want to change and then the last thing is to call Process() to actually write that data. Like this: senderfs.Value = &H11000 + 380 '(THIRD_PARTY_EVENT_ID_MIN=0x000011000,senderfs is "offset 3110") ' Set other values here FSUIPCConnection.Process() Paul Oh, Thank you very much. But indeed the data sending is the biggest problem. Thank you again!
prius0304 Posted June 22, 2014 Author Report Posted June 22, 2014 Pete I figure this out, But there is a problem. Such as the selector(Course_Selector), How can I transport data to NGX?
Pete Dowson Posted June 22, 2014 Report Posted June 22, 2014 Pete I figure this out, But there is a problem. Such as the selector(Course_Selector), How can I transport data to NGX? I don't use PMDG aircraft so I don't know the answer. It will either be by using one of the Events they support and listed in the PMDG SDK document, or possible by writing to local panel variables (L:Vars) if the aircraft uses such things. If neither way is possible, then it probably cannot be done directly. Maybe you can ask folks over in the PMDG support forum? There are defined events for operating the course selectors with parameters identifying the mouse operation to be made, thus simulating the user doing it with the mouse on screen. So one solution is to use the appropriate event, in a loop, reading the value from the relevant offset, until the desired value is reached. Pete
prius0304 Posted June 23, 2014 Author Report Posted June 23, 2014 I don't use PMDG aircraft so I don't know the answer. It will either be by using one of the Events they support and listed in the PMDG SDK document, or possible by writing to local panel variables (L:Vars) if the aircraft uses such things. If neither way is possible, then it probably cannot be done directly. Maybe you can ask folks over in the PMDG support forum? There are defined events for operating the course selectors with parameters identifying the mouse operation to be made, thus simulating the user doing it with the mouse on screen. So one solution is to use the appropriate event, in a loop, reading the value from the relevant offset, until the desired value is reached. Pete Thank you, Pete. I will try that!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now