Sun, 27 Dec 2015 17:52:26 +0100
Renamed Mash-in step to Prepare on the display. Don't run the pump when the mash is added. When preparing the mash, first heat the HLT, and then the MLT so that both have the chance to reach their target temperatures.
442 | 1 | /***************************************************************************** |
2 | * Copyright (C) 2015 | |
3 | * | |
4 | * Michiel Broek <mbroek at mbse dot eu> | |
5 | * | |
6 | * This file is part of the mbsePi-apps | |
7 | * | |
8 | * This is free software; you can redistribute it and/or modify it | |
9 | * under the terms of the GNU General Public License as published by the | |
10 | * Free Software Foundation; either version 2, or (at your option) any | |
11 | * later version. | |
12 | * | |
13 | * mbsePi-apps is distributed in the hope that it will be useful, but | |
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 | * General Public License for more details. | |
17 | * | |
18 | * You should have received a copy of the GNU General Public License | |
19 | * along with ThermFerm; see the file COPYING. If not, write to the Free | |
20 | * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. | |
21 | *****************************************************************************/ | |
22 | ||
23 | #include "brewco.h" | |
24 | #include "slcd.h" | |
25 | #include "prompt.h" | |
26 | ||
27 | ||
28 | extern int debug; | |
29 | extern sys_config Config; | |
30 | extern int lcdHandle; | |
31 | extern int slcdHandle; | |
32 | ||
33 | ||
34 | ||
458
43a8ecb53637
Fixes for compiling on Raspberry.
Michiel Broek <mbroek@mbse.eu>
parents:
451
diff
changeset
|
35 | void prompt(int idx, char *text) |
442 | 36 | { |
37 | char message[81]; | |
38 | int line; | |
39 | ||
458
43a8ecb53637
Fixes for compiling on Raspberry.
Michiel Broek <mbroek@mbse.eu>
parents:
451
diff
changeset
|
40 | switch (idx) { |
442 | 41 | case 0: |
42 | #ifdef HAVE_WIRINGPI_H | |
43 | piLock(LOCK_LCD); | |
44 | lcdClear(lcdHandle); | |
45 | #endif | |
46 | slcdClear(slcdHandle); | |
47 | #ifdef HAVE_WIRINGPI_H | |
48 | piUnlock(LOCK_LCD); | |
49 | #endif | |
50 | return; | |
467 | 51 | case 100: if (text == NULL) |
52 | snprintf(message, Config.lcd_cols + 1, " "); | |
53 | else | |
54 | snprintf(message, Config.lcd_cols + 1, text); | |
443
6b80a37fdf8d
Added programming display CGRAM. Added display of characters from CGRAM. Changed prompts to allow free prompt strings. More code for the brewsystem unit editor.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
55 | break; |
6b80a37fdf8d
Added programming display CGRAM. Added display of characters from CGRAM. Changed prompts to allow free prompt strings. More code for the brewsystem unit editor.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
56 | case 101: snprintf(message, Config.lcd_cols + 1, " Brewco %s \007", VERSION); |
442 | 57 | break; |
58 | case 102: snprintf(message, Config.lcd_cols + 1, " SETUP MENU "); | |
59 | break; | |
60 | case 103: snprintf(message, Config.lcd_cols + 1, " AUTOMATIC MODE "); | |
61 | break; | |
62 | case 104: snprintf(message, Config.lcd_cols + 1, " MANUAL MODE "); | |
63 | break; | |
477
9167ad4c2e77
Renamed Mash-in step to Prepare on the display. Don't run the pump when the mash is added. When preparing the mash, first heat the HLT, and then the MLT so that both have the chance to reach their target temperatures.
Michiel Broek <mbroek@mbse.eu>
parents:
473
diff
changeset
|
64 | case 111: snprintf(message, Config.lcd_cols + 1, "AUTO --> Prepare "); |
442 | 65 | break; |
443
6b80a37fdf8d
Added programming display CGRAM. Added display of characters from CGRAM. Changed prompts to allow free prompt strings. More code for the brewsystem unit editor.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
66 | case 112: snprintf(message, Config.lcd_cols + 1, "AUTO --> Phytase "); |
442 | 67 | break; |
443
6b80a37fdf8d
Added programming display CGRAM. Added display of characters from CGRAM. Changed prompts to allow free prompt strings. More code for the brewsystem unit editor.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
68 | case 113: snprintf(message, Config.lcd_cols + 1, "AUTO --> Glucanase "); |
442 | 69 | break; |
443
6b80a37fdf8d
Added programming display CGRAM. Added display of characters from CGRAM. Changed prompts to allow free prompt strings. More code for the brewsystem unit editor.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
70 | case 114: snprintf(message, Config.lcd_cols + 1, "AUTO --> Protease "); |
442 | 71 | break; |
443
6b80a37fdf8d
Added programming display CGRAM. Added display of characters from CGRAM. Changed prompts to allow free prompt strings. More code for the brewsystem unit editor.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
72 | case 115: snprintf(message, Config.lcd_cols + 1, "AUTO --> \342-Amylase "); /* Beta */ |
442 | 73 | break; |
443
6b80a37fdf8d
Added programming display CGRAM. Added display of characters from CGRAM. Changed prompts to allow free prompt strings. More code for the brewsystem unit editor.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
74 | case 116: snprintf(message, Config.lcd_cols + 1, "AUTO --> \340-Amylase 1"); /* Alpha */ |
442 | 75 | break; |
443
6b80a37fdf8d
Added programming display CGRAM. Added display of characters from CGRAM. Changed prompts to allow free prompt strings. More code for the brewsystem unit editor.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
76 | case 117: snprintf(message, Config.lcd_cols + 1, "AUTO --> \340-Amylase 2"); |
442 | 77 | break; |
78 | case 118: snprintf(message, Config.lcd_cols + 1, "AUTO --> Mash Out "); | |
79 | break; | |
443
6b80a37fdf8d
Added programming display CGRAM. Added display of characters from CGRAM. Changed prompts to allow free prompt strings. More code for the brewsystem unit editor.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
80 | case 119: snprintf(message, Config.lcd_cols + 1, "AUTO --> Boil "); |
6b80a37fdf8d
Added programming display CGRAM. Added display of characters from CGRAM. Changed prompts to allow free prompt strings. More code for the brewsystem unit editor.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
81 | break; |
6b80a37fdf8d
Added programming display CGRAM. Added display of characters from CGRAM. Changed prompts to allow free prompt strings. More code for the brewsystem unit editor.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
82 | case 120: snprintf(message, Config.lcd_cols + 1, "AUTO --> Cooling "); |
6b80a37fdf8d
Added programming display CGRAM. Added display of characters from CGRAM. Changed prompts to allow free prompt strings. More code for the brewsystem unit editor.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
83 | break; |
6b80a37fdf8d
Added programming display CGRAM. Added display of characters from CGRAM. Changed prompts to allow free prompt strings. More code for the brewsystem unit editor.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
84 | case 121: snprintf(message, Config.lcd_cols + 1, "AUTO --> Whirlpool "); |
6b80a37fdf8d
Added programming display CGRAM. Added display of characters from CGRAM. Changed prompts to allow free prompt strings. More code for the brewsystem unit editor.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
85 | break; |
461
482bab226340
Changed some prompt numbers. Added name editor.
Michiel Broek <mbroek@mbse.eu>
parents:
459
diff
changeset
|
86 | case 122: snprintf(message, Config.lcd_cols + 1, "AUTO --> Hopstand 1 "); |
482bab226340
Changed some prompt numbers. Added name editor.
Michiel Broek <mbroek@mbse.eu>
parents:
459
diff
changeset
|
87 | break; |
482bab226340
Changed some prompt numbers. Added name editor.
Michiel Broek <mbroek@mbse.eu>
parents:
459
diff
changeset
|
88 | case 123: snprintf(message, Config.lcd_cols + 1, "AUTO --> Hopstand 2 "); |
443
6b80a37fdf8d
Added programming display CGRAM. Added display of characters from CGRAM. Changed prompts to allow free prompt strings. More code for the brewsystem unit editor.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
89 | break; |
461
482bab226340
Changed some prompt numbers. Added name editor.
Michiel Broek <mbroek@mbse.eu>
parents:
459
diff
changeset
|
90 | case 124: snprintf(message, Config.lcd_cols + 1, "AUTO --> Hopstand 3 "); |
482bab226340
Changed some prompt numbers. Added name editor.
Michiel Broek <mbroek@mbse.eu>
parents:
459
diff
changeset
|
91 | break; |
482bab226340
Changed some prompt numbers. Added name editor.
Michiel Broek <mbroek@mbse.eu>
parents:
459
diff
changeset
|
92 | case 125: snprintf(message, Config.lcd_cols + 1, "AUTO --> Hop xx "); |
482bab226340
Changed some prompt numbers. Added name editor.
Michiel Broek <mbroek@mbse.eu>
parents:
459
diff
changeset
|
93 | break; |
482bab226340
Changed some prompt numbers. Added name editor.
Michiel Broek <mbroek@mbse.eu>
parents:
459
diff
changeset
|
94 | |
482bab226340
Changed some prompt numbers. Added name editor.
Michiel Broek <mbroek@mbse.eu>
parents:
459
diff
changeset
|
95 | case 131: snprintf(message, Config.lcd_cols + 1, " Change Name "); |
443
6b80a37fdf8d
Added programming display CGRAM. Added display of characters from CGRAM. Changed prompts to allow free prompt strings. More code for the brewsystem unit editor.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
96 | break; |
6b80a37fdf8d
Added programming display CGRAM. Added display of characters from CGRAM. Changed prompts to allow free prompt strings. More code for the brewsystem unit editor.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
97 | case 132: snprintf(message, Config.lcd_cols + 1, " Toggle Yes/No "); |
6b80a37fdf8d
Added programming display CGRAM. Added display of characters from CGRAM. Changed prompts to allow free prompt strings. More code for the brewsystem unit editor.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
98 | break; |
445
3ec477cda546
Changed internal storage of temperatures to float. Added 2 prompts. Added editors for float and integer values. Added most of brewunit edit functions.
Michiel Broek <mbroek@mbse.eu>
parents:
443
diff
changeset
|
99 | case 133: snprintf(message, Config.lcd_cols + 1, " Change temperature "); |
3ec477cda546
Changed internal storage of temperatures to float. Added 2 prompts. Added editors for float and integer values. Added most of brewunit edit functions.
Michiel Broek <mbroek@mbse.eu>
parents:
443
diff
changeset
|
100 | break; |
3ec477cda546
Changed internal storage of temperatures to float. Added 2 prompts. Added editors for float and integer values. Added most of brewunit edit functions.
Michiel Broek <mbroek@mbse.eu>
parents:
443
diff
changeset
|
101 | case 134: snprintf(message, Config.lcd_cols + 1, " Change time "); |
3ec477cda546
Changed internal storage of temperatures to float. Added 2 prompts. Added editors for float and integer values. Added most of brewunit edit functions.
Michiel Broek <mbroek@mbse.eu>
parents:
443
diff
changeset
|
102 | break; |
448 | 103 | case 137: snprintf(message, Config.lcd_cols + 1, " Direct/Reverse "); |
104 | break; | |
105 | case 138: snprintf(message, Config.lcd_cols + 1, " Change parameter "); | |
106 | break; | |
461
482bab226340
Changed some prompt numbers. Added name editor.
Michiel Broek <mbroek@mbse.eu>
parents:
459
diff
changeset
|
107 | |
482bab226340
Changed some prompt numbers. Added name editor.
Michiel Broek <mbroek@mbse.eu>
parents:
459
diff
changeset
|
108 | case 191: snprintf(message, Config.lcd_cols + 1, " Edit recipe "); |
482bab226340
Changed some prompt numbers. Added name editor.
Michiel Broek <mbroek@mbse.eu>
parents:
459
diff
changeset
|
109 | break; |
482bab226340
Changed some prompt numbers. Added name editor.
Michiel Broek <mbroek@mbse.eu>
parents:
459
diff
changeset
|
110 | case 192: snprintf(message, Config.lcd_cols + 1, " Edit PID "); |
482bab226340
Changed some prompt numbers. Added name editor.
Michiel Broek <mbroek@mbse.eu>
parents:
459
diff
changeset
|
111 | break; |
482bab226340
Changed some prompt numbers. Added name editor.
Michiel Broek <mbroek@mbse.eu>
parents:
459
diff
changeset
|
112 | case 193: snprintf(message, Config.lcd_cols + 1, " Edit brewsystem "); |
459
1f88be70f253
Added the beginning of the recipes editor. Added load and save of recipes file.
Michiel Broek <mbroek@mbse.eu>
parents:
458
diff
changeset
|
113 | break; |
463
a1da58215b65
Completed the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents:
461
diff
changeset
|
114 | case 194: snprintf(message, Config.lcd_cols + 1, " Edit Mashstep "); |
a1da58215b65
Completed the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents:
461
diff
changeset
|
115 | break; |
a1da58215b65
Completed the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents:
461
diff
changeset
|
116 | case 195: snprintf(message, Config.lcd_cols + 1, " Edit Addition "); |
a1da58215b65
Completed the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents:
461
diff
changeset
|
117 | break; |
a1da58215b65
Completed the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents:
461
diff
changeset
|
118 | case 196: snprintf(message, Config.lcd_cols + 1, " Edit Hopstand "); |
a1da58215b65
Completed the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents:
461
diff
changeset
|
119 | break; |
467 | 120 | case 200: if (text == NULL) |
121 | snprintf(message, Config.lcd_cols + 1, " "); | |
122 | else | |
123 | snprintf(message, Config.lcd_cols + 1, text); | |
442 | 124 | break; |
125 | case 202: snprintf(message, Config.lcd_cols + 1, " Manage Recipes "); | |
126 | break; | |
127 | case 203: snprintf(message, Config.lcd_cols + 1, " Manage Brewsystems "); | |
128 | break; | |
129 | case 204: snprintf(message, Config.lcd_cols + 1, " Manage Devices "); | |
130 | break; | |
131 | case 205: snprintf(message, Config.lcd_cols + 1, " Manage Simulators "); | |
132 | break; | |
133 | case 206: snprintf(message, Config.lcd_cols + 1, " Set Automation "); | |
134 | break; | |
135 | case 207: snprintf(message, Config.lcd_cols + 1, " Delay start? "); | |
136 | break; | |
137 | case 208: snprintf(message, Config.lcd_cols + 1, " Resume Process "); | |
138 | break; | |
139 | case 209: snprintf(message, Config.lcd_cols + 1, " Water Added? "); | |
140 | break; | |
141 | case 210: snprintf(message, Config.lcd_cols + 1, " Pump Prime "); | |
142 | break; | |
143 | case 211: snprintf(message, Config.lcd_cols + 1, " Setting Delay "); | |
144 | break; | |
145 | case 212: snprintf(message, Config.lcd_cols + 1, " To be started in "); | |
146 | break; | |
147 | case 213: snprintf(message, Config.lcd_cols + 1, " Iodine test "); | |
148 | break; | |
149 | case 214: snprintf(message, Config.lcd_cols + 1, " START COOLING "); | |
150 | break; | |
151 | case 215: snprintf(message, Config.lcd_cols + 1, " WHIRLPOOL "); | |
152 | break; | |
153 | case 216: snprintf(message, Config.lcd_cols + 1, " Timing Whirlpool "); | |
154 | break; | |
155 | case 217: snprintf(message, Config.lcd_cols + 1, " Brewing Process "); | |
156 | break; | |
157 | case 218: snprintf(message, Config.lcd_cols + 1, " Add Brewsystem? "); | |
158 | break; | |
473
fdd30e935079
The brew state machine is complete, works but is not bugfree
Michiel Broek <mbroek@mbse.eu>
parents:
467
diff
changeset
|
159 | case 219: snprintf(message, Config.lcd_cols + 1, " Mash added? "); |
fdd30e935079
The brew state machine is complete, works but is not bugfree
Michiel Broek <mbroek@mbse.eu>
parents:
467
diff
changeset
|
160 | break; |
fdd30e935079
The brew state machine is complete, works but is not bugfree
Michiel Broek <mbroek@mbse.eu>
parents:
467
diff
changeset
|
161 | case 220: snprintf(message, Config.lcd_cols + 1, " Mash Removed? "); |
fdd30e935079
The brew state machine is complete, works but is not bugfree
Michiel Broek <mbroek@mbse.eu>
parents:
467
diff
changeset
|
162 | break; |
459
1f88be70f253
Added the beginning of the recipes editor. Added load and save of recipes file.
Michiel Broek <mbroek@mbse.eu>
parents:
458
diff
changeset
|
163 | case 221: snprintf(message, Config.lcd_cols + 1, " Select Recipe "); |
1f88be70f253
Added the beginning of the recipes editor. Added load and save of recipes file.
Michiel Broek <mbroek@mbse.eu>
parents:
458
diff
changeset
|
164 | break; |
1f88be70f253
Added the beginning of the recipes editor. Added load and save of recipes file.
Michiel Broek <mbroek@mbse.eu>
parents:
458
diff
changeset
|
165 | case 222: snprintf(message, Config.lcd_cols + 1, " Select Brewsystem "); |
1f88be70f253
Added the beginning of the recipes editor. Added load and save of recipes file.
Michiel Broek <mbroek@mbse.eu>
parents:
458
diff
changeset
|
166 | break; |
1f88be70f253
Added the beginning of the recipes editor. Added load and save of recipes file.
Michiel Broek <mbroek@mbse.eu>
parents:
458
diff
changeset
|
167 | case 223: snprintf(message, Config.lcd_cols + 1, " Select Device "); |
1f88be70f253
Added the beginning of the recipes editor. Added load and save of recipes file.
Michiel Broek <mbroek@mbse.eu>
parents:
458
diff
changeset
|
168 | break; |
467 | 169 | case 300: if (text == NULL) |
170 | snprintf(message, Config.lcd_cols + 1, " "); | |
171 | else | |
172 | snprintf(message, Config.lcd_cols + 1, text); | |
443
6b80a37fdf8d
Added programming display CGRAM. Added display of characters from CGRAM. Changed prompts to allow free prompt strings. More code for the brewsystem unit editor.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
173 | break; |
6b80a37fdf8d
Added programming display CGRAM. Added display of characters from CGRAM. Changed prompts to allow free prompt strings. More code for the brewsystem unit editor.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
174 | case 301: snprintf(message, Config.lcd_cols + 1, " Finished "); |
442 | 175 | break; |
443
6b80a37fdf8d
Added programming display CGRAM. Added display of characters from CGRAM. Changed prompts to allow free prompt strings. More code for the brewsystem unit editor.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
176 | case 302: snprintf(message, Config.lcd_cols + 1, " Shutting down "); |
6b80a37fdf8d
Added programming display CGRAM. Added display of characters from CGRAM. Changed prompts to allow free prompt strings. More code for the brewsystem unit editor.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
177 | break; |
467 | 178 | case 303: snprintf(message, Config.lcd_cols + 1, " Manual HLT "); |
179 | break; | |
180 | case 304: snprintf(message, Config.lcd_cols + 1, " Manual MLT "); | |
181 | break; | |
182 | case 400: if (text == NULL) | |
183 | snprintf(message, Config.lcd_cols + 1, " "); | |
184 | else | |
185 | snprintf(message, Config.lcd_cols + 1, text); | |
442 | 186 | break; |
187 | case 401: snprintf(message, Config.lcd_cols + 1, "--- MAN AUTO SETUP"); | |
188 | break; | |
189 | case 402: snprintf(message, Config.lcd_cols + 1, "--- dwn quit ok "); | |
190 | break; | |
191 | case 403: snprintf(message, Config.lcd_cols + 1, " up dwn quit ok "); | |
192 | break; | |
193 | case 404: snprintf(message, Config.lcd_cols + 1, " up --- quit ok "); | |
194 | break; | |
195 | case 405: snprintf(message, Config.lcd_cols + 1, "--- --- quit ok "); | |
196 | break; | |
197 | case 406: snprintf(message, Config.lcd_cols + 1, "UP* *DWN heat pmp "); | |
198 | break; | |
199 | case 407: snprintf(message, Config.lcd_cols + 1, "--- --- No Yes "); | |
200 | break; | |
201 | case 408: snprintf(message, Config.lcd_cols + 1, "--- --- Ok --- "); | |
202 | break; | |
203 | case 409: snprintf(message, Config.lcd_cols + 1, "UP* *DWN Pause --- "); | |
204 | break; | |
205 | case 410: snprintf(message, Config.lcd_cols + 1, " Continue: Yes No "); | |
206 | break; | |
207 | case 411: snprintf(message, Config.lcd_cols + 1, "UP* *DWN --- pmp "); | |
208 | break; | |
209 | case 412: snprintf(message, Config.lcd_cols + 1, "Up Dwn Exit Ok "); | |
210 | break; | |
451 | 211 | case 413: snprintf(message, Config.lcd_cols + 1, "UP* *DWN heat --- "); |
212 | break; | |
459
1f88be70f253
Added the beginning of the recipes editor. Added load and save of recipes file.
Michiel Broek <mbroek@mbse.eu>
parents:
458
diff
changeset
|
213 | case 414: snprintf(message, Config.lcd_cols + 1, "add dwn quit ok "); |
1f88be70f253
Added the beginning of the recipes editor. Added load and save of recipes file.
Michiel Broek <mbroek@mbse.eu>
parents:
458
diff
changeset
|
214 | break; |
1f88be70f253
Added the beginning of the recipes editor. Added load and save of recipes file.
Michiel Broek <mbroek@mbse.eu>
parents:
458
diff
changeset
|
215 | case 415: snprintf(message, Config.lcd_cols + 1, "add --- quit ok "); |
1f88be70f253
Added the beginning of the recipes editor. Added load and save of recipes file.
Michiel Broek <mbroek@mbse.eu>
parents:
458
diff
changeset
|
216 | break; |
1f88be70f253
Added the beginning of the recipes editor. Added load and save of recipes file.
Michiel Broek <mbroek@mbse.eu>
parents:
458
diff
changeset
|
217 | case 416: snprintf(message, Config.lcd_cols + 1, "add --- quit --- "); |
1f88be70f253
Added the beginning of the recipes editor. Added load and save of recipes file.
Michiel Broek <mbroek@mbse.eu>
parents:
458
diff
changeset
|
218 | break; |
461
482bab226340
Changed some prompt numbers. Added name editor.
Michiel Broek <mbroek@mbse.eu>
parents:
459
diff
changeset
|
219 | case 417: snprintf(message, Config.lcd_cols + 1, " up dwn next ok "); |
482bab226340
Changed some prompt numbers. Added name editor.
Michiel Broek <mbroek@mbse.eu>
parents:
459
diff
changeset
|
220 | break; |
473
fdd30e935079
The brew state machine is complete, works but is not bugfree
Michiel Broek <mbroek@mbse.eu>
parents:
467
diff
changeset
|
221 | case 418: snprintf(message, Config.lcd_cols + 1, "--- --- Pause --- "); |
fdd30e935079
The brew state machine is complete, works but is not bugfree
Michiel Broek <mbroek@mbse.eu>
parents:
467
diff
changeset
|
222 | break; |
fdd30e935079
The brew state machine is complete, works but is not bugfree
Michiel Broek <mbroek@mbse.eu>
parents:
467
diff
changeset
|
223 | case 419: snprintf(message, Config.lcd_cols + 1, "--* *-- --- pmp "); |
fdd30e935079
The brew state machine is complete, works but is not bugfree
Michiel Broek <mbroek@mbse.eu>
parents:
467
diff
changeset
|
224 | break; |
fdd30e935079
The brew state machine is complete, works but is not bugfree
Michiel Broek <mbroek@mbse.eu>
parents:
467
diff
changeset
|
225 | |
442 | 226 | // 12345678901234567890 |
227 | default: snprintf(message, Config.lcd_cols + 1, " N/A N/A"); | |
228 | } | |
229 | ||
458
43a8ecb53637
Fixes for compiling on Raspberry.
Michiel Broek <mbroek@mbse.eu>
parents:
451
diff
changeset
|
230 | if (idx < 200) |
442 | 231 | line = 0; |
458
43a8ecb53637
Fixes for compiling on Raspberry.
Michiel Broek <mbroek@mbse.eu>
parents:
451
diff
changeset
|
232 | else if (idx < 300) |
442 | 233 | line = 1; |
458
43a8ecb53637
Fixes for compiling on Raspberry.
Michiel Broek <mbroek@mbse.eu>
parents:
451
diff
changeset
|
234 | else if (idx < 400) |
442 | 235 | line = 2; |
236 | else | |
237 | line = 3; | |
238 | ||
239 | fprintf(stdout, "%d %d '%s'\n", line, Config.lcd_cols, message); | |
240 | ||
241 | #ifdef HAVE_WIRINGPI_H | |
242 | piLock(LOCK_LCD); | |
243 | lcdPosition(lcdHandle, 0, line); | |
244 | lcdPuts(lcdHandle, message); | |
245 | ||
246 | #endif | |
247 | slcdPosition(slcdHandle, 0, line); | |
248 | slcdPuts(slcdHandle, message); | |
249 | #ifdef HAVE_WIRINGPI_H | |
250 | piUnlock(LOCK_LCD); | |
251 | #endif | |
252 | } | |
253 | ||
254 |