diff --git a/brew.h b/brew.h index 300839c16eeb77527cf18536497dead0ed9cc681..b41019ae89c17f0d3b04043dd78e03f6f99aa734 100644 --- a/brew.h +++ b/brew.h @@ -56,7 +56,7 @@ void xStartStageHeadless( eCookingStages nextStage, bool bPurgePump ); void xStartStageInteractive( unsigned long *stageTime, int *stageTemperature, eCookingStages nextStage ); -void xCountTheTime( int temperatureRange, boolean bAverageUpDown ); +void xCountTheTime( float temperatureRange, boolean bAverageUpDown ); bool isTimeLeft(); @@ -78,7 +78,7 @@ void xSetupStage(eCookingStages nextStage); void xTransitionIntoStage(eCookingStages nextStage); -void xBasicStageOperation( int iStageTime, int iStageTemperature, int iStageTemperatureRange, eCookingStages nextStage, boolean bAverageUpDown ); +void xBasicStageOperation( int iStageTime, int iStageTemperature, float iStageTemperatureRange, eCookingStages nextStage, boolean bAverageUpDown ); void xManageMachineSystems(); diff --git a/brew.ino b/brew.ino index af95ae9655272ac74a5d5a6c9f89e11e690fa7f1..35b5046e052f357b299f02028dc08010def60d0e 100644 --- a/brew.ino +++ b/brew.ino @@ -379,7 +379,7 @@ void loop() { // ######################### FUNCTIONS ######################## -void xCountTheTime( int temperatureMarginRange, boolean bMaximumOfUpDown ) { +void xCountTheTime( float temperatureMarginRange, boolean bMaximumOfUpDown ) { unsigned long now = millis(); // Get current maximum sensed temperaure @@ -808,7 +808,7 @@ void xTransitionIntoStage(eCookingStages nextStage) { xSetupStage( nextStage ); } -void xBasicStageOperation( int iStageTime, int iStageTemperature, int iStageTemperatureRange, eCookingStages nextStage, boolean bMaximumOfUpDown ) { +void xBasicStageOperation( int iStageTime, int iStageTemperature, float iStageTemperatureRange, eCookingStages nextStage, boolean bMaximumOfUpDown ) { // Account for time spent at the target temperature | Input 1: range in ÂșC within which the target temperature is considered to be reached #ifdef DEBUG_OFF @@ -851,8 +851,6 @@ void xManageMachineSystems() { Serial.print("|"); Serial.print(now); Serial.print("|"); - Serial.print(clockCounter); - Serial.print("|"); if (cooking) { Serial.print("1"); } @@ -860,6 +858,10 @@ void xManageMachineSystems() { Serial.print("0"); } Serial.print("|"); + Serial.print( mdStageMenu._dialog[cookingStage+1] ); + Serial.print("|"); + Serial.print(clockCounter); + Serial.print("|"); Serial.print(cookTemperature); Serial.print("|"); Serial.print(basePT100.getCurrentTemperature()); @@ -890,51 +892,51 @@ void xManageMachineSystems() { // Operate the machine according to the current mode switch (cookingStage) { case eCookingStage_Startpoint: { - xBasicStageOperation( startpointTime, startpointTemperature, 0, eCookingStage_BetaGlucanase, false); + xBasicStageOperation( startpointTime, startpointTemperature, 0.0, eCookingStage_BetaGlucanase, false); break; } case eCookingStage_BetaGlucanase: { - xBasicStageOperation( betaGlucanaseTime, betaGlucanaseTemperature, 3, eCookingStage_Debranching, true ); + xBasicStageOperation( betaGlucanaseTime, betaGlucanaseTemperature, 3.0, eCookingStage_Debranching, true ); break; } case eCookingStage_Debranching: { - xBasicStageOperation( debranchingTime, debranchingTemperature, 3, eCookingStage_Proteolytic, true ); + xBasicStageOperation( debranchingTime, debranchingTemperature, 3.0, eCookingStage_Proteolytic, true ); break; } case eCookingStage_Proteolytic: { - xBasicStageOperation( proteolyticTime, proteolyticTemperature, 3, eCookingStage_BetaAmylase, true ); + xBasicStageOperation( proteolyticTime, proteolyticTemperature, 3.0, eCookingStage_BetaAmylase, true ); break; } case eCookingStage_BetaAmylase: { - xBasicStageOperation( betaAmylaseTime, betaAmylaseTemperature, 4, eCookingStage_AlphaAmylase, true ); + xBasicStageOperation( betaAmylaseTime, betaAmylaseTemperature, 7.0, eCookingStage_AlphaAmylase, true ); break; } case eCookingStage_AlphaAmylase: { - xBasicStageOperation( alphaAmylaseTime, alphaAmylaseTemperature, 2, eCookingStage_Mashout, true ); + xBasicStageOperation( alphaAmylaseTime, alphaAmylaseTemperature, 2.5, eCookingStage_Mashout, true ); break; } case eCookingStage_Mashout: { - xBasicStageOperation( mashoutTime, mashoutTemperature, 1, eCookingStage_Recirculation, true ); + xBasicStageOperation( mashoutTime, mashoutTemperature, 1.0, eCookingStage_Recirculation, true ); break; } case eCookingStage_Recirculation: { - xBasicStageOperation( recirculationTime, recirculationTemperature, 1, eCookingStage_Sparge, true ); + xBasicStageOperation( recirculationTime, recirculationTemperature, 1.0, eCookingStage_Sparge, true ); break; } case eCookingStage_Sparge: { - xBasicStageOperation( spargeTime, spargeTemperature, 3, eCookingStage_Boil, false ); + xBasicStageOperation( spargeTime, spargeTemperature, 3.0, eCookingStage_Boil, false ); break; } case eCookingStage_Boil: { - xBasicStageOperation( boilTime, boilTemperature, 2, eCookingStage_Cooling, false ); + xBasicStageOperation( boilTime, boilTemperature, 2.0, eCookingStage_Cooling, false ); break; } case eCookingStage_Cooling: { - xBasicStageOperation( coolingTime, coolingTemperature, 0, eCookingStage_Done, false ); + xBasicStageOperation( coolingTime, coolingTemperature, 0.0, eCookingStage_Done, false ); break; } case eCookingStage_Clean: { - xBasicStageOperation( cleaningTime, cleaningTemperature, 0, eCookingStage_Done, false ); + xBasicStageOperation( cleaningTime, cleaningTemperature, 0.0, eCookingStage_Done, false ); break; } case eCookingStage_Purge: {