reformating and some minor bugs/things found on the way.

This commit is contained in:
Bernhard Kubicek
2011-11-06 19:23:08 +01:00
parent 900e0c9bf2
commit 1d171e9e52
17 changed files with 1204 additions and 1192 deletions

View File

@ -32,16 +32,16 @@ typedef struct {
// Fields used by the bresenham algorithm for tracing the line
long steps_x, steps_y, steps_z, steps_e; // Step count along each axis
long step_event_count; // The number of step events required to complete this block
volatile long accelerate_until; // The index of the step event on which to stop acceleration
volatile long decelerate_after; // The index of the step event on which to start decelerating
volatile long acceleration_rate; // The acceleration rate used for acceleration calculation
volatile long accelerate_until; // The index of the step event on which to stop acceleration
volatile long decelerate_after; // The index of the step event on which to start decelerating
volatile long acceleration_rate; // The acceleration rate used for acceleration calculation
unsigned char direction_bits; // The direction bit set for this block (refers to *_DIRECTION_BIT in config.h)
#ifdef ADVANCE
long advance_rate;
volatile long initial_advance;
volatile long final_advance;
float advance;
#endif
#ifdef ADVANCE
long advance_rate;
volatile long initial_advance;
volatile long final_advance;
float advance;
#endif
// Fields used by the motion planner to manage acceleration
float speed_x, speed_y, speed_z, speed_e; // Nominal mm/minute for each axis
@ -57,16 +57,17 @@ typedef struct {
long acceleration_st; // acceleration steps/sec^2
volatile char busy;
} block_t;
// Initialize the motion plan subsystem
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);
void plan_buffer_line(const float &x, const float &y, const float &z, const float &e, float feed_rate);
// Set position. Used for G92 instructions.
void plan_set_position(float x, float y, float z, float e);
void plan_set_position(const float &x, const float &y, const float &z, const float &e);
// Called when the current block is no longer needed. Discards the block and makes the memory
// availible for new blocks.