getGyroHeading()


#1

Why does getGyroHeading give negative results. I keep trying to use this but always have to go back to getGyroDegrees, but i feel if heading would work like it is stated in the help, then I could get the bot to make a simple right turn to 270 with a negative speed. But when I do that it gives a negative value (like degrees does). But is that how Heading is supposed to work? What am I missing?


#2

I’m not familiar with it, but that does seem odd considering the API says, “Values returned range from 0-359 (in degrees),” and negatives are not in that range. :frowning:


#3

I think that one is a typo, they just look like duplicated text in the help file but have different functions.
One is a compass style heading and the other is a cumulative value of rotation so can go negative past 0 and also past 359.