extend settings
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
bool newState = true;
|
||||
uint32_t idleTime = 0;
|
||||
uint32_t gameTimeout = 0;
|
||||
|
||||
|
||||
|
||||
@@ -24,6 +25,7 @@ GameStates gameState = GameStates::stateInit;
|
||||
|
||||
void initGame(void)
|
||||
{
|
||||
gameTimeout = GetIntparam("GameTimeout", TIMEOUT_ARMED);
|
||||
log_i("Game: init: done");
|
||||
}
|
||||
|
||||
@@ -151,7 +153,7 @@ void handleGame(void)
|
||||
else
|
||||
{
|
||||
uint32_t now = millis();
|
||||
if(now - idleTime > TIMEOUT_ARMED)
|
||||
if(now - idleTime > gameTimeout)
|
||||
{
|
||||
log_i("Armed timed-out, clear current UID and go back to Idle");
|
||||
clearRFIDlastUID();
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "power.h"
|
||||
|
||||
#define TIMEOUT_IDLE 20000
|
||||
#define TIMEOUT_ARMED 10000
|
||||
#define TIMEOUT_ARMED 20000
|
||||
|
||||
typedef enum{
|
||||
stateInit,
|
||||
|
||||
Reference in New Issue
Block a user