|
@@ -20,72 +20,72 @@
|
20
|
20
|
* V19 EEPROM Layout:
|
21
|
21
|
*
|
22
|
22
|
* ver
|
23
|
|
- * axis_steps_per_unit (x4)
|
24
|
|
- * max_feedrate (x4)
|
25
|
|
- * max_acceleration_units_per_sq_second (x4)
|
26
|
|
- * acceleration
|
27
|
|
- * retract_acceleration
|
28
|
|
- * travel_acceleration
|
29
|
|
- * minimumfeedrate
|
30
|
|
- * mintravelfeedrate
|
31
|
|
- * minsegmenttime
|
32
|
|
- * max_xy_jerk
|
33
|
|
- * max_z_jerk
|
34
|
|
- * max_e_jerk
|
35
|
|
- * home_offset (x3)
|
|
23
|
+ * M92 XYZE axis_steps_per_unit (x4)
|
|
24
|
+ * M203 XYZE max_feedrate (x4)
|
|
25
|
+ * M201 XYZE max_acceleration_units_per_sq_second (x4)
|
|
26
|
+ * M204 P acceleration
|
|
27
|
+ * M204 R retract_acceleration
|
|
28
|
+ * M204 T travel_acceleration
|
|
29
|
+ * M205 S minimumfeedrate
|
|
30
|
+ * M205 T mintravelfeedrate
|
|
31
|
+ * M205 B minsegmenttime
|
|
32
|
+ * M205 X max_xy_jerk
|
|
33
|
+ * M205 Z max_z_jerk
|
|
34
|
+ * M205 E max_e_jerk
|
|
35
|
+ * M206 XYZ home_offset (x3)
|
36
|
36
|
*
|
37
|
37
|
* Mesh bed leveling:
|
38
|
|
- * active
|
39
|
|
- * mesh_num_x
|
40
|
|
- * mesh_num_y
|
41
|
|
- * z_values[][]
|
42
|
|
- * zprobe_zoffset
|
|
38
|
+ * M420 S active
|
|
39
|
+ * mesh_num_x (set in firmware)
|
|
40
|
+ * mesh_num_y (set in firmware)
|
|
41
|
+ * M421 XYZ z_values[][]
|
|
42
|
+ * M851 zprobe_zoffset
|
43
|
43
|
*
|
44
|
44
|
* DELTA:
|
45
|
|
- * endstop_adj (x3)
|
46
|
|
- * delta_radius
|
47
|
|
- * delta_diagonal_rod
|
48
|
|
- * delta_segments_per_second
|
|
45
|
+ * M666 XYZ endstop_adj (x3)
|
|
46
|
+ * M665 R delta_radius
|
|
47
|
+ * M665 L delta_diagonal_rod
|
|
48
|
+ * M665 S delta_segments_per_second
|
49
|
49
|
*
|
50
|
50
|
* ULTIPANEL:
|
51
|
|
- * plaPreheatHotendTemp
|
52
|
|
- * plaPreheatHPBTemp
|
53
|
|
- * plaPreheatFanSpeed
|
54
|
|
- * absPreheatHotendTemp
|
55
|
|
- * absPreheatHPBTemp
|
56
|
|
- * absPreheatFanSpeed
|
|
51
|
+ * M145 S0 H plaPreheatHotendTemp
|
|
52
|
+ * M145 S0 B plaPreheatHPBTemp
|
|
53
|
+ * M145 S0 F plaPreheatFanSpeed
|
|
54
|
+ * M145 S1 H absPreheatHotendTemp
|
|
55
|
+ * M145 S1 B absPreheatHPBTemp
|
|
56
|
+ * M145 S1 F absPreheatFanSpeed
|
57
|
57
|
*
|
58
|
58
|
* PIDTEMP:
|
59
|
|
- * Kp[0], Ki[0], Kd[0], Kc[0]
|
60
|
|
- * Kp[1], Ki[1], Kd[1], Kc[1]
|
61
|
|
- * Kp[2], Ki[2], Kd[2], Kc[2]
|
62
|
|
- * Kp[3], Ki[3], Kd[3], Kc[3]
|
|
59
|
+ * M301 E0 PIDC Kp[0], Ki[0], Kd[0], Kc[0]
|
|
60
|
+ * M301 E1 PIDC Kp[1], Ki[1], Kd[1], Kc[1]
|
|
61
|
+ * M301 E2 PIDC Kp[2], Ki[2], Kd[2], Kc[2]
|
|
62
|
+ * M301 E3 PIDC Kp[3], Ki[3], Kd[3], Kc[3]
|
63
|
63
|
*
|
64
|
64
|
* PIDTEMPBED:
|
65
|
|
- * bedKp, bedKi, bedKd
|
|
65
|
+ * M304 PID bedKp, bedKi, bedKd
|
66
|
66
|
*
|
67
|
67
|
* DOGLCD:
|
68
|
|
- * lcd_contrast
|
|
68
|
+ * M250 C lcd_contrast
|
69
|
69
|
*
|
70
|
70
|
* SCARA:
|
71
|
|
- * axis_scaling (x3)
|
|
71
|
+ * M365 XYZ axis_scaling (x3)
|
72
|
72
|
*
|
73
|
73
|
* FWRETRACT:
|
74
|
|
- * autoretract_enabled
|
75
|
|
- * retract_length
|
76
|
|
- * retract_length_swap
|
77
|
|
- * retract_feedrate
|
78
|
|
- * retract_zlift
|
79
|
|
- * retract_recover_length
|
80
|
|
- * retract_recover_length_swap
|
81
|
|
- * retract_recover_feedrate
|
|
74
|
+ * M209 S autoretract_enabled
|
|
75
|
+ * M207 S retract_length
|
|
76
|
+ * M207 W retract_length_swap
|
|
77
|
+ * M207 F retract_feedrate
|
|
78
|
+ * M207 Z retract_zlift
|
|
79
|
+ * M208 S retract_recover_length
|
|
80
|
+ * M208 W retract_recover_length_swap
|
|
81
|
+ * M208 F retract_recover_feedrate
|
82
|
82
|
*
|
83
|
|
- * volumetric_enabled
|
|
83
|
+ * M200 D volumetric_enabled (D>0 makes this enabled)
|
84
|
84
|
*
|
85
|
|
- * filament_size (x4)
|
|
85
|
+ * M200 T D filament_size (x4) (T0..3)
|
86
|
86
|
*
|
87
|
|
- * Z_DUAL_ENDSTOPS
|
88
|
|
- * z_endstop_adj
|
|
87
|
+ * Z_DUAL_ENDSTOPS:
|
|
88
|
+ * M666 Z z_endstop_adj
|
89
|
89
|
*
|
90
|
90
|
*/
|
91
|
91
|
#include "Marlin.h"
|
|
@@ -122,7 +122,9 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size) {
|
122
|
122
|
#define EEPROM_WRITE_VAR(pos, value) _EEPROM_writeData(pos, (uint8_t*)&value, sizeof(value))
|
123
|
123
|
#define EEPROM_READ_VAR(pos, value) _EEPROM_readData(pos, (uint8_t*)&value, sizeof(value))
|
124
|
124
|
|
125
|
|
-//======================================================================================
|
|
125
|
+/**
|
|
126
|
+ * Store Configuration Settings - M500
|
|
127
|
+ */
|
126
|
128
|
|
127
|
129
|
#define DUMMY_PID_VALUE 3000.0f
|
128
|
130
|
|
|
@@ -235,7 +237,7 @@ void Config_StoreSettings() {
|
235
|
237
|
EEPROM_WRITE_VAR(i, bedKi);
|
236
|
238
|
EEPROM_WRITE_VAR(i, bedKd);
|
237
|
239
|
|
238
|
|
- #ifndef DOGLCD
|
|
240
|
+ #ifndef HAS_LCD_CONTRAST
|
239
|
241
|
int lcd_contrast = 32;
|
240
|
242
|
#endif
|
241
|
243
|
EEPROM_WRITE_VAR(i, lcd_contrast);
|
|
@@ -286,6 +288,10 @@ void Config_StoreSettings() {
|
286
|
288
|
SERIAL_ECHOLNPGM(" bytes)");
|
287
|
289
|
}
|
288
|
290
|
|
|
291
|
+/**
|
|
292
|
+ * Retrieve Configuration Settings - M501
|
|
293
|
+ */
|
|
294
|
+
|
289
|
295
|
void Config_RetrieveSettings() {
|
290
|
296
|
|
291
|
297
|
int i = EEPROM_OFFSET;
|
|
@@ -412,7 +418,7 @@ void Config_RetrieveSettings() {
|
412
|
418
|
for (int q=2; q--;) EEPROM_READ_VAR(i, dummy); // bedKi, bedKd
|
413
|
419
|
}
|
414
|
420
|
|
415
|
|
- #ifndef DOGLCD
|
|
421
|
+ #ifndef HAS_LCD_CONTRAST
|
416
|
422
|
int lcd_contrast;
|
417
|
423
|
#endif
|
418
|
424
|
EEPROM_READ_VAR(i, lcd_contrast);
|
|
@@ -467,6 +473,10 @@ void Config_RetrieveSettings() {
|
467
|
473
|
|
468
|
474
|
#endif // EEPROM_SETTINGS
|
469
|
475
|
|
|
476
|
+/**
|
|
477
|
+ * Reset Configuration Settings - M502
|
|
478
|
+ */
|
|
479
|
+
|
470
|
480
|
void Config_ResetDefault() {
|
471
|
481
|
float tmp1[] = DEFAULT_AXIS_STEPS_PER_UNIT;
|
472
|
482
|
float tmp2[] = DEFAULT_MAX_FEEDRATE;
|
|
@@ -522,7 +532,7 @@ void Config_ResetDefault() {
|
522
|
532
|
absPreheatFanSpeed = ABS_PREHEAT_FAN_SPEED;
|
523
|
533
|
#endif
|
524
|
534
|
|
525
|
|
- #ifdef DOGLCD
|
|
535
|
+ #ifdef HAS_LCD_CONTRAST
|
526
|
536
|
lcd_contrast = DEFAULT_LCD_CONTRAST;
|
527
|
537
|
#endif
|
528
|
538
|
|
|
@@ -584,14 +594,20 @@ void Config_ResetDefault() {
|
584
|
594
|
|
585
|
595
|
#ifndef DISABLE_M503
|
586
|
596
|
|
|
597
|
+/**
|
|
598
|
+ * Print Configuration Settings - M503
|
|
599
|
+ */
|
|
600
|
+
|
|
601
|
+#define CONFIG_ECHO_START do{ if (!forReplay) SERIAL_ECHO_START; }while(0)
|
|
602
|
+
|
587
|
603
|
void Config_PrintSettings(bool forReplay) {
|
588
|
604
|
// Always have this function, even with EEPROM_SETTINGS disabled, the current values will be shown
|
589
|
605
|
|
590
|
|
- SERIAL_ECHO_START;
|
|
606
|
+ CONFIG_ECHO_START;
|
591
|
607
|
|
592
|
608
|
if (!forReplay) {
|
593
|
609
|
SERIAL_ECHOLNPGM("Steps per unit:");
|
594
|
|
- SERIAL_ECHO_START;
|
|
610
|
+ CONFIG_ECHO_START;
|
595
|
611
|
}
|
596
|
612
|
SERIAL_ECHOPAIR(" M92 X", axis_steps_per_unit[X_AXIS]);
|
597
|
613
|
SERIAL_ECHOPAIR(" Y", axis_steps_per_unit[Y_AXIS]);
|
|
@@ -599,23 +615,23 @@ void Config_PrintSettings(bool forReplay) {
|
599
|
615
|
SERIAL_ECHOPAIR(" E", axis_steps_per_unit[E_AXIS]);
|
600
|
616
|
SERIAL_EOL;
|
601
|
617
|
|
602
|
|
- SERIAL_ECHO_START;
|
|
618
|
+ CONFIG_ECHO_START;
|
603
|
619
|
|
604
|
620
|
#ifdef SCARA
|
605
|
621
|
if (!forReplay) {
|
606
|
622
|
SERIAL_ECHOLNPGM("Scaling factors:");
|
607
|
|
- SERIAL_ECHO_START;
|
|
623
|
+ CONFIG_ECHO_START;
|
608
|
624
|
}
|
609
|
625
|
SERIAL_ECHOPAIR(" M365 X", axis_scaling[X_AXIS]);
|
610
|
626
|
SERIAL_ECHOPAIR(" Y", axis_scaling[Y_AXIS]);
|
611
|
627
|
SERIAL_ECHOPAIR(" Z", axis_scaling[Z_AXIS]);
|
612
|
628
|
SERIAL_EOL;
|
613
|
|
- SERIAL_ECHO_START;
|
|
629
|
+ CONFIG_ECHO_START;
|
614
|
630
|
#endif // SCARA
|
615
|
631
|
|
616
|
632
|
if (!forReplay) {
|
617
|
633
|
SERIAL_ECHOLNPGM("Maximum feedrates (mm/s):");
|
618
|
|
- SERIAL_ECHO_START;
|
|
634
|
+ CONFIG_ECHO_START;
|
619
|
635
|
}
|
620
|
636
|
SERIAL_ECHOPAIR(" M203 X", max_feedrate[X_AXIS]);
|
621
|
637
|
SERIAL_ECHOPAIR(" Y", max_feedrate[Y_AXIS]);
|
|
@@ -623,160 +639,224 @@ void Config_PrintSettings(bool forReplay) {
|
623
|
639
|
SERIAL_ECHOPAIR(" E", max_feedrate[E_AXIS]);
|
624
|
640
|
SERIAL_EOL;
|
625
|
641
|
|
626
|
|
- SERIAL_ECHO_START;
|
|
642
|
+ CONFIG_ECHO_START;
|
627
|
643
|
if (!forReplay) {
|
628
|
644
|
SERIAL_ECHOLNPGM("Maximum Acceleration (mm/s2):");
|
629
|
|
- SERIAL_ECHO_START;
|
|
645
|
+ CONFIG_ECHO_START;
|
630
|
646
|
}
|
631
|
|
- SERIAL_ECHOPAIR(" M201 X", max_acceleration_units_per_sq_second[X_AXIS] );
|
632
|
|
- SERIAL_ECHOPAIR(" Y", max_acceleration_units_per_sq_second[Y_AXIS] );
|
633
|
|
- SERIAL_ECHOPAIR(" Z", max_acceleration_units_per_sq_second[Z_AXIS] );
|
|
647
|
+ SERIAL_ECHOPAIR(" M201 X", max_acceleration_units_per_sq_second[X_AXIS]);
|
|
648
|
+ SERIAL_ECHOPAIR(" Y", max_acceleration_units_per_sq_second[Y_AXIS]);
|
|
649
|
+ SERIAL_ECHOPAIR(" Z", max_acceleration_units_per_sq_second[Z_AXIS]);
|
634
|
650
|
SERIAL_ECHOPAIR(" E", max_acceleration_units_per_sq_second[E_AXIS]);
|
635
|
651
|
SERIAL_EOL;
|
636
|
|
- SERIAL_ECHO_START;
|
|
652
|
+ CONFIG_ECHO_START;
|
637
|
653
|
if (!forReplay) {
|
638
|
654
|
SERIAL_ECHOLNPGM("Accelerations: P=printing, R=retract and T=travel");
|
639
|
|
- SERIAL_ECHO_START;
|
|
655
|
+ CONFIG_ECHO_START;
|
640
|
656
|
}
|
641
|
|
- SERIAL_ECHOPAIR(" M204 P", acceleration );
|
|
657
|
+ SERIAL_ECHOPAIR(" M204 P", acceleration);
|
642
|
658
|
SERIAL_ECHOPAIR(" R", retract_acceleration);
|
643
|
659
|
SERIAL_ECHOPAIR(" T", travel_acceleration);
|
644
|
660
|
SERIAL_EOL;
|
645
|
661
|
|
646
|
|
- SERIAL_ECHO_START;
|
|
662
|
+ CONFIG_ECHO_START;
|
647
|
663
|
if (!forReplay) {
|
648
|
664
|
SERIAL_ECHOLNPGM("Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s), Z=maximum Z jerk (mm/s), E=maximum E jerk (mm/s)");
|
649
|
|
- SERIAL_ECHO_START;
|
|
665
|
+ CONFIG_ECHO_START;
|
650
|
666
|
}
|
651
|
|
- SERIAL_ECHOPAIR(" M205 S", minimumfeedrate );
|
652
|
|
- SERIAL_ECHOPAIR(" T", mintravelfeedrate );
|
653
|
|
- SERIAL_ECHOPAIR(" B", minsegmenttime );
|
654
|
|
- SERIAL_ECHOPAIR(" X", max_xy_jerk );
|
|
667
|
+ SERIAL_ECHOPAIR(" M205 S", minimumfeedrate);
|
|
668
|
+ SERIAL_ECHOPAIR(" T", mintravelfeedrate);
|
|
669
|
+ SERIAL_ECHOPAIR(" B", minsegmenttime);
|
|
670
|
+ SERIAL_ECHOPAIR(" X", max_xy_jerk);
|
655
|
671
|
SERIAL_ECHOPAIR(" Z", max_z_jerk);
|
656
|
672
|
SERIAL_ECHOPAIR(" E", max_e_jerk);
|
657
|
673
|
SERIAL_EOL;
|
658
|
674
|
|
659
|
|
- SERIAL_ECHO_START;
|
|
675
|
+ CONFIG_ECHO_START;
|
660
|
676
|
if (!forReplay) {
|
661
|
677
|
SERIAL_ECHOLNPGM("Home offset (mm):");
|
662
|
|
- SERIAL_ECHO_START;
|
|
678
|
+ CONFIG_ECHO_START;
|
663
|
679
|
}
|
664
|
|
- SERIAL_ECHOPAIR(" M206 X", home_offset[X_AXIS] );
|
665
|
|
- SERIAL_ECHOPAIR(" Y", home_offset[Y_AXIS] );
|
666
|
|
- SERIAL_ECHOPAIR(" Z", home_offset[Z_AXIS] );
|
|
680
|
+ SERIAL_ECHOPAIR(" M206 X", home_offset[X_AXIS]);
|
|
681
|
+ SERIAL_ECHOPAIR(" Y", home_offset[Y_AXIS]);
|
|
682
|
+ SERIAL_ECHOPAIR(" Z", home_offset[Z_AXIS]);
|
667
|
683
|
SERIAL_EOL;
|
668
|
684
|
|
|
685
|
+ #ifdef MESH_BED_LEVELING
|
|
686
|
+ if (!forReplay) {
|
|
687
|
+ SERIAL_ECHOLNPGM("Mesh bed leveling:");
|
|
688
|
+ CONFIG_ECHO_START;
|
|
689
|
+ }
|
|
690
|
+ SERIAL_ECHOPAIR(" M420 S", (int32_t)mbl.active);
|
|
691
|
+ SERIAL_ECHOPAIR(" X", MESH_NUM_X_POINTS);
|
|
692
|
+ SERIAL_ECHOPAIR(" Y", MESH_NUM_Y_POINTS);
|
|
693
|
+ SERIAL_EOL;
|
|
694
|
+ for (int y=0; y<MESH_NUM_Y_POINTS; y++) {
|
|
695
|
+ for (int x=0; x<MESH_NUM_X_POINTS; x++) {
|
|
696
|
+ CONFIG_ECHO_START;
|
|
697
|
+ SERIAL_ECHOPAIR(" M421 X", x);
|
|
698
|
+ SERIAL_ECHOPAIR(" Y", y);
|
|
699
|
+ SERIAL_ECHOPAIR(" Z", mbl.z_values[y][x]);
|
|
700
|
+ SERIAL_EOL;
|
|
701
|
+ }
|
|
702
|
+ }
|
|
703
|
+ #endif
|
|
704
|
+
|
669
|
705
|
#ifdef DELTA
|
670
|
|
- SERIAL_ECHO_START;
|
|
706
|
+ CONFIG_ECHO_START;
|
671
|
707
|
if (!forReplay) {
|
672
|
708
|
SERIAL_ECHOLNPGM("Endstop adjustment (mm):");
|
673
|
|
- SERIAL_ECHO_START;
|
|
709
|
+ CONFIG_ECHO_START;
|
674
|
710
|
}
|
675
|
|
- SERIAL_ECHOPAIR(" M666 X", endstop_adj[X_AXIS] );
|
676
|
|
- SERIAL_ECHOPAIR(" Y", endstop_adj[Y_AXIS] );
|
677
|
|
- SERIAL_ECHOPAIR(" Z", endstop_adj[Z_AXIS] );
|
|
711
|
+ SERIAL_ECHOPAIR(" M666 X", endstop_adj[X_AXIS]);
|
|
712
|
+ SERIAL_ECHOPAIR(" Y", endstop_adj[Y_AXIS]);
|
|
713
|
+ SERIAL_ECHOPAIR(" Z", endstop_adj[Z_AXIS]);
|
678
|
714
|
SERIAL_EOL;
|
679
|
|
- SERIAL_ECHO_START;
|
|
715
|
+ CONFIG_ECHO_START;
|
680
|
716
|
SERIAL_ECHOLNPGM("Delta settings: L=delta_diagonal_rod, R=delta_radius, S=delta_segments_per_second");
|
681
|
|
- SERIAL_ECHO_START;
|
682
|
|
- SERIAL_ECHOPAIR(" M665 L", delta_diagonal_rod );
|
683
|
|
- SERIAL_ECHOPAIR(" R", delta_radius );
|
684
|
|
- SERIAL_ECHOPAIR(" S", delta_segments_per_second );
|
|
717
|
+ CONFIG_ECHO_START;
|
|
718
|
+ SERIAL_ECHOPAIR(" M665 L", delta_diagonal_rod);
|
|
719
|
+ SERIAL_ECHOPAIR(" R", delta_radius);
|
|
720
|
+ SERIAL_ECHOPAIR(" S", delta_segments_per_second);
|
685
|
721
|
SERIAL_EOL;
|
686
|
722
|
#elif defined(Z_DUAL_ENDSTOPS)
|
687
|
|
- SERIAL_ECHO_START;
|
|
723
|
+ CONFIG_ECHO_START;
|
688
|
724
|
if (!forReplay) {
|
689
|
725
|
SERIAL_ECHOLNPGM("Z2 Endstop adjustment (mm):");
|
690
|
|
- SERIAL_ECHO_START;
|
|
726
|
+ CONFIG_ECHO_START;
|
691
|
727
|
}
|
692
|
|
- SERIAL_ECHOPAIR(" M666 Z", z_endstop_adj );
|
|
728
|
+ SERIAL_ECHOPAIR(" M666 Z", z_endstop_adj);
|
693
|
729
|
SERIAL_EOL;
|
694
|
730
|
#endif // DELTA
|
695
|
731
|
|
|
732
|
+ #ifdef ULTIPANEL
|
|
733
|
+ CONFIG_ECHO_START;
|
|
734
|
+ if (!forReplay) {
|
|
735
|
+ SERIAL_ECHOLNPGM("Material heatup parameters:");
|
|
736
|
+ CONFIG_ECHO_START;
|
|
737
|
+ }
|
|
738
|
+ SERIAL_ECHOPAIR(" M145 M0 H", (unsigned long)plaPreheatHotendTemp);
|
|
739
|
+ SERIAL_ECHOPAIR(" B", (unsigned long)plaPreheatHPBTemp);
|
|
740
|
+ SERIAL_ECHOPAIR(" F", (unsigned long)plaPreheatFanSpeed);
|
|
741
|
+ SERIAL_EOL;
|
|
742
|
+ CONFIG_ECHO_START;
|
|
743
|
+ SERIAL_ECHOPAIR(" M145 M1 H", (unsigned long)absPreheatHotendTemp);
|
|
744
|
+ SERIAL_ECHOPAIR(" B", (unsigned long)absPreheatHPBTemp);
|
|
745
|
+ SERIAL_ECHOPAIR(" F", (unsigned long)absPreheatFanSpeed);
|
|
746
|
+ SERIAL_EOL;
|
|
747
|
+ #endif // ULTIPANEL
|
|
748
|
+
|
696
|
749
|
#if defined(PIDTEMP) || defined(PIDTEMPBED)
|
697
|
|
- SERIAL_ECHO_START;
|
|
750
|
+
|
|
751
|
+ CONFIG_ECHO_START;
|
698
|
752
|
if (!forReplay) {
|
699
|
753
|
SERIAL_ECHOLNPGM("PID settings:");
|
700
|
|
- SERIAL_ECHO_START;
|
701
|
754
|
}
|
702
|
|
- #if defined(PIDTEMP) && defined(PIDTEMPBED)
|
703
|
|
- SERIAL_EOL;
|
704
|
|
- #endif
|
705
|
755
|
#ifdef PIDTEMP
|
706
|
|
- SERIAL_ECHOPAIR(" M301 P", PID_PARAM(Kp, 0)); // for compatibility with hosts, only echos values for E0
|
707
|
|
- SERIAL_ECHOPAIR(" I", unscalePID_i(PID_PARAM(Ki, 0)));
|
708
|
|
- SERIAL_ECHOPAIR(" D", unscalePID_d(PID_PARAM(Kd, 0)));
|
709
|
|
- SERIAL_EOL;
|
710
|
|
- #endif
|
|
756
|
+ #if EXTRUDERS > 1
|
|
757
|
+ if (forReplay) {
|
|
758
|
+ for (uint8_t i = 0; i < EXTRUDERS; i++) {
|
|
759
|
+ CONFIG_ECHO_START;
|
|
760
|
+ SERIAL_ECHOPAIR(" M301 E", (unsigned long)i);
|
|
761
|
+ SERIAL_ECHOPAIR(" P", PID_PARAM(Kp, i));
|
|
762
|
+ SERIAL_ECHOPAIR(" I", unscalePID_i(PID_PARAM(Ki, i)));
|
|
763
|
+ SERIAL_ECHOPAIR(" D", unscalePID_d(PID_PARAM(Kd, i)));
|
|
764
|
+ #ifdef PID_ADD_EXTRUSION_RATE
|
|
765
|
+ SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, i));
|
|
766
|
+ #endif
|
|
767
|
+ SERIAL_EOL;
|
|
768
|
+ }
|
|
769
|
+ }
|
|
770
|
+ else
|
|
771
|
+ #endif // EXTRUDERS > 1
|
|
772
|
+ // !forReplay || EXTRUDERS == 1
|
|
773
|
+ {
|
|
774
|
+ CONFIG_ECHO_START;
|
|
775
|
+ SERIAL_ECHOPAIR(" M301 P", PID_PARAM(Kp, 0)); // for compatibility with hosts, only echo values for E0
|
|
776
|
+ SERIAL_ECHOPAIR(" I", unscalePID_i(PID_PARAM(Ki, 0)));
|
|
777
|
+ SERIAL_ECHOPAIR(" D", unscalePID_d(PID_PARAM(Kd, 0)));
|
|
778
|
+ #ifdef PID_ADD_EXTRUSION_RATE
|
|
779
|
+ SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, 0));
|
|
780
|
+ #endif
|
|
781
|
+ SERIAL_EOL;
|
|
782
|
+ }
|
|
783
|
+ #endif // PIDTEMP
|
|
784
|
+
|
711
|
785
|
#ifdef PIDTEMPBED
|
712
|
|
- SERIAL_ECHOPAIR(" M304 P", bedKp); // for compatibility with hosts, only echos values for E0
|
|
786
|
+ CONFIG_ECHO_START;
|
|
787
|
+ SERIAL_ECHOPAIR(" M304 P", bedKp);
|
713
|
788
|
SERIAL_ECHOPAIR(" I", unscalePID_i(bedKi));
|
714
|
789
|
SERIAL_ECHOPAIR(" D", unscalePID_d(bedKd));
|
715
|
790
|
SERIAL_EOL;
|
716
|
791
|
#endif
|
|
792
|
+
|
|
793
|
+ #endif // PIDTEMP || PIDTEMPBED
|
|
794
|
+
|
|
795
|
+ #ifdef HAS_LCD_CONTRAST
|
|
796
|
+ CONFIG_ECHO_START;
|
|
797
|
+ if (!forReplay) {
|
|
798
|
+ SERIAL_ECHOLNPGM("LCD Contrast:");
|
|
799
|
+ CONFIG_ECHO_START;
|
|
800
|
+ }
|
|
801
|
+ SERIAL_ECHOPAIR(" M250 C", (unsigned long)lcd_contrast);
|
|
802
|
+ SERIAL_EOL;
|
717
|
803
|
#endif
|
718
|
804
|
|
719
|
805
|
#ifdef FWRETRACT
|
720
|
806
|
|
721
|
|
- SERIAL_ECHO_START;
|
|
807
|
+ CONFIG_ECHO_START;
|
722
|
808
|
if (!forReplay) {
|
723
|
809
|
SERIAL_ECHOLNPGM("Retract: S=Length (mm) F:Speed (mm/m) Z: ZLift (mm)");
|
724
|
|
- SERIAL_ECHO_START;
|
|
810
|
+ CONFIG_ECHO_START;
|
725
|
811
|
}
|
726
|
812
|
SERIAL_ECHOPAIR(" M207 S", retract_length);
|
|
813
|
+ #if EXTRUDERS > 1
|
|
814
|
+ SERIAL_ECHOPAIR(" W", retract_length_swap);
|
|
815
|
+ #endif
|
727
|
816
|
SERIAL_ECHOPAIR(" F", retract_feedrate*60);
|
728
|
817
|
SERIAL_ECHOPAIR(" Z", retract_zlift);
|
729
|
818
|
SERIAL_EOL;
|
730
|
|
- SERIAL_ECHO_START;
|
|
819
|
+ CONFIG_ECHO_START;
|
731
|
820
|
if (!forReplay) {
|
732
|
821
|
SERIAL_ECHOLNPGM("Recover: S=Extra length (mm) F:Speed (mm/m)");
|
733
|
|
- SERIAL_ECHO_START;
|
|
822
|
+ CONFIG_ECHO_START;
|
734
|
823
|
}
|
735
|
824
|
SERIAL_ECHOPAIR(" M208 S", retract_recover_length);
|
|
825
|
+ #if EXTRUDERS > 1
|
|
826
|
+ SERIAL_ECHOPAIR(" W", retract_recover_length_swap);
|
|
827
|
+ #endif
|
736
|
828
|
SERIAL_ECHOPAIR(" F", retract_recover_feedrate*60);
|
737
|
829
|
SERIAL_EOL;
|
738
|
|
- SERIAL_ECHO_START;
|
|
830
|
+ CONFIG_ECHO_START;
|
739
|
831
|
if (!forReplay) {
|
740
|
832
|
SERIAL_ECHOLNPGM("Auto-Retract: S=0 to disable, 1 to interpret extrude-only moves as retracts or recoveries");
|
741
|
|
- SERIAL_ECHO_START;
|
|
833
|
+ CONFIG_ECHO_START;
|
742
|
834
|
}
|
743
|
835
|
SERIAL_ECHOPAIR(" M209 S", (unsigned long)(autoretract_enabled ? 1 : 0));
|
744
|
836
|
SERIAL_EOL;
|
745
|
837
|
|
746
|
|
- #if EXTRUDERS > 1
|
747
|
|
- if (!forReplay) {
|
748
|
|
- SERIAL_ECHO_START;
|
749
|
|
- SERIAL_ECHOLNPGM("Multi-extruder settings:");
|
750
|
|
- SERIAL_ECHO_START;
|
751
|
|
- SERIAL_ECHOPAIR(" Swap retract length (mm): ", retract_length_swap);
|
752
|
|
- SERIAL_EOL;
|
753
|
|
- SERIAL_ECHO_START;
|
754
|
|
- SERIAL_ECHOPAIR(" Swap rec. addl. length (mm): ", retract_recover_length_swap);
|
755
|
|
- SERIAL_EOL;
|
756
|
|
- }
|
757
|
|
- #endif // EXTRUDERS > 1
|
758
|
|
-
|
759
|
838
|
#endif // FWRETRACT
|
760
|
839
|
|
761
|
|
- SERIAL_ECHO_START;
|
762
|
840
|
if (volumetric_enabled) {
|
763
|
841
|
if (!forReplay) {
|
|
842
|
+ CONFIG_ECHO_START;
|
764
|
843
|
SERIAL_ECHOLNPGM("Filament settings:");
|
765
|
|
- SERIAL_ECHO_START;
|
766
|
844
|
}
|
|
845
|
+
|
|
846
|
+ CONFIG_ECHO_START;
|
767
|
847
|
SERIAL_ECHOPAIR(" M200 D", filament_size[0]);
|
768
|
848
|
SERIAL_EOL;
|
769
|
849
|
|
770
|
850
|
#if EXTRUDERS > 1
|
771
|
|
- SERIAL_ECHO_START;
|
|
851
|
+ CONFIG_ECHO_START;
|
772
|
852
|
SERIAL_ECHOPAIR(" M200 T1 D", filament_size[1]);
|
773
|
853
|
SERIAL_EOL;
|
774
|
854
|
#if EXTRUDERS > 2
|
775
|
|
- SERIAL_ECHO_START;
|
|
855
|
+ CONFIG_ECHO_START;
|
776
|
856
|
SERIAL_ECHOPAIR(" M200 T2 D", filament_size[2]);
|
777
|
857
|
SERIAL_EOL;
|
778
|
858
|
#if EXTRUDERS > 3
|
779
|
|
- SERIAL_ECHO_START;
|
|
859
|
+ CONFIG_ECHO_START;
|
780
|
860
|
SERIAL_ECHOPAIR(" M200 T3 D", filament_size[3]);
|
781
|
861
|
SERIAL_EOL;
|
782
|
862
|
#endif
|
|
@@ -785,21 +865,23 @@ void Config_PrintSettings(bool forReplay) {
|
785
|
865
|
|
786
|
866
|
} else {
|
787
|
867
|
if (!forReplay) {
|
|
868
|
+ CONFIG_ECHO_START;
|
788
|
869
|
SERIAL_ECHOLNPGM("Filament settings: Disabled");
|
789
|
870
|
}
|
790
|
871
|
}
|
791
|
872
|
|
792
|
873
|
#ifdef ENABLE_AUTO_BED_LEVELING
|
793
|
|
- SERIAL_ECHO_START;
|
794
|
874
|
#ifdef CUSTOM_M_CODES
|
795
|
875
|
if (!forReplay) {
|
|
876
|
+ CONFIG_ECHO_START;
|
796
|
877
|
SERIAL_ECHOLNPGM("Z-Probe Offset (mm):");
|
797
|
|
- SERIAL_ECHO_START;
|
798
|
878
|
}
|
|
879
|
+ CONFIG_ECHO_START;
|
799
|
880
|
SERIAL_ECHOPAIR(" M", (unsigned long)CUSTOM_M_CODE_SET_Z_PROBE_OFFSET);
|
800
|
881
|
SERIAL_ECHOPAIR(" Z", -zprobe_zoffset);
|
801
|
882
|
#else
|
802
|
883
|
if (!forReplay) {
|
|
884
|
+ CONFIG_ECHO_START;
|
803
|
885
|
SERIAL_ECHOPAIR("Z-Probe Offset (mm):", -zprobe_zoffset);
|
804
|
886
|
}
|
805
|
887
|
#endif
|