Skip to content

Commit

Permalink
brew
Browse files Browse the repository at this point in the history
  • Loading branch information
uncodead committed Jan 13, 2019
1 parent df201ae commit dac9a59
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
22 changes: 22 additions & 0 deletions src/BrewService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,28 @@ void BrewService::temp(AsyncWebServerRequest *request)
request->send(200, "text/plain charset=utf-8", String(_temperature));
}

void BrewService::startBrew(AsyncWebServerRequest *request)
{
/*
Load mash
Load Boil
_brewstarted = true
_activeStep = mash;
_startTime = 0;
_endTime = 0;
return json {mash,boil}
*/
}

void BrewService::getActiveStep(AsyncWebServerRequest *request)
{
/*
_activeStep:
_activeMashStepIndex:
_boilStepIndex:
*/
}

void BrewService::LoadBoilSettings()
{
_boilSettings = &LoadSettings(BOIL_SETTINGS_FILE);
Expand Down
10 changes: 6 additions & 4 deletions src/BrewService.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,16 @@ class BrewService
};

boolean _brewStarted;

StepType _activeStep;

int _activeMashStepIndex;
String _boilStepIndex;

float _targetTemperature;
float _temperature;

time_t _endTime;
time_t _startTime;

String _boilStepIndex;

void loopBoil(time_t timeNow);
void loopMash(time_t timeNow);
void LoadBoilSettings();
Expand All @@ -66,5 +65,8 @@ class BrewService

//temp
void temp(AsyncWebServerRequest *request);

void getActiveStep(AsyncWebServerRequest *request);
void startBrew(AsyncWebServerRequest *request);
};
#endif

0 comments on commit dac9a59

Please sign in to comment.