View Single Post
  #10   Spotlight this post!  
Unread 17-04-2006, 09:05
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: How to end an auto mode after gyro gets out of deadband

Quote:
Originally Posted by kiettyyyy
Hey all,

In my code, i have a gyroscope that gets read from the adc.c and gyro.c where when it gets off the deadband the robot would stop auto mode. But when the gyro gets put back into position (within the deadband) it would keep executing from where it started. Any ideas?
Just to keep weird things like this from happening, our code has a global flag (called auto_done) that is set once the autonomous mode is completed. If the flag is set, the autonomous code won't do anything.