Jump to content
The simFlight Network Forums

WASM LVar module - Repeating inputs not registering


Mario Noriega
 Share

Recommended Posts

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.

 

Link to comment
Share on other sites

Hi Mario,

1 hour ago, Mario Noriega said:

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.

I'm not sure I fully understand this. Could you explain an actual use case, i.e. which lvar and which aircraft?

This may be due to the way client data areas function - if the data doesn't change (i.e. writing the same data, lvar +value) a second time won't be registered.
There was a similar issue recently related to executing calculator code - if you executed the same code twice, the second would be ignored. I got around this by sending a dummy calc code request after each one requested, just to reset the CDA. I probably need to do something similar for the various other CDAs that FSUIPC uses, i.e. to set lvars and activate hvars.

I will look into this next week, but a concrete example would help.

Thanks,

John

Link to comment
Share on other sites

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!

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • 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.