Ver código fonte

Normalize load/unload length in M600

Thomas Moore 6 anos atrás
pai
commit
4714fb8fcb
2 arquivos alterados com 4 adições e 3 exclusões
  1. 2
    2
      Marlin/Marlin_main.cpp
  2. 2
    1
      Marlin/planner.cpp

+ 2
- 2
Marlin/Marlin_main.cpp Ver arquivo

@@ -6553,7 +6553,7 @@ inline void gcode_M17() {
6553 6553
   #endif
6554 6554
 
6555 6555
   void do_pause_e_move(const float &length, const float fr) {
6556
-    current_position[E_AXIS] += length;
6556
+    current_position[E_AXIS] += length * 100.0 / flow_percentage[active_extruder] / volumetric_multiplier[active_extruder];
6557 6557
     set_destination_from_current();
6558 6558
     RUNPLAN(fr);
6559 6559
     stepper.synchronize();
@@ -12962,7 +12962,7 @@ void prepare_move_to_destination() {
12962 12962
           SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
12963 12963
         }
12964 12964
         #if ENABLED(PREVENT_LENGTHY_EXTRUDE)
12965
-          if (destination[E_AXIS] - current_position[E_AXIS] > EXTRUDE_MAXLENGTH) {
12965
+          if (fabs(destination[E_AXIS] - current_position[E_AXIS]) > EXTRUDE_MAXLENGTH / volumetric_multiplier[active_extruder]) {
12966 12966
             current_position[E_AXIS] = destination[E_AXIS]; // Behave as if the move really took place, but ignore E part
12967 12967
             SERIAL_ECHO_START();
12968 12968
             SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP);

+ 2
- 1
Marlin/planner.cpp Ver arquivo

@@ -736,7 +736,8 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
736 736
         SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
737 737
       }
738 738
       #if ENABLED(PREVENT_LENGTHY_EXTRUDE)
739
-        if (labs(de) > (int32_t)axis_steps_per_mm[E_AXIS_N] * (EXTRUDE_MAXLENGTH)) { // It's not important to get max. extrusion length in a precision < 1mm, so save some cycles and cast to int
739
+        int32_t de_mm = labs(de * volumetric_multiplier[active_extruder]);
740
+        if (de_mm > (int32_t)axis_steps_per_mm[E_AXIS_N] * (EXTRUDE_MAXLENGTH)) { // It's not important to get max. extrusion length in a precision < 1mm, so save some cycles and cast to int
740 741
           position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part
741 742
           de = 0; // no difference
742 743
           #if ENABLED(LIN_ADVANCE)

Carregando…
Cancelar
Salvar