extend settings

This commit is contained in:
2023-04-16 21:58:56 +02:00
parent da809f1ae4
commit 715359f89e
4 changed files with 7 additions and 5 deletions

View File

@@ -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();

View File

@@ -9,7 +9,7 @@
#include "power.h"
#define TIMEOUT_IDLE 20000
#define TIMEOUT_ARMED 10000
#define TIMEOUT_ARMED 20000
typedef enum{
stateInit,