Преглед изворни кода

Merge pull request #3476 from thinkyhead/rc_debug_leveling_gcode_t

Add DEBUG_LEVELING output for gcode_T
Scott Lahteine пре 9 година
родитељ
комит
0439483bc8
1 измењених фајлова са 21 додато и 0 уклоњено
  1. 21
    0
      Marlin/Marlin_main.cpp

+ 21
- 0
Marlin/Marlin_main.cpp Прегледај датотеку

@@ -6189,10 +6189,31 @@ inline void gcode_T(uint8_t tmp_extruder) {
6189 6189
                                                extruder_offset[Y_AXIS][active_extruder],
6190 6190
                                                extruder_offset[Z_AXIS][active_extruder]),
6191 6191
                      offset_vec = tmp_offset_vec - act_offset_vec;
6192
+
6193
+            #if ENABLED(DEBUG_LEVELING_FEATURE)
6194
+              if (DEBUGGING(LEVELING)) {
6195
+                SERIAL_ECHOLNPGM(">>> gcode_T");
6196
+                tmp_offset_vec.debug("tmp_offset_vec");
6197
+                act_offset_vec.debug("act_offset_vec");
6198
+                offset_vec.debug("offset_vec (BEFORE)");
6199
+                DEBUG_POS("BEFORE rotation", current_position);
6200
+              }
6201
+            #endif
6202
+
6192 6203
             offset_vec.apply_rotation(plan_bed_level_matrix.transpose(plan_bed_level_matrix));
6204
+
6193 6205
             current_position[X_AXIS] += offset_vec.x;
6194 6206
             current_position[Y_AXIS] += offset_vec.y;
6195 6207
             current_position[Z_AXIS] += offset_vec.z;
6208
+
6209
+            #if ENABLED(DEBUG_LEVELING_FEATURE)
6210
+              if (DEBUGGING(LEVELING)) {
6211
+                offset_vec.debug("offset_vec (AFTER)");
6212
+                DEBUG_POS("AFTER rotation", current_position);
6213
+                SERIAL_ECHOLNPGM("<<< gcode_T");
6214
+              }
6215
+            #endif
6216
+
6196 6217
           #else // !AUTO_BED_LEVELING_FEATURE
6197 6218
             // Offset extruder (only by XY)
6198 6219
             for (int i=X_AXIS; i<=Y_AXIS; i++)

Loading…
Откажи
Сачувај