|
Re: [FTC]: RobotC returns junk joystick data?
Does it only happen when the joystick is fully forward (not backwards)?
If so, it sound like a signed to unsinged integer conversion problem.
Since the joystick actually puts out max negative when you push it forward, somewhere in the software is negating the number. Since there is a -128 in 8 bit signed math, but not a +128, this is sometimes converted incorrectly.
If that's what it is, you might also expect it to happen to the X axis when you move the joystick all the way to the left, but it may not since that value probably isn't reversed.
I don't use Robot C. What "type" is the joystick value (byte or integer)?
Phil.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org
FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
|