Jump to content
The simFlight Network Forums

Xpndr digits right shift ...


Recommended Posts

Hi Peter,

I am keen to emulate the typical pushbutton transponder that will enter the selected number (0 - 7) as the highest numeral and shift the digits to the right one position.

As far as I can tell, there are no combinations offsets via fsuipc that achieve this, and am assuming this needs to be done with a combination of storing some variables and processing.

Happy to cut some code but need some advice on how to approach this with fsuipc ... not quite sure where to start as I've only done pretty simple button assignments in the past.

Cheers,

Tony

Link to comment
Share on other sites

I am keen to emulate the typical pushbutton transponder that will enter the selected number (0 - 7) as the highest numeral and shift the digits to the right one position.

Is there one that does that? All those single selector ones I've encountered work the other way, shifting to the left so the first digit entered is the first one in the transponder code. Otherwise you'd need to enter the code backwards which could introduce errors.

As far as I can tell, there are no combinations offsets via fsuipc that achieve this, and am assuming this needs to be done with a combination of storing some variables and processing.

You can certainly do it with a small Lua plug-in. you could probably do it with a sequence of keystrokes, switching from one decoding to the next by clever use of flags, but I think the Lua plug-in approach would be easier.

Happy to cut some code but need some advice on how to approach this with fsuipc ... not quite sure where to start as I've only done pretty simple button assignments in the past.

In your FSUIPC Documents folder, in the FS Modules folder, you'll find the Lua plug-ins documentation and examples. Have a look at that lot first.

Regards

Pete

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.