Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi Pete,

The offset $036E is not working (I have version 3.70). I have FS9.

Value is varing to the left from 255-127 and to the right from 0-127. But it must be to the left from -127 to the right +127.

Thank you.

Posted
35 minutes ago, zrsk22 said:

Value is varing to the left from 255-127 and to the right from 0-127. But it must be to the left from -127 to the right +127.

As pointed out by Thomas, whether you interpret the 8 binary bits in a byte as signed or unsigned makes the different between a range of decimal values from -128 to +127 and 0 to 255. For example, -1 has all 8 bits set to 1 which is an unsigned value of 255. The highest bit is the sign bit in a signed value.

Pete

 

 

Posted

I see now. Hence as I think it must be converted in this way:

Var 0109, Link FSUIPC_IN, Offset $036E, Length 1 // side slip
{
L0 = V0109
IF L0 > 128
{
L0 = L0 - 256
}
L0 = L0 * 5 // Calculate degrees for UAS-B
&skol = L0
}

 Thank you for help.

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.