Browse Source

Made plan_buffer_line arguments const, which optimizes better and fixes the RUNOUT_PREVENTION feature.

Daid 13 years ago
parent
commit
88d289caa1
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      Marlin/planner.cpp
  2. 1
    1
      Marlin/planner.h

+ 1
- 1
Marlin/planner.cpp View File

@@ -441,7 +441,7 @@ float junction_deviation = 0.1;
441 441
 // Add a new linear movement to the buffer. steps_x, _y and _z is the absolute position in 
442 442
 // mm. Microseconds specify how many microseconds the move should take to perform. To aid acceleration
443 443
 // calculation the caller must also provide the physical length of the line in millimeters.
444
-void plan_buffer_line(float &x, float &y, float &z, float &e, float feed_rate, uint8_t &extruder)
444
+void plan_buffer_line(const float &x, const float &y, const float &z, const float &e, float feed_rate, const uint8_t &extruder)
445 445
 {
446 446
   // Calculate the buffer head after we push this byte
447 447
   int next_buffer_head = next_block_index(block_buffer_head);

+ 1
- 1
Marlin/planner.h View File

@@ -67,7 +67,7 @@ void plan_init();
67 67
 
68 68
 // Add a new linear movement to the buffer. x, y and z is the signed, absolute target position in 
69 69
 // millimaters. Feed rate specifies the speed of the motion.
70
-void plan_buffer_line(float &x, float &y, float &z, float &e, float feed_rate, uint8_t &extruder);
70
+void plan_buffer_line(const float &x, const float &y, const float &z, const float &e, float feed_rate, const uint8_t &extruder);
71 71
 
72 72
 // Set position. Used for G92 instructions.
73 73
 void plan_set_position(const float &x, const float &y, const float &z, const float &e);

Loading…
Cancel
Save