View Single Post
  #4   Spotlight this post!  
Unread 21-02-2010, 13:45
Bryan Herbst's Avatar
Bryan Herbst Bryan Herbst is offline
Registered User
AKA: Bryan
FRC #2052 (KnightKrawler)
Team Role: Mentor
 
Join Date: Sep 2007
Rookie Year: 2007
Location: Minneapolis, Minnesota
Posts: 544
Bryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond repute
Re: switching the x & y on joy stick

I haven't looked at the default holonomic code this year, but from that code it looks as though the holonomic drive function is expecting you to use a 3-axis joystick.
m_rightStick.getMagnitude() would be the y-direction
m_rightStick.getDirectionDegrees() would be the "twist" of the joystick
m_leftStick.getX() would, of course, be the x direction.

Are you using a 3-joystick set up? If not, then you will need to use a different holonomic drive method. If so, then all you should have to do is switch getMagnitute() and getX(). Thus the line would read-

m_robotDrive.holonomicDrive(m_leftStick.getX(), m_rightStick.getDirectionDegrees(), m_rightStick.getMagnitude());
__________________
Team 2052- Knightkrawler
Mentor and volunteer
Reply With Quote