diff --git a/app/model/Cardreader.php b/app/model/Cardreader.php index 2e4bb5f..fdaa905 100644 --- a/app/model/Cardreader.php +++ b/app/model/Cardreader.php @@ -22,6 +22,7 @@ class Cardreader } /** + * TODO: yeah this sucks but it werks! * Returns: * 0 created team * 1 started counting @@ -52,6 +53,9 @@ class Cardreader return 3; } + $team->rounds += 1; + $this->teamMapper->update($team); + if ($team->bestTime === NULL) { $team->bestTime = $diff; diff --git a/app/view/pages/race/teamtable/edit/index.php b/app/view/pages/race/teamtable/edit/index.php index dbce1f4..c2630de 100644 --- a/app/view/pages/race/teamtable/edit/index.php +++ b/app/view/pages/race/teamtable/edit/index.php @@ -29,7 +29,7 @@ echo "" . htmlspecialchars($team->rounds) . ""; echo "" . htmlspecialchars(($team->bestTime === NULL) ? "Ukjent" : $team->bestTime) . ""; echo ""; - echo "Slett ]"; + echo "Slett ] "; echo "Endre ]"; echo ""; echo ''; diff --git a/public/race/simulator.php b/public/race/simulator.php index 19402db..874f40d 100644 --- a/public/race/simulator.php +++ b/public/race/simulator.php @@ -12,7 +12,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') if (!(strlen($cardnumber) > 32)) { - $code = $cardreader->receive($cardnumber, 30); + $code = $cardreader->receive($cardnumber, 5); switch ($code) { case 0: $app->session->flash('Opprettet nytt lag', 'success');