zrsk22 Posted November 30, 2016 Report Posted November 30, 2016 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.
Thomas Richter Posted November 30, 2016 Report Posted November 30, 2016 Hi, do you use maybe unsinged byte instead of signed byte? Thomas
Pete Dowson Posted November 30, 2016 Report Posted November 30, 2016 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
zrsk22 Posted December 1, 2016 Author Report Posted December 1, 2016 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now