View Single Post
  #3   Spotlight this post!  
Unread 22-02-2011, 20:36
Matthew Blake's Avatar
Matthew Blake Matthew Blake is offline
Registered User
FRC #3481 (Bronc Botz)
 
Join Date: Feb 2011
Rookie Year: 2009
Location: Helotes, Texas
Posts: 43
Matthew Blake is an unknown quantity at this point
Re: Take a quick look at our code?

To use the compressor, you must first declare it in the .h file in the inout interface using Compressor name where name is whatever you want to name the compressor in the code. Then, you set it up in the .cpp file by putting in these two values like this: name(x, y). x is the spike channel and y is the pressure regulator channel. If you have already done all this correctly, then the only other thing to check is if moving compress.Start() to the OperatorControl method right here will work

Code:
void OperatorControl(void)
	{
		rd.SetSafetyEnabled(true);
                          compress.Start();		
                          while (IsEnabled() && IsOperatorControl())
		{
__________________
FTC Team 4008: 2009-2012
FTC Team 4602: 2010-2012
FRC Team 3481: 2010-2012
Reply With Quote