View Single Post
  #5   Spotlight this post!  
Unread 11-01-2013, 07:43
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: Motor/Speed control

There are other threads on this, but let me give an overview.

One common approach is to have little Motor Sets all over the code inside various switch blocks testing buttons. If you are careful this will work, but often, the logic isn't quite right and the code doesn't do what you want. Basically, last update wins, and sometimes it isn't clear how the motor got to the speed it is running at.

Another approach is to do the logic and whatnot, but all the code does is to output numbers. LV will help remind you to produce numbers in all cases. Then, in only one location on your teleop diagram, you update that motor. This makes it much easier to trace the logic and debug.

Greg McKaskle
Reply With Quote