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

Changed DIO Get if statement to a case

This commit is contained in:
Adam Long 2015-02-07 10:37:19 +00:00
parent e70dd861ed
commit 4c9ce0b57b

View File

@ -7,12 +7,15 @@ DIO::DIO(){
void DIO::InitDefaultCommand(){
}
bool DIO::Get(e_dioSig dioSig){
if(dioSig == ELEVATORTOP){
// The top elevator digitalinput was triggered
return elevatorTop->Get();
}else if(dioSig == ELEVATORBOTTOM){
// The buttom elevator digitalinput was triggered
return elevatorBottom->Get();
switch (dioSig){
case ELEVATORTOP:
return elevatorTop->Get();
break;
case ELEVATORBOTTOM:
return elevatorBottom->Get();
break;
default:
return false;
break;
}
return false;
}