ckovoor Posted December 17, 2015 Report Posted December 17, 2015 Hello Pete,While attempting to use a rotary encoder to emulate the Bank Angle Selector for a PMDG B777 hardware MCP, I discovered:(1) We have: EVT_MCP_BANK_ANGLE_SELECTOR (SDK value = 2181, Event ID = 71813)and possible Mouse Flags for mouse simulated events:MOUSE_FLAG_RIGHTSINGLE = 2147483648MOUSE_FLAG_LEFTSINGLE = 536870912MOUSE_FLAG_WHEEL_UP = 16384MOUSE_FLAG_WHEEL_DOWN = 8192(2) Sending the Control 71813 with parameters 8192 and 16384 has no effect.Sending the Control 71813 with parameter 536870912 (LEFTSINGLE) duly causes a decrement in the bank angle selected (as would a left-click on the screen location of the selector).However, FSUIPC will NOT accept the parameter 2147483648 (RIGHTSINGLE) even though the PMDG 777 bank angle selector does itself respond to right-clicks (... it increments the selected bank angle). I tried using the FSUIPC box in the FSX add-ons menu, and also writing it into the fsuipc.ini file, but FSUIPC overwrites it with the value 2147483647.Would you be able to tell me why this happens?(3) After some experimentation, I found that sending the control 71813 with the parameter 256 has the desired effect...i.e. MOUSE_FLAG_RIGHTSINGLE, and so I am able to achieve my aims.Would you be able to explain why the parameter 256 produces the same effect that 2147483648 should have? (I am guessing it has something to do with powers of 2, and storage limitations linked thereto.... :???:)Thank you for your time and patience, and for all you do to support our hobby. :)Warm Regards,Chakko.
Pete Dowson Posted December 17, 2015 Report Posted December 17, 2015 However, FSUIPC will NOT accept the parameter 2147483648 (RIGHTSINGLE) even though the PMDG 777 bank angle selector does itself respond to right-clicks (... it increments the selected bank angle). I tried using the FSUIPC box in the FSX add-ons menu, and also writing it into the fsuipc.ini file, but FSUIPC overwrites it with the value 2147483647. Would you be able to tell me why this happens? Yes, it is because the parameter in FSUIPC is signed (it needs to be as many controls use signed values), and the positive value 2147483648 cannot fit into a 32-bit signed value. Try -2147483648, or even x80000000. Either will work. Would you be able to explain why the parameter 256 produces the same effect that 2147483648 should have? No, sorry. That's a function of the FS mouse options in gauges. I expect the answer is in the Microsoft gauge SDK somewhere. I know all the mouse action values are single bits -- i.e. each of the 32 bits in the parameter has some specific meaning. Pete
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