forked from OSCSYS/brewtroller
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Enum.h
127 lines (110 loc) · 2.27 KB
/
Enum.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#ifndef BT_ENUM
#define BT_ENUM
//TSensor and Output (0-2) Array Element Constants
#define TS_HLT 0
#define TS_MASH 1
#define TS_KETTLE 2
#define TS_H2OIN 3
#define TS_H2OOUT 4
#define TS_BEEROUT 5
#define TS_AUX1 6
#define TS_AUX2 7
#define TS_AUX3 8
#define NUM_TS 9
#define BAD_TEMP -32768
#define VS_HLT 0
#define VS_MASH 1
#define VS_KETTLE 2
#define VS_STEAM 3
#define VS_PUMP 3
//Auto-Valve Modes
#define AV_FILL 0
#define AV_MASH 1
#define AV_SPARGEIN 2
#define AV_SPARGEOUT 3
#define AV_FLYSPARGE 4
#define AV_CHILL 5
#define AV_HLT 6
#define AV_KETTLE 7
#define NUM_AV 8
//Valve Array Element Constants and Variables
#define VLV_ALL 4294967295
#define VLV_FILLHLT 0
#define VLV_FILLMASH 1
#define VLV_ADDGRAIN 2
#define VLV_MASHHEAT 3
#define VLV_MASHIDLE 4
#define VLV_SPARGEIN 5
#define VLV_SPARGEOUT 6
#define VLV_HOPADD 7
#define VLV_KETTLELID 8
#define VLV_CHILLH2O 9
#define VLV_CHILLBEER 10
#define VLV_BOILRECIRC 11
#define VLV_DRAIN 12
#define VLV_HLTHEAT 13
#define VLV_HLTIDLE 14
#define VLV_KETTLEHEAT 15
#define VLV_KETTLEIDLE 16
#define VLV_USER1 17
#define VLV_USER2 18
#define VLV_USER3 19
#define NUM_VLVCFGS 20
//Timers
#define TIMER_MASH 0
#define TIMER_BOIL 1
//Brew Steps
#define NUM_BREW_STEPS 15
#define STEP_FILL 0
#define STEP_DELAY 1
#define STEP_PREHEAT 2
#define STEP_ADDGRAIN 3
#define STEP_REFILL 4
#define STEP_DOUGHIN 5
#define STEP_ACID 6
#define STEP_PROTEIN 7
#define STEP_SACCH 8
#define STEP_SACCH2 9
#define STEP_MASHOUT 10
#define STEP_MASHHOLD 11
#define STEP_SPARGE 12
#define STEP_BOIL 13
#define STEP_CHILL 14
#define MASH_DOUGHIN 0
#define MASH_ACID 1
#define MASH_PROTEIN 2
#define MASH_SACCH 3
#define MASH_SACCH2 4
#define MASH_MASHOUT 5
//Zones
#define ZONE_MASH 0
#define ZONE_BOIL 1
//Events
#define EVENT_STEPINIT 0
#define EVENT_STEPEXIT 1
#define EVENT_SETPOINT 2
#define EVENT_ESTOP 3
//Log Constants
#define CMD_MSG_FIELDS 25
#define CMD_FIELD_CHARS 21
#define NUM_PROGRAMS 20
#define BT_I2C_ADDR 0x10
#define BTNIC_I2C_ADDR 0x11
#define ASCII 0
#define BTNIC 1
#define BINARY 2
typedef enum {
TRIGGER_ESTOP,
TRIGGER_SPARGEMAX,
TRIGGER_HLTMIN,
TRIGGER_MASHMIN,
TRIGGER_KETTLEMIN,
NUM_TRIGGERS
} TriggerType;
typedef enum {
CONTROLSTATE_OFF,
CONTROLSTATE_AUTO,
CONTROLSTATE_ON,
NUM_CONTROLSTATES
} ControlState;
#endif