implemented soft power button on-off
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "led.h"
|
||||
#include "power.h"
|
||||
|
||||
|
||||
#define GAMESELECTTIMEOUT 10000 // 10sec * 1000ms
|
||||
|
||||
typedef enum
|
||||
@@ -117,6 +118,10 @@ void loop()
|
||||
{
|
||||
handleButtons();
|
||||
HandlePower();
|
||||
if(getPowerState() != on)
|
||||
{
|
||||
return;
|
||||
}
|
||||
HandleGameSelectTimeout();
|
||||
|
||||
switch (currentGame)
|
||||
@@ -159,8 +164,6 @@ void loop()
|
||||
|
||||
case none:
|
||||
{
|
||||
batteryCheck();
|
||||
batterydisplay();
|
||||
delay(1000);
|
||||
turnOffAllLed();
|
||||
if (buttonIsPressed(GREEN) && currentGame == none)
|
||||
|
||||
Reference in New Issue
Block a user