View Single Post
  #6   Spotlight this post!  
Unread 04-02-2009, 22:34
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: Limit Switchers Logic Problem

Personally, I'd read all the jstick buttons and limit switches. Then look at the jstick buttons to decide what to do with the motor disregarding the limits. You need some logic about multiple buttons being pushed, but you can build a lookup integer from the the three bits or you can do lots of logic.

After you decide what to do with the motor, look at the limits. One limit forces negative numbers to zero, the other forces positive to zero.

Greg McKaskle