The simFlight Network Forums

What does 2^1 in the "use" column mean?

Recommended Posts

Dear all,

What does 2^1 in the "use" column mean?

For example, 3123 is the offset, 1 is the byte fow NAV and COM swap functions,

In the "Use" section I find this:

Radio Use/Standby swap toggles (FS2002+ only), Write bits to operate
toggles. Don’t bother to read it, there’s no meaning to anything read.
2^3 COM1 swap
2^2 COM2 swap
2^1 NAV1 swap
2^0 NAV2 swap

Now, usually (with EPIC), I would send the value 1 to the offset 3123, but how do I deal with the other values?

Best regards,

Holger

Share on other sites

Out of the 8 bits (2^7) of the single byte at offset 3123 only the first 4 bits are used.

2^0 = bit zero = 1

2^1 = bit one  = 2

2^2 = bit two = 4

2^3 = bit three = 8

Sending a 1 to 3123 would swap Nav2, sending a 2 to 3123 would swap Nav1, sending a 4 to 3123 would swap Com2 and finally sending an 8 to 3123 would swap Com1.

You could also combine the bits to do multiple swaps at the same time. Add them up.

Sending a 13 to 3123 would swap, all at once, Nav2, Nav1 & Com1. (8 + 4 + 1)

Share on other sites

This works great, thank you very much!

Best regards,

Holger

Create an account

Register a new account