Browse Source

Group leveling reports for folding

Scott Lahteine 6 years ago
parent
commit
a80f2eea23
1 changed files with 47 additions and 45 deletions
  1. 47
    45
      Marlin/src/module/configuration_store.cpp

+ 47
- 45
Marlin/src/module/configuration_store.cpp View File

1804
       }
1804
       }
1805
     #endif
1805
     #endif
1806
 
1806
 
1807
-    #if ENABLED(MESH_BED_LEVELING)
1807
+    /**
1808
+     * Bed Leveling
1809
+     */
1810
+    #if HAS_LEVELING
1808
 
1811
 
1809
-      if (!forReplay) {
1810
-        CONFIG_ECHO_START;
1811
-        SERIAL_ECHOLNPGM("Mesh Bed Leveling:");
1812
-      }
1813
-      CONFIG_ECHO_START;
1814
-      SERIAL_ECHOPAIR("  M420 S", leveling_is_valid() ? 1 : 0);
1815
-      #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
1816
-        SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(planner.z_fade_height));
1817
-      #endif
1818
-      SERIAL_EOL();
1819
-      for (uint8_t py = 0; py < GRID_MAX_POINTS_Y; py++) {
1820
-        for (uint8_t px = 0; px < GRID_MAX_POINTS_X; px++) {
1812
+      #if ENABLED(MESH_BED_LEVELING)
1813
+
1814
+        if (!forReplay) {
1821
           CONFIG_ECHO_START;
1815
           CONFIG_ECHO_START;
1822
-          SERIAL_ECHOPAIR("  G29 S3 X", (int)px + 1);
1823
-          SERIAL_ECHOPAIR(" Y", (int)py + 1);
1824
-          SERIAL_ECHOPGM(" Z");
1825
-          SERIAL_PROTOCOL_F(LINEAR_UNIT(mbl.z_values[px][py]), 5);
1826
-          SERIAL_EOL();
1816
+          SERIAL_ECHOLNPGM("Mesh Bed Leveling:");
1827
         }
1817
         }
1828
-      }
1829
 
1818
 
1830
-    #elif ENABLED(AUTO_BED_LEVELING_UBL)
1819
+      #elif ENABLED(AUTO_BED_LEVELING_UBL)
1820
+
1821
+        if (!forReplay) {
1822
+          CONFIG_ECHO_START;
1823
+          ubl.echo_name();
1824
+          SERIAL_ECHOLNPGM(":");
1825
+        }
1826
+
1827
+      #elif HAS_ABL
1828
+
1829
+        if (!forReplay) {
1830
+          CONFIG_ECHO_START;
1831
+          SERIAL_ECHOLNPGM("Auto Bed Leveling:");
1832
+        }
1833
+
1834
+      #endif
1831
 
1835
 
1832
-      if (!forReplay) {
1833
-        CONFIG_ECHO_START;
1834
-        ubl.echo_name();
1835
-        SERIAL_ECHOLNPGM(":");
1836
-      }
1837
       CONFIG_ECHO_START;
1836
       CONFIG_ECHO_START;
1838
       SERIAL_ECHOPAIR("  M420 S", planner.leveling_active ? 1 : 0);
1837
       SERIAL_ECHOPAIR("  M420 S", planner.leveling_active ? 1 : 0);
1839
       #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
1838
       #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
1841
       #endif
1840
       #endif
1842
       SERIAL_EOL();
1841
       SERIAL_EOL();
1843
 
1842
 
1844
-      if (!forReplay) {
1845
-        SERIAL_EOL();
1846
-        ubl.report_state();
1843
+      #if ENABLED(MESH_BED_LEVELING)
1847
 
1844
 
1848
-        SERIAL_ECHOLNPAIR("\nActive Mesh Slot: ", ubl.storage_slot);
1849
-        SERIAL_ECHOPAIR("EEPROM can hold ", calc_num_meshes());
1850
-        SERIAL_ECHOLNPGM(" meshes.\n");
1851
-      }
1845
+        for (uint8_t py = 0; py < GRID_MAX_POINTS_Y; py++) {
1846
+          for (uint8_t px = 0; px < GRID_MAX_POINTS_X; px++) {
1847
+            CONFIG_ECHO_START;
1848
+            SERIAL_ECHOPAIR("  G29 S3 X", (int)px + 1);
1849
+            SERIAL_ECHOPAIR(" Y", (int)py + 1);
1850
+            SERIAL_ECHOPGM(" Z");
1851
+            SERIAL_PROTOCOL_F(LINEAR_UNIT(mbl.z_values[px][py]), 5);
1852
+            SERIAL_EOL();
1853
+          }
1854
+        }
1852
 
1855
 
1853
-    #elif HAS_ABL
1856
+      #elif ENABLED(AUTO_BED_LEVELING_UBL)
1857
+
1858
+        if (!forReplay) {
1859
+          SERIAL_EOL();
1860
+          ubl.report_state();
1861
+          SERIAL_ECHOLNPAIR("\nActive Mesh Slot: ", ubl.storage_slot);
1862
+          SERIAL_ECHOPAIR("EEPROM can hold ", calc_num_meshes());
1863
+          SERIAL_ECHOLNPGM(" meshes.\n");
1864
+        }
1854
 
1865
 
1855
-      if (!forReplay) {
1856
-        CONFIG_ECHO_START;
1857
-        SERIAL_ECHOLNPGM("Auto Bed Leveling:");
1858
-      }
1859
-      CONFIG_ECHO_START;
1860
-      SERIAL_ECHOPAIR("  M420 S", planner.leveling_active ? 1 : 0);
1861
-      #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
1862
-        SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(planner.z_fade_height));
1863
       #endif
1866
       #endif
1864
-      SERIAL_EOL();
1865
 
1867
 
1866
-    #endif
1868
+    #endif // HAS_LEVELING
1867
 
1869
 
1868
     #if ENABLED(DELTA)
1870
     #if ENABLED(DELTA)
1869
       if (!forReplay) {
1871
       if (!forReplay) {
2042
     /**
2044
     /**
2043
      * TMC2130 stepper driver current
2045
      * TMC2130 stepper driver current
2044
      */
2046
      */
2045
-    #if ENABLED(HAVE_TMC2130)
2047
+    #if HAS_TRINAMIC
2046
       if (!forReplay) {
2048
       if (!forReplay) {
2047
         CONFIG_ECHO_START;
2049
         CONFIG_ECHO_START;
2048
         SERIAL_ECHOLNPGM("Stepper driver current:");
2050
         SERIAL_ECHOLNPGM("Stepper driver current:");
2088
     /**
2090
     /**
2089
      * TMC2130 Sensorless homing thresholds
2091
      * TMC2130 Sensorless homing thresholds
2090
      */
2092
      */
2091
-    #if ENABLED(HAVE_TMC2130) && ENABLED(SENSORLESS_HOMING)
2093
+    #if ENABLED(SENSORLESS_HOMING)
2092
       if (!forReplay) {
2094
       if (!forReplay) {
2093
         CONFIG_ECHO_START;
2095
         CONFIG_ECHO_START;
2094
         SERIAL_ECHOLNPGM("Sensorless homing threshold:");
2096
         SERIAL_ECHOLNPGM("Sensorless homing threshold:");

Loading…
Cancel
Save