View Single Post
  #5   Spotlight this post!  
Unread 02-07-2014, 12:24
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,561
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Kaj Drive in c++?

Quote:
Originally Posted by ekovacs View Post
This is what my team has done for the last few years now. It can be done with one line of code that is built in to the RobotDrive class in wpilib.

Code:
yourRobotDriveobject.ArcadeDrive(joystick.getRawAxis(forwardaxis), joystick.getRawAxis(rotateaxis));
Quote:
Originally Posted by thatprogrammer View Post
While that method should work for a single joystick, it doesn't appear to work if using 2 stick arcade or Kaj drive. Any idea if changing arcade drive in the robotdrive header file could fix this?
ekovacs example above is using the following form of ArcadeDrive.
Code:
void ArcadeDrive(float moveValue, float rotateValue, bool squaredInputs = true);
It doesn't matter where the moveValue and rotateValue come from. You could read from a second joystick, or a sensor, or anything else.
Reply With Quote