From de64b1eb6da7eb4e06b0baa8ab393a5f0982103f Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Thu, 28 Sep 2017 11:09:24 +0200 Subject: [PATCH] Loop new implementation test@8 --- feature/rfid-read/source/loop.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/feature/rfid-read/source/loop.php b/feature/rfid-read/source/loop.php index bff01a2..1b8b88c 100755 --- a/feature/rfid-read/source/loop.php +++ b/feature/rfid-read/source/loop.php @@ -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 =========================================================*/