Browse Source

Reduce gcode_SET_Z_PROBE_OFFSET by 88 bytes

Scott Lahteine 10 years ago
parent
commit
91122277f4
1 changed files with 8 additions and 9 deletions
  1. 8
    9
      Marlin/Marlin_main.cpp

+ 8
- 9
Marlin/Marlin_main.cpp View File

@@ -4786,18 +4786,19 @@ inline void gcode_M503() {
4786 4786
 #ifdef CUSTOM_M_CODE_SET_Z_PROBE_OFFSET
4787 4787
 
4788 4788
   inline void gcode_SET_Z_PROBE_OFFSET() {
4789
-    float value;
4789
+
4790
+    SERIAL_ECHO_START;
4791
+    SERIAL_ECHOPGM(MSG_ZPROBE_ZOFFSET);
4792
+    SERIAL_CHAR(' ');
4793
+
4790 4794
     if (code_seen('Z')) {
4791
-      value = code_value();
4795
+      float value = code_value();
4792 4796
       if (Z_PROBE_OFFSET_RANGE_MIN <= value && value <= Z_PROBE_OFFSET_RANGE_MAX) {
4793 4797
         zprobe_zoffset = value;
4794
-        SERIAL_ECHO_START;
4795
-        SERIAL_ECHOLNPGM(MSG_ZPROBE_ZOFFSET " " MSG_OK);
4798
+        SERIAL_ECHOLNPGM(MSG_OK);
4796 4799
         SERIAL_EOL;
4797 4800
       }
4798 4801
       else {
4799
-        SERIAL_ECHO_START;
4800
-        SERIAL_ECHOPGM(MSG_ZPROBE_ZOFFSET);
4801 4802
         SERIAL_ECHOPGM(MSG_Z_MIN);
4802 4803
         SERIAL_ECHO(Z_PROBE_OFFSET_RANGE_MIN);
4803 4804
         SERIAL_ECHOPGM(MSG_Z_MAX);
@@ -4806,9 +4807,7 @@ inline void gcode_M503() {
4806 4807
       }
4807 4808
     }
4808 4809
     else {
4809
-      SERIAL_ECHO_START;
4810
-      SERIAL_ECHOPGM(MSG_ZPROBE_ZOFFSET " : ");
4811
-      SERIAL_ECHO(zprobe_zoffset);
4810
+      SERIAL_ECHOPAIR(": ", zprobe_zoffset);
4812 4811
       SERIAL_EOL;
4813 4812
     }
4814 4813
   }

Loading…
Cancel
Save