2
0
mirror of https://github.com/team2059/Dent synced 2025-01-27 22:21:07 -05:00

added bin arm method in pneumatics subsystem

This commit is contained in:
Adam Long 2015-10-08 15:59:40 +00:00
parent b3ee49e903
commit 8930aaf23d
2 changed files with 13 additions and 13 deletions

View File

@ -11,19 +11,13 @@ Pneumatics::Pneumatics(): Subsystem("Pneumatics") {
} }
void Pneumatics::InitDefaultCommand() {} void Pneumatics::InitDefaultCommand() {}
void Pneumatics::SetArmsOpen(bool state) { void Pneumatics::SetArmsOpen(bool state) {
if(state) { solenoid1->Set(state);
solenoid1->Set(true); solenoid2->Set(!state);
solenoid2->Set(false); armState=state;
solenoid3->Set(true); }
solenoid4->Set(false); void Pneumatics::SetBinArm(bool state){
armState = true; solenoid3->Set(state);
} else { solenoid4->Set(!state);
solenoid1->Set(false);
solenoid2->Set(true);
solenoid3->Set(false);
solenoid4->Set(true);
armState = false;
}
} }
void Pneumatics::SetCompressorEnabled(bool state) { void Pneumatics::SetCompressorEnabled(bool state) {
compressor->SetClosedLoopControl(state); compressor->SetClosedLoopControl(state);

View File

@ -36,6 +36,12 @@ class Pneumatics: public Subsystem {
* @param state State of the compressor * @param state State of the compressor
*/ */
void SetCompressorEnabled(bool state); void SetCompressorEnabled(bool state);
/**
* @brief Sets the state of the bin arm
*
* @param state State of the arm
*/
void SetBinArm(bool state);
/** /**
* @brief Gets the state of the arms * @brief Gets the state of the arms
* *