update firmware
add 3d cad design updated PCB layout and chematics
This commit is contained in:
15
src/main.cpp
15
src/main.cpp
@@ -9,7 +9,8 @@
|
||||
#include "buttons.h"
|
||||
#include "led.h"
|
||||
|
||||
#define TIMEOUT 15000 // 15sec * 1000ms
|
||||
|
||||
#define TIMEOUT 300000 // 5min* 60 sec * 1000ms
|
||||
#define GAMESELECTTIMEOUT 10000 // 7sec * 1000ms
|
||||
|
||||
typedef enum
|
||||
@@ -29,6 +30,7 @@ game nextGame = none;
|
||||
uint8_t gameState = 0;
|
||||
uint64_t lasttimeOut = 0;
|
||||
uint64_t GameSelectTimer = 0;
|
||||
bool buttonChanged = false;
|
||||
|
||||
void HandleIdle(void)
|
||||
{
|
||||
@@ -99,23 +101,30 @@ void HandleGameSelectTimeout(void)
|
||||
// if (!lasttimeOut)
|
||||
// {
|
||||
// lasttimeOut = currentmillis;
|
||||
// buttonChanged = anybutton();
|
||||
// }
|
||||
|
||||
// //check if lastTime is initialized or timeout expired
|
||||
// if ((currentmillis - lasttimeOut > TIMEOUT))
|
||||
// {
|
||||
// //handle timeout
|
||||
// LowPower.shutdown();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (anybutton())
|
||||
// if (buttonChanged != anybutton())
|
||||
// {
|
||||
// buttonChanged = anybutton();
|
||||
// //game in progress, update timer
|
||||
// lasttimeOut = currentmillis;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// void initSleep( void )
|
||||
// {
|
||||
// LowPower.begin();
|
||||
// }
|
||||
|
||||
void setup()
|
||||
{
|
||||
initLeds();
|
||||
|
||||
Reference in New Issue
Block a user