Browse Source

Merge pull request #1853 from thinkyhead/dev_version

Set version to "1.0.3 dev"
Scott Lahteine 9 years ago
parent
commit
bb917ecda8

+ 1
- 1
Marlin/Configuration.h View File

@@ -40,7 +40,7 @@ Here are some standard links for getting your machine calibrated:
40 40
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
41 41
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
42 42
 // build by the user have been successfully uploaded into firmware.
43
-#define STRING_VERSION "1.0.2"
43
+#define STRING_VERSION "1.0.3 dev"
44 44
 #define STRING_URL "reprap.org"
45 45
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
46 46
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.

+ 1
- 1
Marlin/configurator/config/Configuration.h View File

@@ -40,7 +40,7 @@ Here are some standard links for getting your machine calibrated:
40 40
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
41 41
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
42 42
 // build by the user have been successfully uploaded into firmware.
43
-#define STRING_VERSION "1.0.2"
43
+#define STRING_VERSION "1.0.3 dev"
44 44
 #define STRING_URL "reprap.org"
45 45
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
46 46
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.

+ 28
- 29
Marlin/dogm_lcd_implementation.h View File

@@ -37,8 +37,8 @@
37 37
 
38 38
 // save 3120 bytes of PROGMEM by commenting out #define USE_BIG_EDIT_FONT
39 39
 // we don't have a big font for Cyrillic, Kana
40
-#if defined( MAPPER_C2C3 ) || defined( MAPPER_NON )
41
-//  #define USE_BIG_EDIT_FONT
40
+#if defined(MAPPER_C2C3) || defined(MAPPER_NON)
41
+  //#define USE_BIG_EDIT_FONT
42 42
 #endif
43 43
 
44 44
 // If you have spare 2300Byte of progmem and want to use a 
@@ -126,17 +126,17 @@
126 126
 
127 127
 // LCD selection
128 128
 #ifdef U8GLIB_ST7920
129
-//U8GLIB_ST7920_128X64_RRD u8g(0,0,0);
130
-U8GLIB_ST7920_128X64_RRD u8g(0);
129
+  //U8GLIB_ST7920_128X64_RRD u8g(0,0,0);
130
+  U8GLIB_ST7920_128X64_RRD u8g(0);
131 131
 #elif defined(MAKRPANEL)
132
-// The MaKrPanel display, ST7565 controller as well
133
-U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0);
132
+  // The MaKrPanel display, ST7565 controller as well
133
+  U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0);
134 134
 #elif defined(VIKI2) || defined(miniVIKI)
135
-// Mini Viki and Viki 2.0 LCD, ST7565 controller as well
136
-U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0);
135
+  // Mini Viki and Viki 2.0 LCD, ST7565 controller as well
136
+  U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0);
137 137
 #else
138
-// for regular DOGM128 display with HW-SPI
139
-U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0);  // HW-SPI Com: CS, A0
138
+  // for regular DOGM128 display with HW-SPI
139
+  U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0);  // HW-SPI Com: CS, A0
140 140
 #endif
141 141
 
142 142
 #include "utf_mapper.h"
