View Single Post
  #5   Spotlight this post!  
Unread 04-11-2010, 19:03
coollog's Avatar
coollog coollog is offline
Q
AKA: Qingyang Chen
FTC #5485 (PRO)
Team Role: Programmer
 
Join Date: Sep 2010
Rookie Year: 2007
Location: US
Posts: 9
coollog is an unknown quantity at this point
Re: [FTC]: Deadbands (axis/motor power restrictions)

Another way to do it is

Code:
int threshold = 12;

motor[motorD] = (abs(joystick.joy1_y1) >= threshold) * joystick.joy1_y1;
...
This basically just zeroes any joystick value that is within a threshold of 0.

Last edited by coollog : 04-11-2010 at 19:09.
Reply With Quote