Various minor updates and variable definition corrections. Removed deprecated acceleration manager.

- Removed deprecated acceleration manager (non-functional since v0.7b)
- Updated variable types and function headers. - Updated stepper
interrupt to ISR() from SIGNAL()+sei(). - General code cleanup.
This commit is contained in:
Sonny Jeon
2011-12-10 11:18:24 -07:00
parent 4bf0085ae6
commit 12bae58994
10 changed files with 210 additions and 205 deletions

View File

@ -27,12 +27,12 @@
// This struct is used when buffering the setup for each linear movement "nominal" values are as specified in
// the source g-code and may never actually be reached if acceleration management is active.
typedef struct {
// Fields used by the bresenham algorithm for tracing the line
uint32_t steps_x, steps_y, steps_z; // Step count along each axis
uint8_t direction_bits; // The direction bit set for this block (refers to *_DIRECTION_BIT in config.h)
uint32_t steps_x, steps_y, steps_z; // Step count along each axis
int32_t step_event_count; // The number of step events required to complete this block
uint32_t nominal_rate; // The nominal step rate for this block in step_events/minute
// Fields used by the motion planner to manage acceleration
double nominal_speed; // The nominal speed for this block in mm/min
double entry_speed; // Entry speed at previous-current junction in mm/min
@ -42,12 +42,13 @@ typedef struct {
uint8_t nominal_length_flag; // Planner flag for nominal speed always reached
// Settings for the trapezoid generator
uint32_t initial_rate; // The jerk-adjusted step rate at start of block
uint32_t final_rate; // The minimal rate at exit
uint32_t initial_rate; // The step rate at start of block
uint32_t final_rate; // The step rate at end of block
int32_t rate_delta; // The steps/minute to add or subtract when changing speed (must be positive)
uint32_t accelerate_until; // The index of the step event on which to stop acceleration
uint32_t decelerate_after; // The index of the step event on which to start decelerating
uint32_t nominal_rate; // The nominal step rate for this block in step_events/minute
} block_t;
// Initialize the motion plan subsystem
@ -65,12 +66,6 @@ void plan_discard_current_block();
// Gets the current block. Returns NULL if buffer empty
block_t *plan_get_current_block();
// Enables or disables acceleration-management for upcoming blocks
void plan_set_acceleration_manager_enabled(uint8_t enabled);
// Is acceleration-management currently enabled?
int plan_is_acceleration_manager_enabled();
// Reset the position vector
void plan_set_current_position(double x, double y, double z);