Loop new implementation test@8

This commit is contained in:
xdrm-brackets 2017-09-28 11:09:24 +02:00
parent 17f2f5bf18
commit de64b1eb6d
1 changed files with 5 additions and 1 deletions

View File

@ -11,6 +11,7 @@
$actions = [];
$last_user = null;
$last_code = null;
$last_to = null; // last action timeout processed
$timeout = 0;
@ -340,6 +341,7 @@
/* [1] Load global variables
=========================================================*/
/* (1) Persistent variabes */
global $last_code;
global $last_user;
global $timeout, $last_to;
@ -374,8 +376,10 @@
/* (3) If code -> format it */
$code = strtoupper($code);
slog("card '$code' read", 'rfid-read:read');
if( $code != $last_code )
slog("card '$code' read", 'rfid-read:read');
$last_code = $code;
/* [2] Check for user in auth list
=========================================================*/