Jump to content
The simFlight Network Forums

Mario Noriega

Members
  • Posts

    10
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Mario Noriega

  1. Thanks for digging into this. It is very minor, as I can use InputEvents instead to map my controls. It will be nicer to get consistent behaviour from FS though.
  2. <UseInputEvent ID="PROCEDURE"> <INPUT_EVENT_ID_SOURCE>PROCEDURE</INPUT_EVENT_ID_SOURCE> <IE_NAME>APVSUP</IE_NAME> <SET_ARG_COUNT>1</SET_ARG_COUNT> <BINDING_SET_0>L0</BINDING_SET_0> <BINDING_SET_0_PARAM_0>2</BINDING_SET_0_PARAM_0> <BINDING_SET_0_EVENT_ID>AP_VS_VAR_INC</BINDING_SET_0_EVENT_ID> <BINDING_SET_0_EVENT_ID_ONLY>True</BINDING_SET_0_EVENT_ID_ONLY> <INC_CODE>1 (&gt;B:#INPUT_EVENT_ID_SOURCE#_#IE_NAME#_Set)</INC_CODE> <DEC_CODE>0 (&gt;B:#INPUT_EVENT_ID_SOURCE#_#IE_NAME#_Set)</DEC_CODE> <SET_CODE>1 (&gt;K:ALL_LIGHTS_TOGGLE)</SET_CODE> </UseInputEvent> You can add this script into the ModelBehaviors of any aircraft. For instance, the C-172 AS-1000. The Classic is encrypted. The file is Cessna172SP_AS1000_interior.xml. You can insert this at the file end, between lines 525 and 526 (in between </Component> and </Behaviors>. (Backup the original first!) If in doubt, let me know and I'll attach a modified file for you. The script above will do the blatantly nonsensical thing of toggling all lights when AP_VS_VAR_INC is requested. This removes the need to have KAP-140 to test this. Anything can go into SET_CODE. This is what an user said... https://devsupport.flightsimulator.com/t/xml-key-event-bindings-do-not-intercept-key-events-via-simconnect/8320 Cheers, Mario N.
  3. Hello John, Over at the MSFS Devsupport forums, they suggested that the GroupID/priority setting may be related to this. A MSFS Dev said that using my code snippet above, and feeding AP_VS_VAR_INC through the Simconnct SDK example 9modified) yielded the expected result, where my EventID interceptor did its job. Any Thoughts? I'd suggest that if this is a behaviour that can be changed, it shall possibly be a config option, so not to change the behaviour for all.
  4. Thanks John, I shall also ask over the MSFS Devsupport forums, the devs there may choose to do something about it. This is in a nutshell a SimConnect issue., as FSUIPC only sent a SimConnect Request. What MSFS does with that is beyond FSUIPC 🙂 Regards, Mario N.
  5. Hello, MSFS offers a facility that allows us developers to program in overrides for key events. This way we can intercept then, and do something else entirely. Example: AP_VS_VAR_INC --> (&gt;B:AUTOPILOT_KAP140_1_ALT_Push) (not actual XML code!) This causes the AP_VS_VAR_INC keyEvent to press the corresponding VS UP button on the MSFS KAP-140, instead of simply increasing VS target. AS a result the display on the JS gauge updates properly. All this works fine when the key event is mapped via MSFS control options The method however fails when FSUIPC sends the key event instead. This simply results in the key event executing instead. <UseInputEvent ID="PROCEDURE"> <INPUT_EVENT_ID_SOURCE>PROCEDURE</INPUT_EVENT_ID_SOURCE> <IE_NAME>APVSUP</IE_NAME> <SET_ARG_COUNT>1</SET_ARG_COUNT> <BINDING_SET_0>L0</BINDING_SET_0> <BINDING_SET_0_PARAM_0>2</BINDING_SET_0_PARAM_0> <BINDING_SET_0_EVENT_ID>AP_VS_VAR_INC</BINDING_SET_0_EVENT_ID> <BINDING_SET_0_EVENT_ID_ONLY>True</BINDING_SET_0_EVENT_ID_ONLY> <INC_CODE>1 (&gt;B:#INPUT_EVENT_ID_SOURCE#_#IE_NAME#_Set)</INC_CODE> <DEC_CODE>0 (&gt;B:#INPUT_EVENT_ID_SOURCE#_#IE_NAME#_Set)</DEC_CODE> <SET_CODE>1 (&gt;B:AUTOPILOT_KAP140_1_UP_Push)</SET_CODE> </UseInputEvent> I inserted the XML snippet as an example. Any ideas?
  6. Works a charm! THanks for the ridiculously fast update!
  7. Hello Again, Well, the aircraft is unreleased! It is C-22J Ventura for MSFS, currently available only for FS-X/P3D/FS9. (Do not try to investigate using the previous versions, as the MSFS edition is totally different!) Below a line from the macro: 1=L:LMAST_TOGGLE=Set,1 Every time (L:MAST_TOGGLE,bool) is set to 1, the aircraft code starts the L engine, or shuts it down depending on the current state. (L:MAST_TOGGLE,bool) is immediately reset to zero after starting the internal algorithm (programmed within the model behaviours XML). Another use case: 5=L:LVENT_PRESS=Set,1 This mtime, (L:LVENT_PRESS,bool) is supposed to operate a momentary button. Again, when set to 1, code in the A/C model behaviours XML is set into action. The code dry-cranks the engine until the LVar is released to zero. But since repeat does not work, it only flashes for an instant (I however could fix this by simply not having it reset in the code and having FSUIPC setting it to zero upon release). Hope this helps, however your description of how the CDAs work matches with my confusing description of an otherwise simple issue 🙂 Thanks again for all the hard work!
  8. Hello! So, I set up a more complex control setup for my buttons. It includes a macro to set som LVars that are then passed via the new WASM FSUIPC module. All works fine, except that if I press the same button again, nothing happens. In general terms, I have some buttons that set a L:variable to 1, then code inside the aircraft performs some actions and sets it back to zero. Pressing the button again results in the aircraft reverting what was done previously and resetting the L:Variable to zero. These are basically toggle buttons. The problem: FSUIPC ignores the second button press, unless I press another button (linked to a different L:Var) first. This also means that setting "repeat while held" does not work (as used for a pushbutton that disengages when released). That said, the flexibility of the system is excellent! This is mainly intended as a suggestion for future improvements. Best Regards, Mario N.
  9. It seems that I shall be moved to the "I do not know what I am doing" section as well. I shall proof read my posts, since the intent was to report on specific offsets. Master Battery does indeed work, it is 0x2E80 as you correctly state that is not working for me. I remember reading that thread you linked hence I suggested that something must have changed. Next up I may test a few more, or even go on a "scanning" mission...
  10. Ran a short test as I imported my control mappings from FSUIPC4. The following offsets are working (pardon me if this is the wrong place.¿: 0x3101 Alternator Set 0x281C Battery Set 0x0D0C Lights (NAV STROBE LAND TAXI BCN PANEL tested, SetBit) The following did NOT work: 0x281C, Avionics (It seems the logic behind this has been changed) We may want a place where people report what works and what not in an orderly fashion. I mean, just for offset reporting. "Why is this not working?" and "I do not know what I am doing" posts go somewhere else 😄 Hope this little contribution helps!
×
×
  • 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.