View Single Post
  #2   Spotlight this post!  
Unread 16-02-2012, 17:16
NS_Radication's Avatar
NS_Radication NS_Radication is offline
Student
AKA: Marco Schoener
FRC #1369 (Minotaur)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Tampa
Posts: 88
NS_Radication is an unknown quantity at this point
Re: Robot Nightmare!

Quote:
Originally Posted by derekwhite View Post
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).
Ok, I got the jaguars to work fin and the spike works, it was a bad spike! So now we are getting somewhere. Note that this is a very basic program to toggle on and off
__________________
Team 1369
Senior
Head Programmer (Java)
Head Electrician
Reply With Quote