Selaa lähdekoodia

Normalize load/unload length in M600

Thomas Moore 7 vuotta sitten
vanhempi
commit
4714fb8fcb
2 muutettua tiedostoa jossa 4 lisäystä ja 3 poistoa
  1. 2
    2
      Marlin/Marlin_main.cpp
  2. 2
    1
      Marlin/planner.cpp

+ 2
- 2
Marlin/Marlin_main.cpp Näytä tiedosto

6553
   #endif
6553
   #endif
6554
 
6554
 
6555
   void do_pause_e_move(const float &length, const float fr) {
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
     set_destination_from_current();
6557
     set_destination_from_current();
6558
     RUNPLAN(fr);
6558
     RUNPLAN(fr);
6559
     stepper.synchronize();
6559
     stepper.synchronize();
12962
           SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
12962
           SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
12963
         }
12963
         }
12964
         #if ENABLED(PREVENT_LENGTHY_EXTRUDE)
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
             current_position[E_AXIS] = destination[E_AXIS]; // Behave as if the move really took place, but ignore E part
12966
             current_position[E_AXIS] = destination[E_AXIS]; // Behave as if the move really took place, but ignore E part
12967
             SERIAL_ECHO_START();
12967
             SERIAL_ECHO_START();
12968
             SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP);
12968
             SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP);

+ 2
- 1
Marlin/planner.cpp Näytä tiedosto

736
         SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
736
         SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
737
       }
737
       }
738
       #if ENABLED(PREVENT_LENGTHY_EXTRUDE)
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
           position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part
741
           position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part
741
           de = 0; // no difference
742
           de = 0; // no difference
742
           #if ENABLED(LIN_ADVANCE)
743
           #if ENABLED(LIN_ADVANCE)

Loading…
Peruuta
Tallenna