2
0
mirror of https://github.com/team2059/Dent synced 2024-12-18 20:52:29 -05:00
dent/Subsystems/DIO.cpp

24 lines
505 B
C++
Raw Normal View History

#include "DIO.h"
#include "../RobotMap.h"
DIO::DIO(){
elevatorTop=new DigitalInput(0);
elevatorBottom=new DigitalInput(1);
}
void DIO::InitDefaultCommand(){
}
bool DIO::Get(e_dioSig dioSig){
2015-02-07 05:37:19 -05:00
switch (dioSig){
case ELEVATORTOP:
printf("Hit top limit switch\n");
2015-02-07 05:37:19 -05:00
return elevatorTop->Get();
break;
case ELEVATORBOTTOM:
printf("Hit top bottom switch\n");
2015-02-07 05:37:19 -05:00
return elevatorBottom->Get();
break;
default:
return false;
break;
}
}