Browse Source

Reduce some debug strings

Scott Lahteine 7 years ago
parent
commit
e2b8fc4f17
2 changed files with 60 additions and 61 deletions
  1. 41
    39
      Marlin/src/core/utility.cpp
  2. 19
    22
      Marlin/src/module/tool_change.cpp

+ 41
- 39
Marlin/src/core/utility.cpp View File

@@ -262,37 +262,38 @@ void safe_delay(millis_t ms) {
262 262
   #include "../feature/bedlevel/bedlevel.h"
263 263
 
264 264
   void log_machine_info() {
265
-    SERIAL_ECHOPGM("Machine Type: ");
266
-    #if ENABLED(DELTA)
267
-      SERIAL_ECHOLNPGM("Delta");
268
-    #elif IS_SCARA
269
-      SERIAL_ECHOLNPGM("SCARA");
270
-    #elif IS_CORE
271
-      SERIAL_ECHOLNPGM("Core");
272
-    #else
273
-      SERIAL_ECHOLNPGM("Cartesian");
274
-    #endif
275
-
276
-    SERIAL_ECHOPGM("Probe: ");
277
-    #if ENABLED(PROBE_MANUALLY)
278
-      SERIAL_ECHOLNPGM("PROBE_MANUALLY");
279
-    #elif ENABLED(FIX_MOUNTED_PROBE)
280
-      SERIAL_ECHOLNPGM("FIX_MOUNTED_PROBE");
281
-    #elif ENABLED(BLTOUCH)
282
-      SERIAL_ECHOLNPGM("BLTOUCH");
283
-    #elif HAS_Z_SERVO_PROBE
284
-      SERIAL_ECHOLNPGM("SERVO PROBE");
285
-    #elif ENABLED(Z_PROBE_SLED)
286
-      SERIAL_ECHOLNPGM("Z_PROBE_SLED");
287
-    #elif ENABLED(Z_PROBE_ALLEN_KEY)
288
-      SERIAL_ECHOLNPGM("Z_PROBE_ALLEN_KEY");
289
-    #else
290
-      SERIAL_ECHOLNPGM("NONE");
291
-    #endif
265
+    SERIAL_ECHOLNPGM("Machine Type: "
266
+      #if ENABLED(DELTA)
267
+        "Delta"
268
+      #elif IS_SCARA
269
+        "SCARA"
270
+      #elif IS_CORE
271
+        "Core"
272
+      #else
273
+        "Cartesian"
274
+      #endif
275
+    );
276
+
277
+    SERIAL_ECHOLNPGM("Probe: "
278
+      #if ENABLED(PROBE_MANUALLY)
279
+        "PROBE_MANUALLY"
280
+      #elif ENABLED(FIX_MOUNTED_PROBE)
281
+        "FIX_MOUNTED_PROBE"
282
+      #elif ENABLED(BLTOUCH)
283
+        "BLTOUCH"
284
+      #elif HAS_Z_SERVO_PROBE
285
+        "SERVO PROBE"
286
+      #elif ENABLED(Z_PROBE_SLED)
287
+        "Z_PROBE_SLED"
288
+      #elif ENABLED(Z_PROBE_ALLEN_KEY)
289
+        "Z_PROBE_ALLEN_KEY"
290
+      #else
291
+        "NONE"
292
+      #endif
293
+    );
292 294
 
293 295
     #if HAS_BED_PROBE
294
-      SERIAL_ECHOPAIR("Probe Offset X:", X_PROBE_OFFSET_FROM_EXTRUDER);
295
-      SERIAL_ECHOPAIR(" Y:", Y_PROBE_OFFSET_FROM_EXTRUDER);
296
+      SERIAL_ECHOPGM("Probe Offset X:" STRINGIFY(X_PROBE_OFFSET_FROM_EXTRUDER) " Y:" STRINGIFY(Y_PROBE_OFFSET_FROM_EXTRUDER));
296 297
       SERIAL_ECHOPAIR(" Z:", zprobe_zoffset);
297 298
       #if X_PROBE_OFFSET_FROM_EXTRUDER > 0
298 299
         SERIAL_ECHOPGM(" (Right");
@@ -328,16 +329,17 @@ void safe_delay(millis_t ms) {
328 329
     #endif
329 330
 
330 331
     #if HAS_ABL
331
-      SERIAL_ECHOPGM("Auto Bed Leveling: ");
332
-      #if ENABLED(AUTO_BED_LEVELING_LINEAR)
333
-        SERIAL_ECHOPGM("LINEAR");
334
-      #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
335
-        SERIAL_ECHOPGM("BILINEAR");
336
-      #elif ENABLED(AUTO_BED_LEVELING_3POINT)
337
-        SERIAL_ECHOPGM("3POINT");
338
-      #elif ENABLED(AUTO_BED_LEVELING_UBL)
339
-        SERIAL_ECHOPGM("UBL");
340
-      #endif
332
+      SERIAL_ECHOLNPGM("Auto Bed Leveling: "
333
+        #if ENABLED(AUTO_BED_LEVELING_LINEAR)
334
+          "LINEAR"
335
+        #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
336
+          "BILINEAR"
337
+        #elif ENABLED(AUTO_BED_LEVELING_3POINT)
338
+          "3POINT"
339
+        #elif ENABLED(AUTO_BED_LEVELING_UBL)
340
+          "UBL"
341
+        #endif
342
+      );
341 343
       if (planner.leveling_active) {
342 344
         SERIAL_ECHOLNPGM(" (enabled)");
343 345
         #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)

+ 19
- 22
Marlin/src/module/tool_change.cpp View File

@@ -122,25 +122,22 @@
122 122
                   grabpos = parkingposx[tmp_extruder] + hotend_offset[X_AXIS][active_extruder]
123 123
                             + (tmp_extruder == 0 ? -(PARKING_EXTRUDER_GRAB_DISTANCE) : PARKING_EXTRUDER_GRAB_DISTANCE);
124 124
       /**
125
-       *  Steps:
126
-       *    1. Raise Z-Axis to give enough clearance
127
-       *    2. Move to park position of old extruder
128
-       *    3. Disengage magnetic field, wait for delay
129
-       *    4. Move near new extruder
130
-       *    5. Engage magnetic field for new extruder
131
-       *    6. Move to parking incl. offset of new extruder
132
-       *    7. Lower Z-Axis
125
+       * 1. Raise Z-Axis to give enough clearance
126
+       * 2. Move to park position of old extruder
127
+       * 3. Disengage magnetic field, wait for delay
128
+       * 4. Move near new extruder
129
+       * 5. Engage magnetic field for new extruder
130
+       * 6. Move to parking incl. offset of new extruder
131
+       * 7. Lower Z-Axis
133 132
        */
134 133
 
135 134
       // STEP 1
136 135
       #if ENABLED(DEBUG_LEVELING_FEATURE)
137
-        SERIAL_ECHOLNPGM("Starting Autopark");
138
-        if (DEBUGGING(LEVELING)) DEBUG_POS("current position:", current_position);
136
+        if (DEBUGGING(LEVELING)) DEBUG_POS("Start Autopark", current_position);
139 137
       #endif
140 138
       current_position[Z_AXIS] += PARKING_EXTRUDER_SECURITY_RAISE;
141 139
       #if ENABLED(DEBUG_LEVELING_FEATURE)
142
-        SERIAL_ECHOLNPGM("(1) Raise Z-Axis ");
143
-        if (DEBUGGING(LEVELING)) DEBUG_POS("Moving to Raised Z-Position", current_position);
140
+        if (DEBUGGING(LEVELING)) DEBUG_POS("(1) Raise Z-Axis", current_position);
144 141
       #endif
145 142
       planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[Z_AXIS], active_extruder);
146 143
       planner.synchronize();
@@ -148,33 +145,35 @@
148 145
       // STEP 2
149 146
       current_position[X_AXIS] = parkingposx[active_extruder] + hotend_offset[X_AXIS][active_extruder];
150 147
       #if ENABLED(DEBUG_LEVELING_FEATURE)
151
-        SERIAL_ECHOLNPAIR("(2) Park extruder ", active_extruder);
152
-        if (DEBUGGING(LEVELING)) DEBUG_POS("Moving ParkPos", current_position);
148
+        if (DEBUGGING(LEVELING)) {
149
+          SERIAL_ECHOLNPAIR("(2) Park extruder ", int(active_extruder));
150
+          DEBUG_POS("Moving ParkPos", current_position);
151
+        }
153 152
       #endif
154 153
       planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder);
155 154
       planner.synchronize();
156 155
 
157 156
       // STEP 3
158 157
       #if ENABLED(DEBUG_LEVELING_FEATURE)
159
-        SERIAL_ECHOLNPGM("(3) Disengage magnet ");
158
+        if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("(3) Disengage magnet ");
160 159
       #endif
161 160
       pe_deactivate_magnet(active_extruder);
162 161
 
163 162
       // STEP 4
164 163
       #if ENABLED(DEBUG_LEVELING_FEATURE)
165
-        SERIAL_ECHOLNPGM("(4) Move to position near new extruder");
164
+        if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("(4) Move to position near new extruder");
166 165
       #endif
167 166
       current_position[X_AXIS] += (active_extruder == 0 ? 10 : -10); // move 10mm away from parked extruder
168 167
 
169 168
       #if ENABLED(DEBUG_LEVELING_FEATURE)
170
-        if (DEBUGGING(LEVELING)) DEBUG_POS("Moving away from parked extruder", current_position);
169
+        if (DEBUGGING(LEVELING)) DEBUG_POS("Move away from parked extruder", current_position);
171 170
       #endif
172 171
       planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder);
173 172
       planner.synchronize();
174 173
 
175 174
       // STEP 5
176 175
       #if ENABLED(DEBUG_LEVELING_FEATURE)
177
-        SERIAL_ECHOLNPGM("(5) Engage magnetic field");
176
+        if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("(5) Engage magnetic field");
178 177
       #endif
179 178
 
180 179
       #if ENABLED(PARKING_EXTRUDER_SOLENOIDS_INVERT)
@@ -187,8 +186,7 @@
187 186
       planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder);
188 187
       current_position[X_AXIS] = grabpos;
189 188
       #if ENABLED(DEBUG_LEVELING_FEATURE)
190
-        SERIAL_ECHOLNPAIR("(6) Unpark extruder ", tmp_extruder);
191
-        if (DEBUGGING(LEVELING)) DEBUG_POS("Move UnparkPos", current_position);
189
+        if (DEBUGGING(LEVELING)) DEBUG_POS("(6) Unpark extruder", current_position);
192 190
       #endif
193 191
       planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS]/2, active_extruder);
194 192
       planner.synchronize();
@@ -196,8 +194,7 @@
196 194
       // Step 7
197 195
       current_position[X_AXIS] = midpos - hotend_offset[X_AXIS][tmp_extruder];
198 196
       #if ENABLED(DEBUG_LEVELING_FEATURE)
199
-        SERIAL_ECHOLNPGM("(7) Move midway between hotends");
200
-        if (DEBUGGING(LEVELING)) DEBUG_POS("Move midway to new extruder", current_position);
197
+        if (DEBUGGING(LEVELING)) DEBUG_POS("(7) Move midway between hotends", current_position);
201 198
       #endif
202 199
       planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder);
203 200
       planner.synchronize();

Loading…
Cancel
Save