ignore incoming serial data unless waiting for it

master
lux 5 years ago
parent 6b467ece6e
commit 84ebdcc7c5

@ -175,6 +175,11 @@ void loop() {
unarmButtonDown = 0;
}
// - Ignore Serial input unless we're waiting for it -
if (waitingForPass == 0) {
while (Serial.available()) { Serial.read(); }
}
// - Activate unarmed/armed LEDs -
if (isArmed == 1 && waitingForPass == 0 && soundAlarm == 0) {

Loading…
Cancel
Save