chiark / gitweb /
Made plan_buffer_line arguments const, which optimizes better and fixes the RUNOUT_PR...
authorDaid <daid303@gmail.com>
Wed, 29 Feb 2012 10:38:12 +0000 (11:38 +0100)
committerDaid <daid303@gmail.com>
Wed, 29 Feb 2012 10:38:12 +0000 (11:38 +0100)
Marlin/planner.cpp
Marlin/planner.h

index 00fead12883f19147dc094efd4d7635342237f94..b1e1d2b2b7316a9207cd8f243284a9ba1d70b29a 100644 (file)
@@ -441,7 +441,7 @@ float junction_deviation = 0.1;
 // Add a new linear movement to the buffer. steps_x, _y and _z is the absolute position in 
 // mm. Microseconds specify how many microseconds the move should take to perform. To aid acceleration
 // calculation the caller must also provide the physical length of the line in millimeters.
-void plan_buffer_line(float &x, float &y, float &z, float &e, float feed_rate, uint8_t &extruder)
+void plan_buffer_line(const float &x, const float &y, const float &z, const float &e, float feed_rate, const uint8_t &extruder)
 {
   // Calculate the buffer head after we push this byte
   int next_buffer_head = next_block_index(block_buffer_head);
index c90581bfd8bdfe690141ad0782eda25f60096b2f..ac9719fbcf5ab9fade5c94f4f6695afcdf6263b9 100644 (file)
@@ -67,7 +67,7 @@ void plan_init();
 
 // Add a new linear movement to the buffer. x, y and z is the signed, absolute target position in 
 // millimaters. Feed rate specifies the speed of the motion.
-void plan_buffer_line(float &x, float &y, float &z, float &e, float feed_rate, uint8_t &extruder);
+void plan_buffer_line(const float &x, const float &y, const float &z, const float &e, float feed_rate, const uint8_t &extruder);
 
 // Set position. Used for G92 instructions.
 void plan_set_position(const float &x, const float &y, const float &z, const float &e);