brewco/brewco.c

changeset 474
fe1c3e3e90dc
parent 473
fdd30e935079
child 475
bec993331061
equal deleted inserted replaced
473:fdd30e935079 474:fe1c3e3e90dc
52 extern sys_config Config; 52 extern sys_config Config;
53 extern a_recipe *recipes; 53 extern a_recipe *recipes;
54 extern int lcdHandle; 54 extern int lcdHandle;
55 extern int slcdHandle; 55 extern int slcdHandle;
56 extern int sock; 56 extern int sock;
57
57 #ifdef USE_SIMULATOR 58 #ifdef USE_SIMULATOR
58 extern int SIM_cooler; 59 extern int SIM_cooler;
59 #endif 60 #endif
60 char *etcpath = NULL; 61 char *etcpath = NULL;
61 char *varpath = NULL; 62 char *varpath = NULL;
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);

mercurial