Browse Source

Fix DISABLE_[XYZE] code (#18970)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Giuliano Zaro 4 years ago
parent
commit
ce3df42e22
No account linked to committer's email address
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      Marlin/src/module/planner.cpp

+ 5
- 5
Marlin/src/module/planner.cpp View File

@@ -1281,7 +1281,7 @@ void Planner::recalculate() {
1281 1281
 void Planner::check_axes_activity() {
1282 1282
 
1283 1283
   #if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_E)
1284
-    xyze_bool_t axis_active = { true, true, true, true };
1284
+    xyze_bool_t axis_active = { false };
1285 1285
   #endif
1286 1286
 
1287 1287
   #if HAS_FAN
@@ -1316,10 +1316,10 @@ void Planner::check_axes_activity() {
1316 1316
     #if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_E)
1317 1317
       for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) {
1318 1318
         block_t *block = &block_buffer[b];
1319
-        if (ENABLED(DISABLE_X) && block->steps[X_AXIS]) axis_active[X_AXIS] = true;
1320
-        if (ENABLED(DISABLE_Y) && block->steps[Y_AXIS]) axis_active[Y_AXIS] = true;
1321
-        if (ENABLED(DISABLE_Z) && block->steps[Z_AXIS]) axis_active[Z_AXIS] = true;
1322
-        if (ENABLED(DISABLE_E) && block->steps[E_AXIS]) axis_active[E_AXIS] = true;
1319
+        if (ENABLED(DISABLE_X) && block->steps.x) axis_active.x = true;
1320
+        if (ENABLED(DISABLE_Y) && block->steps.y) axis_active.y = true;
1321
+        if (ENABLED(DISABLE_Z) && block->steps.z) axis_active.z = true;
1322
+        if (ENABLED(DISABLE_E) && block->steps.e) axis_active.e = true;
1323 1323
       }
1324 1324
     #endif
1325 1325
   }

Loading…
Cancel
Save