|
@@ -1,19 +1,20 @@
|
1
|
1
|
/**
|
2
|
|
- *dogm_lcd_implementation.h
|
|
2
|
+ * dogm_lcd_implementation.h
|
3
|
3
|
*
|
4
|
|
- *Graphics LCD implementation for 128x64 pixel LCDs by STB for ErikZalm/Marlin
|
5
|
|
- *Demonstrator: http://www.reprap.org/wiki/STB_Electronics
|
6
|
|
- *License: http://opensource.org/licenses/BSD-3-Clause
|
|
4
|
+ * Graphics LCD implementation for 128x64 pixel LCDs by STB for ErikZalm/Marlin
|
|
5
|
+ * Demonstrator: http://www.reprap.org/wiki/STB_Electronics
|
|
6
|
+ * License: http://opensource.org/licenses/BSD-3-Clause
|
7
|
7
|
*
|
8
|
|
- *With the use of:
|
9
|
|
- *u8glib by Oliver Kraus
|
10
|
|
- *http://code.google.com/p/u8glib/
|
11
|
|
- *License: http://opensource.org/licenses/BSD-3-Clause
|
|
8
|
+ * With the use of:
|
|
9
|
+ * u8glib by Oliver Kraus
|
|
10
|
+ * http://code.google.com/p/u8glib/
|
|
11
|
+ * License: http://opensource.org/licenses/BSD-3-Clause
|
12
|
12
|
*/
|
13
|
13
|
|
|
14
|
+#ifndef DOGM_LCD_IMPLEMENTATION_H
|
|
15
|
+#define DOGM_LCD_IMPLEMENTATION_H
|
14
|
16
|
|
15
|
|
-#ifndef ULTRA_LCD_IMPLEMENTATION_DOGM_H
|
16
|
|
-#define ULTRA_LCD_IMPLEMENTATION_DOGM_H
|
|
17
|
+#define MARLIN_VERSION "1.0.2"
|
17
|
18
|
|
18
|
19
|
/**
|
19
|
20
|
* Implementation of the LCD display routines for a DOGM128 graphic display. These are common LCD 128x64 pixel graphic displays.
|
|
@@ -51,12 +52,12 @@
|
51
|
52
|
*/
|
52
|
53
|
|
53
|
54
|
// DOGM parameters (size in pixels)
|
54
|
|
-#define DOG_CHAR_WIDTH 6
|
55
|
|
-#define DOG_CHAR_HEIGHT 12
|
56
|
|
-#define DOG_CHAR_WIDTH_LARGE 9
|
57
|
|
-#define DOG_CHAR_HEIGHT_LARGE 18
|
|
55
|
+#define DOG_CHAR_WIDTH 6
|
|
56
|
+#define DOG_CHAR_HEIGHT 12
|
|
57
|
+#define DOG_CHAR_WIDTH_LARGE 9
|
|
58
|
+#define DOG_CHAR_HEIGHT_LARGE 18
|
58
|
59
|
|
59
|
|
-#define START_ROW 0
|
|
60
|
+#define START_ROW 0
|
60
|
61
|
|
61
|
62
|
/* Custom characters defined in font font_6x10_marlin.c */
|
62
|
63
|
#define LCD_STR_DEGREE "\xB0"
|
|
@@ -69,7 +70,7 @@
|
69
|
70
|
#define LCD_STR_BEDTEMP "\xFE"
|
70
|
71
|
#define LCD_STR_THERMOMETER "\xFF"
|
71
|
72
|
|
72
|
|
-#define FONT_STATUSMENU u8g_font_6x9
|
|
73
|
+#define FONT_STATUSMENU u8g_font_6x9
|
73
|
74
|
|
74
|
75
|
int lcd_contrast;
|
75
|
76
|
|
|
@@ -82,7 +83,7 @@ U8GLIB_ST7920_128X64_RRD u8g(0);
|
82
|
83
|
U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0);
|
83
|
84
|
#else
|
84
|
85
|
// for regular DOGM128 display with HW-SPI
|
85
|
|
-U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0); // HW-SPI Com: CS, A0
|
|
86
|
+U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0); // HW-SPI Com: CS, A0
|
86
|
87
|
#endif
|
87
|
88
|
|
88
|
89
|
static void lcd_implementation_init()
|
|
@@ -134,28 +135,12 @@ static void lcd_implementation_init()
|
134
|
135
|
} while(u8g.nextPage());
|
135
|
136
|
}
|
136
|
137
|
|
137
|
|
-static void lcd_implementation_clear()
|
138
|
|
-{
|
139
|
|
-// NO NEED TO IMPLEMENT LIKE SO. Picture loop automatically clears the display.
|
140
|
|
-//
|
141
|
|
-// Check this article: http://arduino.cc/forum/index.php?topic=91395.25;wap2
|
142
|
|
-//
|
143
|
|
-// u8g.firstPage();
|
144
|
|
-// do {
|
145
|
|
-// u8g.setColorIndex(0);
|
146
|
|
-// u8g.drawBox (0, 0, u8g.getWidth(), u8g.getHeight());
|
147
|
|
-// u8g.setColorIndex(1);
|
148
|
|
-// } while( u8g.nextPage() );
|
149
|
|
-}
|
|
138
|
+static void lcd_implementation_clear() { } // Automatically cleared by Picture Loop
|
150
|
139
|
|
151
|
140
|
/* Arduino < 1.0.0 is missing a function to print PROGMEM strings, so we need to implement our own */
|
152
|
|
-static void lcd_printPGM(const char* str)
|
153
|
|
-{
|
154
|
|
- char c;
|
155
|
|
- while((c = pgm_read_byte(str++)) != '\0')
|
156
|
|
- {
|
157
|
|
- u8g.print(c);
|
158
|
|
- }
|
|
141
|
+static void lcd_printPGM(const char* str) {
|
|
142
|
+ char c;
|
|
143
|
+ while ((c = pgm_read_byte(str++))) u8g.print(c);
|
159
|
144
|
}
|
160
|
145
|
|
161
|
146
|
static void _draw_heater_status(int x, int heater) {
|
|
@@ -178,49 +163,44 @@ static void _draw_heater_status(int x, int heater) {
|
178
|
163
|
}
|
179
|
164
|
}
|
180
|
165
|
|
181
|
|
-static void lcd_implementation_status_screen()
|
182
|
|
-{
|
|
166
|
+static void lcd_implementation_status_screen() {
|
183
|
167
|
|
184
|
|
- static unsigned char fan_rot = 0;
|
185
|
|
-
|
186
|
|
- u8g.setColorIndex(1); // black on white
|
|
168
|
+ static unsigned char fan_rot = 0;
|
187
|
169
|
|
188
|
|
- // Symbols menu graphics, animated fan
|
189
|
|
- u8g.drawBitmapP(9,1,STATUS_SCREENBYTEWIDTH,STATUS_SCREENHEIGHT, (blink % 2) && fanSpeed ? status_screen0_bmp : status_screen1_bmp);
|
190
|
|
-
|
191
|
|
- #ifdef SDSUPPORT
|
192
|
|
- //SD Card Symbol
|
193
|
|
- u8g.drawBox(42,42,8,7);
|
194
|
|
- u8g.drawBox(50,44,2,5);
|
195
|
|
- u8g.drawFrame(42,49,10,4);
|
196
|
|
- u8g.drawPixel(50,43);
|
197
|
|
- // Progress bar
|
198
|
|
- u8g.drawFrame(54,49,73,4);
|
|
170
|
+ u8g.setColorIndex(1); // black on white
|
|
171
|
+
|
|
172
|
+ // Symbols menu graphics, animated fan
|
|
173
|
+ u8g.drawBitmapP(9,1,STATUS_SCREENBYTEWIDTH,STATUS_SCREENHEIGHT, (blink % 2) && fanSpeed ? status_screen0_bmp : status_screen1_bmp);
|
199
|
174
|
|
200
|
|
- // SD Card Progress bar and clock
|
201
|
|
- u8g.setFont(FONT_STATUSMENU);
|
|
175
|
+ #ifdef SDSUPPORT
|
|
176
|
+ // SD Card Symbol
|
|
177
|
+ u8g.drawBox(42,42,8,7);
|
|
178
|
+ u8g.drawBox(50,44,2,5);
|
|
179
|
+ u8g.drawFrame(42,49,10,4);
|
|
180
|
+ u8g.drawPixel(50,43);
|
|
181
|
+
|
|
182
|
+ // Progress bar frame
|
|
183
|
+ u8g.drawFrame(54,49,73,4);
|
|
184
|
+
|
|
185
|
+ // SD Card Progress bar and clock
|
|
186
|
+ u8g.setFont(FONT_STATUSMENU);
|
202
|
187
|
|
203
|
|
- if (IS_SD_PRINTING)
|
204
|
|
- {
|
205
|
|
- // Progress bar
|
206
|
|
- u8g.drawBox(55,50, (unsigned int)( (71 * card.percentDone())/100) ,2);
|
207
|
|
- }
|
|
188
|
+ if (IS_SD_PRINTING) {
|
|
189
|
+ // Progress bar solid part
|
|
190
|
+ u8g.drawBox(55, 50, (unsigned int)(71.f * card.percentDone() / 100.f), 2);
|
|
191
|
+ }
|
|
192
|
+
|
|
193
|
+ u8g.setPrintPos(80,47);
|
|
194
|
+ if (starttime != 0) {
|
|
195
|
+ uint16_t time = millis()/60000 - starttime/60000;
|
|
196
|
+ u8g.print(itostr2(time/60));
|
|
197
|
+ u8g.print(':');
|
|
198
|
+ u8g.print(itostr2(time%60));
|
|
199
|
+ }
|
208
|
200
|
else {
|
209
|
|
- // do nothing
|
210
|
|
- }
|
211
|
|
-
|
212
|
|
- u8g.setPrintPos(80,47);
|
213
|
|
- if(starttime != 0)
|
214
|
|
- {
|
215
|
|
- uint16_t time = millis()/60000 - starttime/60000;
|
216
|
|
-
|
217
|
|
- u8g.print(itostr2(time/60));
|
218
|
|
- u8g.print(':');
|
219
|
|
- u8g.print(itostr2(time%60));
|
220
|
|
- }else{
|
221
|
|
- lcd_printPGM(PSTR("--:--"));
|
222
|
|
- }
|
223
|
|
- #endif
|
|
201
|
+ lcd_printPGM(PSTR("--:--"));
|
|
202
|
+ }
|
|
203
|
+ #endif
|
224
|
204
|
|
225
|
205
|
// Extruders
|
226
|
206
|
_draw_heater_status(6, 0);
|
|
@@ -234,107 +214,101 @@ static void lcd_implementation_status_screen()
|
234
|
214
|
// Heatbed
|
235
|
215
|
_draw_heater_status(81, -1);
|
236
|
216
|
|
237
|
|
- // Fan
|
238
|
|
- u8g.setFont(FONT_STATUSMENU);
|
239
|
|
- u8g.setPrintPos(104,27);
|
240
|
|
- #if defined(FAN_PIN) && FAN_PIN > -1
|
241
|
|
- u8g.print(itostr3(int((fanSpeed*100)/256 + 1)));
|
242
|
|
- u8g.print("%");
|
243
|
|
- #else
|
244
|
|
- u8g.print("---");
|
245
|
|
- #endif
|
246
|
|
-
|
247
|
|
-
|
248
|
|
- // X, Y, Z-Coordinates
|
249
|
|
- u8g.setFont(FONT_STATUSMENU);
|
250
|
|
- u8g.drawBox(0,29,128,10);
|
251
|
|
- u8g.setColorIndex(0); // white on black
|
252
|
|
- u8g.setPrintPos(2,37);
|
253
|
|
- u8g.print("X");
|
254
|
|
- u8g.drawPixel(8,33);
|
255
|
|
- u8g.drawPixel(8,35);
|
256
|
|
- u8g.setPrintPos(10,37);
|
257
|
|
- u8g.print(ftostr31ns(current_position[X_AXIS]));
|
258
|
|
- u8g.setPrintPos(43,37);
|
259
|
|
- lcd_printPGM(PSTR("Y"));
|
260
|
|
- u8g.drawPixel(49,33);
|
261
|
|
- u8g.drawPixel(49,35);
|
262
|
|
- u8g.setPrintPos(51,37);
|
263
|
|
- u8g.print(ftostr31ns(current_position[Y_AXIS]));
|
264
|
|
- u8g.setPrintPos(83,37);
|
265
|
|
- u8g.print("Z");
|
266
|
|
- u8g.drawPixel(89,33);
|
267
|
|
- u8g.drawPixel(89,35);
|
268
|
|
- u8g.setPrintPos(91,37);
|
269
|
|
- u8g.print(ftostr31(current_position[Z_AXIS]));
|
270
|
|
- u8g.setColorIndex(1); // black on white
|
|
217
|
+ // Fan
|
|
218
|
+ u8g.setFont(FONT_STATUSMENU);
|
|
219
|
+ u8g.setPrintPos(104,27);
|
|
220
|
+ #if defined(FAN_PIN) && FAN_PIN > -1
|
|
221
|
+ u8g.print(itostr3(int((fanSpeed*100)/256 + 1)));
|
|
222
|
+ u8g.print("%");
|
|
223
|
+ #else
|
|
224
|
+ u8g.print("---");
|
|
225
|
+ #endif
|
|
226
|
+
|
|
227
|
+ // X, Y, Z-Coordinates
|
|
228
|
+ u8g.setFont(FONT_STATUSMENU);
|
|
229
|
+ u8g.drawBox(0,29,128,10);
|
|
230
|
+ u8g.setColorIndex(0); // white on black
|
|
231
|
+ u8g.setPrintPos(2,37);
|
|
232
|
+ u8g.print("X");
|
|
233
|
+ u8g.drawPixel(8,33);
|
|
234
|
+ u8g.drawPixel(8,35);
|
|
235
|
+ u8g.setPrintPos(10,37);
|
|
236
|
+ u8g.print(ftostr31ns(current_position[X_AXIS]));
|
|
237
|
+ u8g.setPrintPos(43,37);
|
|
238
|
+ lcd_printPGM(PSTR("Y"));
|
|
239
|
+ u8g.drawPixel(49,33);
|
|
240
|
+ u8g.drawPixel(49,35);
|
|
241
|
+ u8g.setPrintPos(51,37);
|
|
242
|
+ u8g.print(ftostr31ns(current_position[Y_AXIS]));
|
|
243
|
+ u8g.setPrintPos(83,37);
|
|
244
|
+ u8g.print("Z");
|
|
245
|
+ u8g.drawPixel(89,33);
|
|
246
|
+ u8g.drawPixel(89,35);
|
|
247
|
+ u8g.setPrintPos(91,37);
|
|
248
|
+ u8g.print(ftostr31(current_position[Z_AXIS]));
|
|
249
|
+ u8g.setColorIndex(1); // black on white
|
271
|
250
|
|
272
|
|
- // Feedrate
|
273
|
|
- u8g.setFont(u8g_font_6x10_marlin);
|
274
|
|
- u8g.setPrintPos(3,49);
|
275
|
|
- u8g.print(LCD_STR_FEEDRATE[0]);
|
276
|
|
- u8g.setFont(FONT_STATUSMENU);
|
277
|
|
- u8g.setPrintPos(12,48);
|
278
|
|
- u8g.print(itostr3(feedmultiply));
|
279
|
|
- u8g.print('%');
|
280
|
|
-
|
281
|
|
- // Status line
|
282
|
|
- u8g.setFont(FONT_STATUSMENU);
|
283
|
|
- u8g.setPrintPos(0,61);
|
284
|
|
- #ifndef FILAMENT_LCD_DISPLAY
|
285
|
|
- u8g.print(lcd_status_message);
|
286
|
|
- #else
|
287
|
|
- if(message_millis+5000>millis()){ //Display both Status message line and Filament display on the last line
|
288
|
|
- u8g.print(lcd_status_message);
|
289
|
|
- }
|
290
|
|
- else
|
291
|
|
- {
|
292
|
|
- lcd_printPGM(PSTR("dia:"));
|
293
|
|
- u8g.print(ftostr12ns(filament_width_meas));
|
294
|
|
- lcd_printPGM(PSTR(" factor:"));
|
295
|
|
- u8g.print(itostr3(extrudemultiply));
|
296
|
|
- u8g.print('%');
|
297
|
|
- }
|
298
|
|
- #endif
|
|
251
|
+ // Feedrate
|
|
252
|
+ u8g.setFont(u8g_font_6x10_marlin);
|
|
253
|
+ u8g.setPrintPos(3,49);
|
|
254
|
+ u8g.print(LCD_STR_FEEDRATE[0]);
|
|
255
|
+ u8g.setFont(FONT_STATUSMENU);
|
|
256
|
+ u8g.setPrintPos(12,48);
|
|
257
|
+ u8g.print(itostr3(feedmultiply));
|
|
258
|
+ u8g.print('%');
|
299
|
259
|
|
|
260
|
+ // Status line
|
|
261
|
+ u8g.setFont(FONT_STATUSMENU);
|
|
262
|
+ u8g.setPrintPos(0,61);
|
|
263
|
+ #ifndef FILAMENT_LCD_DISPLAY
|
|
264
|
+ u8g.print(lcd_status_message);
|
|
265
|
+ #else
|
|
266
|
+ if (millis() < message_millis + 5000) { //Display both Status message line and Filament display on the last line
|
|
267
|
+ u8g.print(lcd_status_message);
|
|
268
|
+ }
|
|
269
|
+ else {
|
|
270
|
+ lcd_printPGM(PSTR("dia:"));
|
|
271
|
+ u8g.print(ftostr12ns(filament_width_meas));
|
|
272
|
+ lcd_printPGM(PSTR(" factor:"));
|
|
273
|
+ u8g.print(itostr3(extrudemultiply));
|
|
274
|
+ u8g.print('%');
|
|
275
|
+ }
|
|
276
|
+ #endif
|
300
|
277
|
}
|
301
|
278
|
|
302
|
|
-static void lcd_implementation_drawmenu_generic(uint8_t row, const char* pstr, char pre_char, char post_char)
|
303
|
|
-{
|
304
|
|
- char c;
|
305
|
|
-
|
306
|
|
- uint8_t n = LCD_WIDTH - 1 - 2;
|
307
|
|
-
|
308
|
|
- if ((pre_char == '>') || (pre_char == LCD_STR_UPLEVEL[0] ))
|
309
|
|
- {
|
310
|
|
- u8g.setColorIndex(1); // black on white
|
311
|
|
- u8g.drawBox (0, row*DOG_CHAR_HEIGHT + 3, 128, DOG_CHAR_HEIGHT);
|
312
|
|
- u8g.setColorIndex(0); // following text must be white on black
|
313
|
|
- } else u8g.setColorIndex(1); // unmarked text is black on white
|
314
|
|
-
|
315
|
|
- u8g.setPrintPos(0 * DOG_CHAR_WIDTH, (row + 1) * DOG_CHAR_HEIGHT);
|
316
|
|
- u8g.print(pre_char == '>' ? ' ' : pre_char); // Row selector is obsolete
|
317
|
|
-
|
318
|
|
-
|
319
|
|
- while( (c = pgm_read_byte(pstr)) != '\0' )
|
320
|
|
- {
|
321
|
|
- u8g.print(c);
|
322
|
|
- pstr++;
|
323
|
|
- n--;
|
324
|
|
- }
|
325
|
|
- while(n--){
|
326
|
|
- u8g.print(' ');
|
327
|
|
- }
|
328
|
|
-
|
329
|
|
- u8g.print(post_char);
|
330
|
|
- u8g.print(' ');
|
331
|
|
- u8g.setColorIndex(1); // restore settings to black on white
|
|
279
|
+static void lcd_implementation_drawmenu_generic(uint8_t row, const char* pstr, char pre_char, char post_char) {
|
|
280
|
+ char c;
|
|
281
|
+
|
|
282
|
+ uint8_t n = LCD_WIDTH - 1 - 2;
|
|
283
|
+
|
|
284
|
+ if ((pre_char == '>') || (pre_char == LCD_STR_UPLEVEL[0] )) {
|
|
285
|
+ u8g.setColorIndex(1); // black on white
|
|
286
|
+ u8g.drawBox (0, row*DOG_CHAR_HEIGHT + 3, 128, DOG_CHAR_HEIGHT);
|
|
287
|
+ u8g.setColorIndex(0); // following text must be white on black
|
|
288
|
+ }
|
|
289
|
+ else {
|
|
290
|
+ u8g.setColorIndex(1); // unmarked text is black on white
|
|
291
|
+ }
|
|
292
|
+
|
|
293
|
+ u8g.setPrintPos(0 * DOG_CHAR_WIDTH, (row + 1) * DOG_CHAR_HEIGHT);
|
|
294
|
+ u8g.print(pre_char == '>' ? ' ' : pre_char); // Row selector is obsolete
|
|
295
|
+
|
|
296
|
+ while((c = pgm_read_byte(pstr))) {
|
|
297
|
+ u8g.print(c);
|
|
298
|
+ pstr++;
|
|
299
|
+ n--;
|
|
300
|
+ }
|
|
301
|
+ while(n--) u8g.print(' ');
|
|
302
|
+
|
|
303
|
+ u8g.print(post_char);
|
|
304
|
+ u8g.print(' ');
|
|
305
|
+ u8g.setColorIndex(1); // restore settings to black on white
|
332
|
306
|
}
|
333
|
307
|
|
334
|
308
|
static void _drawmenu_setting_edit_generic(uint8_t row, const char* pstr, char pre_char, const char* data, bool pgm) {
|
335
|
309
|
char c;
|
336
|
310
|
uint8_t n = LCD_WIDTH - 1 - 2 - (pgm ? strlen_P(data) : strlen(data));
|
337
|
|
-
|
|
311
|
+
|
338
|
312
|
u8g.setPrintPos(0 * DOG_CHAR_WIDTH, (row + 1) * DOG_CHAR_HEIGHT);
|
339
|
313
|
u8g.print(pre_char);
|
340
|
314
|
|
|
@@ -393,14 +367,13 @@ static void _drawmenu_setting_edit_generic(uint8_t row, const char* pstr, char p
|
393
|
367
|
#define lcd_implementation_drawmenu_setting_edit_callback_bool_selected(row, pstr, pstr2, data, callback) lcd_implementation_drawmenu_setting_edit_generic_P(row, pstr, '>', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF))
|
394
|
368
|
#define lcd_implementation_drawmenu_setting_edit_callback_bool(row, pstr, pstr2, data, callback) lcd_implementation_drawmenu_setting_edit_generic_P(row, pstr, ' ', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF))
|
395
|
369
|
|
396
|
|
-void lcd_implementation_drawedit(const char* pstr, char* value)
|
397
|
|
-{
|
398
|
|
- u8g.setPrintPos(0 * DOG_CHAR_WIDTH_LARGE, (u8g.getHeight() - 1 - DOG_CHAR_HEIGHT_LARGE) - (1 * DOG_CHAR_HEIGHT_LARGE) - START_ROW );
|
399
|
|
- u8g.setFont(u8g_font_9x18);
|
400
|
|
- lcd_printPGM(pstr);
|
401
|
|
- u8g.print(':');
|
402
|
|
- u8g.setPrintPos((14 - strlen(value)) * DOG_CHAR_WIDTH_LARGE, (u8g.getHeight() - 1 - DOG_CHAR_HEIGHT_LARGE) - (1 * DOG_CHAR_HEIGHT_LARGE) - START_ROW );
|
403
|
|
- u8g.print(value);
|
|
370
|
+void lcd_implementation_drawedit(const char* pstr, char* value) {
|
|
371
|
+ u8g.setPrintPos(0 * DOG_CHAR_WIDTH_LARGE, (u8g.getHeight() - 1 - DOG_CHAR_HEIGHT_LARGE) - (1 * DOG_CHAR_HEIGHT_LARGE) - START_ROW );
|
|
372
|
+ u8g.setFont(u8g_font_9x18);
|
|
373
|
+ lcd_printPGM(pstr);
|
|
374
|
+ u8g.print(':');
|
|
375
|
+ u8g.setPrintPos((14 - strlen(value)) * DOG_CHAR_WIDTH_LARGE, (u8g.getHeight() - 1 - DOG_CHAR_HEIGHT_LARGE) - (1 * DOG_CHAR_HEIGHT_LARGE) - START_ROW );
|
|
376
|
+ u8g.print(value);
|
404
|
377
|
}
|
405
|
378
|
|
406
|
379
|
static void _drawmenu_sd(uint8_t row, const char* pstr, const char* filename, char * const longFilename, bool isDir, bool isSelected) {
|
|
@@ -419,7 +392,7 @@ static void _drawmenu_sd(uint8_t row, const char* pstr, const char* filename, ch
|
419
|
392
|
}
|
420
|
393
|
|
421
|
394
|
u8g.setPrintPos(0 * DOG_CHAR_WIDTH, (row + 1) * DOG_CHAR_HEIGHT);
|
422
|
|
- u8g.print(' '); // Indent by 1 char
|
|
395
|
+ u8g.print(' '); // Indent by 1 char
|
423
|
396
|
|
424
|
397
|
if (isDir) u8g.print(LCD_STR_FOLDER[0]);
|
425
|
398
|
|
|
@@ -447,20 +420,16 @@ static void _drawmenu_sd(uint8_t row, const char* pstr, const char* filename, ch
|
447
|
420
|
#define lcd_implementation_drawmenu_function_selected(row, pstr, data) lcd_implementation_drawmenu_generic(row, pstr, '>', ' ')
|
448
|
421
|
#define lcd_implementation_drawmenu_function(row, pstr, data) lcd_implementation_drawmenu_generic(row, pstr, ' ', ' ')
|
449
|
422
|
|
450
|
|
-static void lcd_implementation_quick_feedback()
|
451
|
|
-{
|
452
|
|
-
|
453
|
|
-#if BEEPER > -1
|
|
423
|
+static void lcd_implementation_quick_feedback() {
|
|
424
|
+ #if BEEPER > -1
|
454
|
425
|
SET_OUTPUT(BEEPER);
|
455
|
|
- for(int8_t i=0;i<10;i++)
|
456
|
|
- {
|
457
|
|
- WRITE(BEEPER,HIGH);
|
458
|
|
- delay(3);
|
459
|
|
- WRITE(BEEPER,LOW);
|
460
|
|
- delay(3);
|
|
426
|
+ for(int8_t i=0; i<10; i++) {
|
|
427
|
+ WRITE(BEEPER,HIGH);
|
|
428
|
+ delay(3);
|
|
429
|
+ WRITE(BEEPER,LOW);
|
|
430
|
+ delay(3);
|
461
|
431
|
}
|
462
|
|
-#endif
|
|
432
|
+ #endif
|
463
|
433
|
}
|
464
|
|
-#endif//ULTRA_LCD_IMPLEMENTATION_DOGM_H
|
465
|
|
-
|
466
|
434
|
|
|
435
|
+#endif //__DOGM_LCD_IMPLEMENTATION_H
|