Browse Source

Fix compilation of say_units

Fixes #10663
Scott Lahteine 6 years ago
parent
commit
6d9ec1852a
1 changed files with 11 additions and 11 deletions
  1. 11
    11
      Marlin/src/module/configuration_store.cpp

+ 11
- 11
Marlin/src/module/configuration_store.cpp View File

@@ -1909,10 +1909,10 @@ void MarlinSettings::reset(PORTARG_SOLO) {
1909 1909
   #endif
1910 1910
 
1911 1911
   inline void say_units(
1912
-    #if ADD_PORT_ARG
1913
-      PORTARG_SOLO,
1912
+    #if NUM_SERIAL > 1
1913
+      const int8_t port,
1914 1914
     #endif
1915
-    const bool colon=false
1915
+    const bool colon
1916 1916
   ) {
1917 1917
     serialprintPGM_P(port,
1918 1918
       #if ENABLED(INCH_MODE_SUPPORT)
@@ -1922,6 +1922,11 @@ void MarlinSettings::reset(PORTARG_SOLO) {
1922 1922
     );
1923 1923
     if (colon) SERIAL_ECHOLNPGM_P(port, ":");
1924 1924
   }
1925
+  #if NUM_SERIAL > 1
1926
+    #define SAY_UNITS_P(PORT, COLON) say_units(PORT, COLON)
1927
+  #else
1928
+    #define SAY_UNITS_P(PORT, COLON) say_units(COLON)
1929
+  #endif
1925 1930
 
1926 1931
   /**
1927 1932
    * M503 - Report current settings in RAM
@@ -1943,12 +1948,12 @@ void MarlinSettings::reset(PORTARG_SOLO) {
1943 1948
       SERIAL_ECHOPGM_P(port, "  G2");
1944 1949
       SERIAL_CHAR_P(port, parser.linear_unit_factor == 1.0 ? '1' : '0');
1945 1950
       SERIAL_ECHOPGM_P(port, " ;");
1946
-      say_units(PORTVAR_SOLO);
1951
+      SAY_UNITS_P(port, false);
1947 1952
     #else
1948 1953
       #define LINEAR_UNIT(N) (N)
1949 1954
       #define VOLUMETRIC_UNIT(N) (N)
1950 1955
       SERIAL_ECHOPGM_P(port, "  G21    ; Units in mm");
1951
-      say_units(PORTVAR_SOLO);
1956
+      SAY_UNITS_P(port, false);
1952 1957
     #endif
1953 1958
     SERIAL_EOL_P(port);
1954 1959
 
@@ -2363,12 +2368,7 @@ void MarlinSettings::reset(PORTARG_SOLO) {
2363 2368
       if (!forReplay) {
2364 2369
         CONFIG_ECHO_START;
2365 2370
         SERIAL_ECHOPGM_P(port, "Z-Probe Offset (mm):");
2366
-        say_units(
2367
-          #if ADD_PORT_ARG
2368
-            port,
2369
-          #endif
2370
-          true
2371
-        );
2371
+        SAY_UNITS_P(port, true);
2372 2372
       }
2373 2373
       CONFIG_ECHO_START;
2374 2374
       SERIAL_ECHOLNPAIR_P(port, "  M851 Z", LINEAR_UNIT(zprobe_zoffset));

Loading…
Cancel
Save