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:
parent
e70dd861ed
commit
4c9ce0b57b
@ -7,12 +7,15 @@ DIO::DIO(){
|
||||
void DIO::InitDefaultCommand(){
|
||||
}
|
||||
bool DIO::Get(e_dioSig dioSig){
|
||||
if(dioSig == ELEVATORTOP){
|
||||
// The top elevator digitalinput was triggered
|
||||
switch (dioSig){
|
||||
case ELEVATORTOP:
|
||||
return elevatorTop->Get();
|
||||
}else if(dioSig == ELEVATORBOTTOM){
|
||||
// The buttom elevator digitalinput was triggered
|
||||
break;
|
||||
case ELEVATORBOTTOM:
|
||||
return elevatorBottom->Get();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user