414 brew->brewstep = STEP_PREMASH; |
414 brew->brewstep = STEP_PREMASH; |
415 } |
415 } |
416 break; |
416 break; |
417 |
417 |
418 case STEP_PREMASH: if (brew->brewstep != last_step) { |
418 case STEP_PREMASH: if (brew->brewstep != last_step) { |
419 prompt(111, NULL); /* "AUTO --> Mash-in " */ |
419 prompt(111, NULL); /* "AUTO --> Prepare " */ |
420 prompt(300, NULL); /* " " */ |
420 prompt(300, NULL); /* " " */ |
421 prompt(418, NULL); /* "--- --- Pause --- " */ |
421 prompt(418, NULL); /* "--- --- Pause --- " */ |
422 tempstatus(); |
422 tempstatus(); |
423 hlt_status(1); |
423 hlt_status(1); |
424 mlt_status(1); |
424 mlt_status(1); |
425 pump_status(unit->pump_premash); |
425 pump_status(unit->pump_premash); |
426 last_step = brew->brewstep; |
426 last_step = brew->brewstep; |
427 } |
427 initlog(brew->name); |
428 initlog(brew->name); |
428 } |
429 if (set_HLT_heater(unit, 1, 85.0)) |
429 if (set_HLT_heater(unit, 1, 85.0)) |
430 syslog(LOG_NOTICE, "AUTO: premash turn on HLT at %6.2f", hltSetpoint); |
430 syslog(LOG_NOTICE, "AUTO: premash turn on HLT at %6.2f", hltSetpoint); |
431 if (set_MLT_heater(unit, 1, recipe->mash[0].setpoint)) |
431 if (set_MLT_heater(unit, 1, 10.0)) |
432 syslog(LOG_NOTICE, "AUTO: premash turn on MLT at %6.2f", mltSetpoint); |
432 syslog(LOG_NOTICE, "AUTO: premash turn on MLT at %6.2f", mltSetpoint); |
433 if (set_MLT_pump(unit, unit->pump_premash)) |
433 if (set_MLT_pump(unit, unit->pump_premash)) |
434 syslog(LOG_NOTICE, "AUTO: premash turn %s MLT pump", mlt_pump_state ? "on":"off"); |
434 syslog(LOG_NOTICE, "AUTO: premash turn %s MLT pump", mlt_pump_state ? "on":"off"); |
435 brew->brewstep = STEP_MASHING; |
435 if (hltInput >= 85.0) { |
436 brew->mashstep = 0; |
436 brew->brewstep = STEP_MASHING; |
437 mash_fase = MASH_NA; |
437 brew->mashstep = 0; |
438 save = TRUE; |
438 mash_fase = MASH_NA; |
|
439 save = TRUE; |
|
440 } |
439 break; |
441 break; |
440 |
442 |
441 case STEP_MASHING: if (brew->brewstep != last_step) { |
443 case STEP_MASHING: if (brew->brewstep != last_step) { |
442 prompt(111 + brew->mashstep, NULL); /* "AUTO --> [mashname] " */ |
444 prompt(111 + brew->mashstep, NULL); /* "AUTO --> [mashname] " */ |
443 prompt(300, NULL); /* " " */ |
445 prompt(300, NULL); /* " " */ |
450 } |
452 } |
451 if (set_HLT_heater(unit, 1, 85.0)) |
453 if (set_HLT_heater(unit, 1, 85.0)) |
452 syslog(LOG_NOTICE, "AUTO: mash turn on HLT at %6.2f", hltSetpoint); |
454 syslog(LOG_NOTICE, "AUTO: mash turn on HLT at %6.2f", hltSetpoint); |
453 if (set_MLT_heater(unit, 1, recipe->mash[brew->mashstep].setpoint)) |
455 if (set_MLT_heater(unit, 1, recipe->mash[brew->mashstep].setpoint)) |
454 syslog(LOG_NOTICE, "AUTO: mash turn on MLT at %6.2f", mltSetpoint); |
456 syslog(LOG_NOTICE, "AUTO: mash turn on MLT at %6.2f", mltSetpoint); |
455 if ((mash_fase != MASH_REST) && set_MLT_pump(unit, unit->pump_onmash)) |
|
456 syslog(LOG_NOTICE, "AUTO: mash turn %s MLT pump", mlt_pump_state ? "on":"off"); |
|
457 |
457 |
458 switch (mash_fase) { |
458 switch (mash_fase) { |
459 case MASH_NA: if (recipe->mash[brew->mashstep].skip) { |
459 case MASH_NA: if (recipe->mash[brew->mashstep].skip) { |
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++; |
477 prompt(219, NULL); /* " Mash added? " */ |
477 prompt(219, NULL); /* " Mash added? " */ |
478 prompt(300, NULL); |
478 prompt(300, NULL); |
479 prompt(407, NULL); /* "--- --- No Yes " */ |
479 prompt(407, NULL); /* "--- --- No Yes " */ |
480 last_fase = mash_fase; |
480 last_fase = mash_fase; |
481 } |
481 } |
|
482 if (set_MLT_pump(unit, 0)) /* Off during mash add */ |
|
483 syslog(LOG_NOTICE, "AUTO: mash turn %s MLT pump", mlt_pump_state ? "on":"off"); |
482 slcdDummy(slcdHandle); |
484 slcdDummy(slcdHandle); |
483 key = keycheck(); |
485 key = keycheck(); |
484 if (key == KEY_ENTER) { |
486 if (key == KEY_ENTER) { |
485 mash_fase = MASH_NA; |
487 mash_fase = MASH_NA; |
486 brew->mashstep++; |
488 brew->mashstep++; |
498 prompt(213, NULL); /* " Iodine test " */ |
500 prompt(213, NULL); /* " Iodine test " */ |
499 timestatus(2, brew->timeout); |
501 timestatus(2, brew->timeout); |
500 prompt(410, NULL); /* " Continue: Yes No " */ |
502 prompt(410, NULL); /* " Continue: Yes No " */ |
501 last_fase = mash_fase; |
503 last_fase = mash_fase; |
502 } |
504 } |
|
505 if (set_MLT_pump(unit, unit->pump_onmash)) |
|
506 syslog(LOG_NOTICE, "AUTO: mash turn %s MLT pump", mlt_pump_state ? "on":"off"); |
503 if (oldsec != seconds) { |
507 if (oldsec != seconds) { |
504 brew->timeout--; |
508 brew->timeout--; |
505 timestatus(2, brew->timeout); |
509 timestatus(2, brew->timeout); |
506 if (brew->timeout <= 0) { |
510 if (brew->timeout <= 0) { |
507 syslog(LOG_NOTICE, "AUTO: mash IODINE test timeout"); |
511 syslog(LOG_NOTICE, "AUTO: mash IODINE test timeout"); |
532 hlt_status(1); |
536 hlt_status(1); |
533 mlt_status(1); |
537 mlt_status(1); |
534 pump_status(unit->pump_onmash); |
538 pump_status(unit->pump_onmash); |
535 last_fase = mash_fase; |
539 last_fase = mash_fase; |
536 } |
540 } |
|
541 if (set_MLT_pump(unit, unit->pump_onmash)) |
|
542 syslog(LOG_NOTICE, "AUTO: mash turn %s MLT pump", mlt_pump_state ? "on":"off"); |
537 if (oldsec != seconds) { |
543 if (oldsec != seconds) { |
538 tempstatus(); |
544 tempstatus(); |
539 percstatus((seconds / 2) % 4); |
545 percstatus((seconds / 2) % 4); |
540 oldsec = seconds; |
546 oldsec = seconds; |
541 } |
547 } |