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.