Browse Source

Merge branch 'Development' of github.com:MarlinFirmware/Marlin into LogoLCD

Conflicts:
	Marlin/dogm_lcd_implementation.h
Steffen Vogel 10 years ago
parent
commit
69dc411ae0
6 changed files with 190 additions and 210 deletions
  1. 7
    1
      Marlin/Configuration_adv.h
  2. 14
    10
      Marlin/Marlin_main.cpp
  3. 158
    189
      Marlin/dogm_lcd_implementation.h
  4. 8
    7
      Marlin/ultralcd.cpp
  5. 1
    1
      Marlin/ultralcd.h
  6. 2
    2
      README.md

+ 7
- 1
Marlin/Configuration_adv.h View File

@@ -297,7 +297,7 @@
297 297
 // using:
298 298
 //#define MENU_ADDAUTOSTART
299 299
 
300
-// Show a progress bar on the LCD when printing from SD?
300
+// Show a progress bar on HD44780 LCDs for SD printing
301 301
 //#define LCD_PROGRESS_BAR
302 302
 
303 303
 #ifdef LCD_PROGRESS_BAR
@@ -309,6 +309,12 @@
309 309
   #define PROGRESS_MSG_EXPIRE   0
310 310
   // Enable this to show messages for MSG_TIME then hide them
311 311
   //#define PROGRESS_MSG_ONCE
312
+  #ifdef DOGLCD
313
+    #warning LCD_PROGRESS_BAR does not apply to graphical displays at this time.
314
+  #endif
315
+  #ifdef FILAMENT_LCD_DISPLAY
316
+    #error LCD_PROGRESS_BAR and FILAMENT_LCD_DISPLAY are not fully compatible. Comment out this line to use both.
317
+  #endif
312 318
 #endif
313 319
 
314 320
 // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.

+ 14
- 10
Marlin/Marlin_main.cpp View File

@@ -1281,28 +1281,32 @@ void refresh_cmd_timeout(void)
1281 1281
       feedrate=retract_feedrate*60;
1282 1282
       retracted[active_extruder]=true;
1283 1283
       prepare_move();
1284
-      current_position[Z_AXIS]-=retract_zlift;
1284
+      if(retract_zlift > 0.01) {
1285
+         current_position[Z_AXIS]-=retract_zlift;
1285 1286
 #ifdef DELTA
1286
-      calculate_delta(current_position); // change cartesian kinematic to  delta kinematic;
1287
-      plan_set_position(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS]);
1287
+         calculate_delta(current_position); // change cartesian kinematic to  delta kinematic;
1288
+         plan_set_position(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS]);
1288 1289
 #else
1289
-      plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1290
+         plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1290 1291
 #endif
1291
-      prepare_move();
1292
+         prepare_move();
1293
+      }
1292 1294
       feedrate = oldFeedrate;
1293 1295
     } else if(!retracting && retracted[active_extruder]) {
1294 1296
       destination[X_AXIS]=current_position[X_AXIS];
1295 1297
       destination[Y_AXIS]=current_position[Y_AXIS];
1296 1298
       destination[Z_AXIS]=current_position[Z_AXIS];
1297 1299
       destination[E_AXIS]=current_position[E_AXIS];
1298
-      current_position[Z_AXIS]+=retract_zlift;
1300
+      if(retract_zlift > 0.01) {
1301
+         current_position[Z_AXIS]+=retract_zlift;
1299 1302
 #ifdef DELTA
1300
-      calculate_delta(current_position); // change cartesian kinematic  to  delta kinematic;
1301
-      plan_set_position(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS]);
1303
+         calculate_delta(current_position); // change cartesian kinematic  to  delta kinematic;
1304
+         plan_set_position(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS]);
1302 1305
 #else
1303
-      plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1306
+         plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1304 1307
 #endif
