implemented soft power button on-off

This commit is contained in:
2021-05-09 15:25:42 +02:00
parent ae1676c669
commit f19e7b79f4
8 changed files with 242 additions and 76 deletions

View File

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