Selaa lähdekoodia

Add "About Printer" information menu.

Includes:
  *firmware version / branch / date.
  *extruder count
  *board information (name, serial details, power supply type)
  *thermistors (names, min/max temperatures)
  *printer statistics (PRINTCOUNTER details)

Thanks to @thinkyhead for contributions.
Anthony Birkett 8 vuotta sitten
vanhempi
commit
7a377c1d75
82 muutettua tiedostoa jossa 526 lisäystä ja 27 poistoa
  1. 3
    0
      Marlin/Configuration_adv.h
  2. 16
    0
      Marlin/dogm_lcd_implementation.h
  3. 3
    0
      Marlin/example_configurations/Cartesio/Configuration_adv.h
  4. 3
    0
      Marlin/example_configurations/Felix/Configuration_adv.h
  5. 3
    0
      Marlin/example_configurations/Hephestos/Configuration_adv.h
  6. 3
    0
      Marlin/example_configurations/Hephestos_2/Configuration_adv.h
  7. 3
    0
      Marlin/example_configurations/K8200/Configuration_adv.h
  8. 3
    0
      Marlin/example_configurations/RigidBot/Configuration_adv.h
  9. 3
    0
      Marlin/example_configurations/SCARA/Configuration_adv.h
  10. 3
    0
      Marlin/example_configurations/TAZ4/Configuration_adv.h
  11. 3
    0
      Marlin/example_configurations/WITBOX/Configuration_adv.h
  12. 3
    0
      Marlin/example_configurations/delta/biv2.5/Configuration_adv.h
  13. 3
    0
      Marlin/example_configurations/delta/generic/Configuration_adv.h
  14. 3
    0
      Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h
  15. 3
    0
      Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h
  16. 3
    0
      Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h
  17. 3
    0
      Marlin/example_configurations/makibox/Configuration_adv.h
  18. 3
    0
      Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h
  19. 39
    0
      Marlin/language_en.h
  20. 12
    3
      Marlin/pins_3DRAG.h
  21. 1
    0
      Marlin/pins_5DPRINT.h
  22. 2
    1
      Marlin/pins_99.h
  23. 2
    0
      Marlin/pins_A4JP.h
  24. 2
    1
      Marlin/pins_AZTEEG_X1.h
  25. 2
    0
      Marlin/pins_AZTEEG_X3.h
  26. 2
    0
      Marlin/pins_AZTEEG_X3_PRO.h
  27. 2
    0
      Marlin/pins_BAM_DICE_DUE.h
  28. 2
    0
      Marlin/pins_BQ_ZUM_MEGA_3D.h
  29. 2
    0
      Marlin/pins_BRAINWAVE.h
  30. 2
    0
      Marlin/pins_BRAINWAVE_PRO.h
  31. 1
    0
      Marlin/pins_CHEAPTRONIC.h
  32. 2
    0
      Marlin/pins_CNCONTROLS_12.h
  33. 2
    0
      Marlin/pins_ELEFU_3.h
  34. 2
    0
      Marlin/pins_FELIX2.h
  35. 1
    0
      Marlin/pins_GEN3_MONOLITHIC.h
  36. 2
    0
      Marlin/pins_GEN3_PLUS.h
  37. 4
    0
      Marlin/pins_GEN6.h
  38. 2
    0
      Marlin/pins_GEN6_DELUXE.h
  39. 4
    0
      Marlin/pins_GEN7_12.h
  40. 2
    2
      Marlin/pins_GEN7_13.h
  41. 4
    2
      Marlin/pins_GEN7_14.h
  42. 2
    0
      Marlin/pins_GEN7_CUSTOM.h
  43. 3
    5
      Marlin/pins_K8200.h
  44. 2
    0
      Marlin/pins_LEAPFROG.h
  45. 2
    0
      Marlin/pins_MEGACONTROLLER.h
  46. 1
    0
      Marlin/pins_MEGATRONICS.h
  47. 1
    0
      Marlin/pins_MEGATRONICS_2.h
  48. 1
    0
      Marlin/pins_MEGATRONICS_3.h
  49. 2
    1
      Marlin/pins_MELZI.h
  50. 2
    3
      Marlin/pins_MELZI_MAKR3D.h
  51. 1
    0
      Marlin/pins_MINIRAMBO.h
  52. 1
    0
      Marlin/pins_MINITRONICS.h
  53. 2
    0
      Marlin/pins_MKS_13.h
  54. 2
    0
      Marlin/pins_MKS_BASE.h
  55. 2
    0
      Marlin/pins_OMCA.h
  56. 2
    0
      Marlin/pins_OMCA_A.h
  57. 1
    0
      Marlin/pins_PRINTRBOARD.h
  58. 1
    0
      Marlin/pins_PRINTRBOARD_REVF.h
  59. 2
    0
      Marlin/pins_RAMBO.h
  60. 4
    1
      Marlin/pins_RAMPS_13.h
  61. 2
    1
      Marlin/pins_RAMPS_13_EFB.h
  62. 4
    0
      Marlin/pins_RAMPS_14.h
  63. 4
    1
      Marlin/pins_RAMPS_14_EFB.h
  64. 2
    0
      Marlin/pins_RAMPS_OLD.h
  65. 3
    0
      Marlin/pins_RIGIDBOARD.h
  66. 3
    0
      Marlin/pins_RIGIDBOARD_V2.h
  67. 1
    0
      Marlin/pins_RUMBA.h
  68. 3
    0
      Marlin/pins_SAINSMART_2IN1.h
  69. 10
    4
      Marlin/pins_SANGUINOLOLU_11.h
  70. 2
    1
      Marlin/pins_SANGUINOLOLU_12.h
  71. 1
    0
      Marlin/pins_SAV_MKI.h
  72. 2
    0
      Marlin/pins_SETHI.h
  73. 2
    1
      Marlin/pins_STB_11.h
  74. 2
    0
      Marlin/pins_TEENSY2.h
  75. 2
    0
      Marlin/pins_TEENSYLU.h
  76. 1
    0
      Marlin/pins_ULTIMAIN_2.h
  77. 1
    0
      Marlin/pins_ULTIMAKER.h
  78. 1
    0
      Marlin/pins_ULTIMAKER_OLD.h
  79. 6
    0
      Marlin/printcounter.h
  80. 91
    0
      Marlin/thermistornames.h
  81. 171
    0
      Marlin/ultralcd.cpp
  82. 15
    0
      Marlin/ultralcd_implementation_hitachi_HD44780.h

+ 3
- 0
Marlin/Configuration_adv.h Näytä tiedosto

@@ -364,6 +364,9 @@
364 364
 
365 365
 // @section lcd
366 366
 
367
+// Include a page of printer information in the LCD Main Menu
368
+//#define LCD_INFO_MENU
369
+
367 370
 #if ENABLED(SDSUPPORT)
368 371
 
369 372
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 16
- 0
Marlin/dogm_lcd_implementation.h Näytä tiedosto

@@ -473,6 +473,22 @@ static void lcd_implementation_mark_as_selected(uint8_t row, bool isSelected) {
473 473
   u8g.setPrintPos((START_ROW) * (DOG_CHAR_WIDTH), (row + 1) * (DOG_CHAR_HEIGHT));
474 474
 }
475 475
 