1305
-      //prepare_move();
1308
+         //prepare_move();
1309
+      }
1306 1310
       if (swapretract) {
1307 1311
         current_position[E_AXIS]-=(retract_length_swap+retract_recover_length_swap)/volumetric_multiplier[active_extruder]; 
1308 1312
       } else {

+ 158
- 189
Marlin/dogm_lcd_implementation.h View File

@@ -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

+ 8
- 7
Marlin/ultralcd.cpp View File

@@ -195,7 +195,7 @@ static void lcd_goto_menu(menuFunc_t menu, const uint32_t encoder=0, const bool
195 195
     if (feedback) lcd_quick_feedback();
196 196
 
197 197
     // For LCD_PROGRESS_BAR re-initialize the custom characters
198
-    #if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT)
198
+    #if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) && !defined(DOGLCD)
199 199
       lcd_set_custom_characters(menu == lcd_status_screen);
200 200
     #endif
201 201
   }
@@ -204,7 +204,7 @@ static void lcd_goto_menu(menuFunc_t menu, const uint32_t encoder=0, const bool
204 204
 /* Main status screen. It's up to the implementation specific part to show what is needed. As this is very display dependent */
205 205
 static void lcd_status_screen()
206 206
 {
207
-  #if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT)
207
+  #if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) && !defined(DOGLCD)
208 208
     uint16_t mil = millis();
209 209
     #ifndef PROGRESS_MSG_ONCE
210 210
       if (mil > progressBarTick + PROGRESS_BAR_MSG_TIME + PROGRESS_BAR_BAR_TIME) {
@@ -236,11 +236,12 @@ static void lcd_status_screen()
236 236
         lcd_status_update_delay--;
237 237
     else
238 238
         lcdDrawUpdate = 1;
239
-    if (lcdDrawUpdate)
240
-    {
239
+
240
+    if (lcdDrawUpdate) {
241 241
         lcd_implementation_status_screen();
242 242
         lcd_status_update_delay = 10;   /* redraw the main screen every second. This is easier then trying keep track of all things that change on the screen */
243 243
     }
244
+
244 245
 #ifdef ULTIPANEL
245 246
 
246 247
     bool current_click = LCD_CLICKED;
@@ -265,7 +266,7 @@ static void lcd_status_screen()
265 266
     {
266 267
         lcd_goto_menu(lcd_main_menu);
267 268
         lcd_implementation_init( // to maybe revive the LCD if static electricity killed it.
268
-          #if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT)
269
+          #if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) && !defined(DOGLCD)
269 270
             currentMenu == lcd_status_screen
270 271
           #endif
271 272
         );
@@ -1191,7 +1192,7 @@ void lcd_update()
1191 1192
         lcdDrawUpdate = 2;
1192 1193
         lcd_oldcardstatus = IS_SD_INSERTED;
1193 1194
         lcd_implementation_init( // to maybe revive the LCD if static electricity killed it.
1194
-          #if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT)
1195
+          #if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) && !defined(DOGLCD)
1195 1196
             currentMenu == lcd_status_screen
1196 1197
           #endif
1197 1198
         );
@@ -1294,7 +1295,7 @@ void lcd_finishstatus() {
1294 1295
     }
1295 1296
   }
1296 1297
   lcd_status_message[LCD_WIDTH] = '\0';
1297
-  #if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT)
1298
+  #if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) && !defined(DOGLCD)
1298 1299
     #if PROGRESS_MSG_EXPIRE > 0
1299 1300
       messageTick =
1300 1301
     #endif

+ 1
- 1
Marlin/ultralcd.h View File

@@ -49,7 +49,7 @@
49 49
   #ifdef FILAMENT_LCD_DISPLAY
50 50
         extern unsigned long message_millis;
51 51
   #endif
52
-    
52
+
53 53
   void lcd_buzz(long duration,uint16_t freq);
54 54
   bool lcd_clicked();
55 55
 

+ 2
- 2
README.md View File

@@ -30,9 +30,9 @@ What bugs are we working on: [Bug Fixing Round 2](https://github.com/MarlinFirmw
30 30
 
31 31
 ## Contact
32 32
 
33
-__IRC:__ #marlin-firmware @freenode
33
+__IRC:__ #marlin-firmware @freenode ([WebChat Client](https://webchat.freenode.net/?channels=marlin-firmware), [Archive](http://energymonitor-dk.dns4e.net/marlin-firmware-log/))
34 34
 
35
-__Google Hangouts:__ https://plus.google.com/hangouts/_/event/cps5d0ru0iruhl6ebqbk9dpqpa4?authuser=0&hl=da
35
+__Mailing List:__ marlin@lists.0l.de ([Subscribe](http://lists.0l.de/mailman/listinfo/marlin), [Archive](http://lists.0l.de/pipermail/marlin/))
36 36
 
37 37
 ## Credits
38 38
 

Loading…
Cancel
Save