Quote:
Originally Posted by W_Yingst
Our team is moving into Java for the first time this year, and we are creating our "Hello World" program (Simple driving). We are using the arcadeDrive method of a RobotDrive class object. It will drive forwards and backwards in the way we want, but the turning is inverted. Left joystick results in a right turn, and right joystick in a left. Inverting motors does not solve this problem, so I think we need to invert the x axis output from the joystick. Has anyone had this problem before? Any help inverting these values? Thanks.
|
All you need to do is place a "-" in front of the value coming out of the joystick going into the ardaceDrive() call. This will invert the value so -1 would become 1 and 1 would become -1. Something like this:
Code:
robotDrive.arcadeDrive(joystick.getY(), -joystick.getX());