extend settings
This commit is contained in:
@@ -25,7 +25,7 @@
|
|||||||
"AudioGain": 0.5,
|
"AudioGain": 0.5,
|
||||||
"ScanTimeout": 50,
|
"ScanTimeout": 50,
|
||||||
"HardwareVersion": 2,
|
"HardwareVersion": 2,
|
||||||
"GameTimeout": 10000,
|
"GameTimeout": 20000,
|
||||||
"PowerTimeout": 420000,
|
"PowerTimeout": 420000,
|
||||||
"PowerOTADelay": 4000,
|
"PowerOTADelay": 4000,
|
||||||
"Brightness": 20
|
"Brightness": 20
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
; https://docs.platformio.org/page/projectconf.html
|
; https://docs.platformio.org/page/projectconf.html
|
||||||
|
|
||||||
[env]
|
[env]
|
||||||
src_filter = +<*> -<.git/> -<.svn/> -<example/> -<examples/> -<test/> -<tests/>
|
build_src_filter = +<*> -<.git/> -<.svn/> -<example/> -<examples/> -<test/> -<tests/>
|
||||||
|
|
||||||
|
|
||||||
[env:esp32-pico]
|
[env:esp32-pico]
|
||||||
@@ -22,7 +22,7 @@ lib_deps =
|
|||||||
fastled/FastLED@^3.5.0
|
fastled/FastLED@^3.5.0
|
||||||
#robtillaart/AS5600 @ ^0.3.4
|
#robtillaart/AS5600 @ ^0.3.4
|
||||||
robtillaart/AS5600 @ ^0.3.6
|
robtillaart/AS5600 @ ^0.3.6
|
||||||
src_filter = ${env.build_src_filter}
|
build_src_filter = ${env.build_src_filter}
|
||||||
lib_ldf_mode = deep+
|
lib_ldf_mode = deep+
|
||||||
build_flags =
|
build_flags =
|
||||||
-DHARDWARE=2
|
-DHARDWARE=2
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
bool newState = true;
|
bool newState = true;
|
||||||
uint32_t idleTime = 0;
|
uint32_t idleTime = 0;
|
||||||
|
uint32_t gameTimeout = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -24,6 +25,7 @@ GameStates gameState = GameStates::stateInit;
|
|||||||
|
|
||||||
void initGame(void)
|
void initGame(void)
|
||||||
{
|
{
|
||||||
|
gameTimeout = GetIntparam("GameTimeout", TIMEOUT_ARMED);
|
||||||
log_i("Game: init: done");
|
log_i("Game: init: done");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,7 +153,7 @@ void handleGame(void)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
uint32_t now = millis();
|
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");
|
log_i("Armed timed-out, clear current UID and go back to Idle");
|
||||||
clearRFIDlastUID();
|
clearRFIDlastUID();
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#include "power.h"
|
#include "power.h"
|
||||||
|
|
||||||
#define TIMEOUT_IDLE 20000
|
#define TIMEOUT_IDLE 20000
|
||||||
#define TIMEOUT_ARMED 10000
|
#define TIMEOUT_ARMED 20000
|
||||||
|
|
||||||
typedef enum{
|
typedef enum{
|
||||||
stateInit,
|
stateInit,
|
||||||
|
|||||||
Reference in New Issue
Block a user