// 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.
typedefstruct{
// Fields used by the bresenham algorithm for tracing the line
// steps_x.y,z, step_event_count, acceleration_rate, direction_bits and active_extruder are set by plan_buffer_line().
longsteps_x,steps_y,steps_z,steps_e;// Step count along each axis
unsignedlongstep_event_count;// The number of step events required to complete this block
longacceleration_rate;// The acceleration rate used for acceleration calculation
unsignedchardirection_bits;// The direction bit set for this block (refers to *_DIRECTION_BIT in config.h)
unsignedcharactive_extruder;// Selects the active extruder
// accelerate_until and decelerate_after are set by calculate_trapezoid_for_block() and they need to be synchronized with the stepper interrupt controller.
longaccelerate_until;// The index of the step event on which to stop acceleration
longdecelerate_after;// The index of the step event on which to start decelerating
#ifdef ADVANCE
longadvance_rate;
volatilelonginitial_advance;
volatilelongfinal_advance;
floatadvance;
#endif
// Fields used by the motion planner to manage acceleration
// float speed_x, speed_y, speed_z, speed_e; // Nominal mm/sec for each axis
// The nominal speed for this block in mm/sec.
// This speed may or may not be reached due to the jerk and acceleration limits.
floatnominal_speed;
// Entry speed at previous-current junction in mm/sec, respecting the acceleration and jerk limits.
// The entry speed limit of the current block equals the exit speed of the preceding block.
floatentry_speed;
// Maximum allowable junction entry speed in mm/sec. This value is also a maximum exit speed of the previous block.
floatmax_entry_speed;
// The total travel of this block in mm
floatmillimeters;
// acceleration mm/sec^2
floatacceleration;
// Bit flags defined by the BlockFlag enum.
boolflag;
// Settings for the trapezoid generator (runs inside an interrupt handler).
// Changing the following values in the planner needs to be synchronized with the interrupt handler by disabling the interrupts.
unsignedlongnominal_rate;// The nominal step rate for this block in step_events/sec
unsignedlonginitial_rate;// The jerk-adjusted step rate at start of block
unsignedlongfinal_rate;// The minimal rate at exit