File tree Expand file tree Collapse file tree 6 files changed +21
-18
lines changed
Expand file tree Collapse file tree 6 files changed +21
-18
lines changed Original file line number Diff line number Diff line change 10351035 // Enable this option and set to HIGH if your SD cards are incorrectly detected.
10361036 //#define SD_DETECT_STATE HIGH
10371037
1038- #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished
1039- #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the Z enabled so your bed stays in place.
1038+ #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished
1039+ #define SD_FINISHED_RELEASECOMMAND "M84" // Use "M84XYE" to keep Z enabled so your bed stays in place
10401040
10411041 // Reverse SD sort to show "more recent" files first, according to the card's FAT.
10421042 // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
Original file line number Diff line number Diff line change 2727#include " ../gcode.h"
2828#include " ../../module/printcounter.h"
2929
30+ #ifdef SD_FINISHED_RELEASECOMMAND
31+ #include " ../queue.h"
32+ #endif
33+
3034#if EITHER(LCD_SET_PROGRESS_MANUALLY, SD_REPRINT_LAST_SELECTED_FILE)
3135 #include " ../../lcd/ultralcd.h"
3236#endif
4751 #include " ../../feature/host_actions.h"
4852#endif
4953
50- #if ENABLED(SD_FINISHED_STEPPERRELEASE) && defined(SD_FINISHED_RELEASECOMMAND)
51- #include " ../../module/planner.h"
52- #endif
53-
5454#ifndef PE_LEDS_COMPLETED_TIME
5555 #define PE_LEDS_COMPLETED_TIME (30 *60 )
5656#endif
@@ -95,9 +95,9 @@ void GcodeSuite::M1001() {
9595 }
9696 #endif
9797
98- // Wait for the queue to empty (and "clean"), inject SD_FINISHED_RELEASECOMMAND
99- #if ENABLED(SD_FINISHED_STEPPERRELEASE) && defined( SD_FINISHED_RELEASECOMMAND)
100- planner. finish_and_disable ( );
98+ // Inject SD_FINISHED_RELEASECOMMAND, if any
99+ #ifdef SD_FINISHED_RELEASECOMMAND
100+ queue. inject_P ( PSTR (SD_FINISHED_RELEASECOMMAND) );
101101 #endif
102102
103103 // Re-select the last printed file in the UI
Original file line number Diff line number Diff line change 6868 #define HAS_FILAMENT_SENSOR 1
6969#endif
7070
71+ // Let SD_FINISHED_RELEASECOMMAND stand in for SD_FINISHED_STEPPERRELEASE
72+ #if ENABLED (SD_FINISHED_STEPPERRELEASE )
73+ #ifndef SD_FINISHED_RELEASECOMMAND )
74+ #define SD_FINISHED_RELEASECOMMAND "M84" // planner.finish_and_disable()
75+ #endif
76+ #else
77+ #undef SD_FINISHED_RELEASECOMMAND
78+ #endif
79+
7180#if EITHER (SDSUPPORT , LCD_SET_PROGRESS_MANUALLY )
7281 #define HAS_PRINT_PROGRESS 1
7382#endif
Original file line number Diff line number Diff line change @@ -1601,8 +1601,8 @@ void Planner::quick_stop() {
16011601 clear_block_buffer_runtime ();
16021602 #endif
16031603
1604- // Make sure to drop any attempt of queuing moves for at least 1 second
1605- cleaning_buffer_counter = 1000 ;
1604+ // Make sure to drop any attempt of queuing moves for 1 second
1605+ cleaning_buffer_counter = TEMP_TIMER_FREQUENCY ;
16061606
16071607 // Reenable Stepper ISR
16081608 if (was_enabled) stepper.wake_up ();
Original file line number Diff line number Diff line change @@ -807,12 +807,7 @@ class Planner {
807807 // Periodic tick to handle cleaning timeouts
808808 // Called from the Temperature ISR at ~1kHz
809809 static void tick () {
810- if (cleaning_buffer_counter) {
811- --cleaning_buffer_counter;
812- #if ENABLED(SD_FINISHED_STEPPERRELEASE) && defined(SD_FINISHED_RELEASECOMMAND)
813- if (!cleaning_buffer_counter) queue.inject_P (PSTR (SD_FINISHED_RELEASECOMMAND));
814- #endif
815- }
810+ if (cleaning_buffer_counter) --cleaning_buffer_counter;
816811 }
817812
818813 /* *
Original file line number Diff line number Diff line change @@ -47,7 +47,6 @@ class Probe {
4747
4848 static bool set_deployed (const bool deploy);
4949
50-
5150 #if IS_KINEMATIC
5251
5352 #if HAS_PROBE_XY_OFFSET
You can’t perform that action at this time.
0 commit comments