Scott Lahteine пре 9 година
родитељ
комит
a120bf3fe4

+ 1
- 1
Marlin/Configuration_adv.h Прегледај датотеку

357
 //#define HEATERS_PARALLEL
357
 //#define HEATERS_PARALLEL
358
 
358
 
359
 //===========================================================================
359
 //===========================================================================
360
-//=============================Buffers           ============================
360
+//================================= Buffers =================================
361
 //===========================================================================
361
 //===========================================================================
362
 
362
 
363
 // @section hidden
363
 // @section hidden

+ 139
- 13
Marlin/Marlin_main.cpp Прегледај датотеку

151
  * M128 - EtoP Open (BariCUDA EtoP = electricity to air pressure transducer by jmil)
151
  * M128 - EtoP Open (BariCUDA EtoP = electricity to air pressure transducer by jmil)
152
  * M129 - EtoP Closed (BariCUDA EtoP = electricity to air pressure transducer by jmil)
152
  * M129 - EtoP Closed (BariCUDA EtoP = electricity to air pressure transducer by jmil)
153
  * M140 - Set bed target temp
153
  * M140 - Set bed target temp
154
+ * M145 - Set the heatup state H<hotend> B<bed> F<fan speed> for S<material> (0=PLA, 1=ABS)
154
  * M150 - Set BlinkM Color Output R: Red<0-255> U(!): Green<0-255> B: Blue<0-255> over i2c, G for green does not work.
155
  * M150 - Set BlinkM Color Output R: Red<0-255> U(!): Green<0-255> B: Blue<0-255> over i2c, G for green does not work.
155
  * M190 - Sxxx Wait for bed current temp to reach target temp. Waits only when heating
156
  * M190 - Sxxx Wait for bed current temp to reach target temp. Waits only when heating
156
  *        Rxxx Wait for bed current temp to reach target temp. Waits when heating and cooling
157
  *        Rxxx Wait for bed current temp to reach target temp. Waits when heating and cooling
186
  * M406 - Turn off Filament Sensor extrusion control
187
  * M406 - Turn off Filament Sensor extrusion control
187
  * M407 - Display measured filament diameter
188
  * M407 - Display measured filament diameter
188
  * M410 - Quickstop. Abort all the planned moves
189
  * M410 - Quickstop. Abort all the planned moves
190
+ * M420 - Enable/Disable Mesh Leveling (with current values) S1=enable S0=disable
191
+ * M421 - Set a single Z coordinate in the Mesh Leveling grid. X<mm> Y<mm> Z<mm>
189
  * M500 - Store parameters in EEPROM
192
  * M500 - Store parameters in EEPROM
190
  * M501 - Read parameters from EEPROM (if you need reset them after you changed them temporarily).
193
  * M501 - Read parameters from EEPROM (if you need reset them after you changed them temporarily).
191
  * M502 - Revert to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
194
  * M502 - Revert to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
3399
   if (code_seen('S')) setTargetBed(code_value());
3402
   if (code_seen('S')) setTargetBed(code_value());
3400
 }
3403
 }
3401
 
3404
 
3405
+#ifdef ULTIPANEL
3406
+
3407
+  /**
3408
+   * M145: Set the heatup state for a material in the LCD menu
3409
+   *   S<material> (0=PLA, 1=ABS)
3410
+   *   H<hotend temp>
3411
+   *   B<bed temp>
3412
+   *   F<fan speed>
3413
+   */
3414
+  inline void gcode_M145() {
3415
+    uint8_t material = code_seen('S') ? code_value_short() : 0;
3416
+    if (material < 0 || material > 1) {
3417
+      SERIAL_ERROR_START;
3418
+      SERIAL_ERRORLNPGM(MSG_ERR_MATERIAL_INDEX);
3419
+    }
3420
+    else {
3421
+      int v;
3422
+      switch (material) {
3423
+        case 0:
3424
+          if (code_seen('H')) {
3425
+            v = code_value_short();
3426
+            plaPreheatHotendTemp = constrain(v, EXTRUDE_MINTEMP, HEATER_0_MAXTEMP - 15);
3427
+          }
3428
+          if (code_seen('F')) {
3429
+            v = code_value_short();
3430
+            plaPreheatFanSpeed = constrain(v, 0, 255);
3431
+          }
3432
+          #if TEMP_SENSOR_BED != 0
3433
+            if (code_seen('B')) {
3434
+              v = code_value_short();
3435
+              plaPreheatHPBTemp = constrain(v, BED_MINTEMP, BED_MAXTEMP - 15);
3436
+            }
3437
+          #endif
3438
+          break;
3439
+        case 1:
3440
+          if (code_seen('H')) {
3441
+            v = code_value_short();
3442
+            absPreheatHotendTemp = constrain(v, EXTRUDE_MINTEMP, HEATER_0_MAXTEMP - 15);
3443
+          }
3444
+          if (code_seen('F')) {
3445
+            v = code_value_short();
3446
+            absPreheatFanSpeed = constrain(v, 0, 255);
3447
+          }
3448
+          #if TEMP_SENSOR_BED != 0
3449
+            if (code_seen('B')) {
3450
+              v = code_value_short();
3451
+              absPreheatHPBTemp = constrain(v, BED_MINTEMP, BED_MAXTEMP - 15);
3452
+            }
3453
+          #endif
3454
+          break;
3455
+      }
3456
+    }
3457
+  }
3458
+
3459
+#endif
3460
+
3402
 #if HAS_POWER_SWITCH
3461
 #if HAS_POWER_SWITCH
3403
 
3462
 
3404
   /**
3463
   /**
3506
 }
3565
 }
3507
 
3566
 
3508
 /**
3567
 /**
3509
- * M92: Set inactivity shutdown timer with parameter S<seconds>. To disable set zero (default)
3568
+ * M92: Set axis steps-per-unit for one or more axes, X, Y, Z, and E.
3569
+ *      (Follows the same syntax as G92)
3510
  */
3570
  */
