prevent Tapout while not in fight
This commit is contained in:
@@ -165,21 +165,29 @@ void OnDataRecv(const uint8_t * mac, const uint8_t *incomingData, int len) {
|
||||
// RED team button
|
||||
// ignore button input if in rumble mode
|
||||
if (!switchRUMBLE.on()) {
|
||||
// ignore button press while in fight
|
||||
if (!FightCountDown.isRunning()) {
|
||||
buttonREDTEAMvar = receiveDATA.buttonREDTEAM;
|
||||
}
|
||||
// ignore tapout while not in fight
|
||||
if (FightCountDown.isRunning()) {
|
||||
buttonREDTEAMtapout = receiveDATA.buttonREDTEAMtapout;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
// BLUE team button
|
||||
// ignore button input if in rumble mode
|
||||
if (!switchRUMBLE.on()) {
|
||||
// ignore button press while in fight
|
||||
if (!FightCountDown.isRunning()) {
|
||||
buttonBLUETEAMvar = receiveDATA.buttonBLUETEAM;
|
||||
}
|
||||
// ignore tapout while not in fight
|
||||
if (FightCountDown.isRunning()) {
|
||||
buttonBLUETEAMtapout = receiveDATA.buttonBLUETEAMtapout;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user