460 syslog(LOG_NOTICE, "AUTO: skipping mash step %d", brew->mashstep); |
460 syslog(LOG_NOTICE, "AUTO: skipping mash step %d", brew->mashstep); |
461 brew->mashstep++; |
461 brew->mashstep++; |
462 } else { |
462 } else { |
463 mltSetpoint = recipe->mash[brew->mashstep].setpoint; |
463 mltSetpoint = recipe->mash[brew->mashstep].setpoint; |
464 brew->timeout = recipe->mash[brew->mashstep].duration * 60; |
464 brew->timeout = recipe->mash[brew->mashstep].duration * 60; |
465 if ((brew->mashstep == 0) && ! unit->skip_add) { |
465 mash_fase = MASH_HEATING; |
466 mash_fase = MASH_PROMPT; |
|
467 } else |
|
468 mash_fase = MASH_HEATING; |
|
469 syslog(LOG_NOTICE, "AUTO: mash step %d fase NA, setpoint %6.2f, duration %d", |
466 syslog(LOG_NOTICE, "AUTO: mash step %d fase NA, setpoint %6.2f, duration %d", |
470 brew->mashstep, mltSetpoint, brew->timeout); |
467 brew->mashstep, mltSetpoint, brew->timeout); |
471 } |
468 } |
472 if (brew->mashstep == 0) { |
469 if (brew->mashstep == 0) { |
473 brew->starttime = time(NULL); |
470 brew->starttime = time(NULL); |
483 last_fase = mash_fase; |
480 last_fase = mash_fase; |
484 } |
481 } |
485 slcdDummy(slcdHandle); |
482 slcdDummy(slcdHandle); |
486 key = keycheck(); |
483 key = keycheck(); |
487 if (key == KEY_ENTER) { |
484 if (key == KEY_ENTER) { |
488 mash_fase = MASH_HEATING; |
485 mash_fase = MASH_NA; |
|
486 brew->mashstep++; |
489 syslog(LOG_NOTICE, "AUTO: confirmed mash added"); |
487 syslog(LOG_NOTICE, "AUTO: confirmed mash added"); |
490 } |
488 } |
491 if (key == KEY_RETURN) { |
489 if (key == KEY_RETURN) { |
492 syslog(LOG_NOTICE, "AUTO: aborted mash added"); |
490 syslog(LOG_NOTICE, "AUTO: aborted mash added"); |
493 brew->brewstep = STEP_CLEANUP; |
491 brew->brewstep = STEP_CLEANUP; |
571 syslog(LOG_NOTICE, "AUTO: mash turn %s MLT pump", mlt_pump_state ? "on":"off"); |
569 syslog(LOG_NOTICE, "AUTO: mash turn %s MLT pump", mlt_pump_state ? "on":"off"); |
572 } |
570 } |
573 brew->timeout--; |
571 brew->timeout--; |
574 if (brew->timeout <= 0) { |
572 if (brew->timeout <= 0) { |
575 syslog(LOG_NOTICE, "AUTO: mash step %d fase REST done", brew->mashstep); |
573 syslog(LOG_NOTICE, "AUTO: mash step %d fase REST done", brew->mashstep); |
576 if ((brew->mashstep == 6) && ! unit->skip_iodine) { |
574 if ((brew->mashstep == 0) && ! unit->skip_add) { |
|
575 mash_fase = MASH_PROMPT; |
|
576 } else if ((brew->mashstep == 6) && ! unit->skip_iodine) { |
577 mash_fase = MASH_IODINE; |
577 mash_fase = MASH_IODINE; |
578 brew->timeout = unit->iodine_time * 60; |
578 brew->timeout = unit->iodine_time * 60; |
579 } else if (brew->mashstep == 7) { |
579 } else if (brew->mashstep == 7) { |
580 mash_fase = MASH_DONE; |
580 mash_fase = MASH_DONE; |
581 } else { |
581 } else { |