|
@@ -36,13 +36,13 @@
|
36
|
36
|
*
|
37
|
37
|
*/
|
38
|
38
|
|
39
|
|
-#define EEPROM_VERSION "V30"
|
|
39
|
+#define EEPROM_VERSION "V31"
|
40
|
40
|
|
41
|
41
|
// Change EEPROM version if these are changed:
|
42
|
42
|
#define EEPROM_OFFSET 100
|
43
|
43
|
|
44
|
44
|
/**
|
45
|
|
- * V30 EEPROM Layout:
|
|
45
|
+ * V31 EEPROM Layout:
|
46
|
46
|
*
|
47
|
47
|
* 100 Version (char x4)
|
48
|
48
|
* 104 EEPROM Checksum (uint16_t)
|
|
@@ -84,64 +84,68 @@
|
84
|
84
|
* 308 G29 L F bilinear_start (int x2)
|
85
|
85
|
* 312 bed_level_grid[][] (float x9, up to float x256) +988
|
86
|
86
|
*
|
87
|
|
- * DELTA (if deltabot): 36 bytes
|
88
|
|
- * 348 M666 XYZ endstop_adj (float x3)
|
89
|
|
- * 360 M665 R delta_radius (float)
|
90
|
|
- * 364 M665 L delta_diagonal_rod (float)
|
91
|
|
- * 368 M665 S delta_segments_per_second (float)
|
92
|
|
- * 372 M665 A delta_diagonal_rod_trim_tower_1 (float)
|
93
|
|
- * 376 M665 B delta_diagonal_rod_trim_tower_2 (float)
|
94
|
|
- * 380 M665 C delta_diagonal_rod_trim_tower_3 (float)
|
|
87
|
+ * DELTA (if deltabot): 48 bytes
|
|
88
|
+ * 348 M666 XYZ endstop_adj (float x3)
|
|
89
|
+ * 360 M665 R delta_radius (float)
|
|
90
|
+ * 364 M665 L delta_diagonal_rod (float)
|
|
91
|
+ * 368 M665 S delta_segments_per_second (float)
|
|
92
|
+ * 372 M665 A delta_diagonal_rod_trim[A] (float)
|
|
93
|
+ * 376 M665 B delta_diagonal_rod_trim[B] (float)
|
|
94
|
+ * 380 M665 C delta_diagonal_rod_trim[C] (float)
|
|
95
|
+ * 384 M665 I delta_tower_angle_trim[A] (float)
|
|
96
|
+ * 388 M665 J delta_tower_angle_trim[B] (float)
|
|
97
|
+ * 392 M665 K delta_tower_angle_trim[C] (float)
|
95
|
98
|
*
|
96
|
|
- * Z_DUAL_ENDSTOPS: 4 bytes
|
97
|
|
- * 384 M666 Z z_endstop_adj (float)
|
|
99
|
+ * Z_DUAL_ENDSTOPS (if not deltabot): 48 bytes
|
|
100
|
+ * 348 M666 Z z_endstop_adj (float)
|
|
101
|
+ * --- dummy data (float x11)
|
98
|
102
|
*
|
99
|
103
|
* ULTIPANEL: 6 bytes
|
100
|
|
- * 388 M145 S0 H lcd_preheat_hotend_temp (int x2)
|
101
|
|
- * 392 M145 S0 B lcd_preheat_bed_temp (int x2)
|
102
|
|
- * 396 M145 S0 F lcd_preheat_fan_speed (int x2)
|
|
104
|
+ * 396 M145 S0 H lcd_preheat_hotend_temp (int x2)
|
|
105
|
+ * 400 M145 S0 B lcd_preheat_bed_temp (int x2)
|
|
106
|
+ * 404 M145 S0 F lcd_preheat_fan_speed (int x2)
|
103
|
107
|
*
|
104
|
108
|
* PIDTEMP: 66 bytes
|
105
|
|
- * 400 M301 E0 PIDC Kp[0], Ki[0], Kd[0], Kc[0] (float x4)
|
106
|
|
- * 416 M301 E1 PIDC Kp[1], Ki[1], Kd[1], Kc[1] (float x4)
|
107
|
|
- * 432 M301 E2 PIDC Kp[2], Ki[2], Kd[2], Kc[2] (float x4)
|
108
|
|
- * 448 M301 E3 PIDC Kp[3], Ki[3], Kd[3], Kc[3] (float x4)
|
109
|
|
- * 464 M301 L lpq_len (int)
|
|
109
|
+ * 408 M301 E0 PIDC Kp[0], Ki[0], Kd[0], Kc[0] (float x4)
|
|
110
|
+ * 424 M301 E1 PIDC Kp[1], Ki[1], Kd[1], Kc[1] (float x4)
|
|
111
|
+ * 440 M301 E2 PIDC Kp[2], Ki[2], Kd[2], Kc[2] (float x4)
|
|
112
|
+ * 456 M301 E3 PIDC Kp[3], Ki[3], Kd[3], Kc[3] (float x4)
|
|
113
|
+ * 472 M301 L lpq_len (int)
|
110
|
114
|
*
|
111
|
|
- * PIDTEMPBED:
|
112
|
|
- * 466 M304 PID thermalManager.bedKp, thermalManager.bedKi, thermalManager.bedKd (float x3)
|
|
115
|
+ * PIDTEMPBED: 12 bytes
|
|
116
|
+ * 474 M304 PID thermalManager.bedKp, .bedKi, .bedKd (float x3)
|
113
|
117
|
*
|
114
|
118
|
* DOGLCD: 2 bytes
|
115
|
|
- * 478 M250 C lcd_contrast (int)
|
|
119
|
+ * 486 M250 C lcd_contrast (int)
|
116
|
120
|
*
|
117
|
121
|
* FWRETRACT: 29 bytes
|
118
|
|
- * 480 M209 S autoretract_enabled (bool)
|
119
|
|
- * 481 M207 S retract_length (float)
|
120
|
|
- * 485 M207 W retract_length_swap (float)
|
121
|
|
- * 489 M207 F retract_feedrate_mm_s (float)
|
122
|
|
- * 493 M207 Z retract_zlift (float)
|
123
|
|
- * 497 M208 S retract_recover_length (float)
|
124
|
|
- * 501 M208 W retract_recover_length_swap (float)
|
125
|
|
- * 505 M208 F retract_recover_feedrate_mm_s (float)
|
|
122
|
+ * 488 M209 S autoretract_enabled (bool)
|
|
123
|
+ * 489 M207 S retract_length (float)
|
|
124
|
+ * 493 M207 W retract_length_swap (float)
|
|
125
|
+ * 497 M207 F retract_feedrate_mm_s (float)
|
|
126
|
+ * 501 M207 Z retract_zlift (float)
|
|
127
|
+ * 505 M208 S retract_recover_length (float)
|
|
128
|
+ * 509 M208 W retract_recover_length_swap (float)
|
|
129
|
+ * 513 M208 F retract_recover_feedrate_mm_s (float)
|
126
|
130
|
*
|
127
|
131
|
* Volumetric Extrusion: 17 bytes
|
128
|
|
- * 509 M200 D volumetric_enabled (bool)
|
129
|
|
- * 510 M200 T D filament_size (float x4) (T0..3)
|
|
132
|
+ * 517 M200 D volumetric_enabled (bool)
|
|
133
|
+ * 518 M200 T D filament_size (float x4) (T0..3)
|
130
|
134
|
*
|
131
|
|
- * TMC2130: 20 bytes
|
132
|
|
- * 526 M906 X TMC2130 X-stepper current (uint16_t)
|
133
|
|
- * 528 M906 Y TMC2130 Y-stepper current (uint16_t)
|
134
|
|
- * 530 M906 Z TMC2130 Z-stepper current (uint16_t)
|
135
|
|
- * 532 M906 X2 TMC2130 X2-stepper current (uint16_t)
|
136
|
|
- * 534 M906 Y2 TMC2130 Y2-stepper current (uint16_t)
|
137
|
|
- * 536 M906 Z2 TMC2130 Z2-stepper current (uint16_t)
|
138
|
|
- * 538 M906 E0 TMC2130 E0-stepper current (uint16_t)
|
139
|
|
- * 540 M906 E1 TMC2130 E1-stepper current (uint16_t)
|
140
|
|
- * 542 M906 E2 TMC2130 E2-stepper current (uint16_t)
|
141
|
|
- * 544 M906 E3 TMC2130 E3-stepper current (uint16_t)
|
|
135
|
+ * TMC2130 Stepper Current: 20 bytes
|
|
136
|
+ * 534 M906 X stepperX current (uint16_t)
|
|
137
|
+ * 536 M906 Y stepperY current (uint16_t)
|
|
138
|
+ * 538 M906 Z stepperZ current (uint16_t)
|
|
139
|
+ * 540 M906 X2 stepperX2 current (uint16_t)
|
|
140
|
+ * 542 M906 Y2 stepperY2 current (uint16_t)
|
|
141
|
+ * 544 M906 Z2 stepperZ2 current (uint16_t)
|
|
142
|
+ * 546 M906 E0 stepperE0 current (uint16_t)
|
|
143
|
+ * 548 M906 E1 stepperE1 current (uint16_t)
|
|
144
|
+ * 550 M906 E2 stepperE2 current (uint16_t)
|
|
145
|
+ * 552 M906 E3 stepperE3 current (uint16_t)
|
142
|
146
|
*
|
143
|
|
- * 546 Minimum end-point
|
144
|
|
- * 1867 (546 + 36 + 9 + 288 + 988) Maximum end-point
|
|
147
|
+ * 554 Minimum end-point
|
|
148
|
+ * 1875 (554 + 36 + 9 + 288 + 988) Maximum end-point
|
145
|
149
|
*
|
146
|
150
|
*/
|
147
|
151
|
#include "Marlin.h"
|
|
@@ -353,16 +357,15 @@ void Config_Postprocess() {
|
353
|
357
|
EEPROM_WRITE(delta_radius); // 1 float
|
354
|
358
|
EEPROM_WRITE(delta_diagonal_rod); // 1 float
|
355
|
359
|
EEPROM_WRITE(delta_segments_per_second); // 1 float
|
356
|
|
- EEPROM_WRITE(delta_diagonal_rod_trim_tower_1); // 1 float
|
357
|
|
- EEPROM_WRITE(delta_diagonal_rod_trim_tower_2); // 1 float
|
358
|
|
- EEPROM_WRITE(delta_diagonal_rod_trim_tower_3); // 1 float
|
|
360
|
+ EEPROM_WRITE(delta_diagonal_rod_trim); // 3 floats
|
|
361
|
+ EEPROM_WRITE(delta_tower_angle_trim); // 3 floats
|
359
|
362
|
#elif ENABLED(Z_DUAL_ENDSTOPS)
|
360
|
|
- EEPROM_WRITE(z_endstop_adj); // 1 float
|
|
363
|
+ EEPROM_WRITE(z_endstop_adj); // 1 float
|
361
|
364
|
dummy = 0.0f;
|
362
|
|
- for (uint8_t q = 8; q--;) EEPROM_WRITE(dummy);
|
|
365
|
+ for (uint8_t q = 11; q--;) EEPROM_WRITE(dummy);
|
363
|
366
|
#else
|
364
|
367
|
dummy = 0.0f;
|
365
|
|
- for (uint8_t q = 9; q--;) EEPROM_WRITE(dummy);
|
|
368
|
+ for (uint8_t q = 12; q--;) EEPROM_WRITE(dummy);
|
366
|
369
|
#endif
|
367
|
370
|
|
368
|
371
|
#if DISABLED(ULTIPANEL)
|
|
@@ -674,20 +677,19 @@ void Config_Postprocess() {
|
674
|
677
|
}
|
675
|
678
|
|
676
|
679
|
#if ENABLED(DELTA)
|
677
|
|
- EEPROM_READ(endstop_adj); // 3 floats
|
678
|
|
- EEPROM_READ(delta_radius); // 1 float
|
679
|
|
- EEPROM_READ(delta_diagonal_rod); // 1 float
|
680
|
|
- EEPROM_READ(delta_segments_per_second); // 1 float
|
681
|
|
- EEPROM_READ(delta_diagonal_rod_trim_tower_1); // 1 float
|
682
|
|
- EEPROM_READ(delta_diagonal_rod_trim_tower_2); // 1 float
|
683
|
|
- EEPROM_READ(delta_diagonal_rod_trim_tower_3); // 1 float
|
|
680
|
+ EEPROM_READ(endstop_adj); // 3 floats
|
|
681
|
+ EEPROM_READ(delta_radius); // 1 float
|
|
682
|
+ EEPROM_READ(delta_diagonal_rod); // 1 float
|
|
683
|
+ EEPROM_READ(delta_segments_per_second); // 1 float
|
|
684
|
+ EEPROM_READ(delta_diagonal_rod_trim); // 3 floats
|
|
685
|
+ EEPROM_READ(delta_tower_angle_trim); // 3 floats
|
684
|
686
|
#elif ENABLED(Z_DUAL_ENDSTOPS)
|
685
|
687
|
EEPROM_READ(z_endstop_adj);
|
686
|
688
|
dummy = 0.0f;
|
687
|
|
- for (uint8_t q=8; q--;) EEPROM_READ(dummy);
|
|
689
|
+ for (uint8_t q=11; q--;) EEPROM_READ(dummy);
|
688
|
690
|
#else
|
689
|
691
|
dummy = 0.0f;
|
690
|
|
- for (uint8_t q=9; q--;) EEPROM_READ(dummy);
|
|
692
|
+ for (uint8_t q=12; q--;) EEPROM_READ(dummy);
|
691
|
693
|
#endif
|
692
|
694
|
|
693
|
695
|
#if DISABLED(ULTIPANEL)
|
|
@@ -899,16 +901,15 @@ void Config_ResetDefault() {
|
899
|
901
|
#endif
|
900
|
902
|
|
901
|
903
|
#if ENABLED(DELTA)
|
902
|
|
- const float adj[ABC] = DELTA_ENDSTOP_ADJ;
|
903
|
|
- endstop_adj[A_AXIS] = adj[A_AXIS];
|
904
|
|
- endstop_adj[B_AXIS] = adj[B_AXIS];
|
905
|
|
- endstop_adj[C_AXIS] = adj[C_AXIS];
|
|
904
|
+ const float adj[ABC] = DELTA_ENDSTOP_ADJ,
|
|
905
|
+ drt[ABC] = { DELTA_DIAGONAL_ROD_TRIM_TOWER_1, DELTA_DIAGONAL_ROD_TRIM_TOWER_2, DELTA_DIAGONAL_ROD_TRIM_TOWER_3 },
|
|
906
|
+ dta[ABC] = { DELTA_TOWER_ANGLE_TRIM_1, DELTA_TOWER_ANGLE_TRIM_2, DELTA_TOWER_ANGLE_TRIM_3 };
|
|
907
|
+ COPY(endstop_adj, adj);
|
906
|
908
|
delta_radius = DELTA_RADIUS;
|
907
|
909
|
delta_diagonal_rod = DELTA_DIAGONAL_ROD;
|
908
|
910
|
delta_segments_per_second = DELTA_SEGMENTS_PER_SECOND;
|
909
|
|
- delta_diagonal_rod_trim_tower_1 = DELTA_DIAGONAL_ROD_TRIM_TOWER_1;
|
910
|
|
- delta_diagonal_rod_trim_tower_2 = DELTA_DIAGONAL_ROD_TRIM_TOWER_2;
|
911
|
|
- delta_diagonal_rod_trim_tower_3 = DELTA_DIAGONAL_ROD_TRIM_TOWER_3;
|
|
911
|
+ COPY(delta_diagonal_rod_trim, drt);
|
|
912
|
+ COPY(delta_tower_angle_trim, dta);
|
912
|
913
|
#elif ENABLED(Z_DUAL_ENDSTOPS)
|
913
|
914
|
z_endstop_adj = 0;
|
914
|
915
|
#endif
|
|
@@ -1179,15 +1180,18 @@ void Config_ResetDefault() {
|
1179
|
1180
|
SERIAL_EOL;
|
1180
|
1181
|
CONFIG_ECHO_START;
|
1181
|
1182
|
if (!forReplay) {
|
1182
|
|
- SERIAL_ECHOLNPGM("Delta settings: L=diagonal_rod, R=radius, S=segments_per_second, ABC=diagonal_rod_trim_tower_[123]");
|
|
1183
|
+ SERIAL_ECHOLNPGM("Delta settings: L=diagonal rod, R=radius, S=segments-per-second, ABC=diagonal rod trim, IJK=tower angle trim");
|
1183
|
1184
|
CONFIG_ECHO_START;
|
1184
|
1185
|
}
|
1185
|
1186
|
SERIAL_ECHOPAIR(" M665 L", delta_diagonal_rod);
|
1186
|
1187
|
SERIAL_ECHOPAIR(" R", delta_radius);
|
1187
|
1188
|
SERIAL_ECHOPAIR(" S", delta_segments_per_second);
|
1188
|
|
- SERIAL_ECHOPAIR(" A", delta_diagonal_rod_trim_tower_1);
|
1189
|
|
- SERIAL_ECHOPAIR(" B", delta_diagonal_rod_trim_tower_2);
|
1190
|
|
- SERIAL_ECHOPAIR(" C", delta_diagonal_rod_trim_tower_3);
|
|
1189
|
+ SERIAL_ECHOPAIR(" A", delta_diagonal_rod_trim[A_AXIS]);
|
|
1190
|
+ SERIAL_ECHOPAIR(" B", delta_diagonal_rod_trim[B_AXIS]);
|
|
1191
|
+ SERIAL_ECHOPAIR(" C", delta_diagonal_rod_trim[C_AXIS]);
|
|
1192
|
+ SERIAL_ECHOPAIR(" I", delta_tower_angle_trim[A_AXIS]);
|
|
1193
|
+ SERIAL_ECHOPAIR(" J", delta_tower_angle_trim[B_AXIS]);
|
|
1194
|
+ SERIAL_ECHOPAIR(" K", delta_tower_angle_trim[C_AXIS]);
|
1191
|
1195
|
SERIAL_EOL;
|
1192
|
1196
|
#elif ENABLED(Z_DUAL_ENDSTOPS)
|
1193
|
1197
|
CONFIG_ECHO_START;
|