|
@@ -467,7 +467,6 @@ void *coffeeThread(void *threadid) {
|
|
|
if (!halProxSensorCovered()) {
|
|
|
//execute the cleaning procedure
|
|
|
coffeeClean();
|
|
|
- updateDescaling();
|
|
|
if (halIsHeating()) {
|
|
|
changeState(STATE_HEATING);
|
|
|
} else {
|
|
@@ -679,10 +678,13 @@ void coffeeClean(void) {
|
|
|
logger(V_BREW, "Cleaning...\n");
|
|
|
for (int i = 0; i < 20; i++) {
|
|
|
halRelaisOn(RELAIS_PUMP);
|
|
|
+ //TODO the sleep function returns when a signal is delivered
|
|
|
+ //this causes the cleaning to not work properly when the pressure is triggered
|
|
|
sleep(3);
|
|
|
halRelaisOff(RELAIS_PUMP);
|
|
|
sleep(15);
|
|
|
}
|
|
|
+ updateDescaling();
|
|
|
descaling = false;
|
|
|
event_trigger("descaling", &descaling, sizeof(bool));
|
|
|
}
|
|
@@ -755,8 +757,6 @@ void stopBrewing() {
|
|
|
*/
|
|
|
void coffeeIncreaseBrewCounter(void) {
|
|
|
brewCounter++;
|
|
|
- if ((brewCounter % DIRTY_ESPRESSO) == 0)
|
|
|
- descaling = true;
|
|
|
}
|
|
|
|
|
|
/**
|