Clean on trigger instead of split_first_move flag

master
Scott Lahteine 7 years ago
parent f30b774f26
commit 3b30cc90f1

@ -1719,7 +1719,6 @@ static void setup_for_endstop_or_probe_move() {
saved_feedrate_percentage = feedrate_percentage; saved_feedrate_percentage = feedrate_percentage;
feedrate_percentage = 100; feedrate_percentage = 100;
refresh_cmd_timeout(); refresh_cmd_timeout();
planner.split_first_move = false;
} }
static void clean_up_after_endstop_or_probe_move() { static void clean_up_after_endstop_or_probe_move() {
@ -1729,7 +1728,6 @@ static void clean_up_after_endstop_or_probe_move() {
feedrate_mm_s = saved_feedrate_mm_s; feedrate_mm_s = saved_feedrate_mm_s;
feedrate_percentage = saved_feedrate_percentage; feedrate_percentage = saved_feedrate_percentage;
refresh_cmd_timeout(); refresh_cmd_timeout();
planner.split_first_move = true;
} }
#if HAS_BED_PROBE #if HAS_BED_PROBE

@ -92,8 +92,6 @@ float Planner::max_feedrate_mm_s[XYZE_N], // Max speeds in mm per second
uint8_t Planner::last_extruder = 0; // Respond to extruder change uint8_t Planner::last_extruder = 0; // Respond to extruder change
#endif #endif
bool Planner::split_first_move = true;
int16_t Planner::flow_percentage[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(100); // Extrusion factor for each extruder int16_t Planner::flow_percentage[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(100); // Extrusion factor for each extruder
float Planner::e_factor[EXTRUDERS], // The flow percentage and volumetric multiplier combine to scale E movement float Planner::e_factor[EXTRUDERS], // The flow percentage and volumetric multiplier combine to scale E movement
@ -1441,7 +1439,7 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
position[E_AXIS] = target[E_AXIS]; position[E_AXIS] = target[E_AXIS];
// Always split the first move into two (if not homing or probing) // Always split the first move into two (if not homing or probing)
if (!blocks_queued() && split_first_move) { if (!blocks_queued()) {
#define _BETWEEN(A) (position[A##_AXIS] + target[A##_AXIS]) >> 1 #define _BETWEEN(A) (position[A##_AXIS] + target[A##_AXIS]) >> 1
const int32_t between[XYZE] = { _BETWEEN(X), _BETWEEN(Y), _BETWEEN(Z), _BETWEEN(E) }; const int32_t between[XYZE] = { _BETWEEN(X), _BETWEEN(Y), _BETWEEN(Z), _BETWEEN(E) };
DISABLE_STEPPER_DRIVER_INTERRUPT(); DISABLE_STEPPER_DRIVER_INTERRUPT();

@ -161,7 +161,6 @@ class Planner {
travel_acceleration, // Travel acceleration mm/s^2 DEFAULT ACCELERATION for all NON printing moves. M204 MXXXX travel_acceleration, // Travel acceleration mm/s^2 DEFAULT ACCELERATION for all NON printing moves. M204 MXXXX
max_jerk[XYZE], // The largest speed change requiring no acceleration max_jerk[XYZE], // The largest speed change requiring no acceleration
min_travel_feedrate_mm_s; min_travel_feedrate_mm_s;
static bool split_first_move;
#if HAS_LEVELING #if HAS_LEVELING
static bool leveling_active; // Flag that bed leveling is enabled static bool leveling_active; // Flag that bed leveling is enabled

@ -1255,6 +1255,7 @@ void Stepper::endstop_triggered(AxisEnum axis) {
#endif // !COREXY && !COREXZ && !COREYZ #endif // !COREXY && !COREXZ && !COREYZ
kill_current_block(); kill_current_block();
cleaning_buffer_counter = -(BLOCK_BUFFER_SIZE - 1); // Ignore remaining blocks
} }
void Stepper::report_positions() { void Stepper::report_positions() {

Loading…
Cancel
Save