310 void automatic_brew(units_list *, brew_session *, a_recipe *, int, int); |
311 void automatic_brew(units_list *, brew_session *, a_recipe *, int, int); |
311 void automatic_brew(units_list *unit, brew_session *brew, a_recipe *recipe, int dosave, int seconds) |
312 void automatic_brew(units_list *unit, brew_session *brew, a_recipe *recipe, int dosave, int seconds) |
312 { |
313 { |
313 int key, save = dosave, i; |
314 int key, save = dosave, i; |
314 char data[128]; |
315 char data[128]; |
315 static int mash_fase = MASH_NA, hopstand = 0, last_step = -1, last_fase = -1, oldsec = 75, startdelay = 0; |
316 static int mash_fase = MASH_NA, hopstand = 0, last_step = STEP_NA, last_fase = -1, oldsec = 75, startdelay = 0; |
|
317 |
|
318 if (brew->brewstep != last_step) { |
|
319 snprintf(data, 40, brewstep_name(last_step)); |
|
320 syslog(LOG_NOTICE, "AUTO: brewstep %s to %s", data, brewstep_name(brew->brewstep)); |
|
321 } |
316 |
322 |
317 switch (brew->brewstep) { |
323 switch (brew->brewstep) { |
318 case STEP_NA: if (debug) |
324 case STEP_NA: if (debug) |
319 fprintf(stdout, "auto: init recipe: %s-%s unit: %s\n", recipe->code, recipe->name, unit->name); |
325 fprintf(stdout, "auto: init recipe: %s-%s unit: %s\n", recipe->code, recipe->name, unit->name); |
320 syslog(LOG_NOTICE, "AUTO: starting new brew, recipe: %s-%s unit: %s", recipe->code, recipe->name, unit->name); |
326 syslog(LOG_NOTICE, "AUTO: starting new brew, recipe: %s-%s unit: %s", recipe->code, recipe->name, unit->name); |
531 } |
537 } |
532 break; |
538 break; |
533 |
539 |
534 case MASH_REST: if (last_fase != mash_fase) { |
540 case MASH_REST: if (last_fase != mash_fase) { |
535 prompt(111 + brew->mashstep, NULL); /* "AUTO --> [mashname] " */ |
541 prompt(111 + brew->mashstep, NULL); /* "AUTO --> [mashname] " */ |
|
542 prompt(200, NULL); |
536 prompt(300, NULL); |
543 prompt(300, NULL); |
537 prompt(418, NULL); /* "--- --- Pause --- " */ |
544 prompt(418, NULL); /* "--- --- Pause --- " */ |
538 hlt_status(1); |
545 hlt_status(1); |
539 mlt_status(1); |
546 mlt_status(1); |
540 pump_status(unit->pump_onmash); |
547 pump_status(unit->pump_onmash); |