3511
 inline void gcode_M92() {
3571
 inline void gcode_M92() {
3512
   for(int8_t i=0; i < NUM_AXIS; i++) {
3572
   for(int8_t i=0; i < NUM_AXIS; i++) {
3828
 #ifdef FWRETRACT
3888
 #ifdef FWRETRACT
3829
 
3889
 
3830
   /**
3890
   /**
3831
-   * M207: Set retract length S[positive mm] F[feedrate mm/min] Z[additional zlift/hop]
3891
+   * M207: Set firmware retraction values
3892
+   *
3893
+   *   S[+mm]    retract_length
3894
+   *   W[+mm]    retract_length_swap (multi-extruder)
3895
+   *   F[mm/min] retract_feedrate
3896
+   *   Z[mm]     retract_zlift
3832
    */
3897
    */
3833
   inline void gcode_M207() {
3898
   inline void gcode_M207() {
3834
     if (code_seen('S')) retract_length = code_value();
3899
     if (code_seen('S')) retract_length = code_value();
3835
     if (code_seen('F')) retract_feedrate = code_value() / 60;
3900
     if (code_seen('F')) retract_feedrate = code_value() / 60;
3836
     if (code_seen('Z')) retract_zlift = code_value();
3901
     if (code_seen('Z')) retract_zlift = code_value();
3902
+    #if EXTRUDERS > 1
3903
+      if (code_seen('W')) retract_length_swap = code_value();
3904
+    #endif
3837
   }
3905
   }
3838
 
3906
 
3839
   /**
3907
   /**
3840
-   * M208: Set retract recover length S[positive mm surplus to the M207 S*] F[feedrate mm/min]
3908
+   * M208: Set firmware un-retraction values
3909
+   *
3910
+   *   S[+mm]    retract_recover_length (in addition to M207 S*)
3911
+   *   W[+mm]    retract_recover_length_swap (multi-extruder)
3912
+   *   F[mm/min] retract_recover_feedrate
3841
    */
3913
    */
3842
   inline void gcode_M208() {
3914
   inline void gcode_M208() {
3843
     if (code_seen('S')) retract_recover_length = code_value();
3915
     if (code_seen('S')) retract_recover_length = code_value();
3844
     if (code_seen('F')) retract_recover_feedrate = code_value() / 60;
3916
     if (code_seen('F')) retract_recover_feedrate = code_value() / 60;
3917
+    #if EXTRUDERS > 1
3918
+      if (code_seen('W')) retract_recover_length_swap = code_value();
3919
+    #endif
3845
   }
3920
   }
3846
 
3921
 
3847
   /**
3922
   /**
4394
  */
4469
  */
4395
 inline void gcode_M410() { quickStop(); }
4470
 inline void gcode_M410() { quickStop(); }
4396
 
4471
 
4472
+
4473
+#ifdef MESH_BED_LEVELING
4474
+
4475
+  /**
4476
+   * M420: Enable/Disable Mesh Bed Leveling
4477
+   */
4478
+  inline void gcode_M420() { if (code_seen('S') && code_has_value()) mbl.active = !!code_value_short(); }
4479
+
4480
+  /**
4481
+   * M421: Set a single Mesh Bed Leveling Z coordinate
4482
+   */
4483
+  inline void gcode_M421() {
4484
+    float x, y, z;
4485
+    bool err = false, hasX, hasY, hasZ;
4486
+    if ((hasX = code_seen('X'))) x = code_value();
4487
+    if ((hasY = code_seen('Y'))) y = code_value();
4488
+    if ((hasZ = code_seen('Z'))) z = code_value();
4489
+
4490
+    if (!hasX || !hasY || !hasZ) {
4491
+      SERIAL_ERROR_START;
4492
+      SERIAL_ERRORLNPGM(MSG_ERR_M421_REQUIRES_XYZ);
4493
+      err = true;
4494
+    }
4495
+
4496
+    if (x >= MESH_NUM_X_POINTS || y >= MESH_NUM_Y_POINTS) {
4497
+      SERIAL_ERROR_START;
4498
+      SERIAL_ERRORLNPGM(MSG_ERR_MESH_INDEX_OOB);
4499
+      err = true;
4500
+    }
4501
+
4502
+    if (!err) mbl.set_z(select_x_index(x), select_y_index(y), z);
4503
+  }
4504
+
4505
+#endif
4506
+
4397
 /**
4507
 /**
4398
  * M500: Store settings in EEPROM
4508
  * M500: Store settings in EEPROM
4399
  */
4509
  */
4948
         gcode_M104();
5058
         gcode_M104();
4949
         break;
5059
         break;
4950
 
5060
 
4951
-      case 111: //  M111: Set debug level
5061
+      case 111: // M111: Set debug level
4952
         gcode_M111();
5062
         gcode_M111();
4953
         break;
5063
         break;
4954
 
5064
 
4955
-      case 112: //  M112: Emergency Stop
5065
+      case 112: // M112: Emergency Stop
4956
         gcode_M112();
5066
         gcode_M112();
4957
         break;
5067
         break;
4958
 
5068
 
5031
       case 85: // M85
5141
       case 85: // M85
5032
         gcode_M85();
5142
         gcode_M85();
5033
         break;
5143
         break;
5034
-      case 92: // M92
5144
+      case 92: // M92: Set the steps-per-unit for one or more axes
5035
         gcode_M92();
5145
         gcode_M92();
5036
         break;
5146
         break;
5037
-      case 115: // M115
5147
+      case 115: // M115: Report capabilities
5038
         gcode_M115();
5148
         gcode_M115();
5039
         break;
5149
         break;
5040
-      case 117: // M117 display message
5150
+      case 117: // M117: Set LCD message text
5041
         gcode_M117();
5151
         gcode_M117();
5042
         break;
5152
         break;
5043
-      case 114: // M114
5153
+      case 114: // M114: Report current position
5044
         gcode_M114();
5154
         gcode_M114();
5045
         break;
5155
         break;
5046
-      case 120: // M120
5156
+      case 120: // M120: Enable endstops
5047
         gcode_M120();
5157
         gcode_M120();
5048
         break;
5158
         break;
5049
-      case 121: // M121
5159
+      case 121: // M121: Disable endstops
5050
         gcode_M121();
5160
         gcode_M121();
5051
         break;
5161
         break;
5052
-      case 119: // M119
5162
+      case 119: // M119: Report endstop states
5053
         gcode_M119();
5163
         gcode_M119();
5054
         break;
5164
         break;
5055
-        //TODO: update for all axis, use for loop
5165
+
5166
+      #ifdef ULTIPANEL
5167
+
5168
+        case 145: // M145: Set material heatup parameters
5169
+          gcode_M145();
5170
+          break;
5171
+
5172
+      #endif
5056
 
5173
 
5057
       #ifdef BLINKM
5174
       #ifdef BLINKM
5058
 
5175
 
5227
         gcode_M410();
5344
         gcode_M410();
5228
         break;
5345
         break;
5229
 
5346
 
5347
+      #ifdef MESH_BED_LEVELING
5348
+        case 420: // M420 Enable/Disable Mesh Bed Leveling
5349
+          gcode_M420();
5350
+          break;
5351
+        case 421: // M421 Set a Mesh Bed Leveling Z coordinate
5352
+          gcode_M421();
5353
+          break;
5354
+      #endif
5355
+
5230
       case 500: // M500 Store settings in EEPROM
5356
       case 500: // M500 Store settings in EEPROM
5231
         gcode_M500();
5357
         gcode_M500();
5232
         break;
5358
         break;

+ 222
- 151
Marlin/configuration_store.cpp Прегледај датотеку

20
  * V19 EEPROM Layout:
20
  * V19 EEPROM Layout:
21
  *
21
  *
22
  *  ver
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
  * Mesh bed leveling:
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
  * DELTA:
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
  * ULTIPANEL:
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
  * PIDTEMP:
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
  * PIDTEMPBED:
64
  * PIDTEMPBED:
65
- *  bedKp, bedKi, bedKd
65
+ *  M304 PID  bedKp, bedKi, bedKd
66
  *
66
  *
67
  * DOGLCD:
67
  * DOGLCD:
68
- *  lcd_contrast
68
+ *  M250 C    lcd_contrast
69
  *
69
  *
70
  * SCARA:
70
  * SCARA:
71
- *  axis_scaling (x3)
71
+ *  M365 XYZ  axis_scaling (x3)
72
  *
72
  *
73
  * FWRETRACT:
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
 #include "Marlin.h"
91
 #include "Marlin.h"
96
 #include "configuration_store.h"
96
 #include "configuration_store.h"
97
 
97
 
98
 #ifdef MESH_BED_LEVELING
98
 #ifdef MESH_BED_LEVELING
99
-   #include "mesh_bed_leveling.h"
100
-#endif  // MESH_BED_LEVELING
99
+  #include "mesh_bed_leveling.h"
100
+#endif
101
 
101
 
102
 void _EEPROM_writeData(int &pos, uint8_t* value, uint8_t size) {
102
 void _EEPROM_writeData(int &pos, uint8_t* value, uint8_t size) {
103
   uint8_t c;
103
   uint8_t c;
122
 #define EEPROM_WRITE_VAR(pos, value) _EEPROM_writeData(pos, (uint8_t*)&value, sizeof(value))
122
 #define EEPROM_WRITE_VAR(pos, value) _EEPROM_writeData(pos, (uint8_t*)&value, sizeof(value))
123
 #define EEPROM_READ_VAR(pos, value) _EEPROM_readData(pos, (uint8_t*)&value, sizeof(value))
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
 #define DUMMY_PID_VALUE 3000.0f
129
 #define DUMMY_PID_VALUE 3000.0f
128
 
130
 
166
     EEPROM_WRITE_VAR(i, mesh_num_x);
168
     EEPROM_WRITE_VAR(i, mesh_num_x);
167
     EEPROM_WRITE_VAR(i, mesh_num_y);
169
     EEPROM_WRITE_VAR(i, mesh_num_y);
168
     dummy = 0.0f;
170
     dummy = 0.0f;
169
-    for (int q=0; q<mesh_num_x*mesh_num_y; q++) {
170
-      EEPROM_WRITE_VAR(i, dummy);
171
-    }
171
+    for (int q=0; q<mesh_num_x*mesh_num_y; q++) EEPROM_WRITE_VAR(i, dummy);
172
   #endif // MESH_BED_LEVELING
172
   #endif // MESH_BED_LEVELING
173
 
173
 
174
   #ifndef ENABLE_AUTO_BED_LEVELING
174
   #ifndef ENABLE_AUTO_BED_LEVELING
235
   EEPROM_WRITE_VAR(i, bedKi);
235
   EEPROM_WRITE_VAR(i, bedKi);
236
   EEPROM_WRITE_VAR(i, bedKd);
236
   EEPROM_WRITE_VAR(i, bedKd);
237
 
237
 
238
-  #ifndef DOGLCD
238
+  #ifndef HAS_LCD_CONTRAST
239
     int lcd_contrast = 32;
239
     int lcd_contrast = 32;
240
   #endif
240
   #endif
241
   EEPROM_WRITE_VAR(i, lcd_contrast);
241
   EEPROM_WRITE_VAR(i, lcd_contrast);
286
   SERIAL_ECHOLNPGM(" bytes)");
286
   SERIAL_ECHOLNPGM(" bytes)");
287
 }
287
 }
288
 
288
 
289
+/**
290
+ * Retrieve Configuration Settings - M501
291
+ */
292
+
289
 void Config_RetrieveSettings() {
293
 void Config_RetrieveSettings() {
290
 
294
 
291
   int i = EEPROM_OFFSET;
295
   int i = EEPROM_OFFSET;
319
     EEPROM_READ_VAR(i, max_e_jerk);
323
     EEPROM_READ_VAR(i, max_e_jerk);
320
     EEPROM_READ_VAR(i, home_offset);
324
     EEPROM_READ_VAR(i, home_offset);
321
 
325
 
322
-    uint8_t mesh_num_x = 0;
323
-    uint8_t mesh_num_y = 0;
326
+    uint8_t dummy_uint8 = 0, mesh_num_x = 0, mesh_num_y = 0;
327
+    EEPROM_READ_VAR(i, dummy_uint8);
328
+    EEPROM_READ_VAR(i, mesh_num_x);
329
+    EEPROM_READ_VAR(i, mesh_num_y);
324
     #ifdef MESH_BED_LEVELING
330
     #ifdef MESH_BED_LEVELING
325
-      EEPROM_READ_VAR(i, mbl.active);
326
-      EEPROM_READ_VAR(i, mesh_num_x);
327
-      EEPROM_READ_VAR(i, mesh_num_y);
328
-      if (mesh_num_x != MESH_NUM_X_POINTS ||
329
-          mesh_num_y != MESH_NUM_Y_POINTS) {
330
-        mbl.reset();
331
-        for (int q=0; q<mesh_num_x*mesh_num_y; q++) {
332
-          EEPROM_READ_VAR(i, dummy);
333
-        }
334
-      } else {
331
+      mbl.active = dummy_uint8;
332
+      if (mesh_num_x == MESH_NUM_X_POINTS && mesh_num_y == MESH_NUM_Y_POINTS) {
335
         EEPROM_READ_VAR(i, mbl.z_values);
333
         EEPROM_READ_VAR(i, mbl.z_values);
334
+      } else {
335
+        mbl.reset();
336
+        for (int q = 0; q < mesh_num_x * mesh_num_y; q++) EEPROM_READ_VAR(i, dummy);
336
       }
337
       }
337
     #else
338
     #else
338
-      uint8_t dummy_uint8 = 0;
339
-      EEPROM_READ_VAR(i, dummy_uint8);
340
-      EEPROM_READ_VAR(i, mesh_num_x);
341
-      EEPROM_READ_VAR(i, mesh_num_y);
342
-      for (int q=0; q<mesh_num_x*mesh_num_y; q++) {
343
-        EEPROM_READ_VAR(i, dummy);
344
-      }
345
-    #endif  // MESH_BED_LEVELING
339
+      for (int q = 0; q < mesh_num_x * mesh_num_y; q++) EEPROM_READ_VAR(i, dummy);
340
+    #endif // MESH_BED_LEVELING
346
 
341
 
347
     #ifndef ENABLE_AUTO_BED_LEVELING
342
     #ifndef ENABLE_AUTO_BED_LEVELING
348
       float zprobe_zoffset = 0;
343
       float zprobe_zoffset = 0;
412
       for (int q=2; q--;) EEPROM_READ_VAR(i, dummy); // bedKi, bedKd
407
       for (int q=2; q--;) EEPROM_READ_VAR(i, dummy); // bedKi, bedKd
413
     }
408
     }
414
 
409
 
415
-    #ifndef DOGLCD
410
+    #ifndef HAS_LCD_CONTRAST
416
       int lcd_contrast;
411
       int lcd_contrast;
417
     #endif
412
     #endif
418
     EEPROM_READ_VAR(i, lcd_contrast);
413
     EEPROM_READ_VAR(i, lcd_contrast);
467
 
462
 
468
 #endif // EEPROM_SETTINGS
463
 #endif // EEPROM_SETTINGS
469
 
464
 
465
+/**
466
+ * Reset Configuration Settings - M502
467
+ */
468
+
470
 void Config_ResetDefault() {
469
 void Config_ResetDefault() {
471
   float tmp1[] = DEFAULT_AXIS_STEPS_PER_UNIT;
470
   float tmp1[] = DEFAULT_AXIS_STEPS_PER_UNIT;
472
   float tmp2[] = DEFAULT_MAX_FEEDRATE;
471
   float tmp2[] = DEFAULT_MAX_FEEDRATE;
522
     absPreheatFanSpeed = ABS_PREHEAT_FAN_SPEED;
521
     absPreheatFanSpeed = ABS_PREHEAT_FAN_SPEED;
523
   #endif
522
   #endif
524
 
523
 
525
-  #ifdef DOGLCD
524
+  #ifdef HAS_LCD_CONTRAST
526
     lcd_contrast = DEFAULT_LCD_CONTRAST;
525
     lcd_contrast = DEFAULT_LCD_CONTRAST;
527
   #endif
526
   #endif
528
 
527
 
584
 
583
 
585
 #ifndef DISABLE_M503
584
 #ifndef DISABLE_M503
586
 
585
 
586
+/**
587
+ * Print Configuration Settings - M503
588
+ */
589
+
590
+#define CONFIG_ECHO_START do{ if (!forReplay) SERIAL_ECHO_START; }while(0)
591
+
587
 void Config_PrintSettings(bool forReplay) {
592
 void Config_PrintSettings(bool forReplay) {
588
   // Always have this function, even with EEPROM_SETTINGS disabled, the current values will be shown
593
   // Always have this function, even with EEPROM_SETTINGS disabled, the current values will be shown
589
 
594
 
590
-  SERIAL_ECHO_START;
595
+  CONFIG_ECHO_START;
591
 
596
 
592
   if (!forReplay) {
597
   if (!forReplay) {
593
     SERIAL_ECHOLNPGM("Steps per unit:");
598
     SERIAL_ECHOLNPGM("Steps per unit:");
594
-    SERIAL_ECHO_START;
599
+    CONFIG_ECHO_START;
595
   }
600
   }
596
   SERIAL_ECHOPAIR("  M92 X", axis_steps_per_unit[X_AXIS]);
601
   SERIAL_ECHOPAIR("  M92 X", axis_steps_per_unit[X_AXIS]);
597
   SERIAL_ECHOPAIR(" Y", axis_steps_per_unit[Y_AXIS]);
602
   SERIAL_ECHOPAIR(" Y", axis_steps_per_unit[Y_AXIS]);
599
   SERIAL_ECHOPAIR(" E", axis_steps_per_unit[E_AXIS]);
604
   SERIAL_ECHOPAIR(" E", axis_steps_per_unit[E_AXIS]);
600
   SERIAL_EOL;
605
   SERIAL_EOL;
601
 
606
 
602
-  SERIAL_ECHO_START;
607
+  CONFIG_ECHO_START;
603
 
608
 
604
   #ifdef SCARA
609
   #ifdef SCARA
605
     if (!forReplay) {
610
     if (!forReplay) {
606
       SERIAL_ECHOLNPGM("Scaling factors:");
611
       SERIAL_ECHOLNPGM("Scaling factors:");
607
-      SERIAL_ECHO_START;
612
+      CONFIG_ECHO_START;
608
     }
613
     }
609
     SERIAL_ECHOPAIR("  M365 X", axis_scaling[X_AXIS]);
614
     SERIAL_ECHOPAIR("  M365 X", axis_scaling[X_AXIS]);
610
     SERIAL_ECHOPAIR(" Y", axis_scaling[Y_AXIS]);
615
     SERIAL_ECHOPAIR(" Y", axis_scaling[Y_AXIS]);
611
     SERIAL_ECHOPAIR(" Z", axis_scaling[Z_AXIS]);
616
     SERIAL_ECHOPAIR(" Z", axis_scaling[Z_AXIS]);
612
     SERIAL_EOL;
617
     SERIAL_EOL;
613
-    SERIAL_ECHO_START;
618
+    CONFIG_ECHO_START;
614
   #endif // SCARA
619
   #endif // SCARA
615
 
620
 
616
   if (!forReplay) {
621
   if (!forReplay) {
617
     SERIAL_ECHOLNPGM("Maximum feedrates (mm/s):");
622
     SERIAL_ECHOLNPGM("Maximum feedrates (mm/s):");
618
-    SERIAL_ECHO_START;
623
+    CONFIG_ECHO_START;
619
   }
624
   }
620
   SERIAL_ECHOPAIR("  M203 X", max_feedrate[X_AXIS]);
625
   SERIAL_ECHOPAIR("  M203 X", max_feedrate[X_AXIS]);
621
   SERIAL_ECHOPAIR(" Y", max_feedrate[Y_AXIS]);
626
   SERIAL_ECHOPAIR(" Y", max_feedrate[Y_AXIS]);
623
   SERIAL_ECHOPAIR(" E", max_feedrate[E_AXIS]);
628
   SERIAL_ECHOPAIR(" E", max_feedrate[E_AXIS]);
624
   SERIAL_EOL;
629
   SERIAL_EOL;
625
 
630
 
626
-  SERIAL_ECHO_START;
631
+  CONFIG_ECHO_START;
627
   if (!forReplay) {
632
   if (!forReplay) {
628
     SERIAL_ECHOLNPGM("Maximum Acceleration (mm/s2):");
633
     SERIAL_ECHOLNPGM("Maximum Acceleration (mm/s2):");
629
-    SERIAL_ECHO_START;
634
+    CONFIG_ECHO_START;
630
   }
635
   }
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] );
636
+  SERIAL_ECHOPAIR("  M201 X", max_acceleration_units_per_sq_second[X_AXIS]);
637
+  SERIAL_ECHOPAIR(" Y", max_acceleration_units_per_sq_second[Y_AXIS]);
638
+  SERIAL_ECHOPAIR(" Z", max_acceleration_units_per_sq_second[Z_AXIS]);
634
   SERIAL_ECHOPAIR(" E", max_acceleration_units_per_sq_second[E_AXIS]);
639
   SERIAL_ECHOPAIR(" E", max_acceleration_units_per_sq_second[E_AXIS]);
635
   SERIAL_EOL;
640
   SERIAL_EOL;
636
-  SERIAL_ECHO_START;
641
+  CONFIG_ECHO_START;
637
   if (!forReplay) {
642
   if (!forReplay) {
638
     SERIAL_ECHOLNPGM("Accelerations: P=printing, R=retract and T=travel");
643
     SERIAL_ECHOLNPGM("Accelerations: P=printing, R=retract and T=travel");
639
-    SERIAL_ECHO_START;
644
+    CONFIG_ECHO_START;
640
   }
645
   }
641
-  SERIAL_ECHOPAIR("  M204 P", acceleration );
646
+  SERIAL_ECHOPAIR("  M204 P", acceleration);
642
   SERIAL_ECHOPAIR(" R", retract_acceleration);
647
   SERIAL_ECHOPAIR(" R", retract_acceleration);
643
   SERIAL_ECHOPAIR(" T", travel_acceleration);
648
   SERIAL_ECHOPAIR(" T", travel_acceleration);
644
   SERIAL_EOL;
649
   SERIAL_EOL;
645
 
650
 
646
-  SERIAL_ECHO_START;
651
+  CONFIG_ECHO_START;
647
   if (!forReplay) {
652
   if (!forReplay) {
648
     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)");
653
     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;
654
+    CONFIG_ECHO_START;
650
   }
655
   }
651
-  SERIAL_ECHOPAIR("  M205 S", minimumfeedrate );
652
-  SERIAL_ECHOPAIR(" T", mintravelfeedrate );
653
-  SERIAL_ECHOPAIR(" B", minsegmenttime );
654
-  SERIAL_ECHOPAIR(" X", max_xy_jerk );
656
+  SERIAL_ECHOPAIR("  M205 S", minimumfeedrate);
657
+  SERIAL_ECHOPAIR(" T", mintravelfeedrate);
658
+  SERIAL_ECHOPAIR(" B", minsegmenttime);
659
+  SERIAL_ECHOPAIR(" X", max_xy_jerk);
655
   SERIAL_ECHOPAIR(" Z", max_z_jerk);
660
   SERIAL_ECHOPAIR(" Z", max_z_jerk);
656
   SERIAL_ECHOPAIR(" E", max_e_jerk);
661
   SERIAL_ECHOPAIR(" E", max_e_jerk);
657
   SERIAL_EOL;
662
   SERIAL_EOL;
658
 
663
 
659
-  SERIAL_ECHO_START;
664
+  CONFIG_ECHO_START;
660
   if (!forReplay) {
665
   if (!forReplay) {
661
     SERIAL_ECHOLNPGM("Home offset (mm):");
666
     SERIAL_ECHOLNPGM("Home offset (mm):");
662
-    SERIAL_ECHO_START;
667
+    CONFIG_ECHO_START;
663
   }
668
   }
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] );
669
+  SERIAL_ECHOPAIR("  M206 X", home_offset[X_AXIS]);
670
+  SERIAL_ECHOPAIR(" Y", home_offset[Y_AXIS]);
671
+  SERIAL_ECHOPAIR(" Z", home_offset[Z_AXIS]);
667
   SERIAL_EOL;
672
   SERIAL_EOL;
668
 
673
 
674
+  #ifdef MESH_BED_LEVELING
675
+    if (!forReplay) {
676
+      SERIAL_ECHOLNPGM("Mesh bed leveling:");
677
+      CONFIG_ECHO_START;
678
+    }
679
+    SERIAL_ECHOPAIR("  M420 S", (int32_t)mbl.active);
680
+    SERIAL_ECHOPAIR(" X", MESH_NUM_X_POINTS);
681
+    SERIAL_ECHOPAIR(" Y", MESH_NUM_Y_POINTS);
682
+    SERIAL_EOL;
683
+    for (int y=0; y<MESH_NUM_Y_POINTS; y++) {
684
+      for (int x=0; x<MESH_NUM_X_POINTS; x++) {
685
+        CONFIG_ECHO_START;
686
+        SERIAL_ECHOPAIR("  M421 X", mbl.get_x(x));
687
+        SERIAL_ECHOPAIR(" Y", mbl.get_y(y));
688
+        SERIAL_ECHOPAIR(" Z", mbl.z_values[y][x]);
689
+        SERIAL_EOL;
690
+      }
691
+    }
692
+  #endif
693
+
669
   #ifdef DELTA
694
   #ifdef DELTA
670
-    SERIAL_ECHO_START;
695
+    CONFIG_ECHO_START;
671
     if (!forReplay) {
696
     if (!forReplay) {
672
       SERIAL_ECHOLNPGM("Endstop adjustment (mm):");
697
       SERIAL_ECHOLNPGM("Endstop adjustment (mm):");
673
-      SERIAL_ECHO_START;
698
+      CONFIG_ECHO_START;
674
     }
699
     }
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] );
700
+    SERIAL_ECHOPAIR("  M666 X", endstop_adj[X_AXIS]);
701
+    SERIAL_ECHOPAIR(" Y", endstop_adj[Y_AXIS]);
702
+    SERIAL_ECHOPAIR(" Z", endstop_adj[Z_AXIS]);
678
     SERIAL_EOL;
703
     SERIAL_EOL;
679
-    SERIAL_ECHO_START;
704
+    CONFIG_ECHO_START;
680
     SERIAL_ECHOLNPGM("Delta settings: L=delta_diagonal_rod, R=delta_radius, S=delta_segments_per_second");
705
     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 );
