Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Compressor not starting (http://www.chiefdelphi.com/forums/showthread.php?t=132950)

VD3626 01-15-2015 04:35 PM

Compressor not starting
 
This is the code I have been using to try and get the compressor to run. The test motor is there just to tell me whether or not the compressor is getting the message to start or not. The motor runs no matter what I try to change which is strange because I am setting "SetClosedLoopControl" to true yet it does not seem to change to true.
Code:

void AutonomousCommand::Execute() {
        compOneCompressorOne->SetClosedLoopControl(true);
                        if(compOneCompressorOne->GetClosedLoopControl() == false)
                        {
                                Robot::testMotor->Go();
                        }
}

Any help is appreciated.

MHSrobotics2853 01-15-2015 10:59 PM

Re: Compressor not starting
 
You have to "Start" the Compressor class. It's a function of the class.

http://first.wpi.edu/FRC/roborio/dev...ompressor.html

Ah, my bad, forgot it was enabled by default. See response below vvvv

Alan Anderson 01-15-2015 11:00 PM

Re: Compressor not starting
 
I'm pretty sure the compressor isn't enabled until you have defined at least one pneumatic solenoid. And it's enabled by default; you don't have to explicitly turn on closed loop control. You only have to worry about it if you ever want to disable it.


All times are GMT -5. The time now is 09:56 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi