Loop new implementation test@8
This commit is contained in:
parent
17f2f5bf18
commit
de64b1eb6d
|
@ -11,6 +11,7 @@
|
||||||
$actions = [];
|
$actions = [];
|
||||||
|
|
||||||
$last_user = null;
|
$last_user = null;
|
||||||
|
$last_code = null;
|
||||||
$last_to = null; // last action timeout processed
|
$last_to = null; // last action timeout processed
|
||||||
$timeout = 0;
|
$timeout = 0;
|
||||||
|
|
||||||
|
@ -340,6 +341,7 @@
|
||||||
/* [1] Load global variables
|
/* [1] Load global variables
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
/* (1) Persistent variabes */
|
/* (1) Persistent variabes */
|
||||||
|
global $last_code;
|
||||||
global $last_user;
|
global $last_user;
|
||||||
global $timeout, $last_to;
|
global $timeout, $last_to;
|
||||||
|
|
||||||
|
@ -374,8 +376,10 @@
|
||||||
/* (3) If code -> format it */
|
/* (3) If code -> format it */
|
||||||
$code = strtoupper($code);
|
$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
|
/* [2] Check for user in auth list
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
|
|
Loading…
Reference in New Issue