@@ -188,8 +188,8 @@ char lcd_printPGM(const char* str) {
188 188
 
189 189
 static bool show_splashscreen = true;
190 190
 
191
-static void lcd_implementation_init()
192
-{
191
+static void lcd_implementation_init() {
192
+
193 193
   #ifdef LCD_PIN_BL // Enable LCD backlight
194 194
     pinMode(LCD_PIN_BL, OUTPUT);
195 195
 	  digitalWrite(LCD_PIN_BL, HIGH);
@@ -198,16 +198,16 @@ static void lcd_implementation_init()
198 198
   u8g.setContrast(lcd_contrast);	
199 199
 	// FIXME: remove this workaround
200 200
   // Uncomment this if you have the first generation (V1.10) of STBs board
201
-	// pinMode(17, OUTPUT);	// Enable LCD backlight
202
-	// digitalWrite(17, HIGH);
203
-  
204
-#ifdef LCD_SCREEN_ROT_90
205
-	u8g.setRot90();   // Rotate screen by 90°
206
-#elif defined(LCD_SCREEN_ROT_180)
207
-	u8g.setRot180();	// Rotate screen by 180°
208
-#elif defined(LCD_SCREEN_ROT_270)
209
-	u8g.setRot270();	// Rotate screen by 270°
210
-#endif
201
+  // pinMode(17, OUTPUT);	// Enable LCD backlight
202
+  // digitalWrite(17, HIGH);
203
+
204
+  #ifdef LCD_SCREEN_ROT_90
205
+    u8g.setRot90();   // Rotate screen by 90°
206
+  #elif defined(LCD_SCREEN_ROT_180)
207
+    u8g.setRot180();	// Rotate screen by 180°
208
+  #elif defined(LCD_SCREEN_ROT_270)
209
+    u8g.setRot270();	// Rotate screen by 270°
210
+  #endif
211 211
 	
212 212
   // Show splashscreen
213 213
   int offx = (u8g.getWidth() - START_BMPWIDTH) / 2;
@@ -220,7 +220,7 @@ static void lcd_implementation_init()
220 220
   int txt1X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE1) - 1)*DOG_CHAR_WIDTH) / 2;
221 221
 
222 222
 	u8g.firstPage();
223
-	do {
223
+  do {
224 224
     if (show_splashscreen) {
225 225
       u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp);
226 226
       lcd_setFont(FONT_MENU);
@@ -232,7 +232,7 @@ static void lcd_implementation_init()
232 232
         u8g.drawStr(txt2X, u8g.getHeight() - DOG_CHAR_HEIGHT*1/2, STRING_SPLASH_LINE2);
233 233
       #endif
234 234
     }
235
-	} while (u8g.nextPage());
235
+  } while (u8g.nextPage());
236 236
   show_splashscreen = false;
237 237
 }
238 238
 
@@ -295,20 +295,19 @@ static void lcd_implementation_status_screen() {
295 295
       lcd_printPGM(PSTR("--:--"));
296 296
     }
297 297
   #endif
298
- 
298
+
299 299
   // Extruders
300 300
   for (int i=0; i<EXTRUDERS; i++) _draw_heater_status(6 + i * 25, i);
301 301
 
302 302
   // Heatbed
303 303
   if (EXTRUDERS < 4) _draw_heater_status(81, -1);
304
- 
304
+
305 305
   // Fan
306 306
   lcd_setFont(FONT_STATUSMENU);
307 307
   u8g.setPrintPos(104,27);
308 308
   #if HAS_FAN
309 309
     int per = ((fanSpeed + 1) * 100) / 256;
310 310
     if (per) {
311
-
312 311
       lcd_print(itostr3(per));
313 312
       lcd_print('%');
314 313
     }