706
+    CONFIG_ECHO_START;
707
+    SERIAL_ECHOPAIR("  M665 L", delta_diagonal_rod);
708
+    SERIAL_ECHOPAIR(" R", delta_radius);
709
+    SERIAL_ECHOPAIR(" S", delta_segments_per_second);
685
     SERIAL_EOL;
710
     SERIAL_EOL;
686
   #elif defined(Z_DUAL_ENDSTOPS)
711
   #elif defined(Z_DUAL_ENDSTOPS)
687
-    SERIAL_ECHO_START;
712
+    CONFIG_ECHO_START;
688
     if (!forReplay) {
713
     if (!forReplay) {
689
       SERIAL_ECHOLNPGM("Z2 Endstop adjustment (mm):");
714
       SERIAL_ECHOLNPGM("Z2 Endstop adjustment (mm):");
690
-      SERIAL_ECHO_START;
715
+      CONFIG_ECHO_START;
691
     }
716
     }
692
-    SERIAL_ECHOPAIR("  M666 Z", z_endstop_adj );
717
+    SERIAL_ECHOPAIR("  M666 Z", z_endstop_adj);
693
     SERIAL_EOL;  
718
     SERIAL_EOL;  
694
   #endif // DELTA
719
   #endif // DELTA
695
 
720
 
