Sfoglia il codice sorgente

Add Z_AFTER_DEACTIVATE to account for gravity (#18906)

swissnorp 4 anni fa
parent
commit
4856ac5028
Nessun account collegato all'indirizzo email del committer

+ 3
- 3
Marlin/Configuration.h Vedi File

@@ -1076,18 +1076,18 @@
1076 1076
 #define Z_ENABLE_ON 0
1077 1077
 #define E_ENABLE_ON 0 // For all extruders
1078 1078
 
1079
-// Disables axis stepper immediately when it's not being used.
1079
+// Disable axis steppers immediately when they're not being stepped.
1080 1080
 // WARNING: When motors turn off there is a chance of losing position accuracy!
1081 1081
 #define DISABLE_X false
1082 1082
 #define DISABLE_Y false
1083 1083
 #define DISABLE_Z false
1084 1084
 
1085
-// Warn on display about possibly reduced accuracy
1085
+// Turn off the display blinking that warns about possible accuracy reduction
1086 1086
 //#define DISABLE_REDUCED_ACCURACY_WARNING
1087 1087
 
1088 1088
 // @section extruder
1089 1089
 
1090
-#define DISABLE_E false             // For all extruders
1090
+#define DISABLE_E false             // Disable the extruder when not stepping
1091 1091
 #define DISABLE_INACTIVE_EXTRUDER   // Keep only the active extruder enabled
1092 1092
 
1093 1093
 // @section machine

+ 15
- 9
Marlin/Configuration_adv.h Vedi File

@@ -809,24 +809,30 @@
809 809
 #define INVERT_Z_STEP_PIN false
810 810
 #define INVERT_E_STEP_PIN false
811 811
 
812
-// Default stepper release if idle. Set to 0 to deactivate.
813
-// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
814
-// Time can be set by M18 and M84.
812
+/**
813
+ * Idle Stepper Shutdown
814
+ * Set DISABLE_INACTIVE_? 'true' to shut down axis steppers after an idle period.
815
+ * The Deactive Time can be overridden with M18 and M84. Set to 0 for No Timeout.
816
+ */
815 817
 #define DEFAULT_STEPPER_DEACTIVE_TIME 120
816 818
 #define DISABLE_INACTIVE_X true
817 819
 #define DISABLE_INACTIVE_Y true
818
-#define DISABLE_INACTIVE_Z true  // Set to false if the nozzle will fall down on your printed part when print has finished.
820
+#define DISABLE_INACTIVE_Z true  // Set 'false' if the nozzle could fall onto your printed part!
819 821
 #define DISABLE_INACTIVE_E true
820 822
 
821
-#define DEFAULT_MINIMUMFEEDRATE       0.0     // minimum feedrate
822
-#define DEFAULT_MINTRAVELFEEDRATE     0.0
823
+// If the Nozzle or Bed falls when the Z stepper is disabled, set its resting position here.
824
+//#define Z_AFTER_DEACTIVATE Z_HOME_POS
823 825
 
824 826
 //#define HOME_AFTER_DEACTIVATE  // Require rehoming after steppers are deactivated
825 827
 
826
-// Minimum time that a segment needs to take if the buffer is emptied
827
-#define DEFAULT_MINSEGMENTTIME        20000   // (µs)
828
+// Minimum time that a segment needs to take as the buffer gets emptied
829
+#define DEFAULT_MINSEGMENTTIME        20000   // (µs) Set with M205 B.
830
+
831
+// Default Minimum Feedrates for printing and travel moves
832
+#define DEFAULT_MINIMUMFEEDRATE       0.0     // (mm/s) Minimum feedrate. Set with M205 S.
833
+#define DEFAULT_MINTRAVELFEEDRATE     0.0     // (mm/s) Minimum travel feedrate. Set with M205 T.
828 834
 
829
-// Slow down the machine if the look ahead buffer is (by default) half full.
835
+// Slow down the machine if the lookahead buffer is (by default) half full.
830 836
 // Increase the slowdown divisor for larger buffer sizes.
831 837
 #define SLOWDOWN
832 838
 #if ENABLED(SLOWDOWN)

+ 3
- 10
Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp Vedi File

@@ -819,16 +819,9 @@ void ST7920_Lite_Status_Screen::update_status_or_position(bool forceUpdate) {
819 819
     }
820 820
 
821 821
     if (countdown == 0 && (forceUpdate || position_changed()
822
-      #if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
823
-        || blink_changed()
824
-      #endif
825
-    )) {
826
-      draw_position(current_position, true
827
-        #if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
828
-          && all_axes_known()
829
-        #endif
830
-      );
831
-    }
822
+      || TERN(DISABLE_REDUCED_ACCURACY_WARNING, 0, blink_changed())
823
+    ))
824
+      draw_position(current_position, TERN(DISABLE_REDUCED_ACCURACY_WARNING, 0, all_axes_known()));
832 825
   #endif
