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(){ void DIO::InitDefaultCommand(){
} }
bool DIO::Get(e_dioSig dioSig){ bool DIO::Get(e_dioSig dioSig){
if(dioSig == ELEVATORTOP){ switch (dioSig){
// The top elevator digitalinput was triggered case ELEVATORTOP:
return elevatorTop->Get(); return elevatorTop->Get();
}else if(dioSig == ELEVATORBOTTOM){ break;
// The buttom elevator digitalinput was triggered case ELEVATORBOTTOM:
return elevatorBottom->Get(); return elevatorBottom->Get();
} break;
default:
return false; return false;
break;
}
} }