|
@@ -115,7 +115,7 @@ void *coffeeThread(void *threadid) {
|
|
|
pause();
|
|
|
|
|
|
switch (getSigValue(MODE_MENU)) {
|
|
|
- case SigInt0Psh:
|
|
|
+ case SigInt0Rls:
|
|
|
changeState(STATE_WAIT_OFF);
|
|
|
leaveMenu();
|
|
|
break;
|
|
@@ -131,7 +131,7 @@ void *coffeeThread(void *threadid) {
|
|
|
pause();
|
|
|
|
|
|
switch (getSigValue(MODE_MENU)) {
|
|
|
- case SigInt0Psh:
|
|
|
+ case SigInt0Rls:
|
|
|
if (halIsHeating()) {
|
|
|
coffeeIncreaseHeatingTime(halgetHeatingTime());
|
|
|
}
|
|
@@ -154,7 +154,7 @@ void *coffeeThread(void *threadid) {
|
|
|
pause();
|
|
|
|
|
|
switch (getSigValue(MODE_MENU)) {
|
|
|
- case SigInt0Psh:
|
|
|
+ case SigInt0Rls:
|
|
|
changeMode(MODE_STATE);
|
|
|
if (!halProxSensorCovered()) {
|
|
|
changeState(STATE_CLEANING);
|
|
@@ -209,7 +209,7 @@ void *coffeeThread(void *threadid) {
|
|
|
pause();
|
|
|
|
|
|
switch (getSigValue(MODE_MENU)) {
|
|
|
- case SigInt0Psh:
|
|
|
+ case SigInt0Rls:
|
|
|
leaveMenu();
|
|
|
break;
|
|
|
|
|
@@ -226,9 +226,6 @@ void *coffeeThread(void *threadid) {
|
|
|
break;
|
|
|
} //end switch (page)
|
|
|
|
|
|
- /* FIXME: Display events are reacting on Psh signal, leads to instant
|
|
|
- * machine turn on when leave menu is pressed */
|
|
|
-
|
|
|
/*
|
|
|
* Hardware FSM
|
|
|
*/
|
|
@@ -240,6 +237,7 @@ void *coffeeThread(void *threadid) {
|
|
|
if (mode == MODE_STATE) {
|
|
|
halMachineOff();
|
|
|
writeBackCache();
|
|
|
+ changePage(PAGE_DEMO);
|
|
|
if (SigValueEmpty())
|
|
|
pause();
|
|
|
}
|
|
@@ -538,6 +536,7 @@ int getSigValue(coffee_mode_t mode) {
|
|
|
case SigInt1RlsLong:
|
|
|
sigValue = 0;
|
|
|
return tmp;
|
|
|
+ break;
|
|
|
|
|
|
default:
|
|
|
break;
|
|
@@ -594,6 +593,7 @@ void changeMode(coffee_mode_t newMode) {
|
|
|
|
|
|
/*
|
|
|
* leaving the menu
|
|
|
+ * sets the start page for the next menu call to softoff
|
|
|
*/
|
|
|
void leaveMenu() {
|
|
|
logger(V_BREW, "Leaving the menu again...\n");
|
|
@@ -609,6 +609,13 @@ coffee_status_t getState(void) {
|
|
|
return state;
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * Returns the local up-to-date brewcounter
|
|
|
+ */
|
|
|
+uint16_t getBrewCounter(void) {
|
|
|
+ return brewCounter;
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* Counter for the brew time
|
|
|
* refresh every 200ms
|
|
@@ -673,9 +680,10 @@ void coffeeBrew(void) {
|
|
|
brewTimer.start();
|
|
|
while (halGetFlow() < AMOUNT_PREINFUSION) {
|
|
|
usleep(50000);
|
|
|
- if (getSigValue(MODE_STATE) == SigInt0Psh)
|
|
|
+ if (getSigValue(MODE_STATE) == SigInt0Psh){
|
|
|
stopBrewing();
|
|
|
- return;
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
stopBrewing();
|
|
|
|
|
@@ -700,8 +708,10 @@ void coffeeBrew(void) {
|
|
|
brewTimer.start();
|
|
|
while (brewTime < TIME_INFUSION && halGetFlow() < AMOUNT_DBLESPRESSO) {
|
|
|
usleep(100000);
|
|
|
- if (getSigValue(MODE_STATE) == SigInt0Psh)
|
|
|
+ if (getSigValue(MODE_STATE) == SigInt0Psh){
|
|
|
+ stopBrewing();
|
|
|
break;
|
|
|
+ }
|
|
|
}
|
|
|
stopBrewing();
|
|
|
return;
|