721
+  #ifdef ULTIPANEL
722
+    CONFIG_ECHO_START;
723
+    if (!forReplay) {
724
+      SERIAL_ECHOLNPGM("Material heatup parameters:");
725
+      CONFIG_ECHO_START;
726
+    }
727
+    SERIAL_ECHOPAIR("  M145 M0 H", (unsigned long)plaPreheatHotendTemp);
728
+    SERIAL_ECHOPAIR(" B", (unsigned long)plaPreheatHPBTemp);
729
+    SERIAL_ECHOPAIR(" F", (unsigned long)plaPreheatFanSpeed);
730
+    SERIAL_EOL;
731
+    CONFIG_ECHO_START;
732
+    SERIAL_ECHOPAIR("  M145 M1 H", (unsigned long)absPreheatHotendTemp);
733
+    SERIAL_ECHOPAIR(" B", (unsigned long)absPreheatHPBTemp);
734
+    SERIAL_ECHOPAIR(" F", (unsigned long)absPreheatFanSpeed);
735
+    SERIAL_EOL;
736
+  #endif // ULTIPANEL
737
+
696
   #if defined(PIDTEMP) || defined(PIDTEMPBED)
738
   #if defined(PIDTEMP) || defined(PIDTEMPBED)
697
-    SERIAL_ECHO_START;
739
+
740
+    CONFIG_ECHO_START;
698
     if (!forReplay) {
741
     if (!forReplay) {
699
       SERIAL_ECHOLNPGM("PID settings:");
742
       SERIAL_ECHOLNPGM("PID settings:");
700
-      SERIAL_ECHO_START;
701
     }
743
     }
702
-    #if defined(PIDTEMP) && defined(PIDTEMPBED)
703
-      SERIAL_EOL;
704
-    #endif
705
     #ifdef PIDTEMP
744
     #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
