mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-23 12:04:19 +00:00
disable / enable_all_steppers functions
This commit is contained in:
parent
713953d8c1
commit
b98ebd517e
@ -179,6 +179,9 @@ void manage_inactivity(bool ignore_stepper_queue=false);
|
||||
#define disable_e3() /* nothing */
|
||||
#endif
|
||||
|
||||
void enable_all_steppers();
|
||||
void disable_all_steppers();
|
||||
|
||||
enum AxisEnum {X_AXIS=0, Y_AXIS=1, A_AXIS=0, B_AXIS=1, Z_AXIS=2, E_AXIS=3, X_HEAD=4, Y_HEAD=5};
|
||||
//X_HEAD and Y_HEAD is used for systems that don't have a 1:1 relationship between X_AXIS and X Head movement, like CoreXY bots.
|
||||
|
||||
|
@ -2569,13 +2569,7 @@ inline void gcode_G92() {
|
||||
*/
|
||||
inline void gcode_M17() {
|
||||
LCD_MESSAGEPGM(MSG_NO_MOVE);
|
||||
enable_x();
|
||||
enable_y();
|
||||
enable_z();
|
||||
enable_e0();
|
||||
enable_e1();
|
||||
enable_e2();
|
||||
enable_e3();
|
||||
enable_all_steppers();
|
||||
}
|
||||
|
||||
#ifdef SDSUPPORT
|
||||
@ -5695,7 +5689,17 @@ void handle_status_leds(void) {
|
||||
}
|
||||
#endif
|
||||
|
||||
void disable_all_axes() {
|
||||
void enable_all_steppers() {
|
||||
enable_x();
|
||||
enable_y();
|
||||
enable_z();
|
||||
enable_e0();
|
||||
enable_e1();
|
||||
enable_e2();
|
||||
enable_e3();
|
||||
}
|
||||
|
||||
void disable_all_steppers() {
|
||||
disable_x();
|
||||
disable_y();
|
||||
disable_z();
|
||||
@ -5723,7 +5727,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
|
||||
|
||||
if (stepper_inactive_time && ms > previous_millis_cmd + stepper_inactive_time
|
||||
&& !ignore_stepper_queue && !blocks_queued())
|
||||
disable_all_axes();
|
||||
disable_all_steppers();
|
||||
|
||||
#ifdef CHDK //Check if pin should be set to LOW after M240 set it to HIGH
|
||||
if (chdkActive && ms > chdkHigh + CHDK_DELAY) {
|
||||
@ -5811,7 +5815,7 @@ void kill()
|
||||
cli(); // Stop interrupts
|
||||
disable_heater();
|
||||
|
||||
disable_all_axes();
|
||||
disable_all_steppers();
|
||||
|
||||
#if HAS_POWER_SWITCH
|
||||
pinMode(PS_ON_PIN, INPUT);
|
||||
|
@ -614,7 +614,7 @@ float junction_deviation = 0.1;
|
||||
#if EXTRUDERS > 1
|
||||
case 1:
|
||||
enable_e1();
|
||||
g_uc_extruder_last_move[1] = BLOCK_BUFFER_SIZE*2;
|
||||
g_uc_extruder_last_move[1] = BLOCK_BUFFER_SIZE * 2;
|
||||
if (g_uc_extruder_last_move[0] == 0) disable_e0();
|
||||
#if EXTRUDERS > 2
|
||||
if (g_uc_extruder_last_move[2] == 0) disable_e2();
|
||||
@ -626,7 +626,7 @@ float junction_deviation = 0.1;
|
||||
#if EXTRUDERS > 2
|
||||
case 2:
|
||||
enable_e2();
|
||||
g_uc_extruder_last_move[2] = BLOCK_BUFFER_SIZE*2;
|
||||
g_uc_extruder_last_move[2] = BLOCK_BUFFER_SIZE * 2;
|
||||
if (g_uc_extruder_last_move[0] == 0) disable_e0();
|
||||
if (g_uc_extruder_last_move[1] == 0) disable_e1();
|
||||
#if EXTRUDERS > 3
|
||||
@ -636,7 +636,7 @@ float junction_deviation = 0.1;
|
||||
#if EXTRUDERS > 3
|
||||
case 3:
|
||||
enable_e3();
|
||||
g_uc_extruder_last_move[3] = BLOCK_BUFFER_SIZE*2;
|
||||
g_uc_extruder_last_move[3] = BLOCK_BUFFER_SIZE * 2;
|
||||
if (g_uc_extruder_last_move[0] == 0) disable_e0();
|
||||
if (g_uc_extruder_last_move[1] == 0) disable_e1();
|
||||
if (g_uc_extruder_last_move[2] == 0) disable_e2();
|
||||
|
@ -1127,13 +1127,7 @@ long st_get_position(uint8_t axis) {
|
||||
|
||||
void finishAndDisableSteppers() {
|
||||
st_synchronize();
|
||||
disable_x();
|
||||
disable_y();
|
||||
disable_z();
|
||||
disable_e0();
|
||||
disable_e1();
|
||||
disable_e2();
|
||||
disable_e3();
|
||||
disable_all_steppers();
|
||||
}
|
||||
|
||||
void quickStop() {
|
||||
|
@ -1051,13 +1051,7 @@ void setWatch() {
|
||||
thermal_runaway = true;
|
||||
for (;;) {
|
||||
disable_heater();
|
||||
disable_x();
|
||||
disable_y();
|
||||
disable_z();
|
||||
disable_e0();
|
||||
disable_e1();
|
||||
disable_e2();
|
||||
disable_e3();
|
||||
disable_all_steppers();
|
||||
manage_heater();
|
||||
lcd_update();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user