-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKittleService.h
36 lines (33 loc) · 867 Bytes
/
KittleService.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <WString.h>
#include "RelayControl.h"
#include "ThermistorSensor.h"
#include "WaterSensor.h"
#ifndef KittleService_h
#define KittleService_h
class KittleService
{
public:
static KittleService* getInstance();
void InitializeKittle();
bool StartClientRequest(short desiredTemp);
String UpdateClientRequest();
private:
//singleton instance
static KittleService* instance;
//hardware interfacing stuff
RelayControl* waterValve;
RelayControl* waterHeater;
ThermistorSensor* tempSensor;
WaterSensor* waterLevelSensor;
//status stuff
bool _processingARequest;
short _currentStep;
short _desiredTemp;
//methods
KittleService(); //private constructor because of singleton
void EnsureEnoughWater();
void HeatWater();
void EndClientRequest();
void LogKittleStatus();
};
#endif