View Single Post
  #6   Spotlight this post!  
Unread 13-02-2010, 13:30
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Deadzone(ish) Problem

If that is truly what you want, you may want to adjust your code a bit more. Try values such as 22.55 and see what you get.

If you want to output a more coarse joystick value like that, an equivalent approach with much less code is to take the angle, divide by 45, round to nearest integer, then multiply by 45. Finally, if you really can have values above 180, you can use In Range and Coerce to pin the big values back to the limits.

Greg McKaskle
Reply With Quote