Jump to content
The simFlight Network Forums

Assign buttons to transponder code


Recommended Posts

Moved to Main Forum

FSUIPC can assign joystick buttons to inc/dec radio frequencies, which is great!

Does something similar exist to set the squawk code? I coudn't find anything.

I see two options: Either as inc/dec for each of the four digits, or with seven numeric buttons, like the garmin transponders use.

I don't mind which one, but I need to order either rotary encoders or buttons for my little project...

Many thanks,

Stefan

Edited by Thomas Richter
Link to comment
Share on other sites

11 hours ago, scm@smurn.org said:

I don't mind which one, but I need to order either rotary encoders or buttons for my little project..

Really either would do, interchangeable 94 rotaries or 8 buttons) but probably best to assign to the INC/DEC controls anyway. Rotary encoders will be seen as two buttons, one for each direction, going "on" and "off" on alternate clicks. You could do it via the offsets -- even with FSUIPC inc/dec controls* -- but you aren't gaining anything. The individual FS controls are doing the same.

Pete

* The inc/dec controls, if you had one rotary (or two buttons) per digit would simple have the appropriate increment - x1000, x0100, x0010 or x0001, and limit - x7000, x0700, x0070 or x0007 respectively.

Pete

 

Link to comment
Share on other sites

  • 4 weeks later...

I've finally finished building the hardware, so I'm now able to actually try this.

Turns out that Xpndr 1/10/100/1000 inc/dec controls already exist that are perfect for my use-case.

I've also tried the inc/dec controls on the offset directly, but the problem is that manipulating higher digits sets the lower digits to 0. The Xpndr controls work fine!

Thanks for your help!

Link to comment
Share on other sites

11 hours ago, scm@smurn.org said:

I've also tried the inc/dec controls on the offset directly, but the problem is that manipulating higher digits sets the lower digits to 0. The Xpndr controls work fine!

The offset has all 4 digits in one encoded number, as a BCD value. The separate inc/dec controls are in any way easier to use unless you use a driver or plug-in to handle the values.

Pete

 

Link to comment
Share on other sites

  • 5 years later...

Pete retired several years ago.

16 minutes ago, DARSIM said:

I also still have problem to use offset for transponder digits and using mobiflight, will you help me what should I do for each digit control by an encoder?

What exactly is your problem? What FS and version of FSUIPC are you using? Have you tried the xpndr inc/dec controls? You can send use them with MobiFlight using offset 0x3110, which will send any control to the FS.

Link to comment
Share on other sites

Dear John

 

appreciate your reply.

my exact problem is that I have connected my encoders for 4 digits for transponder code to Arduino. in mobiflight I used the offset 0x0354. but I do not know how can I assign each encoder to its related digit?

 

regards

DARSIM

Link to comment
Share on other sites

3 minutes ago, DARSIM said:

in mobiflight I used the offset 0x0354. but I do not know how can I assign each encoder to its related digit?

Offset 0x0354 allows you to set the transponder code, but you would need to write the code you want to use there in BCD format. If you want to assign a rotary for changing each digit, use the xpndr controls via offset 0x3110:

66455   XPNDR_1000_DEC
65651   XPNDR_1000_INC
66456   XPNDR_100_DEC
65652   XPNDR_100_INC
66457   XPNDR_10_DEC
65653   XPNDR_10_INC
66458   XPNDR_1_DEC
65654   XPNDR_1_INC
 

e.g. to increase  by 100, you would assign the clockwise rotary button that changes the third digit to write 65652  to offset 0x3110.

John

Link to comment
Share on other sites

Dear John 

thanks again with your support,

I face another odd problem.

I used offset 0345 to set transponder frequency to 1200 by pressing the button, I set all the thing and when I press it the amount of 0430 is set in transponder in FSX???!!!

 

regards

DArsim

Link to comment
Share on other sites

9 hours ago, DARSIM said:

I used offset 0345 to set transponder frequency to 1200 by pressing the button, I set all the thing and when I press it the amount of 0430 is set in transponder

First, the offset is 0x0354, not 0345, and the offset is in BCD format, so you write 0x1200 to the offset, which is 4608 in decimal.

John

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.