浏览代码

Extend Core endstop commentary

Scott Lahteine 8 年前
父节点
当前提交
b6d9eb229f
共有 1 个文件被更改,包括 10 次插入4 次删除
  1. 10
    4
      Marlin/endstops.cpp

+ 10
- 4
Marlin/endstops.cpp 查看文件

@@ -273,8 +273,6 @@ void Endstops::update() {
273 273
   #endif
274 274
 
275 275
   #if CORE_IS_XY || CORE_IS_XZ
276
-    // Head direction in -X axis for CoreXY and CoreXZ bots.
277
-    // If DeltaA == -DeltaB, the movement is only in only one axis
278 276
     #if ENABLED(COREYX) || ENABLED(COREZX)
279 277
       #define CORE_X_CMP !=
280 278
       #define CORE_X_NOT !
@@ -282,6 +280,10 @@ void Endstops::update() {
282 280
       #define CORE_X_CMP ==
283 281
       #define CORE_X_NOT
284 282
     #endif
283
+    // Head direction in -X axis for CoreXY and CoreXZ bots.
284
+    // If steps differ, both axes are moving.
285
+    // If DeltaA == -DeltaB, the movement is only in the 2nd axis (Y or Z, handled below)
286
+    // If DeltaA ==  DeltaB, the movement is only in the 1st axis (X)
285 287
     if (stepper.current_block->steps[CORE_AXIS_1] != stepper.current_block->steps[CORE_AXIS_2] || stepper.motor_direction(CORE_AXIS_1) CORE_X_CMP stepper.motor_direction(CORE_AXIS_2)) {
286 288
       if (CORE_X_NOT stepper.motor_direction(X_HEAD))
287 289
   #else
@@ -324,7 +326,9 @@ void Endstops::update() {
324 326
 
325 327
   #if CORE_IS_XY || CORE_IS_YZ
326 328
     // Head direction in -Y axis for CoreXY / CoreYZ bots.
327
-    // If DeltaA == DeltaB, the movement is in only one axis
329
+    // If steps differ, both axes are moving
330
+    // If DeltaA ==  DeltaB, the movement is only in the 1st axis (X or Y)
331
+    // If DeltaA == -DeltaB, the movement is only in the 2nd axis (Y or Z)
328 332
     if (stepper.current_block->steps[CORE_AXIS_1] != stepper.current_block->steps[CORE_AXIS_2] || stepper.motor_direction(CORE_AXIS_1) CORE_YZ_CMP stepper.motor_direction(CORE_AXIS_2)) {
329 333
       if (CORE_YZ_NOT stepper.motor_direction(Y_HEAD))
330 334
   #else
@@ -346,7 +350,9 @@ void Endstops::update() {
346 350
 
347 351
   #if CORE_IS_XZ || CORE_IS_YZ
348 352
     // Head direction in -Z axis for CoreXZ or CoreYZ bots.
349
-    // If DeltaA == DeltaB, the movement is in only one axis
353
+    // If steps differ, both axes are moving
354
+    // If DeltaA ==  DeltaB, the movement is only in the 1st axis (X or Y, already handled above)
355
+    // If DeltaA == -DeltaB, the movement is only in the 2nd axis (Z)
350 356
     if (stepper.current_block->steps[CORE_AXIS_1] != stepper.current_block->steps[CORE_AXIS_2] || stepper.motor_direction(CORE_AXIS_1) CORE_YZ_CMP stepper.motor_direction(CORE_AXIS_2)) {
351 357
       if (CORE_YZ_NOT stepper.motor_direction(Z_HEAD))
352 358
   #else

正在加载...
取消
保存