2
0
mirror of https://github.com/team2059/Dent synced 2025-01-07 22:14:14 -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::SetArmsOpen(bool state) {
if(state) {
solenoid1->Set(true);
solenoid2->Set(false);
solenoid3->Set(true);
solenoid4->Set(false);
armState = true;
} else {
solenoid1->Set(false);
solenoid2->Set(true);
solenoid3->Set(false);
solenoid4->Set(true);
armState = false;
}
solenoid1->Set(state);
solenoid2->Set(!state);
armState=state;
}
void Pneumatics::SetBinArm(bool state){
solenoid3->Set(state);
solenoid4->Set(!state);
}
void Pneumatics::SetCompressorEnabled(bool state) {
compressor->SetClosedLoopControl(state);

View File

@ -36,6 +36,12 @@ class Pneumatics: public Subsystem {
* @param state State of the compressor
*/
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
*