View Single Post
  #6   Spotlight this post!  
Unread 21-02-2010, 12:27
AlftanSr AlftanSr is offline
Registered User
FRC #1013
 
Join Date: Feb 2010
Location: Arizona
Posts: 12
AlftanSr is an unknown quantity at this point
Re: Mecanum Drive Not Working

Quote:
Originally Posted by Ether View Post
When you square x (and y) you change their range from [-1 to +1] to [0 to +1] .

Perhaps you accounted for this in your code but I didn't see it with a cursory review.

Try x*x*x instead of x*x. That preserves the sign.

See the following posts:

TUNABLE JOYSTICK SENSITIVITY
http://www.chiefdelphi.com/forums/sh...d.php?p=921992

MECANUM CODE
http://www.chiefdelphi.com/forums/sh...383#post916383




~
or you could have an if statement, so there's less multiplying...

if (x<0.0) x = -(x*x); else x = x*x;
Reply With Quote