Sfoglia il codice sorgente

Fix an acceleration anomaly by making locals signed

Scott Lahteine 8 anni fa
parent
commit
e38baaa23e
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1
    1
      Marlin/planner.cpp

+ 1
- 1
Marlin/planner.cpp Vedi File

@@ -941,7 +941,7 @@ float junction_deviation = 0.1;
941 941
 
942 942
   // Compute and limit the acceleration rate for the trapezoid generator.
943 943
   float steps_per_mm = block->step_event_count / block->millimeters;
944
-  unsigned long bsx = block->steps[X_AXIS], bsy = block->steps[Y_AXIS], bsz = block->steps[Z_AXIS], bse = block->steps[E_AXIS];
944
+  long bsx = block->steps[X_AXIS], bsy = block->steps[Y_AXIS], bsz = block->steps[Z_AXIS], bse = block->steps[E_AXIS];
945 945
   if (bsx == 0 && bsy == 0 && bsz == 0) {
946 946
     block->acceleration_st = ceil(retract_acceleration * steps_per_mm); // convert to: acceleration steps/sec^2
947 947
   }

Loading…
Annulla
Salva