745
+      #if EXTRUDERS > 1
746
+        if (forReplay) {
747
+          for (uint8_t i = 0; i < EXTRUDERS; i++) {
748
+            CONFIG_ECHO_START;
749
+            SERIAL_ECHOPAIR("  M301 E", (unsigned long)i);
750
+            SERIAL_ECHOPAIR(" P", PID_PARAM(Kp, i));
751
+            SERIAL_ECHOPAIR(" I", unscalePID_i(PID_PARAM(Ki, i)));
752
+            SERIAL_ECHOPAIR(" D", unscalePID_d(PID_PARAM(Kd, i)));
753
+            #ifdef PID_ADD_EXTRUSION_RATE
754
+              SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, i));
755
+            #endif      
756
+            SERIAL_EOL;
757
+          }
758
+        }
759
+        else
760
+      #endif // EXTRUDERS > 1
761
+      // !forReplay || EXTRUDERS == 1
762
+      {
763
+        CONFIG_ECHO_START;
764
+        SERIAL_ECHOPAIR("  M301 P", PID_PARAM(Kp, 0)); // for compatibility with hosts, only echo values for E0
765
+        SERIAL_ECHOPAIR(" I", unscalePID_i(PID_PARAM(Ki, 0)));
766
+        SERIAL_ECHOPAIR(" D", unscalePID_d(PID_PARAM(Kd, 0)));
767
+        #ifdef PID_ADD_EXTRUSION_RATE
768
+          SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, 0));
769
+        #endif      
770
+        SERIAL_EOL;
771
+      }
772
+    #endif // PIDTEMP
773
+
711
     #ifdef PIDTEMPBED
774
     #ifdef PIDTEMPBED
712
-      SERIAL_ECHOPAIR("  M304 P", bedKp); // for compatibility with hosts, only echos values for E0
775
+      CONFIG_ECHO_START;
776
+      SERIAL_ECHOPAIR("  M304 P", bedKp);
713
       SERIAL_ECHOPAIR(" I", unscalePID_i(bedKi));
777
       SERIAL_ECHOPAIR(" I", unscalePID_i(bedKi));
714
       SERIAL_ECHOPAIR(" D", unscalePID_d(bedKd));
778
       SERIAL_ECHOPAIR(" D", unscalePID_d(bedKd));
715
       SERIAL_EOL;
779
       SERIAL_EOL;
716
     #endif
780
     #endif
781
+
782
+  #endif // PIDTEMP || PIDTEMPBED
783
+
784
+  #ifdef HAS_LCD_CONTRAST
785
+    CONFIG_ECHO_START;
786
+    if (!forReplay) {
787
+      SERIAL_ECHOLNPGM("LCD Contrast:");
788
+      CONFIG_ECHO_START;
789
+    }
790
+    SERIAL_ECHOPAIR("  M250 C", (unsigned long)lcd_contrast);
791
+    SERIAL_EOL;
717
   #endif
792
   #endif
718
 
793
 
719
   #ifdef FWRETRACT
794
   #ifdef FWRETRACT
720
 
795
 
721
-    SERIAL_ECHO_START;
796
+    CONFIG_ECHO_START;
722
     if (!forReplay) {
797
     if (!forReplay) {
723
       SERIAL_ECHOLNPGM("Retract: S=Length (mm) F:Speed (mm/m) Z: ZLift (mm)");
798
       SERIAL_ECHOLNPGM("Retract: S=Length (mm) F:Speed (mm/m) Z: ZLift (mm)");
724
-      SERIAL_ECHO_START;
799
+      CONFIG_ECHO_START;
725
     }
800
     }
726
     SERIAL_ECHOPAIR("  M207 S", retract_length);
801
     SERIAL_ECHOPAIR("  M207 S", retract_length);
802
+    #if EXTRUDERS > 1
803
+      SERIAL_ECHOPAIR(" W", retract_length_swap);
804
+    #endif
727
     SERIAL_ECHOPAIR(" F", retract_feedrate*60);
805
     SERIAL_ECHOPAIR(" F", retract_feedrate*60);
728
     SERIAL_ECHOPAIR(" Z", retract_zlift);
806
     SERIAL_ECHOPAIR(" Z", retract_zlift);
729
     SERIAL_EOL;
807
     SERIAL_EOL;
730
-    SERIAL_ECHO_START;
808
+    CONFIG_ECHO_START;
731
     if (!forReplay) {
809
     if (!forReplay) {
732
       SERIAL_ECHOLNPGM("Recover: S=Extra length (mm) F:Speed (mm/m)");
810
       SERIAL_ECHOLNPGM("Recover: S=Extra length (mm) F:Speed (mm/m)");
733
-      SERIAL_ECHO_START;
811
+      CONFIG_ECHO_START;
734
     }
812
     }
735
     SERIAL_ECHOPAIR("  M208 S", retract_recover_length);
813
     SERIAL_ECHOPAIR("  M208 S", retract_recover_length);
814
+    #if EXTRUDERS > 1
815
+      SERIAL_ECHOPAIR(" W", retract_recover_length_swap);
816
+    #endif
736
     SERIAL_ECHOPAIR(" F", retract_recover_feedrate*60);
817
     SERIAL_ECHOPAIR(" F", retract_recover_feedrate*60);
737
     SERIAL_EOL;
818
     SERIAL_EOL;
738
-    SERIAL_ECHO_START;
819
+    CONFIG_ECHO_START;
739
     if (!forReplay) {
820
     if (!forReplay) {
740
       SERIAL_ECHOLNPGM("Auto-Retract: S=0 to disable, 1 to interpret extrude-only moves as retracts or recoveries");
821
       SERIAL_ECHOLNPGM("Auto-Retract: S=0 to disable, 1 to interpret extrude-only moves as retracts or recoveries");
741
-      SERIAL_ECHO_START;
822
+      CONFIG_ECHO_START;
742
     }
823
     }
743
     SERIAL_ECHOPAIR("  M209 S", (unsigned long)(autoretract_enabled ? 1 : 0));
824
     SERIAL_ECHOPAIR("  M209 S", (unsigned long)(autoretract_enabled ? 1 : 0));
744
     SERIAL_EOL;
825
     SERIAL_EOL;
745
 
826
 
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
   #endif // FWRETRACT
827
   #endif // FWRETRACT
760
 
828
 
761
-  SERIAL_ECHO_START;
762
   if (volumetric_enabled) {
829
   if (volumetric_enabled) {
763
     if (!forReplay) {
830
     if (!forReplay) {
831
+      CONFIG_ECHO_START;
764
       SERIAL_ECHOLNPGM("Filament settings:");
832
       SERIAL_ECHOLNPGM("Filament settings:");
765
-      SERIAL_ECHO_START;
766
     }
833
     }
834
+
835
+    CONFIG_ECHO_START;
767
     SERIAL_ECHOPAIR("  M200 D", filament_size[0]);
836
     SERIAL_ECHOPAIR("  M200 D", filament_size[0]);
768
     SERIAL_EOL;
837
     SERIAL_EOL;
769
 
838
 
770
     #if EXTRUDERS > 1
839
     #if EXTRUDERS > 1
771
-      SERIAL_ECHO_START;
840
+      CONFIG_ECHO_START;
772
       SERIAL_ECHOPAIR("  M200 T1 D", filament_size[1]);
841
       SERIAL_ECHOPAIR("  M200 T1 D", filament_size[1]);
773
       SERIAL_EOL;
842
       SERIAL_EOL;
774
       #if EXTRUDERS > 2
843
       #if EXTRUDERS > 2
775
-        SERIAL_ECHO_START;
844
+        CONFIG_ECHO_START;
776
         SERIAL_ECHOPAIR("  M200 T2 D", filament_size[2]);
845
         SERIAL_ECHOPAIR("  M200 T2 D", filament_size[2]);
777
         SERIAL_EOL;
846
         SERIAL_EOL;
778
         #if EXTRUDERS > 3
847
         #if EXTRUDERS > 3
779
-          SERIAL_ECHO_START;
848
+          CONFIG_ECHO_START;
780
           SERIAL_ECHOPAIR("  M200 T3 D", filament_size[3]);
849
           SERIAL_ECHOPAIR("  M200 T3 D", filament_size[3]);
781
           SERIAL_EOL;
850
           SERIAL_EOL;
782
         #endif
851
         #endif
785
 
854
 
786
   } else {
855
   } else {
787
     if (!forReplay) {
856
     if (!forReplay) {
857
+      CONFIG_ECHO_START;
788
       SERIAL_ECHOLNPGM("Filament settings: Disabled");
858
       SERIAL_ECHOLNPGM("Filament settings: Disabled");
789
     }
859
     }
790
   }
860
   }
791
 
861
 
792
   #ifdef ENABLE_AUTO_BED_LEVELING
862
   #ifdef ENABLE_AUTO_BED_LEVELING
793
-    SERIAL_ECHO_START;
794
     #ifdef CUSTOM_M_CODES
863
     #ifdef CUSTOM_M_CODES
