View Single Post
  #2   Spotlight this post!  
Unread 07-04-2008, 15:24
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Unique ways of controlling your robot (driving)

Quote:
Originally Posted by AmoryG View Post
What I don't understand is where is the code that says if(x-axis + y-axis < 0) motors = 0 or there the other way around if it's more than 255?
Look at the Limit_Mix() function. Doing that is the whole reason it exists. It limits the result of mixing the x and y axes of the joystick. The extra 2000 can be a little confusing, but I expect that you now understand why it is there.