disable / enable_all_steppers functions

2.0.x
Scott Lahteine 10 years ago
parent 713953d8c1
commit b98ebd517e

@ -179,6 +179,9 @@ void manage_inactivity(bool ignore_stepper_queue=false);
#define disable_e3() /* nothing */ #define disable_e3() /* nothing */
#endif #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}; 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. //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() { inline void gcode_M17() {
LCD_MESSAGEPGM(MSG_NO_MOVE); LCD_MESSAGEPGM(MSG_NO_MOVE);
enable_x(); enable_all_steppers();
enable_y();
enable_z();
enable_e0();
enable_e1();
enable_e2();
enable_e3();
} }
#ifdef SDSUPPORT #ifdef SDSUPPORT
@ -5695,7 +5689,17 @@ void handle_status_leds(void) {
} }
#endif #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_x();
disable_y(); disable_y();
disable_z(); 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 if (stepper_inactive_time && ms > previous_millis_cmd + stepper_inactive_time
&& !ignore_stepper_queue && !blocks_queued()) && !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 #ifdef CHDK //Check if pin should be set to LOW after M240 set it to HIGH
if (chdkActive && ms > chdkHigh + CHDK_DELAY) { if (chdkActive && ms > chdkHigh + CHDK_DELAY) {
@ -5811,7 +5815,7 @@ void kill()
cli(); // Stop interrupts cli(); // Stop interrupts
disable_heater(); disable_heater();
disable_all_axes(); disable_all_steppers();
#if HAS_POWER_SWITCH #if HAS_POWER_SWITCH
pinMode(PS_ON_PIN, INPUT); pinMode(PS_ON_PIN, INPUT);

@ -1127,13 +1127,7 @@ long st_get_position(uint8_t axis) {
void finishAndDisableSteppers() { void finishAndDisableSteppers() {
st_synchronize(); st_synchronize();
disable_x(); disable_all_steppers();
disable_y();
disable_z();
disable_e0();
disable_e1();
disable_e2();
disable_e3();
} }
void quickStop() { void quickStop() {

@ -1051,13 +1051,7 @@ void setWatch() {
thermal_runaway = true; thermal_runaway = true;
for (;;) { for (;;) {
disable_heater(); disable_heater();
disable_x(); disable_all_steppers();
disable_y();
disable_z();
disable_e0();
disable_e1();
disable_e2();
disable_e3();
manage_heater(); manage_heater();
lcd_update(); lcd_update();
} }

Loading…
Cancel
Save