浏览代码

Simplify DRY RUN (PR#2358)

Elsewhere DRYRUN turns off the heating elements
and ignores constraints on them.

Here, whenever motion is entered into the planner,
if DRY RUN is set, we instantly act as if the E_AXIS
is in the desired final position.
Richard Wackerbarth 10 年前
父节点
当前提交
54ddc1d417
共有 1 个文件被更改,包括 8 次插入3 次删除
  1. 8
    3
      Marlin/planner.cpp

+ 8
- 3
Marlin/planner.cpp 查看文件

@@ -502,12 +502,17 @@ float junction_deviation = 0.1;
502 502
 
503 503
   float dx = target[X_AXIS] - position[X_AXIS],
504 504
         dy = target[Y_AXIS] - position[Y_AXIS],
505
-        dz = target[Z_AXIS] - position[Z_AXIS],
506
-        de = target[E_AXIS] - position[E_AXIS];
505
+        dz = target[Z_AXIS] - position[Z_AXIS];
506
+
507
+  // DRYRUN ignores all temperature constraints and assures that the extruder is instantly satisfied
508
+  if (marlin_debug_flags & DEBUG_DRYRUN)
509
+    position[E_AXIS] = target[E_AXIS];
510
+
511
+  float de = target[E_AXIS] - position[E_AXIS];
507 512
 
508 513
   #ifdef PREVENT_DANGEROUS_EXTRUDE
509 514
     if (de) {
510
-      if (degHotend(extruder) < extrude_min_temp && !(marlin_debug_flags & DEBUG_DRYRUN)) {
515
+      if (degHotend(extruder) < extrude_min_temp) {
511 516
         position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part
512 517
         de = 0; // no difference
513 518
         SERIAL_ECHO_START;

正在加载...
取消
保存