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:
parent
b3ee49e903
commit
8930aaf23d
@ -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);
|
||||
|
@ -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
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user