// for max allowable speed if block is decelerating and nominal length is false.
if ((!this->nominal_length_flag) && (this->max_entry_speed > exit_speed))
{
- float max_entry_speed = max_allowable_speed(-THEKERNEL->planner->get_acceleration(), exit_speed, this->millimeters);
+ float max_entry_speed = max_allowable_speed(-this->acceleration, exit_speed, this->millimeters);
this->entry_speed = min(max_entry_speed, this->max_entry_speed);
return nominal_speed;
// otherwise, we have to work out max exit speed based on entry and acceleration
- float max = max_allowable_speed(-THEKERNEL->planner->get_acceleration(), this->entry_speed, this->millimeters);
+ float max = max_allowable_speed(-this->acceleration, this->entry_speed, this->millimeters);
return min(max, nominal_speed);
}
float entry_speed;
float exit_speed;
float rate_delta; // Nomber of steps to add to the speed for each acceleration tick
+ float acceleration; // the acceleratoin for this block
unsigned int initial_rate; // Initial speed in steps per second
unsigned int final_rate; // Final speed in steps per second
unsigned int accelerate_until; // Stop accelerating after this number of steps
unsigned int decelerate_after; // Start decelerating after this number of steps
- std::bitset<3> direction_bits; // Direction for each axis in bit form, relative to the direction port's mask
+ float max_entry_speed;
+
+ short times_taken; // A block can be "taken" by any number of modules, and the next block is not moved to until all the modules have "released" it. This value serves as a tracker.
+
+ std::bitset<3> direction_bits; // Direction for each axis in bit form, relative to the direction port's mask
struct {
bool recalculate_flag:1; // Planner flag to recalculate trapezoids on entry junction
bool nominal_length_flag:1; // Planner flag for nominal speed always reached
bool is_ready:1;
};
-
- float max_entry_speed;
-
- short times_taken; // A block can be "taken" by any number of modules, and the next block is not moved to until all the modules have "released" it. This value serves as a tracker.
-
};
if(this->z_junction_deviation >= 0.0F) junction_deviation= this->z_junction_deviation;
}
+ block->acceleration= acceleration; // save in block
+
// Max number of steps, for all axes
block->steps_event_count = max( block->steps[ALPHA_STEPPER], max( block->steps[BETA_STEPPER], block->steps[GAMMA_STEPPER] ) );
gcode->mark_as_taken();
if (gcode->has_letter('S')) {
- // TODO for safety so it applies only to following gcodes, maybe a better way to do this?
- THEKERNEL->conveyor->wait_for_empty_queue();
float acc = gcode->get_value('S'); // mm/s^2
// enforce minimum
if (acc < 1.0F)
THEKERNEL->planner->acceleration = acc;
}
if (gcode->has_letter('Z')) {
- // TODO for safety so it applies only to following gcodes, maybe a better way to do this?
- THEKERNEL->conveyor->wait_for_empty_queue();
float acc = gcode->get_value('Z'); // mm/s^2
// enforce positive
if (acc < 0.0F)