795
       if (!forReplay) {
864
       if (!forReplay) {
865
+        CONFIG_ECHO_START;
796
         SERIAL_ECHOLNPGM("Z-Probe Offset (mm):");
866
         SERIAL_ECHOLNPGM("Z-Probe Offset (mm):");
797
-        SERIAL_ECHO_START;
798
       }
867
       }
868
+      CONFIG_ECHO_START;
799
       SERIAL_ECHOPAIR("  M", (unsigned long)CUSTOM_M_CODE_SET_Z_PROBE_OFFSET);
869
       SERIAL_ECHOPAIR("  M", (unsigned long)CUSTOM_M_CODE_SET_Z_PROBE_OFFSET);
800
       SERIAL_ECHOPAIR(" Z", -zprobe_zoffset);
870
       SERIAL_ECHOPAIR(" Z", -zprobe_zoffset);
801
     #else
871
     #else
802
       if (!forReplay) {
872
       if (!forReplay) {
873
+        CONFIG_ECHO_START;
803
         SERIAL_ECHOPAIR("Z-Probe Offset (mm):", -zprobe_zoffset);
874
         SERIAL_ECHOPAIR("Z-Probe Offset (mm):", -zprobe_zoffset);
804
       }
875
       }
805
     #endif
876
     #endif

+ 1
- 1
Marlin/configurator/config/Configuration_adv.h Прегледај датотеку

357
 //#define HEATERS_PARALLEL
357
 //#define HEATERS_PARALLEL
358
 
358
 
359
 //===========================================================================
359
 //===========================================================================
360
-//=============================Buffers           ============================
360
+//================================= Buffers =================================
361
 //===========================================================================
361
 //===========================================================================
362
 
362
 
363
 // @section hidden
363
 // @section hidden

+ 4
- 1
Marlin/configurator/config/language.h Прегледај датотеку

70
   #endif
70
   #endif
71
 #else
71
 #else
72
   #ifndef MACHINE_NAME
72
   #ifndef MACHINE_NAME
73
-    #define MACHINE_NAME "Mendel"
73
+    #define MACHINE_NAME "3D Printer"
74
   #endif
74
   #endif
75
 #endif
75
 #endif
76
 
76
 
158
 #define MSG_Z_MAX                           "z_max: "
158
 #define MSG_Z_MAX                           "z_max: "
159
 #define MSG_Z2_MAX                          "z2_max: "
159
 #define MSG_Z2_MAX                          "z2_max: "
160
 #define MSG_Z_PROBE                         "z_probe: "
160
 #define MSG_Z_PROBE                         "z_probe: "
161
+#define MSG_ERR_MATERIAL_INDEX              "M145 S<index> out of range (0-1)"
162
+#define MSG_ERR_M421_REQUIRES_XYZ           "M421 requires XYZ parameters"
163
+#define MSG_ERR_MESH_INDEX_OOB              "Mesh XY index is out of bounds"
161
 #define MSG_M119_REPORT                     "Reporting endstop status"
164
 #define MSG_M119_REPORT                     "Reporting endstop status"
162
 #define MSG_ENDSTOP_HIT                     "TRIGGERED"
165
 #define MSG_ENDSTOP_HIT                     "TRIGGERED"
163
 #define MSG_ENDSTOP_OPEN                    "open"
166
 #define MSG_ENDSTOP_OPEN                    "open"

+ 1
- 1
Marlin/example_configurations/Felix/Configuration_adv.h Прегледај датотеку

357
 //#define HEATERS_PARALLEL
357
 //#define HEATERS_PARALLEL
358
 
358
 
359
 //===========================================================================
359
 //===========================================================================
360
-//=============================Buffers           ============================
360
+//================================= Buffers =================================
361
 //===========================================================================
361
 //===========================================================================
362
 
362
 
363
 // @section hidden
363
 // @section hidden

+ 1
- 1
Marlin/example_configurations/Hephestos/Configuration_adv.h Прегледај датотеку

357
 //#define HEATERS_PARALLEL
357
 //#define HEATERS_PARALLEL
358
 
358
 
359
 //===========================================================================
359
 //===========================================================================
360
-//=============================Buffers           ============================
360
+//================================= Buffers =================================
361
 //===========================================================================
361
 //===========================================================================
362
 
362
 
363
 // @section hidden
363
 // @section hidden

+ 1
- 1
Marlin/example_configurations/K8200/Configuration_adv.h Прегледај датотеку

357
 //#define HEATERS_PARALLEL
357
 //#define HEATERS_PARALLEL
358
 
358
 
359
 //===========================================================================
359
 //===========================================================================
360
-//=============================Buffers           ============================
360
+//================================= Buffers =================================
361
 //===========================================================================
361
 //===========================================================================
362
 
362
 
363
 // @section hidden
363
 // @section hidden

+ 1
- 1
Marlin/example_configurations/SCARA/Configuration_adv.h Прегледај датотеку

357
 //#define HEATERS_PARALLEL
357
 //#define HEATERS_PARALLEL
358
 
358
 
359
 //===========================================================================
359
 //===========================================================================
360
-//=============================Buffers           ============================
360
+//================================= Buffers =================================
361
 //===========================================================================
361
 //===========================================================================
362
 
362
 
363
 // @section hidden
363
 // @section hidden

+ 1
- 1
Marlin/example_configurations/WITBOX/Configuration_adv.h Прегледај датотеку

357
 //#define HEATERS_PARALLEL
357
 //#define HEATERS_PARALLEL
358
 
358
 
359
 //===========================================================================
359
 //===========================================================================
360
-//=============================Buffers           ============================
360
+//================================= Buffers =================================
361
 //===========================================================================
361
 //===========================================================================
362
 
362
 
363
 // @section hidden
363
 // @section hidden

+ 1
- 1
Marlin/example_configurations/delta/generic/Configuration_adv.h Прегледај датотеку

358
 //#define HEATERS_PARALLEL
358
 //#define HEATERS_PARALLEL
359
 
359
 
360
 //===========================================================================
360
 //===========================================================================
361
-//=============================Buffers           ============================
361
+//================================= Buffers =================================
362
 //===========================================================================
362
 //===========================================================================
363
 
363
 
364
 // @section hidden
364
 // @section hidden

+ 1
- 1
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h Прегледај датотеку

357
 //#define HEATERS_PARALLEL
357
 //#define HEATERS_PARALLEL
358
 
358
 
359
 //===========================================================================
359
 //===========================================================================
360
-//=============================Buffers           ============================
360
+//================================= Buffers =================================
361
 //===========================================================================
361
 //===========================================================================
362
 
362
 
363
 // @section hidden
363
 // @section hidden

+ 1
- 1
Marlin/example_configurations/makibox/Configuration_adv.h Прегледај датотеку

357
 //#define HEATERS_PARALLEL
357
 //#define HEATERS_PARALLEL
358
 
358
 
359
 //===========================================================================
359
 //===========================================================================
360
-//=============================Buffers           ============================
360
+//================================= Buffers =================================
361
 //===========================================================================
361
 //===========================================================================
362
 
362
 
363
 // @section hidden
363
 // @section hidden

+ 1
- 1
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h Прегледај датотеку

357
 //#define HEATERS_PARALLEL
357
 //#define HEATERS_PARALLEL
358
 
358
 
359
 //===========================================================================
359
 //===========================================================================
360
-//=============================Buffers           ============================
360
+//================================= Buffers =================================
361
 //===========================================================================
361
 //===========================================================================
362
 
362
 
363
 // @section hidden
363
 // @section hidden

+ 3
- 0
Marlin/language.h Прегледај датотеку

159
 #define MSG_Z_MAX                           "z_max: "
159
 #define MSG_Z_MAX                           "z_max: "
160
 #define MSG_Z2_MAX                          "z2_max: "
160
 #define MSG_Z2_MAX                          "z2_max: "
161
 #define MSG_Z_PROBE                         "z_probe: "
161
 #define MSG_Z_PROBE                         "z_probe: "
162
+#define MSG_ERR_MATERIAL_INDEX              "M145 S<index> out of range (0-1)"
163
+#define MSG_ERR_M421_REQUIRES_XYZ           "M421 requires XYZ parameters"
164
+#define MSG_ERR_MESH_INDEX_OOB              "Mesh XY index is out of bounds"
162
 #define MSG_M119_REPORT                     "Reporting endstop status"
165
 #define MSG_M119_REPORT                     "Reporting endstop status"
163
 #define MSG_ENDSTOP_HIT                     "TRIGGERED"
166
 #define MSG_ENDSTOP_HIT                     "TRIGGERED"
164
 #define MSG_ENDSTOP_OPEN                    "open"
167
 #define MSG_ENDSTOP_OPEN                    "open"

+ 68
- 69
Marlin/planner.cpp Прегледај датотеку

