View Single Post
  #2   Spotlight this post!  
Unread 16-02-2012, 12:55
derekwhite's Avatar
derekwhite derekwhite is offline
Java Virtual Machine Hacker
no team (FIRST@Oracle)
Team Role: Programmer
 
Join Date: May 2009
Rookie Year: 2009
Location: Burlington, MA
Posts: 127
derekwhite is on a distinguished road
Re: Robot Nightmare!

In your operatorControl code, while you hold down one button, you are in an inner loop and not sending updates to the other motor.

One way to fix it is to get rid of your inner loops. Instead, calculate values for desired state variables of the conveyor and launcher based on the buttons. If no buttons pressed, set desired states to default state (OFF?). Then actually set the motors/relays to the desired state (unconditionally, not just when button pressed).
Reply With Quote