Browse Source

Merge pull request #2983 from AnHardt/ok-echo

Replace the "ok" in M280, M301, M304, M851 with output not including …
Scott Lahteine 9 years ago
parent
commit
0c9db67273
1 changed files with 30 additions and 32 deletions
  1. 30
    32
      Marlin/Marlin_main.cpp

+ 30
- 32
Marlin/Marlin_main.cpp View File

@@ -4750,19 +4750,18 @@ inline void gcode_M226() {
4750 4750
       if (servo_index >= 0 && servo_index < NUM_SERVOS)
4751 4751
         servo[servo_index].move(servo_position);
4752 4752
       else {
4753
-        SERIAL_ECHO_START;
4754
-        SERIAL_ECHO("Servo ");
4755
-        SERIAL_ECHO(servo_index);
4756
-        SERIAL_ECHOLN(" out of range");
4753
+        SERIAL_ERROR_START;
4754
+        SERIAL_ERROR("Servo ");
4755
+        SERIAL_ERROR(servo_index);
4756
+        SERIAL_ERRORLN(" out of range");
4757 4757
       }
4758 4758
     }
4759 4759
     else if (servo_index >= 0) {
4760
-      SERIAL_PROTOCOL(MSG_OK);
4761
-      SERIAL_PROTOCOL(" Servo ");
4762
-      SERIAL_PROTOCOL(servo_index);
4763
-      SERIAL_PROTOCOL(": ");
4764
-      SERIAL_PROTOCOL(servo[servo_index].read());
4765
-      SERIAL_EOL;
4760
+      SERIAL_ECHO_START;
4761
+      SERIAL_ECHO(" Servo ");
4762
+      SERIAL_ECHO(servo_index);
4763
+      SERIAL_ECHO(": ");
4764
+      SERIAL_ECHOLN(servo[servo_index].read());
4766 4765
     }
4767 4766
   }
4768 4767
 
@@ -4813,27 +4812,27 @@ inline void gcode_M226() {
4813 4812
       #endif
4814 4813
 
4815 4814
       updatePID();
4816
-      SERIAL_PROTOCOL(MSG_OK);
4815
+      SERIAL_ECHO_START;
4817 4816
       #if ENABLED(PID_PARAMS_PER_EXTRUDER)
4818
-        SERIAL_PROTOCOL(" e:"); // specify extruder in serial output
4819
-        SERIAL_PROTOCOL(e);
4817
+        SERIAL_ECHO(" e:"); // specify extruder in serial output
4818
+        SERIAL_ECHO(e);
4820 4819
       #endif // PID_PARAMS_PER_EXTRUDER
4821
-      SERIAL_PROTOCOL(" p:");
4822
-      SERIAL_PROTOCOL(PID_PARAM(Kp, e));
4823
-      SERIAL_PROTOCOL(" i:");
4824
-      SERIAL_PROTOCOL(unscalePID_i(PID_PARAM(Ki, e)));
4825
-      SERIAL_PROTOCOL(" d:");
4826
-      SERIAL_PROTOCOL(unscalePID_d(PID_PARAM(Kd, e)));
4820
+      SERIAL_ECHO(" p:");
4821
+      SERIAL_ECHO(PID_PARAM(Kp, e));
4822
+      SERIAL_ECHO(" i:");
4823
+      SERIAL_ECHO(unscalePID_i(PID_PARAM(Ki, e)));
4824
+      SERIAL_ECHO(" d:");
4825
+      SERIAL_ECHO(unscalePID_d(PID_PARAM(Kd, e)));
4827 4826
       #if ENABLED(PID_ADD_EXTRUSION_RATE)
4828
-        SERIAL_PROTOCOL(" c:");
4827
+        SERIAL_ECHO(" c:");
4829 4828
         //Kc does not have scaling applied above, or in resetting defaults
4830
-        SERIAL_PROTOCOL(PID_PARAM(Kc, e));
4829
+        SERIAL_ECHO(PID_PARAM(Kc, e));
4831 4830
       #endif
4832 4831
       SERIAL_EOL;
4833 4832
     }
4834 4833
     else {
4835
-      SERIAL_ECHO_START;
4836
-      SERIAL_ECHOLN(MSG_INVALID_EXTRUDER);
4834
+      SERIAL_ERROR_START;
4835
+      SERIAL_ERRORLN(MSG_INVALID_EXTRUDER);
4837 4836
     }
4838 4837
   }
4839 4838
 
@@ -4847,14 +4846,13 @@ inline void gcode_M226() {
4847 4846
     if (code_seen('D')) bedKd = scalePID_d(code_value());
4848 4847
 
4849 4848
     updatePID();
4850
-    SERIAL_PROTOCOL(MSG_OK);
4851
-    SERIAL_PROTOCOL(" p:");
4852
-    SERIAL_PROTOCOL(bedKp);
4853
-    SERIAL_PROTOCOL(" i:");
4854
-    SERIAL_PROTOCOL(unscalePID_i(bedKi));
4855
-    SERIAL_PROTOCOL(" d:");
4856
-    SERIAL_PROTOCOL(unscalePID_d(bedKd));
4857
-    SERIAL_EOL;
4849
+    SERIAL_ECHO_START;
4850
+    SERIAL_ECHO(" p:");
4851
+    SERIAL_ECHO(bedKp);
4852
+    SERIAL_ECHO(" i:");
4853
+    SERIAL_ECHO(unscalePID_i(bedKi));
4854
+    SERIAL_ECHO(" d:");
4855
+    SERIAL_ECHOLN(unscalePID_d(bedKd));
4858 4856
   }
4859 4857
 
4860 4858
 #endif // PIDTEMPBED
@@ -5286,7 +5284,7 @@ inline void gcode_M503() {
5286 5284
       float value = code_value();
5287 5285
       if (Z_PROBE_OFFSET_RANGE_MIN <= value && value <= Z_PROBE_OFFSET_RANGE_MAX) {
5288 5286
         zprobe_zoffset = value;
5289
-        SERIAL_ECHOPGM(MSG_OK);
5287
+        SERIAL_ECHO(zprobe_zoffset);
5290 5288
       }
5291 5289
       else {
5292 5290
         SERIAL_ECHOPGM(MSG_Z_MIN);

Loading…
Cancel
Save