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 =========================================================*/