Commit aa0e5afa authored by João Lino's avatar João Lino

fix menu error o cancel

fix menu error o cancel
parent 9c9b1394
...@@ -1377,14 +1377,15 @@ void runSettingsSelection() { ...@@ -1377,14 +1377,15 @@ void runSettingsSelection() {
bool bNewPumpStatus = xSetGenericValue( iPumpSpeed ? 0 : 1, PUMP_SPEED_DEFAULT, 0, 1, "pump", "bool" ); bool bNewPumpStatus = xSetGenericValue( iPumpSpeed ? 0 : 1, PUMP_SPEED_DEFAULT, 0, 1, "pump", "bool" );
if( cancel ) { if( cancel ) {
cancel = false; cancel = false;
return;
} }
if ( bNewPumpStatus ) { else {
iPumpSpeed = PUMP_SPEED_MAX_MOSFET; if ( bNewPumpStatus ) {
} else { iPumpSpeed = PUMP_SPEED_MAX_MOSFET;
iPumpSpeed = PUMP_SPEED_STOP_MOSFET; } else {
iPumpSpeed = PUMP_SPEED_STOP_MOSFET;
}
analogWrite(PUMP_PIN, iPumpSpeed);
} }
analogWrite(PUMP_PIN, iPumpSpeed);
backToStatus(); backToStatus();
break; break;
} }
...@@ -1450,14 +1451,14 @@ void runStageSelection_Generic( unsigned long * selectedStageTime, int *selected ...@@ -1450,14 +1451,14 @@ void runStageSelection_Generic( unsigned long * selectedStageTime, int *selected
if( cancel ) { if( cancel ) {
*selectedStageTime = selectedStageTimeStorage; *selectedStageTime = selectedStageTimeStorage;
cancel = false; cancel = false;
return;
} }
*selectedStageTemperature = getTemperature( *selectedStageTemperature ); else {
if( cancel ) { *selectedStageTemperature = getTemperature( *selectedStageTemperature );
*selectedStageTime = selectedStageTimeStorage; if( cancel ) {
*selectedStageTemperature = selectedStageTemperatureStorage; *selectedStageTime = selectedStageTimeStorage;
cancel = false; *selectedStageTemperature = selectedStageTemperatureStorage;
return; cancel = false;
}
} }
backToStatus(); backToStatus();
} }
...@@ -1479,7 +1480,9 @@ void xStartStage( unsigned long *stageTime, int *stageTemperature, eCookingStage ...@@ -1479,7 +1480,9 @@ void xStartStage( unsigned long *stageTime, int *stageTemperature, eCookingStage
finalYield = getFinalYield( finalYield, SETTING_MACHINE_YIELD_DEFAULT ); finalYield = getFinalYield( finalYield, SETTING_MACHINE_YIELD_DEFAULT );
if( cancel ) { if( cancel ) {
finalYield = finalYieldStorage; finalYield = finalYieldStorage;
cancel = false; cancel = false;
backToStatus();
return; return;
} }
} }
...@@ -1488,7 +1491,9 @@ void xStartStage( unsigned long *stageTime, int *stageTemperature, eCookingStage ...@@ -1488,7 +1491,9 @@ void xStartStage( unsigned long *stageTime, int *stageTemperature, eCookingStage
if( cancel ) { if( cancel ) {
finalYield = finalYieldStorage; finalYield = finalYieldStorage;
*stageTime = stageTimeStorage; *stageTime = stageTimeStorage;
cancel = false; cancel = false;
backToStatus();
return; return;
} }
} }
...@@ -1498,15 +1503,17 @@ void xStartStage( unsigned long *stageTime, int *stageTemperature, eCookingStage ...@@ -1498,15 +1503,17 @@ void xStartStage( unsigned long *stageTime, int *stageTemperature, eCookingStage
finalYield = finalYieldStorage; finalYield = finalYieldStorage;
*stageTime = stageTimeStorage; *stageTime = stageTimeStorage;
*stageTemperature = stageTemperatureStorage; *stageTemperature = stageTemperatureStorage;
cancel = false; cancel = false;
backToStatus();
return; return;
} }
} }
xSafeHardwarePowerOff(); // Stop anything that might be still going on xSafeHardwarePowerOff(); // Stop anything that might be still going on
if (bPurgePump) { if (bPurgePump) {
xPurgePump(); xPurgePump();
} }
startBrewing(); startBrewing();
xSetupStage( nextStage ); xSetupStage( nextStage );
backToStatus(); backToStatus();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment