Browse Source

Adjustments to M209, G28, M605

Scott Lahteine 9 years ago
parent
commit
4cd1ad8f28
1 changed files with 3 additions and 15 deletions
  1. 3
    15
      Marlin/Marlin_main.cpp

+ 3
- 15
Marlin/Marlin_main.cpp View File

@@ -3326,7 +3326,7 @@ inline void gcode_G28() {
3326 3326
     switch (state) {
3327 3327
       case MeshReport:
3328 3328
         if (mbl.has_mesh()) {
3329
-          SERIAL_PROTOCOLPAIR("State: ", mbl.active() ? "On" : "Off");
3329
+          SERIAL_PROTOCOLPAIR("State: ", mbl.active() ? MSG_ON : MSG_OFF);
3330 3330
           SERIAL_PROTOCOLLNPGM("\nNum X,Y: " STRINGIFY(MESH_NUM_X_POINTS) "," STRINGIFY(MESH_NUM_Y_POINTS));
3331 3331
           SERIAL_PROTOCOLLNPGM("Z search height: " STRINGIFY(MESH_HOME_SEARCH_Z));
3332 3332
           SERIAL_PROTOCOLPGM("Z offset: "); SERIAL_PROTOCOL_F(mbl.z_offset, 5);
@@ -5557,18 +5557,7 @@ inline void gcode_M206() {
5557 5557
    */
5558 5558
   inline void gcode_M209() {
5559 5559
     if (code_seen('S')) {
5560
-      int t = code_value_int();
5561
-      switch (t) {
5562
-        case 0:
5563
-          autoretract_enabled = false;
5564
-          break;
5565
-        case 1:
5566
-          autoretract_enabled = true;
5567
-          break;
5568
-        default:
5569
-          unknown_command_error();
5570
-          return;
5571
-      }
5560
+      autoretract_enabled = code_value_bool();
5572 5561
       for (int i = 0; i < EXTRUDERS; i++) retracted[i] = false;
5573 5562
     }
5574 5563
   }
@@ -6529,8 +6518,7 @@ inline void gcode_M503() {
6529 6518
     stepper.synchronize();
6530 6519
     extruder_duplication_enabled = code_seen('S') && code_value_int() == 2;
6531 6520
     SERIAL_ECHO_START;
6532
-    SERIAL_ECHOPAIR(MSG_DUPLICATION_MODE, extruder_duplication_enabled ? MSG_ON : MSG_OFF);
6533
-    SERIAL_EOL;
6521
+    SERIAL_ECHOLNPAIR(MSG_DUPLICATION_MODE, extruder_duplication_enabled ? MSG_ON : MSG_OFF);
6534 6522
   }
6535 6523
 
6536 6524
 #endif // M605

Loading…
Cancel
Save