diff --git a/motion_control.c b/motion_control.c index 2d01eb2..b3d9fa3 100644 --- a/motion_control.c +++ b/motion_control.c @@ -39,10 +39,10 @@ void mc_dwell(uint32_t milliseconds) // Execute linear motion in absolute millimeter coordinates. Feed rate given in millimeters/second // unless invert_feed_rate is true. Then the feed_rate means that the motion should be completed in // 1/feed_rate minutes. -void mc_line(double x, double y, double z, double feed_rate, int invert_feed_rate) -{ - plan_buffer_line(x, y, z, feed_rate, invert_feed_rate); -} +// void mc_line(double x, double y, double z, double feed_rate, int invert_feed_rate) +// { +// plan_buffer_line(x, y, z, feed_rate, invert_feed_rate); +// } // Execute an arc. theta == start angle, angular_travel == number of radians to go along the arc, // positive angular_travel means clockwise, negative means counterclockwise. Radius == the radius of the diff --git a/motion_control.h b/motion_control.h index 2f1737e..2d37292 100644 --- a/motion_control.h +++ b/motion_control.h @@ -19,14 +19,19 @@ */ #ifndef motion_control_h -#define motion_control_h +#define motion_control_h #include +#include "planner.h" // Execute linear motion in absolute millimeter coordinates. Feed rate given in millimeters/second // unless invert_feed_rate is true. Then the feed_rate means that the motion should be completed in // (1 minute)/feed_rate time. -void mc_line(double x, double y, double z, double feed_rate, int invert_feed_rate); +// void mc_line(double x, double y, double z, double feed_rate, int invert_feed_rate); +#define mc_line(x, y, z, feed_rate, invert_feed_rate) plan_buffer_line(x,y,z,feed_rate,invert_feed_rate) +// Note: Although this function structurally belongs in this module, there is nothing to to but +// to forward the request to the planner. For efficiency the function is replaced with a macro that +// just forwards the call to the planner. // Execute an arc. theta == start angle, angular_travel == number of radians to go along the arc, // positive angular_travel means clockwise, negative means counterclockwise. Radius == the radius of the