833 826
 }
834 827
 

+ 5
- 2
Marlin/src/module/planner.cpp Vedi File

@@ -1281,7 +1281,7 @@ void Planner::recalculate() {
1281 1281
 void Planner::check_axes_activity() {
1282 1282
 
1283 1283
   #if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_E)
1284
-    xyze_bool_t axis_active = { false };
1284
+    xyze_bool_t axis_active = { true, true, true, true };
1285 1285
   #endif
1286 1286
 
1287 1287
   #if HAS_FAN
@@ -1316,7 +1316,10 @@ void Planner::check_axes_activity() {
1316 1316
     #if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_E)
1317 1317
       for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) {
1318 1318
         block_t *block = &block_buffer[b];
1319
-        LOOP_XYZE(i) if (block->steps[i]) axis_active[i] = true;
1319
+        if (ENABLED(DISABLE_X) && block->steps[X_AXIS]) axis_active[X_AXIS] = true;
1320
+        if (ENABLED(DISABLE_Y) && block->steps[Y_AXIS]) axis_active[Y_AXIS] = true;
1321
+        if (ENABLED(DISABLE_Z) && block->steps[Z_AXIS]) axis_active[Z_AXIS] = true;
1322
+        if (ENABLED(DISABLE_E) && block->steps[E_AXIS]) axis_active[E_AXIS] = true;
1320 1323
       }
1321 1324
     #endif
1322 1325
   }

+ 7
- 1
Marlin/src/module/stepper/indirection.h Vedi File

@@ -848,7 +848,13 @@ void reset_stepper_drivers();    // Called by settings.load / settings.reset
848 848
 #define DISABLE_AXIS_Y() do{ DISABLE_STEPPER_Y(); DISABLE_STEPPER_Y2(); CBI(axis_known_position, Y_AXIS); }while(0)
849 849
 
850 850
 #define  ENABLE_AXIS_Z() do{ ENABLE_STEPPER_Z();  ENABLE_STEPPER_Z2();  ENABLE_STEPPER_Z3();  ENABLE_STEPPER_Z4(); }while(0)
851
-#define DISABLE_AXIS_Z() do{ DISABLE_STEPPER_Z(); DISABLE_STEPPER_Z2(); DISABLE_STEPPER_Z3(); DISABLE_STEPPER_Z4(); CBI(axis_known_position, Z_AXIS); }while(0)
851
+
852
+#ifdef Z_AFTER_DEACTIVATE
853
+  #define Z_RESET() do{ current_position.z = Z_AFTER_DEACTIVATE; planner.sync_plan_position(); }while(0)
854
+#else
855
+  #define Z_RESET()
856
+#endif
857
+#define DISABLE_AXIS_Z() do{ DISABLE_STEPPER_Z(); DISABLE_STEPPER_Z2(); DISABLE_STEPPER_Z3(); DISABLE_STEPPER_Z4(); CBI(axis_known_position, Z_AXIS); Z_RESET(); }while(0)
852 858
 
853 859
 //
854 860
 // Extruder steppers enable / disable macros

Loading…
Annulla
Salva