Updated several prompts. Added pump prime. Added first part of a test plan.

Sun, 27 Dec 2015 16:09:44 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 27 Dec 2015 16:09:44 +0100
changeset 475
bec993331061
parent 474
fe1c3e3e90dc
child 476
8f159cd4f5fc

Updated several prompts. Added pump prime. Added first part of a test plan.

brewco/README file | annotate | diff | comparison | revisions
brewco/brewco.c file | annotate | diff | comparison | revisions
brewco/rdsession.c file | annotate | diff | comparison | revisions
--- a/brewco/README	Sat Dec 26 23:35:42 2015 +0100
+++ b/brewco/README	Sun Dec 27 16:09:44 2015 +0100
@@ -1,3 +1,31 @@
+	Testplan.
+	---------
+
+1. Start a brew, delay start = yes. Set a delay.
+   Ack water added. See Pump Prime. Then see the
+   delay countdown. After timeout, mash-in starts.
+
+2. Start a brew, delay start = no. Ack water added.
+   See pump prime. Then mash-in should start.
+
+3. Start a brew, delay start = no. Nack water added.
+   Brew should cleanup and finish.
+
+4. Start a brew, delay start = no. Ack water added.
+   See pump prime. Then mash-in should start.
+   If set for Skip-add mashing should start.
+
+5. Start a brew, delay start = no. Ack water added.
+   See pump prime. Then mash-in should start.
+   If not Skip-add, should ask for Mash added.
+   If Nack, brew should cleanup and finish.
+
+6. Start a brew, delay start = no. Ack water added.
+   See pump prime. Then mash-in should start.
+   If not Skip-add, should ask for Mash added.
+   If Ack, mashing should start.
+
+
 
 Intern temperatuur in Celcius, float 3 cijfers achter comma. 
 Als het systeem in Farenheid mode staat is alleen de
--- a/brewco/brewco.c	Sat Dec 26 23:35:42 2015 +0100
+++ b/brewco/brewco.c	Sun Dec 27 16:09:44 2015 +0100
@@ -352,28 +352,38 @@
 				    prompt(111, NULL);		/* "AUTO --> Mash In    " */
 				    prompt(209, NULL);		/* "    Water Added?    " */
 				    prompt(300, NULL);
-				    prompt(410, NULL);          /* " Continue: Yes  No  " */
+				    prompt(407, NULL);          /* "---  ---   No   Yes " */
 				    last_step = brew->brewstep;
 				}
 				slcdDummy(slcdHandle);
 				key = keycheck();
-				if (key == KEY_RETURN) {
+				if (key == KEY_ENTER) {
 				    brew->brewstep = STEP_PUMPPRIME;
 				    syslog(LOG_NOTICE, "AUTO: confirmed water added");
 				}
-				if (key == KEY_ENTER) {
+				if (key == KEY_RETURN) {
 				    syslog(LOG_NOTICE, "AUTO: aborted water added");
 				    brew->brewstep = STEP_CLEANUP;
 				}
 				break;
 
 	case STEP_PUMPPRIME:	if (brew->brewstep != last_step) {
-				    prompt(111, NULL);		/* "AUTO --> Mash In    " */
+				    prompt(100, NULL);		/* "                    " */
 				    prompt(210, NULL);		/* "     Pump Prime     " */
 				    prompt(300, NULL);		/* "                    " */
 				    prompt(400, NULL);		/* "                    " */
+				    hlt_status(0);
+				    mlt_status(0);
 				    last_step = brew->brewstep;
 				}
+				for (i = 1; i < 6; i++) {
+				    if (set_MLT_pump(unit, 1))
+					syslog(LOG_NOTICE, "AUTO: pump prime %d turn %s MLT pump", i, mlt_pump_state ? "on":"off");
+				    usleep(750000 + (i * 250000));	/* 250 + i * 250 mSec */
+				    if (set_MLT_pump(unit, 0))
+					syslog(LOG_NOTICE, "AUTO: pump prime %d turn %s MLT pump", i, mlt_pump_state ? "on":"off");
+				    usleep(350000);			/* 350 mSec */
+				}
 				brew->brewstep = STEP_WAITSTART;
 				break;
 
@@ -406,9 +416,9 @@
 				break;
 
 	case STEP_PREMASH:	if (brew->brewstep != last_step) {
-				    prompt(111 + brew->mashstep, NULL);     /* "AUTO --> [mashname] " */
-				    prompt(300, NULL);                      /* "                    " */
-				    prompt(418, NULL);                      /* "---  ---  Pause --- " */
+				    prompt(111, NULL);     	/* "AUTO --> Mash-in    " */
+				    prompt(300, NULL);          /* "                    " */
+				    prompt(418, NULL);          /* "---  ---  Pause --- " */
 				    tempstatus();
 				    hlt_status(1);
 				    mlt_status(1);
@@ -469,16 +479,16 @@
 							    prompt(111 + brew->mashstep, NULL);	/* "AUTO --> [mashname] " */
 							    prompt(219, NULL);              	/* "    Mash added?     " */
 							    prompt(300, NULL);
-							    prompt(410, NULL);              	/* " Continue: Yes  No  " */
+							    prompt(407, NULL);              	/* "---  ---   No   Yes " */
 							    last_fase = mash_fase;
 							}
 							slcdDummy(slcdHandle);
 							key = keycheck();
-							if (key == KEY_RETURN) {
+							if (key == KEY_ENTER) {
 							    mash_fase = MASH_HEATING;
 							    syslog(LOG_NOTICE, "AUTO: confirmed mash added");
 							}
-							if (key == KEY_ENTER) {
+							if (key == KEY_RETURN) {
 							    syslog(LOG_NOTICE, "AUTO: aborted mash added");
 							    brew->brewstep = STEP_CLEANUP;
 							    brew->mashstep = 0;
@@ -1400,6 +1410,11 @@
 	    if (key == KEY_ENTER) {
 		setup();
 		prompt(101, NULL);	/* "    Brewco x.x.x    " */
+		prompt(200, NULL);
+		prompt(300, NULL);
+		hlt_status(0);
+		mlt_status(0);
+		pump_status(0);
 		prompt(401, NULL);	/* "---  MAN  AUTO SETUP" */
 	    } else if (key == KEY_RETURN && ! brew) {
 		int     i, isOk = TRUE;
--- a/brewco/rdsession.c	Sat Dec 26 23:35:42 2015 +0100
+++ b/brewco/rdsession.c	Sun Dec 27 16:09:44 2015 +0100
@@ -29,10 +29,10 @@
 extern char	*etcpath;
 
 
-const char      BREWSTEP[16][10] = { 	"NA", "INIT", "WATEROK", "PRIME", "WAITSTART",
+const char      BREWSTEP[16][11] = { 	"NA", "BREWINIT", "WATERCHECK", "PUMPPRIME", "WAITSTART",
 					"PREMASH", "MASHING", "REMOVE", "PREBOIL", "BOIL",
 					"BOILDONE", "COOLING", "HOPSTAND", "WHIRLPOOL", "CLEANUP",
-					"DONE" };
+					"BREWDONE" };
 const char	MASHSTEP[8][11] = {	"MASH-IN", "PHYTASE", "GLUCANASE", "PROTEASE", "B-AMYLASE", "A-AMYLASE1", "A-AMYLASE2", "MASH-OUT" };
 
 #define MY_ENCODING "utf-8"

mercurial