Skip to content

Commit dac9a59

Browse files
committed
brew
1 parent df201ae commit dac9a59

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

src/BrewService.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,28 @@ void BrewService::temp(AsyncWebServerRequest *request)
2222
request->send(200, "text/plain charset=utf-8", String(_temperature));
2323
}
2424

25+
void BrewService::startBrew(AsyncWebServerRequest *request)
26+
{
27+
/*
28+
Load mash
29+
Load Boil
30+
_brewstarted = true
31+
_activeStep = mash;
32+
_startTime = 0;
33+
_endTime = 0;
34+
return json {mash,boil}
35+
*/
36+
}
37+
38+
void BrewService::getActiveStep(AsyncWebServerRequest *request)
39+
{
40+
/*
41+
_activeStep:
42+
_activeMashStepIndex:
43+
_boilStepIndex:
44+
*/
45+
}
46+
2547
void BrewService::LoadBoilSettings()
2648
{
2749
_boilSettings = &LoadSettings(BOIL_SETTINGS_FILE);

src/BrewService.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,16 @@ class BrewService
4545
};
4646

4747
boolean _brewStarted;
48-
4948
StepType _activeStep;
49+
5050
int _activeMashStepIndex;
51+
String _boilStepIndex;
52+
5153
float _targetTemperature;
5254
float _temperature;
53-
5455
time_t _endTime;
5556
time_t _startTime;
5657

57-
String _boilStepIndex;
58-
5958
void loopBoil(time_t timeNow);
6059
void loopMash(time_t timeNow);
6160
void LoadBoilSettings();
@@ -66,5 +65,8 @@ class BrewService
6665

6766
//temp
6867
void temp(AsyncWebServerRequest *request);
68+
69+
void getActiveStep(AsyncWebServerRequest *request);
70+
void startBrew(AsyncWebServerRequest *request);
6971
};
7072
#endif

0 commit comments

Comments
 (0)