1
-/*
2
-  planner.c - buffers movement commands and manages the acceleration profile plan
3
- Part of Grbl
4
- 
5
- Copyright (c) 2009-2011 Simen Svale Skogsrud
6
- 
7
- Grbl is free software: you can redistribute it and/or modify
8
- it under the terms of the GNU General Public License as published by
9
- the Free Software Foundation, either version 3 of the License, or
10
- (at your option) any later version.
11
- 
12
- Grbl is distributed in the hope that it will be useful,
13
- but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
- GNU General Public License for more details.
16
- 
17
- You should have received a copy of the GNU General Public License
18
- along with Grbl.  If not, see <http://www.gnu.org/licenses/>.
19
- */
20
-
21
-/* The ring buffer implementation gleaned from the wiring_serial library by David A. Mellis. */
22
-
23
-/*  
24
- Reasoning behind the mathematics in this module (in the key of 'Mathematica'):
25
- 
26
- s == speed, a == acceleration, t == time, d == distance
27
- 
28
- Basic definitions:
29
- 
30
- Speed[s_, a_, t_] := s + (a*t) 
31
- Travel[s_, a_, t_] := Integrate[Speed[s, a, t], t]
32
- 
33
- Distance to reach a specific speed with a constant acceleration:
34
- 
35
- Solve[{Speed[s, a, t] == m, Travel[s, a, t] == d}, d, t]
36
- d -> (m^2 - s^2)/(2 a) --> estimate_acceleration_distance()
37
- 
38
- Speed after a given distance of travel with constant acceleration:
39
- 
40
- Solve[{Speed[s, a, t] == m, Travel[s, a, t] == d}, m, t]
41
- m -> Sqrt[2 a d + s^2]    
42
- 
43
- DestinationSpeed[s_, a_, d_] := Sqrt[2 a d + s^2]
44
- 
45
- When to start braking (di) to reach a specified destionation speed (s2) after accelerating
46
- from initial speed s1 without ever stopping at a plateau:
47
- 
48
- Solve[{DestinationSpeed[s1, a, di] == DestinationSpeed[s2, a, d - di]}, di]
49
- di -> (2 a d - s1^2 + s2^2)/(4 a) --> intersection_distance()
50
- 
51
- IntersectionDistance[s1_, s2_, a_, d_] := (2 a d - s1^2 + s2^2)/(4 a)
1
+/**
2
+ * planner.cpp - Buffer movement commands and manage the acceleration profile plan
3
+ * Part of Grbl
4
+ * 
5
+ * Copyright (c) 2009-2011 Simen Svale Skogsrud
6
+ *
7
+ * Grbl is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * Grbl is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with Grbl.  If not, see <http://www.gnu.org/licenses/>.
19
+ *
20
+ *
21
+ * The ring buffer implementation gleaned from the wiring_serial library by David A. Mellis.
22
+ *
23
+ *
24
+ * Reasoning behind the mathematics in this module (in the key of 'Mathematica'):
25
+ *
26
+ * s == speed, a == acceleration, t == time, d == distance
27
+ *
28
+ * Basic definitions:
29
+ *   Speed[s_, a_, t_] := s + (a*t)
30
+ *   Travel[s_, a_, t_] := Integrate[Speed[s, a, t], t]
31
+ *
32
+ * Distance to reach a specific speed with a constant acceleration:
33
+ *   Solve[{Speed[s, a, t] == m, Travel[s, a, t] == d}, d, t]
34
+ *   d -> (m^2 - s^2)/(2 a) --> estimate_acceleration_distance()
35
+ *
36
+ * Speed after a given distance of travel with constant acceleration:
37
+ *   Solve[{Speed[s, a, t] == m, Travel[s, a, t] == d}, m, t]
38
+ *   m -> Sqrt[2 a d + s^2]
39
+ *
40
+ * DestinationSpeed[s_, a_, d_] := Sqrt[2 a d + s^2]
41
+ *
42
+ * When to start braking (di) to reach a specified destination speed (s2) after accelerating
43
+ * from initial speed s1 without ever stopping at a plateau:
44
+ *   Solve[{DestinationSpeed[s1, a, di] == DestinationSpeed[s2, a, d - di]}, di]
45
+ *   di -> (2 a d - s1^2 + s2^2)/(4 a) --> intersection_distance()
46
+ *
47
+ * IntersectionDistance[s1_, s2_, a_, d_] := (2 a d - s1^2 + s2^2)/(4 a)
48
+ *
52
  */
49
  */
53
 
50
 
54
 #include "Marlin.h"
51
 #include "Marlin.h"
71
 float axis_steps_per_unit[NUM_AXIS];
68
 float axis_steps_per_unit[NUM_AXIS];
72
 unsigned long max_acceleration_units_per_sq_second[NUM_AXIS]; // Use M201 to override by software
69
 unsigned long max_acceleration_units_per_sq_second[NUM_AXIS]; // Use M201 to override by software
73
 float minimumfeedrate;
70
 float minimumfeedrate;
74
-float acceleration;         // Normal acceleration mm/s^2  THIS IS THE DEFAULT ACCELERATION for all printing moves. M204 SXXXX
75
-float retract_acceleration; //  mm/s^2   filament pull-pack and push-forward  while standing still in the other axis M204 TXXXX
76
-float travel_acceleration;  // Travel acceleration mm/s^2  THIS IS THE DEFAULT ACCELERATION for all NON printing moves. M204 MXXXX
77
-float max_xy_jerk; //speed than can be stopped at once, if i understand correctly.
71
+float acceleration;         // Normal acceleration mm/s^2  DEFAULT ACCELERATION for all printing moves. M204 SXXXX
72
+float retract_acceleration; // Retract acceleration mm/s^2 filament pull-back and push-forward while standing still in the other axes M204 TXXXX
73
+float travel_acceleration;  // Travel acceleration mm/s^2  DEFAULT ACCELERATION for all NON printing moves. M204 MXXXX
74
+float max_xy_jerk;          // The largest speed change requiring no acceleration
78
 float max_z_jerk;
75
 float max_z_jerk;
79
 float max_e_jerk;
76
 float max_e_jerk;
80
 float mintravelfeedrate;
77
 float mintravelfeedrate;
81
 unsigned long axis_steps_per_sqr_second[NUM_AXIS];
78
 unsigned long axis_steps_per_sqr_second[NUM_AXIS];
82
 
79
 
83
 #ifdef ENABLE_AUTO_BED_LEVELING
80
 #ifdef ENABLE_AUTO_BED_LEVELING
84
-  // this holds the required transform to compensate for bed level
81
+  // Transform required to compensate for bed level
85
   matrix_3x3 plan_bed_level_matrix = {
82
   matrix_3x3 plan_bed_level_matrix = {
86
     1.0, 0.0, 0.0,
83
     1.0, 0.0, 0.0,
87
     0.0, 1.0, 0.0,
84
     0.0, 1.0, 0.0,
89
   };
86
   };
90
 #endif // ENABLE_AUTO_BED_LEVELING
87
 #endif // ENABLE_AUTO_BED_LEVELING
91
 
88
 
92
-// The current position of the tool in absolute steps
93
-long position[NUM_AXIS];   //rescaled from extern when axis_steps_per_unit are changed by gcode
94
-static float previous_speed[NUM_AXIS]; // Speed of previous path line segment
95
-static float previous_nominal_speed; // Nominal speed of previous path line segment
96
-
97
 #ifdef AUTOTEMP
89
 #ifdef AUTOTEMP
98
   float autotemp_max = 250;
90
   float autotemp_max = 250;
99
   float autotemp_min = 210;
91
   float autotemp_min = 210;
101
   bool autotemp_enabled = false;
93
   bool autotemp_enabled = false;
102
 #endif
94
 #endif
103
 
95
 
104
-unsigned char g_uc_extruder_last_move[4] = {0,0,0,0};
105
-
106
 //===========================================================================
96
 //===========================================================================
107
-//=================semi-private variables, used in inline  functions    =====
97
+//============ semi-private variables, used in inline functions =============
108
 //===========================================================================
98
 //===========================================================================
99
+
109
 block_t block_buffer[BLOCK_BUFFER_SIZE];            // A ring buffer for motion instfructions
100
 block_t block_buffer[BLOCK_BUFFER_SIZE];            // A ring buffer for motion instfructions
110
 volatile unsigned char block_buffer_head;           // Index of the next block to be pushed
101
 volatile unsigned char block_buffer_head;           // Index of the next block to be pushed
111
 volatile unsigned char block_buffer_tail;           // Index of the block to process now
102
 volatile unsigned char block_buffer_tail;           // Index of the block to process now
112
 
103
 
113
 //===========================================================================
104
 //===========================================================================
114
-//=============================private variables ============================
105
+//============================ private variables ============================
115
 //===========================================================================
106
 //===========================================================================
107
+
108
+// The current position of the tool in absolute steps
109
+long position[NUM_AXIS];               // Rescaled from extern when axis_steps_per_unit are changed by gcode
110
+static float previous_speed[NUM_AXIS]; // Speed of previous path line segment
111
+static float previous_nominal_speed;   // Nominal speed of previous path line segment
112
+
113
+unsigned char g_uc_extruder_last_move[4] = {0,0,0,0};
114
+
116
 #ifdef XY_FREQUENCY_LIMIT