476
+static void lcd_implementation_drawmenu_static(uint8_t row, const char* pstr, bool center=true) {
477
+  char c;
478
+  uint8_t n = LCD_WIDTH;
479
+  u8g.setPrintPos(0, (row + 1) * (DOG_CHAR_HEIGHT));
480
+  u8g.setColorIndex(1); // normal text
481
+  if (center) {
482
+    int8_t pad = (LCD_WIDTH - lcd_strlen_P(pstr)) / 2;
483
+    while (--pad >= 0) { lcd_print(' '); n--; }
484
+  }
485
+  while (c = pgm_read_byte(pstr)) {
486
+    n -= lcd_print(c);
487
+    pstr++;
488
+  }
489
+  while (n--) lcd_print(' ');
490
+}
491
+
476 492
 static void lcd_implementation_drawmenu_generic(bool isSelected, uint8_t row, const char* pstr, char pre_char, char post_char) {
477 493
   UNUSED(pstr);
478 494
   UNUSED(pre_char);

+ 3
- 0
Marlin/example_configurations/Cartesio/Configuration_adv.h Näytä tiedosto

@@ -364,6 +364,9 @@
364 364
 
365 365
 // @section lcd
366 366
 
367
+// Include a page of printer information in the LCD Main Menu
368
+//#define LCD_INFO_MENU
369
+
367 370
 #if ENABLED(SDSUPPORT)
368 371
 
369 372
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 3
- 0
Marlin/example_configurations/Felix/Configuration_adv.h Näytä tiedosto

@@ -364,6 +364,9 @@
364 364
 
365 365
 // @section lcd
366 366
 
367
+// Include a page of printer information in the LCD Main Menu
368
+//#define LCD_INFO_MENU
369
+
367 370
 #if ENABLED(SDSUPPORT)
368 371
 
369 372
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 3
- 0
Marlin/example_configurations/Hephestos/Configuration_adv.h Näytä tiedosto

@@ -364,6 +364,9 @@
364 364
 
365 365
 // @section lcd
366 366
 
367
+// Include a page of printer information in the LCD Main Menu
368
+//#define LCD_INFO_MENU
369
+
367 370
 #if ENABLED(SDSUPPORT)
368 371
 
369 372
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 3
- 0
Marlin/example_configurations/Hephestos_2/Configuration_adv.h Näytä tiedosto

@@ -364,6 +364,9 @@
364 364
 
365 365
 // @section lcd
366 366
 
367
+// Include a page of printer information in the LCD Main Menu
368
+//#define LCD_INFO_MENU
369
+
367 370
 #if ENABLED(SDSUPPORT)
368 371
 
369 372
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 3
- 0
Marlin/example_configurations/K8200/Configuration_adv.h Näytä tiedosto

@@ -370,6 +370,9 @@
370 370
 
371 371
 // @section lcd
372 372
 
373
+// Include a page of printer information in the LCD Main Menu
374
+//#define LCD_INFO_MENU
375
+
373 376
 #if ENABLED(SDSUPPORT)
374 377
 
375 378
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 3
- 0
Marlin/example_configurations/RigidBot/Configuration_adv.h Näytä tiedosto

@@ -364,6 +364,9 @@
364 364
 
365 365
 // @section lcd
366 366
 
367
+// Include a page of printer information in the LCD Main Menu
368
+//#define LCD_INFO_MENU
369
+
367 370
 #if ENABLED(SDSUPPORT)
368 371
 
369 372
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 3
- 0
Marlin/example_configurations/SCARA/Configuration_adv.h Näytä tiedosto

@@ -364,6 +364,9 @@
364 364
 
365 365
 // @section lcd
366 366
 
367
+// Include a page of printer information in the LCD Main Menu
368
+//#define LCD_INFO_MENU
369
+
367 370
 #if ENABLED(SDSUPPORT)
368 371
 
369 372
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 3
- 0
Marlin/example_configurations/TAZ4/Configuration_adv.h Näytä tiedosto

@@ -372,6 +372,9 @@
372 372
 
373 373
 // @section lcd
374 374
 
375
+// Include a page of printer information in the LCD Main Menu
376
+//#define LCD_INFO_MENU
377
+
375 378
 #if ENABLED(SDSUPPORT)
376 379
 
377 380
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 3
- 0
Marlin/example_configurations/WITBOX/Configuration_adv.h Näytä tiedosto

@@ -364,6 +364,9 @@
364 364
 
365 365
 // @section lcd
366 366
 
367
+// Include a page of printer information in the LCD Main Menu
368
+//#define LCD_INFO_MENU
369
+
367 370
 #if ENABLED(SDSUPPORT)
368 371
 
369 372
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 3
- 0
Marlin/example_configurations/delta/biv2.5/Configuration_adv.h Näytä tiedosto

@@ -366,6 +366,9 @@
366 366
 
367 367
 // @section lcd
368 368
 
369
+// Include a page of printer information in the LCD Main Menu
370
+//#define LCD_INFO_MENU
371
+
369 372
 #if ENABLED(SDSUPPORT)
370 373
 
371 374
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 3
- 0
Marlin/example_configurations/delta/generic/Configuration_adv.h Näytä tiedosto

@@ -366,6 +366,9 @@
366 366
 
367 367
 // @section lcd
368 368
 
369
+// Include a page of printer information in the LCD Main Menu
370
+//#define LCD_INFO_MENU
371
+
369 372
 #if ENABLED(SDSUPPORT)
370 373
 
371 374
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 3
- 0
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h Näytä tiedosto

@@ -365,6 +365,9 @@
365 365
 
366 366
 // @section lcd
367 367
 
368
+// Include a page of printer information in the LCD Main Menu
369
+//#define LCD_INFO_MENU
370
+
368 371
 #if ENABLED(SDSUPPORT)
369 372
 
370 373
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 3
- 0
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h Näytä tiedosto

@@ -370,6 +370,9 @@
370 370
 
371 371
 // @section lcd
372 372
 
373
+// Include a page of printer information in the LCD Main Menu
374
+//#define LCD_INFO_MENU
375
+
373 376
 #if ENABLED(SDSUPPORT)
374 377
 
375 378
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 3
- 0
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h Näytä tiedosto

@@ -366,6 +366,9 @@
366 366
 
367 367
 // @section lcd
368 368
 
369
+// Include a page of printer information in the LCD Main Menu
370
+//#define LCD_INFO_MENU
371
+
369 372
 #if ENABLED(SDSUPPORT)
370 373
 
371 374
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 3
- 0
Marlin/example_configurations/makibox/Configuration_adv.h Näytä tiedosto

@@ -364,6 +364,9 @@
364 364
 
365 365
 // @section lcd
366 366
 
367
+// Include a page of printer information in the LCD Main Menu
368
+//#define LCD_INFO_MENU
369
+
367 370
 #if ENABLED(SDSUPPORT)
368 371
 
369 372
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 3
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h Näytä tiedosto

@@ -364,6 +364,9 @@
364 364
 
365 365
 // @section lcd
366 366
 
367
+// Include a page of printer information in the LCD Main Menu
368
+//#define LCD_INFO_MENU
369
+
367 370
 #if ENABLED(SDSUPPORT)
368 371
 
369 372
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 39
- 0
Marlin/language_en.h Näytä tiedosto

@@ -520,5 +520,44 @@
520 520
 #ifndef MSG_DELTA_CALIBRATE_CENTER
521 521
   #define MSG_DELTA_CALIBRATE_CENTER          "Calibrate Center"
522 522
 #endif
523
+#ifndef MSG_INFO_MENU
524
+  #define MSG_INFO_MENU                       "About Printer"
525
+#endif
526
+#ifndef MSG_INFO_STATS_MENU
527
+  #define MSG_INFO_STATS_MENU                 "Printer Stats"
528
+#endif
529
+#ifndef MSG_INFO_BOARD_MENU
530
+  #define MSG_INFO_BOARD_MENU                 "Board Info"
531
+#endif
532
+#ifndef MSG_INFO_THERMISTOR_MENU
533
+  #define MSG_INFO_THERMISTOR_MENU            "Thermistors"
534
+#endif
535
+#ifndef MSG_INFO_EXTRUDERS
536
+  #define MSG_INFO_EXTRUDERS                  "Extruders"
537
+#endif
538
+#ifndef MSG_INFO_BAUDRATE
539
+  #define MSG_INFO_BAUDRATE                   "Baud"
540
+#endif
541
+#ifndef MSG_INFO_PROTOCOL
542
+  #define MSG_INFO_PROTOCOL                   "Protocol"
543
+#endif
544
+#ifndef MSG_INFO_TOTAL_PRINTS
545
+  #define MSG_INFO_TOTAL_PRINTS               "Total Prints"
546
+#endif
547
+#ifndef MSG_INFO_FINISHED_PRINTS
548
+  #define MSG_INFO_FINISHED_PRINTS            "Finished Prints"
549
+#endif
550
+#ifndef MSG_INFO_PRINT_TIME
551
+  #define MSG_INFO_PRINT_TIME                 "Total Print Time"
552
+#endif
553
+#ifndef MSG_INFO_MIN_TEMP
554
+  #define MSG_INFO_MIN_TEMP                   "Min Temp"
555
+#endif
556
+#ifndef MSG_INFO_MAX_TEMP
557
+  #define MSG_INFO_MAX_TEMP                   "Max Temp"
558
+#endif
559
+#ifndef MSG_INFO_PSU
560
+  #define MSG_INFO_PSU                        "Power Supply"
561
+#endif
523 562
 
524 563
 #endif // LANGUAGE_EN_H

+ 12
- 3
Marlin/pins_3DRAG.h Näytä tiedosto

@@ -24,10 +24,19 @@
24 24
  * 3DRAG (and K8200) Arduino Mega with RAMPS v1.4 pin assignments
25 25
  */
26 26
 
27
-#include "pins_RAMPS_14.h"
27
+#ifndef BOARD_NAME
28
+  #define BOARD_NAME "3Drag"
29
+#endif
30
+
31
+#ifndef DEFAULT_MACHINE_NAME
32
+  #define DEFAULT_MACHINE_NAME "3Drag"
33
+#endif
28 34
 
29
-#define DEFAULT_MACHINE_NAME    "3Drag"
30
-#define DEFAULT_SOURCE_CODE_URL "http://3dprint.elettronicain.it/"
35
+#ifndef DEFAULT_SOURCE_CODE_URL
36
+  #define DEFAULT_SOURCE_CODE_URL "http://3dprint.elettronicain.it/"
37
+#endif
38
+
39
+#include "pins_RAMPS_14.h"
31 40
 
32 41
 #undef Z_ENABLE_PIN
33 42
 #define Z_ENABLE_PIN       63

+ 1
- 0
Marlin/pins_5DPRINT.h Näytä tiedosto

@@ -31,6 +31,7 @@
31 31
 #endif
32 32
 
33 33
 #define DEFAULT_MACHINE_NAME "Makibox"
34
+#define BOARD_NAME           "5DPrint D8"
34 35
 
35 36
 #define LARGE_FLASH        true
36 37
 

+ 2
- 1
Marlin/pins_99.h Näytä tiedosto

@@ -23,7 +23,8 @@
23 23
 /**
24 24
  * Board 99 pin assignments
25 25
  */
26
-
26
+#define BOARD_NAME          "99 Unknown"
27
+ 
27 28
 #define X_STEP_PIN          2
28 29
 #define X_DIR_PIN           3
29 30
 #define X_ENABLE_PIN        -1

+ 2
- 0
Marlin/pins_A4JP.h Näytä tiedosto

@@ -28,6 +28,8 @@
28 28
   #error "Oops!  Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu."
29 29
 #endif
30 30
 
31
+#define BOARD_NAME "AJ4P"
32
+
31 33
 // Servo support
32 34
 #define SERVO0_PIN 22 // Motor header MX1
33 35
 #define SERVO1_PIN 23 // Motor header MX2

+ 2
- 1
Marlin/pins_AZTEEG_X1.h Näytä tiedosto

@@ -24,6 +24,7 @@
24 24
  * Azteeg X1 pin assignments
25 25
  */
26 26
 
27
-#define SANGUINOLOLU_V_1_2
27
+#define BOARD_NAME "Azteeg X1"
28 28
 
29
+#define SANGUINOLOLU_V_1_2
29 30
 #include "pins_SANGUINOLOLU_11.h"

+ 2
- 0
Marlin/pins_AZTEEG_X3.h Näytä tiedosto

@@ -24,6 +24,8 @@
24 24
  * AZTEEG_X3 Arduino Mega with RAMPS v1.4 pin assignments
25 25
  */
26 26
 
27
+#define BOARD_NAME "Azteeg X3"
28
+
27 29
 #include "pins_RAMPS_14_EFB.h"
28 30
 
29 31
 #if ENABLED(VIKI2) || ENABLED(miniVIKI)

+ 2
- 0
Marlin/pins_AZTEEG_X3_PRO.h Näytä tiedosto

@@ -24,6 +24,8 @@
24 24
  * AZTEEG_X3_PRO (Arduino Mega) pin assignments
25 25
  */
26 26
 
27
+#define BOARD_NAME "Azteeg X3 Pro"
28
+
27 29
 #include "pins_RAMPS_14.h"
28 30
 
29 31
 #undef FAN_PIN

+ 2
- 0
Marlin/pins_BAM_DICE_DUE.h Näytä tiedosto

@@ -24,6 +24,8 @@
24 24
  * BAM&DICE Due (Arduino Mega) pin assignments
25 25
  */
26 26
 
27
+#define BOARD_NAME "2PrintBeta Due"
28
+
27 29
 #include "pins_RAMPS_14_EFB.h"
28 30
 
29 31
 #undef TEMP_0_PIN

+ 2
- 0
Marlin/pins_BQ_ZUM_MEGA_3D.h Näytä tiedosto

@@ -28,6 +28,8 @@
28 28
   #error "Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu."
29 29
 #endif
30 30
 
31
+#define BOARD_NAME "ZUM Mega 3D"
32
+
31 33
 #include "pins_RAMPS_13.h"
32 34
 
33 35
 #undef X_MAX_PIN

+ 2
- 0
Marlin/pins_BRAINWAVE.h Näytä tiedosto

@@ -31,6 +31,8 @@
31 31
   #error "Oops!  Make sure you have 'Brainwave' selected from the 'Tools -> Boards' menu."
32 32
 #endif
33 33
 
34
+#define BOARD_NAME         "Brainwave"
35
+
34 36
 #define X_STEP_PIN         27
35 37
 #define X_DIR_PIN          29
36 38
 #define X_ENABLE_PIN       28

+ 2
- 0
Marlin/pins_BRAINWAVE_PRO.h Näytä tiedosto

@@ -37,6 +37,8 @@
37 37
   #error "Uncomment #define AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h for this config"
38 38
 #endif
39 39
 
40
+#define BOARD_NAME         "Brainwave Pro"
41
+
40 42
 #define LARGE_FLASH        true
41 43
 
42 44
 #define X_STEP_PIN         33

+ 1
- 0
Marlin/pins_CHEAPTRONIC.h Näytä tiedosto

@@ -28,6 +28,7 @@
28 28
   #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
29 29
 #endif
30 30
 
31
+#define BOARD_NAME         "Cheaptronic v1.0"
31 32
 #define LARGE_FLASH        true
32 33
 
33 34
 // X motor stepper

+ 2
- 0
Marlin/pins_CNCONTROLS_12.h Näytä tiedosto

@@ -6,6 +6,8 @@
6 6
   #error Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
7 7
 #endif
8 8
 
9
+#define BOARD_NAME            "CN Controls V12"
10
+
9 11
 //#define LARGE_FLASH true
10 12
 
11 13
 #define X_ENABLE_PIN          26

+ 2
- 0
Marlin/pins_ELEFU_3.h Näytä tiedosto

@@ -28,6 +28,8 @@
28 28
   #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
29 29
 #endif
30 30
 
31
+#define BOARD_NAME         "Elefu Ra v3"
32
+
31 33
 #define X_STEP_PIN         49
32 34
 #define X_DIR_PIN          13
33 35
 #define X_ENABLE_PIN       48

+ 2
- 0
Marlin/pins_FELIX2.h Näytä tiedosto

@@ -24,6 +24,8 @@
24 24
  * FELIXprinters v2.0/3.0 (RAMPS v1.4) pin assignments
25 25
  */
26 26
 
27
+#define BOARD_NAME "Felix 2.0+"
28
+
27 29
 #include "pins_RAMPS_14_EFB.h"
28 30
 
29 31
 #undef HEATER_1_PIN

+ 1
- 0
Marlin/pins_GEN3_MONOLITHIC.h Näytä tiedosto

@@ -28,6 +28,7 @@
28 28
   #error "Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu."
29 29
 #endif
30 30
 
31
+#define BOARD_NAME "Gen3 Monolithic"
31 32
 #define DEBUG_PIN 0
32 33
 
33 34
 // x axis

+ 2
- 0
Marlin/pins_GEN3_PLUS.h Näytä tiedosto

@@ -28,6 +28,8 @@
28 28
   #error "Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu."
29 29
 #endif
30 30
 
31
+#define BOARD_NAME         "Gen3+"
32
+
31 33
 #define X_STEP_PIN         15
32 34
 #define X_DIR_PIN          18
33 35
 #define X_STOP_PIN         20

+ 4
- 0
Marlin/pins_GEN6.h Näytä tiedosto

@@ -30,6 +30,10 @@
30 30
   #endif
31 31
 #endif
32 32
 
33
+#ifndef BOARD_NAME
34
+  #define BOARD_NAME "Gen6"
35
+#endif
36
+
33 37
 //x axis pins
34 38
 #define X_STEP_PIN      15
35 39
 #define X_DIR_PIN       18

+ 2
- 0
Marlin/pins_GEN6_DELUXE.h Näytä tiedosto

@@ -24,4 +24,6 @@
24 24
  * Gen6 Deluxe pin assignments
25 25
  */
26 26
 
27
+#define BOARD_NAME "Gen6 Deluxe"
28
+
27 29
 #include "pins_GEN6.h"

+ 4
- 0
Marlin/pins_GEN7_12.h Näytä tiedosto

@@ -28,6 +28,10 @@
28 28
   #error "Oops!  Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu."
29 29
 #endif
30 30
 
31
+#ifndef BOARD_NAME
32
+  #define BOARD_NAME "Gen7 v1.1 / 1.2"
33
+#endif
34
+
31 35
 #ifndef GEN7_VERSION
32 36
   #define GEN7_VERSION 12 // v1.x
33 37
 #endif

+ 2
- 2
Marlin/pins_GEN7_13.h Näytä tiedosto

@@ -24,7 +24,7 @@
24 24
  * Gen7 v1.3 pin assignments
25 25
  */
26 26
 
27
-#define MOTHERBOARD BOARD_GEN7_12
28
-#define GEN7_VERSION 13 // v1.3
27
+#define BOARD_NAME "Gen7 v1.3"
29 28
 
29
+#define GEN7_VERSION 13 // v1.3
30 30
 #include "pins_GEN7_12.h"

+ 4
- 2
Marlin/pins_GEN7_14.h Näytä tiedosto

@@ -24,12 +24,14 @@
24 24
  * Gen7 v1.4 pin assignments
25 25
  */
26 26
 
27
-#define GEN7_VERSION 14 // v1.4
28
-
29 27
 #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
30 28
   #error "Oops!  Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu."
31 29
 #endif
32 30
 
31
+#define BOARD_NAME "Gen7 v1.4"
32
+
33
+#define GEN7_VERSION 14 // v1.4
34
+
33 35
 //x axis pins
34 36
 #define X_STEP_PIN 29
35 37
 #define X_DIR_PIN 28

+ 2
- 0
Marlin/pins_GEN7_CUSTOM.h Näytä tiedosto

@@ -31,6 +31,8 @@
31 31
   #error "Oops!  Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu."
32 32
 #endif
33 33
 
34
+#define BOARD_NAME      "Gen7 Custom"
35
+
34 36
 //x axis pins
35 37
 #define X_STEP_PIN      21                  // different from standard GEN7
36 38
 #define X_DIR_PIN       20                  // different from standard GEN7

+ 3
- 5
Marlin/pins_K8200.h Näytä tiedosto

@@ -25,10 +25,8 @@
25 25
  * Identical to 3DRAG
26 26
  */
27 27
 
28
-#include "pins_3DRAG.h"
29
-
30
-#undef  DEFAULT_MACHINE_NAME
28
+#define BOARD_NAME              "Velleman K8200"
31 29
 #define DEFAULT_MACHINE_NAME    "K8200"
32
-
33
-#undef  DEFAULT_SOURCE_CODE_URL
34 30
 #define DEFAULT_SOURCE_CODE_URL "https://github.com/CONSULitAS/Marlin-K8200"
31
+
32
+#include "pins_3DRAG.h"

+ 2
- 0
Marlin/pins_LEAPFROG.h Näytä tiedosto

@@ -28,6 +28,8 @@
28 28
   #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
29 29
 #endif
30 30
 
31
+#define BOARD_NAME         "Leapfrog"
32
+
31 33
 #define X_STEP_PIN         28
32 34
 #define X_DIR_PIN          63
33 35
 #define X_ENABLE_PIN       29

+ 2
- 0
Marlin/pins_MEGACONTROLLER.h Näytä tiedosto

@@ -32,6 +32,8 @@
32 32
   #error "Mega Controller supports up to 2 extruders. Comment this line to keep going."
33 33
 #endif
34 34
 
35
+#define BOARD_NAME "Mega Controller"
36
+
35 37
 #define SERVO0_PIN 30
36 38
 #define SERVO1_PIN 31
37 39
 #define SERVO2_PIN 32

+ 1
- 0
Marlin/pins_MEGATRONICS.h Näytä tiedosto

@@ -28,6 +28,7 @@
28 28
   #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
29 29
 #endif
30 30
 
31
+#define BOARD_NAME         "Megatronics"
31 32
 #define LARGE_FLASH        true
32 33
 
33 34
 #define X_STEP_PIN         26

+ 1
- 0
Marlin/pins_MEGATRONICS_2.h Näytä tiedosto

@@ -28,6 +28,7 @@
28 28
   #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
29 29
 #endif
30 30
 
31
+#define BOARD_NAME         "Megatronics v2.0"
31 32
 #define LARGE_FLASH        true
32 33
 
33 34
 #define X_STEP_PIN 26

+ 1
- 0
Marlin/pins_MEGATRONICS_3.h Näytä tiedosto

@@ -28,6 +28,7 @@
28 28
   #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
29 29
 #endif
30 30
 
31
+#define BOARD_NAME         "Megatronics v3.0"
31 32
 #define LARGE_FLASH        true
32 33
 
33 34
 #if ENABLED(Z_PROBE_SLED)

+ 2
- 1
Marlin/pins_MELZI.h Näytä tiedosto

@@ -24,10 +24,11 @@
24 24
  * Melzi pin assignments
25 25
  */
26 26
 
27
-#define SANGUINOLOLU_V_1_2
27
+#define BOARD_NAME "Melzi"
28 28
 
29 29
 #if defined(__AVR_ATmega1284P__)
30 30
   #define LARGE_FLASH true
31 31
 #endif
32 32
 
33
+#define SANGUINOLOLU_V_1_2
33 34
 #include "pins_SANGUINOLOLU_11.h"

+ 2
- 3
Marlin/pins_MELZI_MAKR3D.h Näytä tiedosto

@@ -24,12 +24,11 @@
24 24
  * Melzi with ATmega1284 (MaKr3d version) pin assignments
25 25
  */
26 26
 
27
-#undef MOTHERBOARD
28
-#define MOTHERBOARD BOARD_MELZI
29
-#define SANGUINOLOLU_V_1_2
27
+#define BOARD_NAME "Melzi ATmega1284"
30 28
 
31 29
 #if defined(__AVR_ATmega1284P__)
32 30
   #define LARGE_FLASH true
33 31
 #endif
34 32
 
33
+#define SANGUINOLOLU_V_1_2
35 34
 #include "pins_SANGUINOLOLU_11.h"

+ 1
- 0
Marlin/pins_MINIRAMBO.h Näytä tiedosto

@@ -28,6 +28,7 @@
28 28
   #error "Oops!  Make sure you have 'Arduino Mega 2560 or Rambo' selected from the 'Tools -> Boards' menu."
29 29
 #endif
30 30
 
31
+#define BOARD_NAME          "Mini Rambo"
31 32
 #define LARGE_FLASH         true
32 33
 
33 34
 #define X_STEP_PIN          37

+ 1
- 0
Marlin/pins_MINITRONICS.h Näytä tiedosto

@@ -28,6 +28,7 @@
28 28
   #error "Oops!  Make sure you have 'Minitronics' selected from the 'Tools -> Boards' menu."
29 29
 #endif
30 30
 
31
+#define BOARD_NAME         "Minitronics v1.0 / v1.1"
31 32
 #define LARGE_FLASH        true
32 33
 
33 34
 #define X_STEP_PIN 48

+ 2
- 0
Marlin/pins_MKS_13.h Näytä tiedosto

@@ -29,6 +29,8 @@
29 29
  *  MKS v1.4  (Extruder, Extruder, Fan, Bed)
30 30
  */
31 31
 
32
+#define BOARD_NAME "MKS > v1.3"
33
+
32 34
 #include "pins_RAMPS_14_EFB.h"
33 35
 
34 36
 #undef HEATER_1_PIN

+ 2
- 0
Marlin/pins_MKS_BASE.h Näytä tiedosto

@@ -24,6 +24,8 @@
24 24
  * MKS BASE 1.0 – Arduino Mega2560 with RAMPS v1.4 pin assignments
25 25
  */
26 26
 
27
+#define BOARD_NAME "MKS BASE 1.0"
28
+
27 29
 #include "pins_RAMPS_14_EFB.h"
28 30
 
29 31
 #undef HEATER_1_PIN

+ 2
- 0
Marlin/pins_OMCA.h Näytä tiedosto

@@ -55,6 +55,8 @@
55 55
   #error "Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu. (Final OMCA board)"
56 56
 #endif
57 57
 
58
+#define BOARD_NAME         "Final OMCA"
59
+
58 60
 #define X_STEP_PIN         26
59 61
 #define X_DIR_PIN          25
60 62
 #define X_ENABLE_PIN       10

+ 2
- 0
Marlin/pins_OMCA_A.h Näytä tiedosto

@@ -54,6 +54,8 @@
54 54
   #error "Oops!  Make sure you have 'SanguinoA' selected from the 'Tools -> Boards' menu."
55 55
 #endif
56 56
 
57
+#define BOARD_NAME         "Alpha OMCA"
58
+
57 59
 #define X_STEP_PIN         21
58 60
 #define X_DIR_PIN          20
59 61
 #define X_ENABLE_PIN       24

+ 1
- 0
Marlin/pins_PRINTRBOARD.h Näytä tiedosto

@@ -35,6 +35,7 @@
35 35
   #error "These Printrboard assignments depend on traditional Marlin assignments, not AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h"
36 36
 #endif
37 37
 
38
+#define BOARD_NAME         "Printrboard"
38 39
 #define LARGE_FLASH        true
39 40
 
40 41
 // Disable JTAG pins so they can be used for the Extrudrboard

+ 1
- 0
Marlin/pins_PRINTRBOARD_REVF.h Näytä tiedosto

@@ -35,6 +35,7 @@
35 35
   #error "These Printrboard assignments depend on traditional Marlin assignments, not AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h"
36 36
 #endif
37 37
 
38
+#define BOARD_NAME         "Printrboard Rev F"
38 39
 #define LARGE_FLASH        true
39 40
 
40 41
 #define X_STEP_PIN          0

+ 2
- 0
Marlin/pins_RAMBO.h Näytä tiedosto

@@ -28,6 +28,8 @@
28 28
   #error "Oops!  Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu."
29 29
 #endif
30 30
 
31
+#define BOARD_NAME "Rambo"
32
+
31 33
 #define LARGE_FLASH true
32 34
 
33 35
 // Servo support

+ 4
- 1
Marlin/pins_RAMPS_13.h Näytä tiedosto

@@ -33,6 +33,9 @@
33 33
  *
34 34
  */
35 35
 
36
-#define IS_RAMPS_13
36
+#ifndef BOARD_NAME
37
+  #define BOARD_NAME "RAMPS 1.3"
38
+#endif
37 39
 
40
+#define IS_RAMPS_13
38 41
 #include "pins_RAMPS_14.h"

+ 2
- 1
Marlin/pins_RAMPS_13_EFB.h Näytä tiedosto

@@ -26,6 +26,7 @@
26 26
  *  RAMPS_13_EFB (Extruder, Fan, Bed)
27 27
  */
28 28
 
29
-#define IS_RAMPS_13
29
+#define BOARD_NAME "RAMPS 1.3 EFB"
30 30
 
31
+#define IS_RAMPS_13
31 32
 #include "pins_RAMPS_14_EFB.h"

+ 4
- 0
Marlin/pins_RAMPS_14.h Näytä tiedosto

@@ -48,6 +48,10 @@
48 48
   #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
49 49
 #endif
50 50
 
51
+#ifndef BOARD_NAME
52
+  #define BOARD_NAME "RAMPS 1.4"
53
+#endif
54
+
51 55
 #define LARGE_FLASH true
52 56
 
53 57
 #ifdef IS_RAMPS_13

+ 4
- 1
Marlin/pins_RAMPS_14_EFB.h Näytä tiedosto

@@ -26,6 +26,9 @@
26 26
  *  RAMPS_14_EFB (Extruder, Fan, Bed)
27 27
  */
28 28
 
29
-#define IS_RAMPS_EFB
29
+#ifndef BOARD_NAME
30
+  #define BOARD_NAME "RAMPS 1.4 EFB"
31
+#endif
30 32
 
33
+#define IS_RAMPS_EFB
31 34
 #include "pins_RAMPS_14.h"

+ 2
- 0
Marlin/pins_RAMPS_OLD.h Näytä tiedosto

@@ -28,6 +28,8 @@
28 28
   #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
29 29
 #endif
30 30
 
31
+#define BOARD_NAME         "MEGA/RAMPS <1.2"
32
+
31 33
 // Uncomment the following line for RAMPS v1.0
32 34
 //#define RAMPS_V_1_0
33 35
 

+ 3
- 0
Marlin/pins_RIGIDBOARD.h Näytä tiedosto

@@ -26,6 +26,9 @@
26 26
 
27 27
 #include "pins_RAMPS_14.h"
28 28
 
29
+#undef BOARD_NAME
30
+#define BOARD_NAME "RigidBoard"
31
+
29 32
 #if ENABLED(Z_MIN_PROBE_ENDSTOP)
30 33
   #undef Z_MAX_PIN
31 34
   #define Z_MAX_PIN -1

+ 3
- 0
Marlin/pins_RIGIDBOARD_V2.h Näytä tiedosto

@@ -26,6 +26,9 @@
26 26
 
27 27
 #include "pins_RIGIDBOARD.h"
28 28
 
29
+#undef BOARD_NAME
30
+#define BOARD_NAME "RigidBoard V2"
31
+
29 32
 // I2C based DAC like on the Printrboard REVF
30 33
 #define DAC_STEPPER_CURRENT
31 34
 // Channels available for DAC, For Rigidboard there are 4

+ 1
- 0
Marlin/pins_RUMBA.h Näytä tiedosto

@@ -33,6 +33,7 @@
33 33
 #endif
34 34
 
35 35
 #define DEFAULT_MACHINE_NAME "Rumba"
36
+#define BOARD_NAME           "Rumba"
36 37
 
37 38
 #define X_STEP_PIN         17
38 39
 #define X_DIR_PIN          16

+ 3
- 0
Marlin/pins_SAINSMART_2IN1.h Näytä tiedosto

@@ -26,6 +26,9 @@
26 26
 
27 27
 #include "pins_RAMPS_14_EFB.h"
28 28
 
29
+#undef BOARD_NAME
30
+#define BOARD_NAME          "Sainsmart"
31
+
29 32
 #undef FAN_PIN
30 33
 #define FAN_PIN             7 // PART FAN in front of board next to Extruder heat
31 34
 

+ 10
- 4
Marlin/pins_SANGUINOLOLU_11.h Näytä tiedosto

@@ -28,6 +28,12 @@
28 28
   #error "Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu."
29 29
 #endif
30 30
 
31
+#ifndef BOARD_NAME
32
+  #define BOARD_NAME "Sanguinololu <1.2"
33
+#endif
34
+
35
+#define IS_MELZI (MB(MELZI) || MB(MELZI_MAKR3D))
36
+
31 37
 #define X_STEP_PIN         15
32 38
 #define X_DIR_PIN          21
33 39
 #define X_STOP_PIN         18
@@ -43,11 +49,11 @@
43 49
 #define E0_STEP_PIN         1
44 50
 #define E0_DIR_PIN          0
45 51
 
46
-#if MB(AZTEEG_X1) || MB(STB_11) || MB(MELZI)
52
+#if MB(AZTEEG_X1) || MB(STB_11) || IS_MELZI
47 53
   #define FAN_PIN           4 // Works for Panelolu2 too
48 54
 #endif
49 55
 
50
-#if MB(MELZI)
56
+#if IS_MELZI
51 57
   #define LED_PIN          27 // On some broken versions of the Sanguino libraries the pin definitions are wrong, so LED_PIN needs to be 28. But you should upgrade your Sanguino libraries! See #368.
52 58
 #elif MB(STB_11)
53 59
   #define LCD_PIN_BL       17 // LCD backlight LED
@@ -101,7 +107,7 @@
101 107
 
102 108
     #if ENABLED(U8GLIB_ST7920) //SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0
103 109
 
104
-      #if MB(MELZI) // Melzi board
110
+      #if IS_MELZI // Melzi board
105 111
         #define LCD_PINS_RS     30 //CS chip select /SS chip slave select
106 112
         #define LCD_PINS_ENABLE 29 //SID (MOSI)
107 113
         #define LCD_PINS_D4     17 //SCK (CLK) clock
@@ -147,7 +153,7 @@
147 153
   #define BTN_EN1               11
148 154
   #define BTN_EN2               10
149 155
   #if ENABLED(LCD_I2C_PANELOLU2)
150
-    #if MB(MELZI)
156
+    #if IS_MELZI
151 157
       #define BTN_ENC           29
152 158
       #define LCD_SDSS          30 // Panelolu2 SD card reader rather than the Melzi
153 159
     #else

+ 2
- 1
Marlin/pins_SANGUINOLOLU_12.h Näytä tiedosto

@@ -32,10 +32,11 @@
32 32
  *  STB_11
33 33
  */
34 34
 
35
-#define SANGUINOLOLU_V_1_2
35
+#define BOARD_NAME "Sanguinololu 1.2"
36 36
 
37 37
 #if defined(__AVR_ATmega1284P__)
38 38
   #define LARGE_FLASH true
39 39
 #endif
40 40
 
41
+#define SANGUINOLOLU_V_1_2
41 42
 #include "pins_SANGUINOLOLU_11.h"

+ 1
- 0
Marlin/pins_SAV_MKI.h Näytä tiedosto

@@ -33,6 +33,7 @@
33 33
 
34 34
 #define DEFAULT_MACHINE_NAME    "SAV MkI"
35 35
 #define DEFAULT_SOURCE_CODE_URL "https://github.com/fmalpartida/Marlin/tree/SAV-MkI-config"
36
+#define BOARD_NAME              "SAV MkI"
36 37
 
37 38
 #define LARGE_FLASH        true
38 39
 

+ 2
- 0
Marlin/pins_SETHI.h Näytä tiedosto

@@ -28,6 +28,8 @@
28 28
   #error "Oops!  Make sure you have 'Sethi 3D' selected from the 'Tools -> Boards' menu."
29 29
 #endif
30 30
 
31
+#define BOARD_NAME "Sethi 3D_1"
32
+
31 33
 #ifndef GEN7_VERSION
32 34
   #define GEN7_VERSION 12 // v1.x
33 35
 #endif

+ 2
- 1
Marlin/pins_STB_11.h Näytä tiedosto

@@ -24,10 +24,11 @@
24 24
  * STB V1.1 pin assignments
25 25
  */
26 26
 
27
-#define SANGUINOLOLU_V_1_2
27
+#define BOARD_NAME "STB V1.1"
28 28
 
29 29
 #if defined(__AVR_ATmega1284P__)
30 30
   #define LARGE_FLASH true
31 31
 #endif
32 32
 
33
+#define SANGUINOLOLU_V_1_2
33 34
 #include "pins_SANGUINOLOLU_11.h"

+ 2
- 0
Marlin/pins_TEENSY2.h Näytä tiedosto

@@ -74,6 +74,8 @@
74 74
   // (or build from command line)
75 75
 #endif
76 76
 
77
+#define BOARD_NAME         "Teensy++2.0"
78
+
77 79
 #define LARGE_FLASH        true
78 80
 
79 81
 #define X_STEP_PIN         28 //  0 Marlin

+ 2
- 0
Marlin/pins_TEENSYLU.h Näytä tiedosto

@@ -35,6 +35,8 @@
35 35
   #error "These Teensylu assignments depend on traditional Marlin assignments, not AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h"
36 36
 #endif
37 37
 
38
+#define BOARD_NAME         "Teensylu"
39
+
38 40
 #define LARGE_FLASH        true
39 41
 
40 42
 #define X_STEP_PIN          0

+ 1
- 0
Marlin/pins_ULTIMAIN_2.h Näytä tiedosto

@@ -30,6 +30,7 @@
30 30
 
31 31
 #define DEFAULT_MACHINE_NAME    "Ultimaker"
32 32
 #define DEFAULT_SOURCE_CODE_URL "https://github.com/Ultimaker/Marlin"
33
+#define BOARD_NAME              "Ultimaker 2.x"
33 34
 
34 35
 #define X_STEP_PIN 25
35 36
 #define X_DIR_PIN 23

+ 1
- 0
Marlin/pins_ULTIMAKER.h Näytä tiedosto

@@ -30,6 +30,7 @@
30 30
 
31 31
 #define DEFAULT_MACHINE_NAME    "Ultimaker"
32 32
 #define DEFAULT_SOURCE_CODE_URL "https://github.com/Ultimaker/Marlin"
33
+#define BOARD_NAME              "Ultimaker"
33 34
 
34 35
 #define LARGE_FLASH true
35 36
 

+ 1
- 0
Marlin/pins_ULTIMAKER_OLD.h Näytä tiedosto

@@ -30,6 +30,7 @@
30 30
 
31 31
 #define DEFAULT_MACHINE_NAME    "Ultimaker"
32 32
 #define DEFAULT_SOURCE_CODE_URL "https://github.com/Ultimaker/Marlin"
33
+#define BOARD_NAME              "Ultimaker <1.5.4"
33 34
 
34 35
 #define LARGE_FLASH true
35 36
 

+ 6
- 0
Marlin/printcounter.h Näytä tiedosto

@@ -132,6 +132,12 @@ class PrintCounter: public Stopwatch {
132 132
     void showStats();
133 133
 
134 134
     /**
135
+     * @brief Return the currently loaded statistics
136
+     * @details Return the raw data, in the same structure used internally
137
+     */
138
+    printStatistics getStats() { return this->data; }
139
+
140
+    /**
135 141
      * @brief Loop function
136 142
      * @details This function should be called at loop, it will take care of
137 143
      * periodically save the statistical data to EEPROM and do time keeping.

+ 91
- 0
Marlin/thermistornames.h Näytä tiedosto

@@ -0,0 +1,91 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+#undef THERMISTOR_NAME
24
+
25
+// Thermcouples
26
+#if THERMISTOR_ID == -3
27
+  #define THERMISTOR_NAME "MAX31855"
28
+#elif THERMISTOR_ID == -2
29
+  #define THERMISTOR_NAME "MAX6675"
30
+#elif THERMISTOR_ID == -1
31
+  #define THERMISTOR_NAME "AD595"
32
+
33
+// Standard thermistors
34
+#elif THERMISTOR_ID == 1
35
+  #define THERMISTOR_NAME "EPCOS 100K"
36
+#elif THERMISTOR_ID == 2
37
+  #define THERMISTOR_NAME "ATC 204GT-2"
38
+#elif THERMISTOR_ID == 3
39
+  #define THERMISTOR_NAME "Mendel-parts"
40
+#elif THERMISTOR_ID == 4
41
+  #define THERMISTOR_NAME "Generic 10K"
42
+#elif THERMISTOR_ID == 5
43
+  #define THERMISTOR_NAME "ATC 104GT-2"
44
+#elif THERMISTOR_ID == 6
45
+  #define THERMISTOR_NAME "EPCOS (alt)"
46
+#elif THERMISTOR_ID == 7
47
+  #define THERMISTOR_NAME "HW 104LAG"
48
+#elif THERMISTOR_ID == 71
49
+  #define THERMISTOR_NAME "HW 104LAF"
50
+#elif THERMISTOR_ID == 8
51
+  #define THERMISTOR_NAME "E3104FXT"
52
+#elif THERMISTOR_ID == 9
53
+  #define THERMISTOR_NAME "GE AL03006"
54
+#elif THERMISTOR_ID == 10
55
+  #define THERMISTOR_NAME "RS 198-961"
56
+#elif THERMISTOR_ID == 11
57
+  #define THERMISTOR_NAME "1% beta 3950"
58
+#elif THERMISTOR_ID == 12
59
+  #define THERMISTOR_NAME "E3104FXT (alt)"
60
+#elif THERMISTOR_ID == 13
61
+  #define THERMISTOR_NAME "Hisens 3950"
62
+#elif THERMISTOR_ID == 20
63
+  #define THERMISTOR_NAME "PT100 UltiMB"
64
+#elif THERMISTOR_ID == 60
65
+  #define THERMISTOR_NAME "Makers Tool"
66
+#elif THERMISTOR_ID == 70
67
+  #define THERMISTOR_NAME "Hephestos 2"
68
+
69
+// Modified thermistors
70
+#elif THERMISTOR_ID == 51
71
+  #define THERMISTOR_NAME "EPCOS 1K"
72
+#elif THERMISTOR_ID == 52
73
+  #define THERMISTOR_NAME "ATC204GT-2 1K"
74
+#elif THERMISTOR_ID == 55
75
+  #define THERMISTOR_NAME "ATC104GT-2 1K"
76
+#elif THERMISTOR_ID == 1047
77
+  #define THERMISTOR_NAME "PT1000 4K7"
78
+#elif THERMISTOR_ID == 1010
79
+  #define THERMISTOR_NAME "PT1000 1K"
80
+#elif THERMISTOR_ID == 147
81
+  #define THERMISTOR_NAME "PT100 4K7"
82
+#elif THERMISTOR_ID == 110
83
+  #define THERMISTOR_NAME "PT100 1K"
84
+
85
+// Dummies for dev testing
86
+#elif THERMISTOR_ID == 998
87
+  #define THERMISTOR_NAME "Dummy 1"
88
+#elif THERMISTOR_ID == 999
89
+  #define THERMISTOR_NAME "Dummy 2"
90
+
91
+#endif // THERMISTOR_ID

+ 171
- 0
Marlin/ultralcd.cpp Näytä tiedosto

@@ -29,6 +29,10 @@
29 29
 #include "stepper.h"
30 30
 #include "configuration_store.h"
31 31
 
32
+#if ENABLED(PRINTCOUNTER)
33
+  #include "printcounter.h"
34
+#endif
35
+
32 36
 int plaPreheatHotendTemp;
33 37
 int plaPreheatHPBTemp;
34 38
 int plaPreheatFanSpeed;
@@ -117,6 +121,15 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
117 121
   static void lcd_control_motion_menu();
118 122
   static void lcd_control_volumetric_menu();
119 123
 
124
+  #if ENABLED(LCD_INFO_MENU)
125
+    #if ENABLED(PRINTCOUNTER)
126
+      static void lcd_info_stats_menu();
127
+    #endif
128
+    static void lcd_info_thermistors_menu();
129
+    static void lcd_info_board_menu();
130
+    static void lcd_info_menu();
131
+  #endif
132
+
120 133
   #if HAS_LCD_CONTRAST
121 134
     static void lcd_set_contrast();
122 135
   #endif
@@ -189,6 +202,12 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
189 202
 
190 203
   /**
191 204
    * START_MENU generates the init code for a menu function
205
+   *
206
+   *   encoderLine is the position based on the encoder
207
+   *   currentMenuViewOffset is the top menu line to display
208
+   *   _drawLineNr is the index of the LCD line (0-3)
209
+   *   _lineNr is the menu item to draw and process
210
+   *   _menuItemNr is the index of each MENU_ITEM
192 211
    */
193 212
   #define START_MENU() do { \
194 213
     ENCODER_DIRECTION_MENUS(); \
@@ -242,6 +261,26 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
242 261
       _MENU_ITEM_PART_2(type, ## args); \
243 262
     } while(0)
244 263
 
264
+  // Used to print static text with no visible cursor.
265
+  #define STATIC_ITEM(label, args...) \
266
+    if (_menuItemNr == _lineNr) { \
267
+      if (encoderLine == _menuItemNr && _menuItemNr < LCD_HEIGHT - 1) \
268
+        encoderPosition += ENCODER_STEPS_PER_MENU_ITEM; \
269
+      if (lcdDrawUpdate) \
270
+        lcd_implementation_drawmenu_static(_drawLineNr, PSTR(label), ## args); \
271
+    } \
272
+    _menuItemNr++
273
+
274
+  // Same as STATIC_ITEM, but can display variables. Do not use for text strings.
275
+  #define STATIC_ITEM_VAR(label, args...) \
276
+    if (_menuItemNr == _lineNr) { \
277
+      if (encoderLine == _menuItemNr && _menuItemNr < LCD_HEIGHT - 1) \
278
+        encoderPosition += ENCODER_STEPS_PER_MENU_ITEM; \
279
+      if (lcdDrawUpdate) \
280
+        lcd_implementation_drawmenu_static(_drawLineNr, label, ## args); \
281
+    } \
282
+    _menuItemNr++
283
+
245 284
   #if ENABLED(ENCODER_RATE_MULTIPLIER)
246 285
 
247 286
     //#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
@@ -554,6 +593,10 @@ static void lcd_status_screen() {
554 593
       }
555 594
     #endif //SDSUPPORT
556 595
 
596
+    #if ENABLED(LCD_INFO_MENU)
597
+      MENU_ITEM(submenu, MSG_INFO_MENU, lcd_info_menu);
598
+    #endif
599
+
557 600
     END_MENU();
558 601
   }
559 602
 
@@ -1870,6 +1913,134 @@ static void lcd_status_screen() {
1870 1913
 
1871 1914
   #endif //SDSUPPORT
1872 1915
 
1916
+  #if ENABLED(LCD_INFO_MENU)
1917
+    #if ENABLED(PRINTCOUNTER)
1918
+      /**
1919
+       *
1920
+       * Printer Info > Stastics submenu
1921
+       *
1922
+       */
1923
+      static void lcd_info_stats_menu() {
1924
+        PrintCounter print_job_counter = PrintCounter();
1925
+        print_job_counter.loadStats();
1926
+        printStatistics stats = print_job_counter.getStats();
1927
+
1928
+        char totalPrints[18];
1929
+        itoa(stats.totalPrints, totalPrints, 10);
1930
+        char finishedPrints[18];
1931
+        itoa(stats.finishedPrints, finishedPrints, 10);
1932
+        char printTime[18];
1933
+        itoa(stats.printTime, printTime, 10);
1934
+
1935
+        if (LCD_CLICKED) lcd_goto_previous_menu(true);
1936
+        START_MENU();
1937
+        STATIC_ITEM(MSG_INFO_TOTAL_PRINTS ": ");    // Total Prints:
1938
+        STATIC_ITEM_VAR(totalPrints);               // 999
1939
+        STATIC_ITEM(MSG_INFO_FINISHED_PRINTS ": "); // Finished Prints:
1940
+        STATIC_ITEM_VAR(finishedPrints);            // 666
1941
+        STATIC_ITEM(MSG_INFO_PRINT_TIME ": ");      // Total Print Time:
1942
+        STATIC_ITEM_VAR(printTime);                 // 123456
1943
+        END_MENU();
1944
+      }
1945
+    #endif
1946
+  
1947
+    /**
1948
+     *
1949
+     * Printer Info > Thermistors
1950
+     *
1951
+     */
1952
+    static void lcd_info_thermistors_menu() {
1953
+      if (LCD_CLICKED) lcd_goto_previous_menu(true);
1954
+      START_MENU();
1955
+      #define THERMISTOR_ID TEMP_SENSOR_0
1956
+      #include "thermistornames.h"
1957
+      STATIC_ITEM("T0: " THERMISTOR_NAME);
1958
+      STATIC_ITEM(MSG_INFO_MIN_TEMP ": " STRINGIFY(HEATER_0_MINTEMP));
1959
+      STATIC_ITEM(MSG_INFO_MAX_TEMP ": " STRINGIFY(HEATER_0_MAXTEMP));
1960
+
1961
+      #if TEMP_SENSOR_1 != 0
1962
+        #undef THERMISTOR_ID
1963
+        #define THERMISTOR_ID TEMP_SENSOR_1
1964
+        #include "thermistornames.h"
1965
+        STATIC_ITEM("T1: " THERMISTOR_NAME);
1966
+        STATIC_ITEM(MSG_INFO_MIN_TEMP ": " STRINGIFY(HEATER_1_MINTEMP));
1967
+        STATIC_ITEM(MSG_INFO_MAX_TEMP ": " STRINGIFY(HEATER_1_MAXTEMP));
1968
+      #endif
1969
+
1970
+      #if TEMP_SENSOR_2 != 0
1971
+        #undef THERMISTOR_ID
1972
+        #define THERMISTOR_ID TEMP_SENSOR_2
1973
+        #include "thermistornames.h"
1974
+        STATIC_ITEM("T2: " THERMISTOR_NAME);
1975
+        STATIC_ITEM(MSG_INFO_MIN_TEMP ": " STRINGIFY(HEATER_2_MINTEMP));
1976
+        STATIC_ITEM(MSG_INFO_MAX_TEMP ": " STRINGIFY(HEATER_2_MAXTEMP));
1977
+      #endif
1978
+
1979
+      #if TEMP_SENSOR_3 != 0
1980
+        #undef THERMISTOR_ID
1981
+        #define THERMISTOR_ID TEMP_SENSOR_3
1982
+        #include "thermistornames.h"
1983
+        STATIC_ITEM("T3: " THERMISTOR_NAME);
1984
+        STATIC_ITEM(MSG_INFO_MIN_TEMP ": " STRINGIFY(HEATER_3_MINTEMP));
1985
+        STATIC_ITEM(MSG_INFO_MAX_TEMP ": " STRINGIFY(HEATER_3_MAXTEMP));
1986
+      #endif
1987
+    
1988
+      #if TEMP_SENSOR_BED != 0
1989
+        #undef THERMISTOR_ID
1990
+        #define THERMISTOR_ID TEMP_SENSOR_BED
1991
+        #include "thermistornames.h"
1992
+        STATIC_ITEM("TBed:" THERMISTOR_NAME);
1993
+        STATIC_ITEM(MSG_INFO_MIN_TEMP ": " STRINGIFY(BED_MINTEMP));
1994
+        STATIC_ITEM(MSG_INFO_MAX_TEMP ": " STRINGIFY(BED_MAXTEMP));
1995
+      #endif
1996
+      END_MENU();
1997
+    }
1998
+
1999
+    /**
2000
+     *
2001
+     * Printer Info > Board Info
2002
+     *
2003
+     */
2004
+    static void lcd_info_board_menu() {
2005
+      if (LCD_CLICKED) lcd_goto_previous_menu(true);
2006
+      START_MENU();
2007
+      STATIC_ITEM(BOARD_NAME);                                 // MyPrinterController
2008
+      STATIC_ITEM(MSG_INFO_BAUDRATE ": " STRINGIFY(BAUDRATE)); // Baud: 250000
2009
+      STATIC_ITEM(MSG_INFO_PROTOCOL ": " PROTOCOL_VERSION);    // Protocol: 1.0
2010
+      #ifdef POWER_SUPPLY
2011
+        #if (POWER_SUPPLY == 1)
2012
+          STATIC_ITEM(MSG_INFO_PSU ": ATX");  // Power Supply: ATX
2013
+        #elif (POWER_SUPPLY == 2)
2014
+          STATIC_ITEM(MSG_INFO_PSU ": XBox"); // Power Supply: XBox
2015
+        #endif
2016
+      #endif // POWER_SUPPLY
2017
+      END_MENU();
2018
+    }
2019
+
2020
+    /**
2021
+     *
2022
+     * "Printer Info" submenu
2023
+     *
2024
+     */
2025
+    static void lcd_info_menu() {
2026
+      START_MENU();
2027
+      MENU_ITEM(back, MSG_INFO_MENU);
2028
+      STATIC_ITEM(MSG_MARLIN);                                   // Marlin
2029
+      STATIC_ITEM(SHORT_BUILD_VERSION);                          // x.x.x-Branch
2030
+      STATIC_ITEM(STRING_DISTRIBUTION_DATE);                     // YYYY-MM-DD HH:MM
2031
+      STATIC_ITEM(MACHINE_NAME);                                 // My3DPrinter
2032
+      STATIC_ITEM(WEBSITE_URL);                                  // www.my3dprinter.com
2033
+      STATIC_ITEM(MSG_INFO_EXTRUDERS ": " STRINGIFY(EXTRUDERS)); // Extruders: 2
2034
+
2035
+      MENU_ITEM(submenu, MSG_INFO_BOARD_MENU, lcd_info_board_menu);            // Board Info ->
2036
+      MENU_ITEM(submenu, MSG_INFO_THERMISTOR_MENU, lcd_info_thermistors_menu); // Thermistors ->
2037
+      #if ENABLED(PRINTCOUNTER)
2038
+        MENU_ITEM(submenu, MSG_INFO_STATS_MENU, lcd_info_stats_menu);          // Printer Statistics ->
2039
+      #endif
2040
+      END_MENU();
2041
+    }
2042
+  #endif // LCD_INFO_MENU
2043
+
1873 2044
   /**
1874 2045
    *
1875 2046
    * Functions for editing single values

+ 15
- 0
Marlin/ultralcd_implementation_hitachi_HD44780.h Näytä tiedosto

@@ -815,6 +815,21 @@ static void lcd_implementation_status_screen() {
815 815
   lcd_print(lcd_status_message);
816 816
 }
817 817
 
818
+static void lcd_implementation_drawmenu_static(uint8_t row, const char* pstr, bool center=true) {
819
+  char c;
820
+  uint8_t n = LCD_WIDTH;
821
+  lcd.setCursor(0, row);
822
+  if (center) {
823
+    int8_t pad = (LCD_WIDTH - lcd_strlen_P(pstr)) / 2;
824
+    while (--pad >= 0) { lcd.print(' '); n--; }
825
+  }
826
+  while ((c = pgm_read_byte(pstr)) && n > 0) {
827
+    n -= lcd_print(c);
828
+    pstr++;
829
+  }
830
+  while (n--) lcd.print(' ');
831
+}
832
+
818 833
 static void lcd_implementation_drawmenu_generic(bool sel, uint8_t row, const char* pstr, char pre_char, char post_char) {
819 834
   char c;
820 835
   uint8_t n = LCD_WIDTH - 2;

Loading…
Peruuta
Tallenna