2 This file is part of Smoothie (http://smoothieware.org/). The motion control part is heavily based on Grbl (https://github.com/simen/grbl).
3 Smoothie is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
4 Smoothie is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
5 You should have received a copy of the GNU General Public License along with Smoothie. If not, see <http://www.gnu.org/licenses/>.
13 #include "ActuatorCoordinates.h"
20 void calculate_trapezoid( float entry_speed
, float exit_speed
);
21 float estimate_acceleration_distance( float initial_rate
, float target_rate
, float acceleration
);
22 float intersection_distance(float initial_rate
, float final_rate
, float acceleration
, float distance
);
23 float max_allowable_speed( float acceleration
, float target_velocity
, float distance
);
25 float reverse_pass(float exit_speed
);
26 float forward_pass(float next_entry_speed
);
28 float max_exit_speed();
32 void append_gcode(Gcode
* gcode
);
43 std::vector
<Gcode
> gcodes
;
45 std::array
<uint32_t, k_max_actuators
> steps
; // Number of steps for each axis for this block
46 uint32_t steps_event_count
; // Steps for the longest axis
47 uint32_t nominal_rate
; // Nominal rate in steps per second
48 float nominal_speed
; // Nominal speed in mm per second
49 float millimeters
; // Distance for this move
52 float rate_delta
; // Number of steps to add to the speed for each acceleration tick
53 float acceleration
; // the acceleratoin for this block
54 uint32_t initial_rate
; // Initial speed in steps per second
55 uint32_t final_rate
; // Final speed in steps per second
56 uint32_t accelerate_until
; // Stop accelerating after this number of steps
57 uint32_t decelerate_after
; // Start decelerating after this number of steps
59 float max_entry_speed
;
61 int16_t 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.
63 std::bitset
<k_max_actuators
> direction_bits
; // Direction for each axis in bit form, relative to the direction port's mask
65 bool recalculate_flag
:1; // Planner flag to recalculate trapezoids on entry junction
66 bool nominal_length_flag
:1; // Planner flag for nominal speed always reached