Comment/cleanup of motion code
This commit is contained in:
@@ -587,12 +587,9 @@ float soft_endstop_min[XYZ] = { X_MIN_BED, Y_MIN_BED, Z_MIN_POS },
|
||||
float raw[XYZE];
|
||||
COPY(raw, current_position);
|
||||
|
||||
// Drop one segment so the last move is to the exact target.
|
||||
// If there's only 1 segment, loops will be skipped entirely.
|
||||
--segments;
|
||||
|
||||
// Calculate and execute the segments
|
||||
for (uint16_t s = segments + 1; --s;) {
|
||||
while (--segments) {
|
||||
|
||||
static millis_t next_idle_ms = millis() + 200UL;
|
||||
thermalManager.manage_heater(); // This returns immediately if not really needed.
|
||||
@@ -691,16 +688,12 @@ float soft_endstop_min[XYZ] = { X_MIN_BED, Y_MIN_BED, Z_MIN_POS },
|
||||
// SERIAL_ECHOPAIR("mm=", cartesian_mm);
|
||||
// SERIAL_ECHOLNPAIR(" segments=", segments);
|
||||
|
||||
// Drop one segment so the last move is to the exact target.
|
||||
// If there's only 1 segment, loops will be skipped entirely.
|
||||
--segments;
|
||||
|
||||
// Get the raw current position as starting point
|
||||
float raw[XYZE];
|
||||
COPY(raw, current_position);
|
||||
|
||||
// Calculate and execute the segments
|
||||
for (uint16_t s = segments + 1; --s;) {
|
||||
while (--segments) {
|
||||
static millis_t next_idle_ms = millis() + 200UL;
|
||||
thermalManager.manage_heater(); // This returns immediately if not really needed.
|
||||
if (ELAPSED(millis(), next_idle_ms)) {
|
||||
|
@@ -505,8 +505,8 @@ class Planner {
|
||||
/**
|
||||
* Get the index of the next / previous block in the ring buffer
|
||||
*/
|
||||
static int8_t next_block_index(int8_t block_index) { return BLOCK_MOD(block_index + 1); }
|
||||
static int8_t prev_block_index(int8_t block_index) { return BLOCK_MOD(block_index - 1); }
|
||||
static int8_t next_block_index(const int8_t block_index) { return BLOCK_MOD(block_index + 1); }
|
||||
static int8_t prev_block_index(const int8_t block_index) { return BLOCK_MOD(block_index - 1); }
|
||||
|
||||
/**
|
||||
* Calculate the distance (not time) it takes to accelerate
|
||||
|
@@ -409,8 +409,7 @@ void Stepper::isr() {
|
||||
// If there is no current block, attempt to pop one from the buffer
|
||||
if (!current_block) {
|
||||
// Anything in the buffer?
|
||||
current_block = planner.get_current_block();
|
||||
if (current_block) {
|
||||
if ((current_block = planner.get_current_block())) {
|
||||
trapezoid_generator_reset();
|
||||
|
||||
// Initialize Bresenham counters to 1/2 the ceiling
|
||||
|
Reference in New Issue
Block a user