Add pause/resume actions on M600, M125

2.0.x
Scott Lahteine 7 years ago
parent f0a8a1a853
commit f704f405af

@ -1430,6 +1430,14 @@
*/
//#define ACTION_ON_KILL "poweroff"
/**
* Specify an action command to send to the host on pause and resume.
* Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_PAUSE "pause"
//#define ACTION_ON_RESUME "resume"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

@ -114,6 +114,10 @@ bool pause_print(const float &retract, const point_t &park_point, const float &u
) {
if (move_away_flag) return false; // already paused
#ifdef ACTION_ON_PAUSE
SERIAL_ECHOLNPGM("//action:" ACTION_ON_PAUSE);
#endif
if (!DEBUGGING(DRYRUN) && unload_length != 0) {
#if ENABLED(PREVENT_COLD_EXTRUSION)
if (!thermalManager.allow_cold_extrude &&
@ -342,6 +346,10 @@ void resume_print(const float &load_length/*=0*/, const float &initial_extrude_l
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
#endif
#ifdef ACTION_ON_RESUME
SERIAL_ECHOLNPGM("//action:" ACTION_ON_RESUME);
#endif
#if ENABLED(SDSUPPORT)
if (sd_print_paused) {
card.startFileprint();

Loading…
Cancel
Save