Automatically disable steppers after stopping the print.
This commit is contained in:
@@ -41,10 +41,10 @@
|
|||||||
* here we define this default string as the date where the latest release
|
* here we define this default string as the date where the latest release
|
||||||
* version was tagged.
|
* version was tagged.
|
||||||
*/
|
*/
|
||||||
#define CUSTOM_BUILD_VERSION "1.4.1"
|
#define CUSTOM_BUILD_VERSION "1.4.2"
|
||||||
|
|
||||||
#ifndef STRING_DISTRIBUTION_DATE
|
#ifndef STRING_DISTRIBUTION_DATE
|
||||||
#define STRING_DISTRIBUTION_DATE "2022-02-09"
|
#define STRING_DISTRIBUTION_DATE "2022-02-13"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -498,22 +498,17 @@ void AnycubicTouchscreenClass::PausePrint() {
|
|||||||
inline void AnycubicTouchscreenClass::StopPrint()
|
inline void AnycubicTouchscreenClass::StopPrint()
|
||||||
{
|
{
|
||||||
card.abortFilePrintSoon();
|
card.abortFilePrintSoon();
|
||||||
|
|
||||||
#ifdef ANYCUBIC_TFT_DEBUG
|
#ifdef ANYCUBIC_TFT_DEBUG
|
||||||
SERIAL_ECHOLNPGM("DEBUG: Stopped and cleared");
|
SERIAL_ECHOLNPGM("DEBUG: Stopped and cleared");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
print_job_timer.stop();
|
|
||||||
thermalManager.disable_all_heaters();
|
|
||||||
thermalManager.zero_fan_speeds();
|
|
||||||
|
|
||||||
ai3m_pause_state = 0;
|
ai3m_pause_state = 0;
|
||||||
#ifdef ANYCUBIC_TFT_DEBUG
|
#ifdef ANYCUBIC_TFT_DEBUG
|
||||||
SERIAL_ECHOPGM("DEBUG: AI3M Pause State: ", ai3m_pause_state);
|
SERIAL_ECHOPGM("DEBUG: AI3M Pause State: ", ai3m_pause_state);
|
||||||
SERIAL_EOL();
|
SERIAL_EOL();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
IsParked = true;
|
|
||||||
TFTstate = ANYCUBIC_TFT_STATE_SDSTOP_REQ;
|
TFTstate = ANYCUBIC_TFT_STATE_SDSTOP_REQ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -588,21 +583,14 @@ void AnycubicTouchscreenClass::ReheatNozzle() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AnycubicTouchscreenClass::ParkAfterStop(){
|
void AnycubicTouchscreenClass::ParkAfterStop(){
|
||||||
// only park the nozzle if homing was done before
|
|
||||||
if (!homing_needed_error()) {
|
print_job_timer.stop();
|
||||||
// raize nozzle by 25mm respecting Z_MAX_POS
|
thermalManager.disable_all_heaters();
|
||||||
do_blocking_move_to_z(_MIN(current_position[Z_AXIS] + 25, Z_MAX_POS), 5);
|
thermalManager.zero_fan_speeds();
|
||||||
#ifdef ANYCUBIC_TFT_DEBUG
|
|
||||||
SERIAL_ECHOLNPGM("DEBUG: SDSTOP: Park Z");
|
|
||||||
#endif
|
|
||||||
// move bed and hotend to park position
|
|
||||||
do_blocking_move_to_xy((X_MIN_POS + 10), (Y_MAX_POS - 10), 100);
|
|
||||||
#ifdef ANYCUBIC_TFT_DEBUG
|
|
||||||
SERIAL_ECHOLNPGM("DEBUG: SDSTOP: Park XY");
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
queue.enqueue_now_P(PSTR("M84")); // disable stepper motors
|
queue.enqueue_now_P(PSTR("M84")); // disable stepper motors
|
||||||
queue.enqueue_now_P(PSTR("M27")); // force report of SD status
|
queue.enqueue_now_P(PSTR("M27")); // force report of SD status
|
||||||
|
|
||||||
ai3m_pause_state = 0;
|
ai3m_pause_state = 0;
|
||||||
#ifdef ANYCUBIC_TFT_DEBUG
|
#ifdef ANYCUBIC_TFT_DEBUG
|
||||||
SERIAL_ECHOPGM("DEBUG: AI3M Pause State: ", ai3m_pause_state);
|
SERIAL_ECHOPGM("DEBUG: AI3M Pause State: ", ai3m_pause_state);
|
||||||
|
Reference in New Issue
Block a user