@@ -360,9 +359,9 @@ static void lcd_implementation_status_screen() {
360 359
   // Status line
361 360
   lcd_setFont(FONT_STATUSMENU);
362 361
   #ifdef USE_SMALL_INFOFONT
363
-  u8g.setPrintPos(0,62);
362
+    u8g.setPrintPos(0,62);
364 363
   #else
365
-  u8g.setPrintPos(0,63);
364
+    u8g.setPrintPos(0,63);
366 365
   #endif
367 366
   #ifndef FILAMENT_LCD_DISPLAY
368 367
     lcd_print(lcd_status_message);

+ 1
- 1
Marlin/example_configurations/Felix/Configuration.h View File

@@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
38 38
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
39 39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
40 40
 // build by the user have been successfully uploaded into firmware.
41
-#define STRING_VERSION "1.0.2"
41
+#define STRING_VERSION "1.0.3 dev"
42 42
 #define STRING_URL "reprap.org"
43 43
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
44 44
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.

+ 1
- 1
Marlin/example_configurations/Felix/Configuration_DUAL.h View File

@@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
38 38
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
39 39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
40 40
 // build by the user have been successfully uploaded into firmware.
41
-#define STRING_VERSION "1.0.2"
41
+#define STRING_VERSION "1.0.3 dev"
42 42
 #define STRING_URL "reprap.org"
43 43
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
44 44
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.

+ 1
- 1
Marlin/example_configurations/Hephestos/Configuration.h View File

@@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
38 38
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
39 39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
40 40
 // build by the user have been successfully uploaded into firmware.
41
-#define STRING_VERSION "1.0.2"
41
+#define STRING_VERSION "1.0.3 dev"
42 42
 #define STRING_URL "reprap.org"
43 43
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
44 44
 #define STRING_CONFIG_H_AUTHOR "(bq Hephestos)" // Who made the changes.

+ 1
- 1
Marlin/example_configurations/K8200/Configuration.h View File

@@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
38 38
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
39 39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
40 40
 // build by the user have been successfully uploaded into firmware.
41
-#define STRING_VERSION "1.0.2"
41
+#define STRING_VERSION "1.0.3 dev"
42 42
 #define STRING_URL "reprap.org"
43 43
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
44 44
 #define STRING_CONFIG_H_AUTHOR "(K8200, CONSULitAS)" // Who made the changes.

+ 1
- 1
Marlin/example_configurations/SCARA/Configuration.h View File

@@ -56,7 +56,7 @@ Here are some standard links for getting your machine calibrated:
56 56
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
57 57
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
58 58
 // build by the user have been successfully uploaded into firmware.
59
-#define STRING_VERSION "1.0.2"
59
+#define STRING_VERSION "1.0.3 dev"
60 60
 #define STRING_URL "reprap.org"
61 61
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
62 62
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.

+ 1
- 1
Marlin/example_configurations/WITBOX/Configuration.h View File

@@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
38 38
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
39 39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
40 40
 // build by the user have been successfully uploaded into firmware.
41
-#define STRING_VERSION "1.0.2"
41
+#define STRING_VERSION "1.0.3 dev"
42 42
 #define STRING_URL "reprap.org"
43 43
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
44 44
 #define STRING_CONFIG_H_AUTHOR "(bq Witbox)" // Who made the changes.

+ 1
- 1
Marlin/example_configurations/delta/generic/Configuration.h View File

@@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
38 38
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
39 39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
40 40
 // build by the user have been successfully uploaded into firmware.
41
-#define STRING_VERSION "1.0.2"
41
+#define STRING_VERSION "1.0.3 dev"
42 42
 #define STRING_URL "reprap.org"
43 43
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
44 44
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.

+ 1
- 1
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

@@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
38 38
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
39 39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
40 40
 // build by the user have been successfully uploaded into firmware.
41
-#define STRING_VERSION "1.0.2"
41
+#define STRING_VERSION "1.0.3 dev"
42 42
 #define STRING_URL "reprap.org"
43 43
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
44 44
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.

+ 1
- 1
Marlin/example_configurations/makibox/Configuration.h View File

@@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
38 38
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
39 39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
40 40
 // build by the user have been successfully uploaded into firmware.
41
-#define STRING_VERSION "1.0.2"
41
+#define STRING_VERSION "1.0.3 dev"
42 42
 #define STRING_URL "reprap.org"
43 43
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
44 44
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.

+ 1
- 1
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

@@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
38 38
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
39 39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
40 40
 // build by the user have been successfully uploaded into firmware.
41
-#define STRING_VERSION "1.0.2"
41
+#define STRING_VERSION "1.0.3 dev"
42 42
 #define STRING_URL "reprap.org"
43 43
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
44 44
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.

+ 41
- 39
Marlin/ultralcd.cpp View File

@@ -422,7 +422,7 @@ static void lcd_main_menu() {
422 422
   END_MENU();
423 423
 }
424 424
 
425
-#if defined( SDSUPPORT ) && defined( MENU_ADDAUTOSTART )
425
+#if defined(SDSUPPORT) && defined(MENU_ADDAUTOSTART)
426 426
   static void lcd_autostart_sd() {
427 427
     card.autostart_index = 0;
428 428
     card.setroot();
@@ -431,7 +431,7 @@ static void lcd_main_menu() {
431 431
 #endif
432 432
 
433 433
 void lcd_set_home_offsets() {
434
-  for(int8_t i=0; i < NUM_AXIS; i++) {
434
+  for (int8_t i=0; i < NUM_AXIS; i++) {
435 435
     if (i != E_AXIS) {
436 436
       home_offset[i] -= current_position[i];
437 437
       current_position[i] = 0.0;
@@ -965,48 +965,49 @@ static void lcd_control_volumetric_menu() {
965 965
 
966 966
 #ifdef DOGLCD
967 967
 
968
-static void lcd_set_contrast() {
969
-  if (encoderPosition != 0) {
970
-    lcd_contrast -= encoderPosition;
971
-    if (lcd_contrast < 0) lcd_contrast = 0;
972
-    else if (lcd_contrast > 63) lcd_contrast = 63;
973
-    encoderPosition = 0;
974
-    lcdDrawUpdate = 1;
975
-    u8g.setContrast(lcd_contrast);
968
+  static void lcd_set_contrast() {
969
+    if (encoderPosition != 0) {
970
+      lcd_contrast -= encoderPosition;
971
+      lcd_contrast &= 0x3F;
972
+      encoderPosition = 0;
973
+      lcdDrawUpdate = 1;
974
+      u8g.setContrast(lcd_contrast);
975
+    }
976
+    if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr2(lcd_contrast));
977
+    if (LCD_CLICKED) lcd_goto_menu(lcd_control_menu);
976 978
   }
977
-  if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr2(lcd_contrast));
978
-  if (LCD_CLICKED) lcd_goto_menu(lcd_control_menu);
979
-}
980 979
 
981
-#endif //DOGLCD
980
+#endif // DOGLCD
982 981
 
983 982
 #ifdef FWRETRACT
984 983
 
985
-static void lcd_control_retract_menu() {
986
-  START_MENU();
987
-  MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
988
-  MENU_ITEM_EDIT(bool, MSG_AUTORETRACT, &autoretract_enabled);
989
-  MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT, &retract_length, 0, 100);
990
-  #if EXTRUDERS > 1
991
-    MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_SWAP, &retract_length_swap, 0, 100);
992
-  #endif
993
-  MENU_ITEM_EDIT(float3, MSG_CONTROL_RETRACTF, &retract_feedrate, 1, 999);
994
-  MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_ZLIFT, &retract_zlift, 0, 999);
995
-  MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_RECOVER, &retract_recover_length, 0, 100);
996
-  #if EXTRUDERS > 1
997
-    MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_RECOVER_SWAP, &retract_recover_length_swap, 0, 100);
998
-  #endif
999
-  MENU_ITEM_EDIT(float3, MSG_CONTROL_RETRACT_RECOVERF, &retract_recover_feedrate, 1, 999);
1000
-  END_MENU();
1001
-}
984
+  static void lcd_control_retract_menu() {
985
+    START_MENU();
986
+    MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
987
+    MENU_ITEM_EDIT(bool, MSG_AUTORETRACT, &autoretract_enabled);
988
+    MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT, &retract_length, 0, 100);
989
+    #if EXTRUDERS > 1
990
+      MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_SWAP, &retract_length_swap, 0, 100);
991
+    #endif
992
+    MENU_ITEM_EDIT(float3, MSG_CONTROL_RETRACTF, &retract_feedrate, 1, 999);
993
+    MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_ZLIFT, &retract_zlift, 0, 999);
994
+    MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_RECOVER, &retract_recover_length, 0, 100);
995
+    #if EXTRUDERS > 1
996
+      MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_RECOVER_SWAP, &retract_recover_length_swap, 0, 100);
997
+    #endif
998
+    MENU_ITEM_EDIT(float3, MSG_CONTROL_RETRACT_RECOVERF, &retract_recover_feedrate, 1, 999);
999
+    END_MENU();
1000
+  }
1002 1001
 
