View Single Post
  #3   Spotlight this post!  
Unread 14-01-2008, 12:47
RyanW RyanW is offline
Registered User
FRC #0449 (Blair Robot Project)
Team Role: Programmer
 
Join Date: Feb 2007
Rookie Year: 2007
Location: MD
Posts: 40
RyanW has a spectacular aura aboutRyanW has a spectacular aura about
Re: Mech Wheel Programing

What Kaszeta said is correct; however, our team decided we also wanted to scale the values. What we came up with was to take the initial inputs, change the range to (-127)-(127), add them together, then scale the sum by a factor:

The factor = Max ( |speed|, |turn|, |strafe|) / (|speed| + |turn| + |strafe|)

We used this code last year, and it seemed to work pretty well.