|
@@ -130,6 +130,10 @@ float extruder_advance_K = LIN_ADVANCE_K;
|
|
|
float position_float[NUM_AXIS];
|
|
|
#endif
|
|
|
|
|
|
+
|
|
|
+static bool plan_reset_next_e_queue;
|
|
|
+static bool plan_reset_next_e_sched;
|
|
|
+
|
|
|
|
|
|
|
|
|
static inline int8_t next_block_index(int8_t block_index) {
|
|
@@ -441,6 +445,8 @@ void plan_init() {
|
|
|
previous_speed[2] = 0.0;
|
|
|
previous_speed[3] = 0.0;
|
|
|
previous_nominal_speed = 0.0;
|
|
|
+ plan_reset_next_e_queue = false;
|
|
|
+ plan_reset_next_e_sched = false;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -658,6 +664,9 @@ void planner_abort_hard()
|
|
|
previous_speed[2] = 0.0;
|
|
|
previous_speed[3] = 0.0;
|
|
|
|
|
|
+ plan_reset_next_e_queue = false;
|
|
|
+ plan_reset_next_e_sched = false;
|
|
|
+
|
|
|
|
|
|
waiting_inside_plan_buffer_line_print_aborted = true;
|
|
|
}
|
|
@@ -721,6 +730,20 @@ void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate
|
|
|
|
|
|
block->gcode_feedrate = feedrate;
|
|
|
|
|
|
+
|
|
|
+ if (plan_reset_next_e_queue)
|
|
|
+ {
|
|
|
+ position[E_AXIS] = 0;
|
|
|
+#ifdef LIN_ADVANCE
|
|
|
+ position_float[E_AXIS] = 0;
|
|
|
+#endif
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ plan_reset_next_e_queue = false;
|
|
|
+ plan_reset_next_e_sched = true;
|
|
|
+ }
|
|
|
+
|
|
|
#ifdef ENABLE_AUTO_BED_LEVELING
|
|
|
apply_rotation_xyz(plan_bed_level_matrix, x, y, z);
|
|
|
#endif
|
|
@@ -1165,6 +1188,13 @@ Having the real displacement of the head, we can calculate the total movement le
|
|
|
|
|
|
block->flag = 0;
|
|
|
|
|
|
+ if (plan_reset_next_e_sched)
|
|
|
+ {
|
|
|
+
|
|
|
+ block->flag |= BLOCK_FLAG_E_RESET;
|
|
|
+ plan_reset_next_e_sched = false;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
float vmax_junction;
|
|
|
|
|
@@ -1367,6 +1397,11 @@ void plan_set_e_position(const float &e)
|
|
|
st_set_e_position(position[E_AXIS]);
|
|
|
}
|
|
|
|
|
|
+void plan_reset_next_e()
|
|
|
+{
|
|
|
+ plan_reset_next_e_queue = true;
|
|
|
+}
|
|
|
+
|
|
|
#ifdef PREVENT_DANGEROUS_EXTRUDE
|
|
|
void set_extrude_min_temp(float temp)
|
|
|
{
|