1003
-#endif //FWRETRACT
1002
+#endif // FWRETRACT
1004 1003
 
1005 1004
 #if SDCARDDETECT == -1
1005
+
1006 1006
   static void lcd_sd_refresh() {
1007 1007
     card.initsd();
1008 1008
     currentMenuViewOffset = 0;
1009 1009
   }
1010
+
1010 1011
 #endif
1011 1012
 
1012 1013
 static void lcd_sd_updir() {
@@ -1029,13 +1030,14 @@ void lcd_sdcard_menu() {
1029 1030
     MENU_ITEM(function, LCD_STR_FOLDER "..", lcd_sd_updir);
1030 1031
   }
1031 1032
 
1032
-  for(uint16_t i = 0; i < fileCnt; i++) {
1033
+  for (uint16_t i = 0; i < fileCnt; i++) {
1033 1034
     if (_menuItemNr == _lineNr) {
1034
-      #ifndef SDCARD_RATHERRECENTFIRST
1035
-        card.getfilename(i);
1036
-      #else
1037
-        card.getfilename(fileCnt-1-i);
1038
-      #endif
1035
+      card.getfilename(
1036
+        #ifdef SDCARD_RATHERRECENTFIRST
1037
+          fileCnt-1 -
1038
+        #endif
1039
+        i
1040
+      );
1039 1041
       if (card.filenameIsDir)
1040 1042
         MENU_ITEM(sddirectory, MSG_CARD_MENU, card.filename, card.longFilename);
1041 1043
       else
@@ -1458,7 +1460,7 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
1458 1460
 
1459 1461
 #ifdef DOGLCD
1460 1462
   void lcd_setcontrast(uint8_t value) {
1461
-    lcd_contrast = value & 63;
1463
+    lcd_contrast = value & 0x3F;
1462 1464
     u8g.setContrast(lcd_contrast);
1463 1465
   }
1464 1466
 #endif

+ 123
- 109
Marlin/ultralcd_implementation_hitachi_HD44780.h View File

@@ -443,7 +443,7 @@ Possible status screens:
443 443
 
444 444
 20x4   |01234567890123456789|
445 445
        |T000/000D B000/000D |
446
-       |X+000.0 Y+000.0 Z+000.0|
446
+       |X000  Y000   Z000.00|
447 447
        |F100%  SD100% T--:--|
448 448
        |Status line.........|
449 449
 
@@ -453,141 +453,154 @@ Possible status screens:
453 453
        |F100%  SD100% T--:--|
454 454
        |Status line.........|
455 455
 */
456
-static void lcd_implementation_status_screen()
457
-{
458
-    int tHotend=int(degHotend(0) + 0.5);
459
-    int tTarget=int(degTargetHotend(0) + 0.5);
456
+static void lcd_implementation_status_screen() {
457
+  int tHotend = int(degHotend(0) + 0.5);
458
+  int tTarget = int(degTargetHotend(0) + 0.5);
459
+
460
+  #if LCD_WIDTH < 20
460 461
 
461
-#if LCD_WIDTH < 20
462 462
     lcd.setCursor(0, 0);
463 463
     lcd.print(itostr3(tHotend));
464 464
     lcd.print('/');
465 465
     lcd.print(itostr3left(tTarget));
466 466
 
467
-# if EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
468
-    //If we have an 2nd extruder or heated bed, show that in the top right corner
469
-    lcd.setCursor(8, 0);
470
-#  if EXTRUDERS > 1
471
-    tHotend = int(degHotend(1) + 0.5);
472
-    tTarget = int(degTargetHotend(1) + 0.5);
473
-    lcd.print(LCD_STR_THERMOMETER[0]);
474
-#  else//Heated bed
475
-    tHotend=int(degBed() + 0.5);
476
-    tTarget=int(degTargetBed() + 0.5);
477
-    lcd.print(LCD_STR_BEDTEMP[0]);
478
-#  endif
479
-    lcd.print(itostr3(tHotend));
480
-    lcd.print('/');
481
-    lcd.print(itostr3left(tTarget));
482
-# endif//EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
467
+    #if EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
468
+
469
+      // If we have an 2nd extruder or heated bed, show that in the top right corner
470
+      lcd.setCursor(8, 0);
471
+      #if EXTRUDERS > 1
472
+        tHotend = int(degHotend(1) + 0.5);
473
+        tTarget = int(degTargetHotend(1) + 0.5);
474
+        lcd.print(LCD_STR_THERMOMETER[0]);
475
+      #else // Heated bed
476
+        tHotend = int(degBed() + 0.5);
477
+        tTarget = int(degTargetBed() + 0.5);
478
+        lcd.print(LCD_STR_BEDTEMP[0]);
479
+      #endif
480
+      lcd.print(itostr3(tHotend));
481
+      lcd.print('/');
482
+      lcd.print(itostr3left(tTarget));
483
+
484
+    #endif // EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
485
+
486
+  #else // LCD_WIDTH > 19
483 487
 
484
-#else//LCD_WIDTH > 19
485 488
     lcd.setCursor(0, 0);
486 489
     lcd.print(LCD_STR_THERMOMETER[0]);
487 490
     lcd.print(itostr3(tHotend));
488 491
     lcd.print('/');
489 492
     lcd.print(itostr3left(tTarget));
490 493
     lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
491
-    if (tTarget < 10)
492
-        lcd.print(' ');
493
-
494
-# if EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
495
-    //If we have an 2nd extruder or heated bed, show that in the top right corner
496
-    lcd.setCursor(10, 0);
497
-#  if EXTRUDERS > 1
498
-    tHotend = int(degHotend(1) + 0.5);
499
-    tTarget = int(degTargetHotend(1) + 0.5);
500
-    lcd.print(LCD_STR_THERMOMETER[0]);
501
-#  else//Heated bed
502
-    tHotend=int(degBed() + 0.5);
503
-    tTarget=int(degTargetBed() + 0.5);
504
-    lcd.print(LCD_STR_BEDTEMP[0]);
505
-#  endif
506
-    lcd.print(itostr3(tHotend));
507
-    lcd.print('/');
508
-    lcd.print(itostr3left(tTarget));
509
-    lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
510
-    if (tTarget < 10)
511
-        lcd.print(' ');
512
-# endif//EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
513
-#endif//LCD_WIDTH > 19
514
-
515
-#if LCD_HEIGHT > 2
516
-//Lines 2 for 4 line LCD
517
-# if LCD_WIDTH < 20
518
-#  ifdef SDSUPPORT
519
-    lcd.setCursor(0, 2);
520
-    lcd_printPGM(PSTR("SD"));
521
-    if (IS_SD_PRINTING)
522
-        lcd.print(itostr3(card.percentDone()));
523
-    else
524
-        lcd_printPGM(PSTR("---"));
525
-    lcd.print('%');
526
-#  endif//SDSUPPORT
527
-# else//LCD_WIDTH > 19
528
-#  if EXTRUDERS > 1 && TEMP_SENSOR_BED != 0
529
-    //If we both have a 2nd extruder and a heated bed, show the heated bed temp on the 2nd line on the left, as the first line is filled with extruder temps
530
-    tHotend=int(degBed() + 0.5);
531
-    tTarget=int(degTargetBed() + 0.5);
532
-
533
-    lcd.setCursor(0, 1);
534
-    lcd.print(LCD_STR_BEDTEMP[0]);
535
-    lcd.print(itostr3(tHotend));
536
-    lcd.print('/');
537
-    lcd.print(itostr3left(tTarget));
538
-    lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
539
-    if (tTarget < 10)
540
-        lcd.print(' ');
541
-#  else
542
-    lcd.setCursor(0,1);
543
-    lcd.print('X');
544
-    lcd.print(ftostr3(current_position[X_AXIS]));
545
-    lcd_printPGM(PSTR(" Y"));
546
-    lcd.print(ftostr3(current_position[Y_AXIS]));
547
-#  endif//EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
548
-# endif//LCD_WIDTH > 19
494
+    if (tTarget < 10) lcd.print(' ');
495
+
496
+    #if EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
497
+      // If we have an 2nd extruder or heated bed, show that in the top right corner
498
+      lcd.setCursor(10, 0);
499
+      #if EXTRUDERS > 1
500
+        tHotend = int(degHotend(1) + 0.5);
501
+        tTarget = int(degTargetHotend(1) + 0.5);
502
+        lcd.print(LCD_STR_THERMOMETER[0]);
503
+      #else // Heated bed
504
+        tHotend = int(degBed() + 0.5);
505
+        tTarget = int(degTargetBed() + 0.5);
506
+        lcd.print(LCD_STR_BEDTEMP[0]);
507
+      #endif
508
+      lcd.print(itostr3(tHotend));
509
+      lcd.print('/');
510
+      lcd.print(itostr3left(tTarget));
511
+      lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
512
+      if (tTarget < 10) lcd.print(' ');
513
+
514
+    #endif  // EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
515
+
516
+  #endif // LCD_WIDTH > 19
517
+
518
+  #if LCD_HEIGHT > 2
519
+    // Lines 2 for 4 line LCD
520
+    #if LCD_WIDTH < 20
521
+      #ifdef SDSUPPORT
522
+        lcd.setCursor(0, 2);
523
+        lcd_printPGM(PSTR("SD"));
524
+        if (IS_SD_PRINTING)
525
+          lcd.print(itostr3(card.percentDone()));
526
+        else
527
+          lcd_printPGM(PSTR("---"));
528
+          lcd.print('%');
529
+      #endif // SDSUPPORT
530
+
531
+    #else // LCD_WIDTH > 19
532
+
533
+      #if EXTRUDERS > 1 && TEMP_SENSOR_BED != 0
534
+        // If we both have a 2nd extruder and a heated bed, show the heated bed temp on the 2nd line on the left, as the first line is filled with extruder temps
535
+        tHotend = int(degBed() + 0.5);
536
+        tTarget = int(degTargetBed() + 0.5);
537
+
538
+        lcd.setCursor(0, 1);
539
+        lcd.print(LCD_STR_BEDTEMP[0]);
540
+        lcd.print(itostr3(tHotend));
541
+        lcd.print('/');
542
+        lcd.print(itostr3left(tTarget));
543
+        lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
544
+        if (tTarget < 10) lcd.print(' ');
545
+      #else
546
+        lcd.setCursor(0,1);
547
+        lcd.print('X');
548
+        lcd.print(ftostr3(current_position[X_AXIS]));
549
+        lcd_printPGM(PSTR("  Y"));
550
+        lcd.print(ftostr3(current_position[Y_AXIS]));
551
+      #endif // EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
552
+
553
+    #endif // LCD_WIDTH > 19
554
+
549 555
     lcd.setCursor(LCD_WIDTH - 8, 1);
550 556
     lcd.print('Z');
551 557
     lcd.print(ftostr32sp(current_position[Z_AXIS] + 0.00001));
552
-#endif//LCD_HEIGHT > 2
553 558
 
554
-#if LCD_HEIGHT > 3
559
+  #endif // LCD_HEIGHT > 2
560
+
561
+  #if LCD_HEIGHT > 3
562
+
555 563
     lcd.setCursor(0, 2);
556 564
     lcd.print(LCD_STR_FEEDRATE[0]);
557 565
     lcd.print(itostr3(feedmultiply));
558 566
     lcd.print('%');
559
-# if LCD_WIDTH > 19
560
-#  ifdef SDSUPPORT
561
-    lcd.setCursor(7, 2);
562
-    lcd_printPGM(PSTR("SD"));
563
-    if (IS_SD_PRINTING)
567
+
568
+    #if LCD_WIDTH > 19 && defined(SDSUPPORT)
569
+
570
+      lcd.setCursor(7, 2);
571
+      lcd_printPGM(PSTR("SD"));
572
+      if (IS_SD_PRINTING)
564 573
         lcd.print(itostr3(card.percentDone()));
565
-    else
574
+      else
566 575
         lcd_printPGM(PSTR("---"));
567
-    lcd.print('%');
568
-#  endif//SDSUPPORT
569
-# endif//LCD_WIDTH > 19
576
+      lcd.print('%');
577
+
578
+    #endif // LCD_WIDTH > 19 && SDSUPPORT
579
+
570 580
     lcd.setCursor(LCD_WIDTH - 6, 2);
571 581
     lcd.print(LCD_STR_CLOCK[0]);
572
-    if(starttime != 0)
573
-    {
574
-        uint16_t time = millis()/60000 - starttime/60000;
575
-        lcd.print(itostr2(time/60));
576
-        lcd.print(':');
577
-        lcd.print(itostr2(time%60));
578
-    }else{
579
-        lcd_printPGM(PSTR("--:--"));
582
+    if (starttime != 0) {
583
+      uint16_t time = millis()/60000 - starttime/60000;
584
+      lcd.print(itostr2(time/60));
585
+      lcd.print(':');
586
+      lcd.print(itostr2(time%60));
580 587
     }
581
-#endif
588
+    else {
589
+      lcd_printPGM(PSTR("--:--"));
590
+    }
591
+
592
+  #endif // LCD_HEIGHT > 3
593
+
594
+  /**
595
+   * Display Progress Bar, Filament display, and/or Status Message on the last line
596
+   */
582 597
 
583
-  // Status message line at the bottom
584 598
   lcd.setCursor(0, LCD_HEIGHT - 1);
585 599
 
586 600
   #ifdef LCD_PROGRESS_BAR
587 601
 
588 602
     if (card.isFileOpen()) {
589
-      uint16_t mil = millis(), diff = mil - progressBarTick;
590
-      if (diff >= PROGRESS_BAR_MSG_TIME || !lcd_status_message[0]) {
603
+      if (millis() >= progressBarTick + PROGRESS_BAR_MSG_TIME || !lcd_status_message[0]) {
591 604
         // draw the progress bar
592 605
         int tix = (int)(card.percentDone() * LCD_WIDTH * 3) / 100,
593 606
           cel = tix / 3, rem = tix % 3, i = LCD_WIDTH;
@@ -605,11 +618,11 @@ static void lcd_implementation_status_screen()
605 618
       }
606 619
     } //card.isFileOpen
607 620
 
608
-  #endif //LCD_PROGRESS_BAR
621
+  #elif defined(FILAMENT_LCD_DISPLAY)
609 622
 
610
-  //Display both Status message line and Filament display on the last line
611
-  #ifdef FILAMENT_LCD_DISPLAY
612
-    if (message_millis + 5000 <= millis()) {  //display any status for the first 5 sec after screen is initiated
623
+    // Show Filament Diameter and Volumetric Multiplier %
624
+    // After allowing lcd_status_message to show for 5 seconds
625
+    if (millis() >= message_millis + 5000) {
613 626
       lcd_printPGM(PSTR("Dia "));
614 627
       lcd.print(ftostr12ns(filament_width_meas));
615 628
       lcd_printPGM(PSTR(" V"));
@@ -617,7 +630,8 @@ static void lcd_implementation_status_screen()
617 630
   	  lcd.print('%');
618 631
   	  return;
619 632
     }
620
-  #endif //FILAMENT_LCD_DISPLAY
633
+
634
+  #endif // FILAMENT_LCD_DISPLAY
621 635
 
622 636
   lcd_print(lcd_status_message);
623 637
 }

Loading…
Cancel
Save