diff --git a/feature/rfid-read/source/loop.php b/feature/rfid-read/source/loop.php index f3bb4ff..bff01a2 100755 --- a/feature/rfid-read/source/loop.php +++ b/feature/rfid-read/source/loop.php @@ -127,11 +127,14 @@ /* [2] Manage timeout =========================================================*/ - /* (1) If no action for this @cur_timeout -> reset to 0 */ + /* (1) Store @cur_timeout not to repeat it */ + $last_to = $cur_timeout; + + /* (2) If no action for this @cur_timeout -> reset to 0 */ if( !isset($actions[$cur_timeout]) || !is_array($actions[$cur_timeout]) ) return false; - /* (2) fetch actions for the current @cur_timeout */ + /* (3) fetch actions for the current @cur_timeout */ $actionlist = $actions[floor($cur_timeout)]; @@ -234,10 +237,7 @@ $toPerform ]).PHP_EOL ); - /* (2) Store @cur_timeout not to repeat it */ - $last_to = $cur_timeout; - - /* (3) Return status */ + /* (2) Return status */ return true; }