update game

This commit is contained in:
2021-12-14 16:27:15 +01:00
parent 6fdeb985e7
commit cce21d299a
18 changed files with 652 additions and 234 deletions

View File

@@ -2,8 +2,32 @@
#include "board.h"
#include "Arduino.h"
#include "JC_Button.h"
#include "Battery.h"
#include "sensor.h"
#define TIMEOUT_POWER (5 * 1000 * 60) //5minutes timeout
#define POWERBUTTONDELAY 1000
#define BATTERYMEASUREDELAY 60000
typedef enum
{
off,
poweringOn,
poweringOn2,
powerinit,
on,
poweringOff,
poweringOff2,
timeOut,
lowBatt
} POWERSTATES;
POWERSTATES getPowerState( void );
void initBattery(void);
bool handleBattery(void);
void initPower(void);
void handlePower(void);