Enclosure files + firmware
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "State.h"
|
||||
|
||||
class AdjustState : public State
|
||||
{
|
||||
public:
|
||||
void enter() override;
|
||||
void update() override;
|
||||
void exit() override;
|
||||
void adjustTimer(int duration);
|
||||
|
||||
private:
|
||||
int adjustDuration;
|
||||
unsigned long lastActivity;
|
||||
};
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "State.h"
|
||||
|
||||
class DoneState : public State
|
||||
{
|
||||
public:
|
||||
DoneState();
|
||||
void enter() override;
|
||||
void update() override;
|
||||
void exit() override;
|
||||
|
||||
private:
|
||||
unsigned long doneEnter;
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
#include "State.h"
|
||||
|
||||
class IdleState : public State
|
||||
{
|
||||
public:
|
||||
IdleState();
|
||||
void enter() override;
|
||||
void update() override;
|
||||
void exit() override;
|
||||
void setTimer(int duration);
|
||||
|
||||
private:
|
||||
int defaultDuration;
|
||||
unsigned long lastActivity;
|
||||
};
|
||||
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include "State.h"
|
||||
|
||||
class PausedState : public State
|
||||
{
|
||||
public:
|
||||
PausedState();
|
||||
void enter() override;
|
||||
void update() override;
|
||||
void exit() override;
|
||||
|
||||
void setPause(int duration, unsigned long elapsedTime);
|
||||
|
||||
private:
|
||||
int duration;
|
||||
unsigned long pauseEnter;
|
||||
unsigned long elapsedTime;
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "State.h"
|
||||
|
||||
class ProvisionState : public State
|
||||
{
|
||||
public:
|
||||
void enter() override;
|
||||
void update() override;
|
||||
void exit() override;
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "State.h"
|
||||
|
||||
class ResetState : public State
|
||||
{
|
||||
public:
|
||||
void enter() override;
|
||||
void update() override;
|
||||
void exit() override;
|
||||
|
||||
unsigned long resetStartTime = 0;
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "State.h"
|
||||
|
||||
class SleepState : public State
|
||||
{
|
||||
public:
|
||||
void enter() override;
|
||||
void update() override;
|
||||
void exit() override;
|
||||
};
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "State.h"
|
||||
|
||||
class StartupState : public State
|
||||
{
|
||||
public:
|
||||
StartupState();
|
||||
void enter() override;
|
||||
void update() override;
|
||||
void exit() override;
|
||||
|
||||
private:
|
||||
unsigned long startEnter;
|
||||
};
|
||||
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include "State.h"
|
||||
|
||||
class TimerState : public State
|
||||
{
|
||||
public:
|
||||
TimerState();
|
||||
|
||||
void enter() override;
|
||||
void update() override;
|
||||
void exit() override;
|
||||
|
||||
void setTimer(int duration, unsigned long elapsedTime);
|
||||
|
||||
private:
|
||||
int duration;
|
||||
unsigned long startTime;
|
||||
unsigned long elapsedTime;
|
||||
};
|
||||
Reference in New Issue
Block a user