2015-01-31 12:16:02 -05:00
|
|
|
#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:
|
2015-02-07 06:53:41 -05:00
|
|
|
printf("Hit top limit switch\n");
|
2015-02-07 05:37:19 -05:00
|
|
|
return elevatorTop->Get();
|
|
|
|
break;
|
|
|
|
case ELEVATORBOTTOM:
|
2015-02-07 06:53:41 -05:00
|
|
|
printf("Hit top bottom switch\n");
|
2015-02-07 05:37:19 -05:00
|
|
|
return elevatorBottom->Get();
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
return false;
|
|
|
|
break;
|
2015-01-31 12:16:02 -05:00
|
|
|
}
|
|
|
|
}
|