115
 #ifdef XY_FREQUENCY_LIMIT
117
   // Used for the frequency limit
116
   // Used for the frequency limit
118
   #define MAX_FREQ_TIME (1000000.0/XY_FREQUENCY_LIMIT)
117
   #define MAX_FREQ_TIME (1000000.0/XY_FREQUENCY_LIMIT)
126
   static char meas_sample; //temporary variable to hold filament measurement sample
125
   static char meas_sample; //temporary variable to hold filament measurement sample
127
 #endif
126
 #endif
128
 
127
 
128
+//===========================================================================
129
+//================================ functions ================================
130
+//===========================================================================
131
+
129
 // Get the next / previous index of the next block in the ring buffer
132
 // Get the next / previous index of the next block in the ring buffer
130
 // NOTE: Using & here (not %) because BLOCK_BUFFER_SIZE is always a power of 2
133
 // NOTE: Using & here (not %) because BLOCK_BUFFER_SIZE is always a power of 2
131
 FORCE_INLINE int8_t next_block_index(int8_t block_index) { return BLOCK_MOD(block_index + 1); }
134
 FORCE_INLINE int8_t next_block_index(int8_t block_index) { return BLOCK_MOD(block_index + 1); }
132
 FORCE_INLINE int8_t prev_block_index(int8_t block_index) { return BLOCK_MOD(block_index - 1); }
135
 FORCE_INLINE int8_t prev_block_index(int8_t block_index) { return BLOCK_MOD(block_index - 1); }
133
 
136
 
134
-//===========================================================================
135
-//================================ Functions ================================
136
-//===========================================================================
137
-
138
 // Calculates the distance (not time) it takes to accelerate from initial_rate to target_rate using the 
137
 // Calculates the distance (not time) it takes to accelerate from initial_rate to target_rate using the 
139
 // given acceleration:
138
 // given acceleration:
140
 FORCE_INLINE float estimate_acceleration_distance(float initial_rate, float target_rate, float acceleration) {
139
 FORCE_INLINE float estimate_acceleration_distance(float initial_rate, float target_rate, float acceleration) {

+ 9
- 5
Marlin/planner.h Прегледај датотеку

115
 
115
 
116
 void plan_set_e_position(const float &e);
116
 void plan_set_e_position(const float &e);
117
 
117
 
118
+//===========================================================================
119
+//============================= public variables ============================
120
+//===========================================================================
121
+
118
 extern millis_t minsegmenttime;
122
 extern millis_t minsegmenttime;
119
-extern float max_feedrate[NUM_AXIS]; // set the max speeds
123
+extern float max_feedrate[NUM_AXIS]; // Max speeds in mm per minute
120
 extern float axis_steps_per_unit[NUM_AXIS];
124
 extern float axis_steps_per_unit[NUM_AXIS];
121
 extern unsigned long max_acceleration_units_per_sq_second[NUM_AXIS]; // Use M201 to override by software
125
 extern unsigned long max_acceleration_units_per_sq_second[NUM_AXIS]; // Use M201 to override by software
122
 extern float minimumfeedrate;
126
 extern float minimumfeedrate;
123
-extern float acceleration;         // Normal acceleration mm/s^2  THIS IS THE DEFAULT ACCELERATION for all moves. M204 SXXXX
124
-extern float retract_acceleration; //  mm/s^2   filament pull-pack and push-forward  while standing still in the other axis M204 TXXXX
125
-extern float travel_acceleration;  // Travel acceleration mm/s^2  THIS IS THE DEFAULT ACCELERATION for all NON printing moves. M204 MXXXX
126
-extern float max_xy_jerk; //speed than can be stopped at once, if i understand correctly.
127
+extern float acceleration;         // Normal acceleration mm/s^2  DEFAULT ACCELERATION for all printing moves. M204 SXXXX
128
+extern float retract_acceleration; // Retract acceleration mm/s^2 filament pull-back and push-forward while standing still in the other axes M204 TXXXX
129
+extern float travel_acceleration;  // Travel acceleration mm/s^2  DEFAULT ACCELERATION for all NON printing moves. M204 MXXXX
130
+extern float max_xy_jerk;          // The largest speed change requiring no acceleration
127
 extern float max_z_jerk;
131
 extern float max_z_jerk;
128
 extern float max_e_jerk;
132
 extern float max_e_jerk;
129
 extern float mintravelfeedrate;
133
 extern float mintravelfeedrate;

+ 2
- 1
Marlin/temperature.cpp Прегледај датотеку

89
 #endif
89
 #endif
90
 
90
 
91
 //===========================================================================
91
 //===========================================================================
92
-//=============================private variables============================
92
+//============================ private variables ============================
93
 //===========================================================================
93
 //===========================================================================
94
+
94
 static volatile bool temp_meas_ready = false;
95
 static volatile bool temp_meas_ready = false;
95
 
96
 
96
 #ifdef PIDTEMP
97
 #ifdef PIDTEMP

+ 4
- 4
Marlin/ultralcd.cpp Прегледај датотеку

978
   MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu);
978
   MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu);
979
   MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &plaPreheatFanSpeed, 0, 255);
979
   MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &plaPreheatFanSpeed, 0, 255);
980
   #if TEMP_SENSOR_0 != 0
980
   #if TEMP_SENSOR_0 != 0
981
-    MENU_ITEM_EDIT(int3, MSG_NOZZLE, &plaPreheatHotendTemp, 0, HEATER_0_MAXTEMP - 15);
981
+    MENU_ITEM_EDIT(int3, MSG_NOZZLE, &plaPreheatHotendTemp, HEATER_0_MINTEMP, HEATER_0_MAXTEMP - 15);
982
   #endif
982
   #endif
983
   #if TEMP_SENSOR_BED != 0
983
   #if TEMP_SENSOR_BED != 0
984
-    MENU_ITEM_EDIT(int3, MSG_BED, &plaPreheatHPBTemp, 0, BED_MAXTEMP - 15);
984
+    MENU_ITEM_EDIT(int3, MSG_BED, &plaPreheatHPBTemp, BED_MINTEMP, BED_MAXTEMP - 15);
985
   #endif
985
   #endif
986
   #ifdef EEPROM_SETTINGS
986
   #ifdef EEPROM_SETTINGS
987
     MENU_ITEM(function, MSG_STORE_EPROM, Config_StoreSettings);
987
     MENU_ITEM(function, MSG_STORE_EPROM, Config_StoreSettings);
1000
   MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu);
1000
   MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu);
1001
   MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &absPreheatFanSpeed, 0, 255);
1001
   MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &absPreheatFanSpeed, 0, 255);
1002
   #if TEMP_SENSOR_0 != 0
1002
   #if TEMP_SENSOR_0 != 0
1003
-    MENU_ITEM_EDIT(int3, MSG_NOZZLE, &absPreheatHotendTemp, 0, HEATER_0_MAXTEMP - 15);
1003
+    MENU_ITEM_EDIT(int3, MSG_NOZZLE, &absPreheatHotendTemp, HEATER_0_MINTEMP, HEATER_0_MAXTEMP - 15);
1004
   #endif
1004
   #endif
1005
   #if TEMP_SENSOR_BED != 0
1005
   #if TEMP_SENSOR_BED != 0
1006
-    MENU_ITEM_EDIT(int3, MSG_BED, &absPreheatHPBTemp, 0, BED_MAXTEMP - 15);
1006
+    MENU_ITEM_EDIT(int3, MSG_BED, &absPreheatHPBTemp, BED_MINTEMP, BED_MAXTEMP - 15);
1007
   #endif
1007
   #endif
1008
   #ifdef EEPROM_SETTINGS
1008
   #ifdef EEPROM_SETTINGS
1009
     MENU_ITEM(function, MSG_STORE_EPROM, Config_StoreSettings);
1009
     MENU_ITEM(function, MSG_STORE_EPROM, Config_StoreSettings);

+ 3
- 3
Marlin/watchdog.cpp Прегледај датотеку

7
 #include "ultralcd.h"
7
 #include "ultralcd.h"
8
 
8
 
9
 //===========================================================================
9
 //===========================================================================
10
-//=============================private variables  ============================
10
+//============================ private variables ============================
11
 //===========================================================================
11
 //===========================================================================
12
 
12
 
13
 //===========================================================================
13
 //===========================================================================
14
-//=============================functinos         ============================
14
+//================================ functions ================================
15
 //===========================================================================
15
 //===========================================================================
16
 
16
 
17
 
17
 
36
 }
36
 }
37
 
37
 
38
 //===========================================================================
38
 //===========================================================================
39
-//=============================ISR               ============================
39
+//=================================== ISR ===================================
40
 //===========================================================================
40
 //===========================================================================
41
 
41
 
42
 //Watchdog timer interrupt, called if main program blocks >1sec and manual reset is enabled.
42
 //Watchdog timer interrupt, called if main program blocks >1sec and manual reset is enabled.

Loading…
Откажи
Сачувај