diff -r 6b80a37fdf8d -r eafb140a1ddd brewco/brewco.h --- a/brewco/brewco.h Wed Dec 02 17:16:41 2015 +0100 +++ b/brewco/brewco.h Fri Dec 04 14:21:25 2015 +0100 @@ -280,6 +280,20 @@ * Brewing state file ~/.brewco/var/brewing.xml * If present a brew session is running */ +#define STEP_NA 0 /* Not in any step yet */ +#define STEP_BREWINIT 1 /* Initialize brew */ +#define STEP_WAITSTART 2 /* Wait for starttime */ +#define STEP_PREMASH 3 /* Pre-mash */ +#define STEP_MASHING 4 /* Mash steps */ +#define STEP_IODINE 5 /* Iodine test */ +#define STEP_MASHREMOVE 6 /* Remove mash */ +#define STEP_PREBOIL 7 /* Heating before boil */ +#define STEP_BOILING 8 /* Boil */ +#define STEP_BOILDONE 9 /* Boil done, hopstand */ +#define STEP_COOLING 10 /* Cooling */ +#define STEP_WHIRLPOOL 11 /* Whirlpool */ +#define STEP_CLEANUP 12 /* Cleanup */ +#define STEP_BREWDONE 13 /* Final step */ #define MAISH_NA 0 /* Not in any state yet */ #define MASIH_PROMPT 1 /* Prompt the user */ @@ -288,21 +302,14 @@ #define MAISH_DONE 4 /* This step is done */ + typedef struct _brew_session { char *uuid_recipe; /* Brewing this recipe */ char *uuid_unit; /* Brewing unit */ - int premash; /* In premash state */ - int mashstep; /* In or into maishstep or -1 */ - int mashstate; /* State this step is in */ - int resttime; /* Rest time downcouner */ - int iodine; /* Mash iodine test */ - int mashremove; /* Mash remove step */ - int boilheating; /* Heat for boiling */ - int boiling; /* Boiling started */ + int brewstep; /* Main steps */ + int mashstep; /* Mash step */ + int timeout; /* Generic time downcouner */ int boiltimer; /* Boiling downcount */ - int cooling; /* Cooling phase */ - int whirlpool; /* Whirlpool phase */ - int cleanup; /* Cleanup phase */ time_t starttime; /* Start of brew */ time_t endtime; /* End of brew */ } brew_session;