diff --git a/Subsystems/Pneumatics.cpp b/Subsystems/Pneumatics.cpp index 38c737b..1b4ca18 100644 --- a/Subsystems/Pneumatics.cpp +++ b/Subsystems/Pneumatics.cpp @@ -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); diff --git a/Subsystems/Pneumatics.h b/Subsystems/Pneumatics.h index a33920c..332613b 100644 --- a/Subsystems/Pneumatics.h +++ b/Subsystems/Pneumatics.h @@ -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 *