View Single Post
  #5   Spotlight this post!  
Unread 16-03-2014, 08:18
pblankenbaker pblankenbaker is offline
Registered User
FRC #0868
 
Join Date: Feb 2012
Location: Carmel, IN, USA
Posts: 103
pblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of light
Re: Robot Will Not Enable After Being Disabled

It looks like you are trying to construct a instance of the Compressor object within your Pneumatics method:

Code:
public void Pneumatics() //to initialize compressor + solenoids 
    {
        //First argument is digital input port pressure switch is connected to, 
        //second arg is relay port for Spike 
        Compressor airCompressor = new Compressor(6, 1);

        airCompressor.start();
    }
Since, you call this method in teleopInit(), this probably results in a error the second time you try to run teleop after rebooting the robot. You should see a stack trace in your developer console when this happens.

Try changing the creation of the airCompressor to be similar to the way you have created your other components (like the Talons).

Code:
    private Compressor airCompressor = new Compressor(6, 1);

public void Pneumatics() //to initialize compressor + solenoids 
    {
        // Make sure compressor is running
        airCompressor.start();
    }
If you still get a stack trace, examine the output of the stack trace as it should point out line numbers in your code where things went south.

Hope that helps,
Paul
Reply With Quote