June 6, 20187 yr When using the SDK to control the 737NGX I experience strange behavior when controlling the MFD buttons such as EVT_MPM_MFD_ENG_BUTTON and EVT_MPM_MFD_SYS_BUTTON. When I send a control with parameter 1 the button gets pressed and the MFD changes, but when I send a parameter -1, the button is released but the function is activated again, resulting in another change in MFD. How should I properly release the button press without activating the function again? Thanks! Emile van Gerwen. (737NGX on P3D v2.5) Emile van Gerwen.
June 6, 20187 yr Emile, it depends of the function. For example, pitch control cannot generally be turned on or off rather it changes from one mode to another. This is on the MCP and of course I reread and saw MFD......, I suspect the button has only a press value since they are spring loaded and do not stay in when pressed. Edited June 6, 20187 yr by downscc Dan Downs KCRP
June 10, 20187 yr Author Thanks for your response. In this case, you can see in the Virtual Cockpit that the button is pressed and keeps being down if I send it the "1" parameter. Furthermore, it is not possible to "press" it again by sending it another "1" so it looks like I really need it to "release" again. This does happen when I send it a "-1", but, and that is my problem, that triggers the function again. Regards, Emile van Gerwen, Emile van Gerwen.
June 10, 20187 yr That is interesting, because they operate on a mouse click as a momentary spring return button. May I suggest that you document the discrepancy in a trouble ticket, not sure it will lead to anything quickly but it might be of value in the development of NG3. Dan Downs KCRP
August 22, 20187 yr Author For others having the same issue: I found a solution to not set a value directly but to emulate a mouse click: MOUSE_FLAG_LEFTSINGLE = 0x20000000 # mouse click from PMDG SDK ipc.control(70095, MOUSE_FLAG_LEFTSINGLE) This is not showing the on-screen button pressed and released the same as the physical button but clicking the physical button presses and releases the on-screen button, just as it would at mouse click. Emile van Gerwen. Emile van Gerwen.
August 22, 20187 yr When setting controls directly, buttons and 2-position switches are boolean (0 and 1). In C++ 0 is 'false' and I think any other value that can be implicitly converted to a bool is 'true'. Examples from my NG in FSUIPC: 1=P1,6,C70316,1 ; EVT_CONTROL_STAND_TOGA1_SWITCH 1=Depress -{Custom control: <70316>}- 2=P1,3,C70319,1 ; EVT_CONTROL_STAND_TOGA2_SWITCH 1=Depress -{Custom control: <70319>}- 3=U1,6,C70316,0 ; EVT_CONTROL_STAND_TOGA1_SWITCH 0=Release -{Custom control: <70316>}- 4=U1,3,C70319,0 ; EVT_CONTROL_STAND_TOGA2_SWITCH 0=Release -{Custom control: <70319>}- 5=P1,5,C70314,1 ; EVT_CONTROL_STAND_AT1_DISENGAGE_SWITCH 1=Depress -{Custom control: <70314>}- 6=U1,5,C70314,0 ; EVT_CONTROL_STAND_AT1_DISENGAGE_SWITCH 0=Release -{Custom control: <70314>}- 7=P1,2,C70317,1 ; EVT_CONTROL_STAND_AT2_DISENGAGE_SWITCH 1=Depress -{Custom control: <70317>}- 8=U1,2,C70317,0 ; EVT_CONTROL_STAND_AT2_DISENGAGE_SWITCH 0=Release -{Custom control: <70317>}- Larry [email protected] HT, Maximus XI Code, 16GB TridentZ @ 4000, 2080Ti FTW3 Ultra Hydro, ekwb EK-KIT P360 water, 4K@30, W10 Pro, P3D v5.0
Archived
This topic is now archived and is closed to further replies.