Enhance print cancelling behaviour
This commit is contained in:
parent
7c05040274
commit
4dd8c5df0d
|
@ -465,9 +465,19 @@ void AnycubicTFTClass::StateHandler()
|
||||||
#ifdef ANYCUBIC_TFT_DEBUG
|
#ifdef ANYCUBIC_TFT_DEBUG
|
||||||
SERIAL_ECHOLNPGM("TFT Serial Debug: SD print stopped... J16");
|
SERIAL_ECHOLNPGM("TFT Serial Debug: SD print stopped... J16");
|
||||||
#endif
|
#endif
|
||||||
if((current_position[Z_AXIS]>200)) enqueue_and_echo_commands_P(PSTR("G91\nG1 Z2 F240\nG90"));
|
if((current_position[Z_AXIS]>200)){
|
||||||
if((current_position[Z_AXIS]<200)) enqueue_and_echo_commands_P(PSTR("G91\nG1 Z5 F240\nG90"));
|
enqueue_and_echo_commands_P(PSTR("G91"));
|
||||||
if((current_position[Z_AXIS]<150)) enqueue_and_echo_commands_P(PSTR("G91\nG1 Z45 F240\nG90"));
|
enqueue_and_echo_commands_P(PSTR("G1 Z1 F240"));
|
||||||
|
enqueue_and_echo_commands_P(PSTR("G90"));
|
||||||
|
} else if ((current_position[Z_AXIS]<190)){
|
||||||
|
enqueue_and_echo_commands_P(PSTR("G91"));
|
||||||
|
enqueue_and_echo_commands_P(PSTR("G1 Z15 F240"));
|
||||||
|
enqueue_and_echo_commands_P(PSTR("G90"));
|
||||||
|
} else if ((current_position[Z_AXIS]<150)){
|
||||||
|
enqueue_and_echo_commands_P(PSTR("G91"));
|
||||||
|
enqueue_and_echo_commands_P(PSTR("G1 Z50 F240"));
|
||||||
|
enqueue_and_echo_commands_P(PSTR("G90"));
|
||||||
|
}
|
||||||
enqueue_and_echo_commands_P(PSTR("M84"));
|
enqueue_and_echo_commands_P(PSTR("M84"));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue