View Single Post
  #4   Spotlight this post!  
Unread 23-01-2008, 17:38
psy_wombats's Avatar
psy_wombats psy_wombats is offline
Registered User
AKA: A. King
FRC #0467 (Duct Tape Bandits)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Shrewsbury MA
Posts: 95
psy_wombats has a spectacular aura aboutpsy_wombats has a spectacular aura aboutpsy_wombats has a spectacular aura about
Re: Joystick sensitivity

That code above should produce a curve that reduces the motor outputs when the joystick is at a low level, but still maintain a max speed. (See attachment.) Of course, you could just multiply by some fraction, but that decreases your top speed. Or maybe reduce speed when motors are turning in opposite directions, (turning?)

The reason it's cubed is to get that sort of curve for the entire function. The random huge number in there is 128, (the maximum value) squared. It's basically to center the cubic equation on 128,128. (I believe I came up with it with experimentation on a graphing calculator, I really forget why it works)
Attached Images
File Type: bmp ramping.bmp (48.1 KB, 298 views)

Last edited by psy_wombats : 23-01-2008 at 17:40.