DoorLockController: Fix possible multiple-key conflict

Ensured that if more than 1 key is available and authentication fails
for at least the last one, door will open. This is by ending the loop on
1st available key.
This commit is contained in:
Lech 2018-01-24 11:06:06 +01:00 committed by Lech Perczak
parent 40ddf07c00
commit ba8a3b48dc
1 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,6 @@ void DoorLockController::checkForKeys()
logger.info("Access granted.");
unauthorizedAccess = false;
doorLock.open();
continue;
}
else
{
@ -44,8 +43,9 @@ void DoorLockController::checkForKeys()
logger.error("ACCESS DENIED!");
unauthorizedAccess = true;
delay(DOOR_OPEN_TIME_MS);
continue;
}
return;
}
}