-
Notifications
You must be signed in to change notification settings - Fork 1
/
Enum.py
92 lines (75 loc) · 1.92 KB
/
Enum.py
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
#TSensor and Output (0-2) Array Element Constants
TS_HLT = 0
TS_MASH = 1
TS_KETTLE = 1
TS_H2OIN = 3
TS_H2OOUT = 4
TS_BEEROUT = 5
TS_AUX1 = 6
TS_AUX2 = 7
TS_AUX3 = 8
NUM_TS = 9
BAD_TEMP = -32768
VS_MASH = 1
VS_KETTLE = 1
VS_PUMP = 3
#Timers
TIMER_MASH = 0
TIMER_BOIL = 1
#Brew Steps
NUM_BREW_STEPS = 16
STEP_FILL = 0
STEP_DELAY = 1
STEP_PREHEAT = 2
STEP_ADDGRAIN = 3
STEP_REFILL = 4
STEP_DOUGHIN = 5
STEP_ACID = 6
STEP_PROTEIN = 7
STEP_SACCH = 8
STEP_SACCH2 = 9
STEP_MASHOUT = 10
STEP_MASHHOLD = 11
STEP_SPARGE = 12
STEP_BOIL = 13
STEP_CHILL = 14
STEP_DONE = 15
PROGRAM_IDLE = 255
ProgramNames = {0: "STEP_FILL", 1: 'STEP_DELAY', 2: 'STEP_PREHEAT', 3: 'STEP_ADDGRAIN',
4: 'STEP_REFILL', 5: 'STEP_DOUGHIN', 6: 'STEP_ACID', 7: 'STEP_PROTEIN', 8: 'STEP_SACCH',
9: 'STEP_SACCH2', 10: 'STEP_MASHOUT', 11: 'STEP_MASHHOLD',
12: 'STEP_SPARGE', 13: 'STEP_BOIL', 14: 'STEP_CHILL', 15: 'STEP_DONE', 255: 'PROGRAM_IDLE'}
# stepProgram[STEP_FILL] = STEP_FILL
# stepProgram[STEP_DELAY] = PROGRAM_IDLE
# stepProgram[STEP_PREHEAT] = PROGRAM_IDLE
# stepProgram[STEP_ADDGRAIN] = PROGRAM_IDLE
# stepProgram[STEP_REFILL] = PROGRAM_IDLE
# stepProgram[STEP_DOUGHIN] = PROGRAM_IDLE
# stepProgram[STEP_ACID] = PROGRAM_IDLE
# stepProgram[STEP_PROTEIN] = PROGRAM_IDLE
# stepProgram[STEP_SACCH] = PROGRAM_IDLE
# stepProgram[STEP_SACCH2] = PROGRAM_IDLE
# stepProgram[STEP_MASHOUT] = PROGRAM_IDLE
# stepProgram[STEP_MASHHOLD] = PROGRAM_IDLE
# stepProgram[STEP_SPARGE] = PROGRAM_IDLE
# stepProgram[STEP_BOIL] = PROGRAM_IDLE
# stepProgram[STEP_CHILL] = PROGRAM_IDLE
# stepProgram[STEP_DONE] = PROGRAM_IDLE
MASH_DOUGHIN = 0
MASH_ACID = 1
MASH_PROTEIN = 2
MASH_SACCH = 3
MASH_SACCH2 = 4
MASH_MASHOUT = 5
#Zones
ZONE_MASH = 0
ZONE_BOIL = 1
I2C_ADDR = 0x10
stepProgram = [PROGRAM_IDLE] * NUM_BREW_STEPS
preheated = [False] * 4
setpoint = {"MASH_TS_TEMP": 0}
HeatStatus = [0, 0]
mashVol = 0
temp = [0] * 2
BrewConfig = {}
ESTOP = False