mirror of
https://github.com/team2059/Dent
synced 2024-12-18 20:52:29 -05:00
Added solenoid subsystem
This commit is contained in:
parent
a75a5b4867
commit
ce28d23c4b
19
Subsystems/Pnuematics.cpp
Normal file
19
Subsystems/Pnuematics.cpp
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#include "Pnuematics.h"
|
||||||
|
#include "../RobotMap.h"
|
||||||
|
|
||||||
|
Pnuematics::Pnuematics() : Subsystem("Pnuematics"){
|
||||||
|
solenoid1 = new Solenoid(BINELEVATOR_SOLDENOID_ONE);
|
||||||
|
solenoid2 = new Solenoid(BINELEVATOR_SOLDENOID_TWO);
|
||||||
|
}
|
||||||
|
void Pnuematics::InitDefaultCommand(){
|
||||||
|
}
|
||||||
|
void Pnuematics::SetOpen(bool k){
|
||||||
|
if(k){
|
||||||
|
solenoid1->Set(true);
|
||||||
|
solenoid2->Set(false);
|
||||||
|
}else{
|
||||||
|
solenoid1->Set(false);
|
||||||
|
solenoid2->Set(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// vim: ts=2:sw=2:et
|
15
Subsystems/Pnuematics.h
Normal file
15
Subsystems/Pnuematics.h
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#ifndef PNUEMATICS_H
|
||||||
|
#define PNUEMATICS_H
|
||||||
|
|
||||||
|
#include "WPILib.h"
|
||||||
|
class Pnuematics: public Subsystem
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
Solenoid *solenoid1, *solenoid2;
|
||||||
|
public:
|
||||||
|
Pnuematics();
|
||||||
|
void InitDefaultCommand();
|
||||||
|
void SetOpen(bool);
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
// vim: ts=2:sw=2:et
|
Loading…
Reference in New Issue
Block a user