Add kill action

Sends pre-defined string as action command when printer is kill.
This commit is contained in:
Ben Lye 2017-07-02 09:44:24 +01:00 committed by benlye
parent 395a9f59ac
commit c28749a567
27 changed files with 186 additions and 0 deletions

View File

@ -1268,6 +1268,13 @@
#define USER_GCODE_5 "G28\nM503"
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

View File

@ -12836,6 +12836,10 @@ void kill(const char* lcd_msg) {
_delay_ms(250); //Wait to ensure all interrupts routines stopped
thermalManager.disable_all_heaters(); //turn off heaters again
#if defined(ACTION_ON_KILL)
SERIAL_ECHOLNPGM("//action:" ACTION_ON_KILL);
#endif
#if HAS_POWER_SWITCH
SET_INPUT(PS_ON_PIN);
#endif

View File

@ -1268,6 +1268,13 @@
#define USER_GCODE_5 "G28\nM503"
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

View File

@ -1268,6 +1268,13 @@
#define USER_GCODE_5 "G28\nM503"
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

View File

@ -1261,6 +1261,13 @@
#define USER_GCODE_5 "G28\nM503"
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

View File

@ -1261,6 +1261,13 @@
//#define USER_GCODE_5 "G28\nM503"
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

View File

@ -1274,6 +1274,13 @@
//#define USER_GCODE_5 "G28\nM503"
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

View File

@ -1261,6 +1261,13 @@
//#define USER_GCODE_5 "G28\nM503"
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

View File

@ -1244,6 +1244,13 @@
//#define USER_GCODE_5 "G28\nM503"
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

View File

@ -1274,6 +1274,13 @@
//#define USER_GCODE_5 "G28\nM503"
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

View File

@ -1261,6 +1261,13 @@
//#define USER_GCODE_5 "G28\nM503"
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

View File

@ -1268,6 +1268,13 @@
#define USER_GCODE_5 "G28\nM503"
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

View File

@ -1261,6 +1261,13 @@
//#define USER_GCODE_5 "G28\nM503"
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

View File

@ -1261,6 +1261,13 @@
//#define USER_GCODE_5 "G28\nM503"
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

View File

@ -1261,6 +1261,13 @@
//#define USER_GCODE_5 "G28\nM503"
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

View File

@ -1264,6 +1264,13 @@
//#define USER_GCODE_5 "G28\nM503"
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

View File

@ -1261,6 +1261,13 @@
//#define USER_GCODE_5 "G28\nM503"
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

View File

@ -1266,6 +1266,13 @@
#define USER_GCODE_5 "G28\nM503"
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

View File

@ -1265,6 +1265,13 @@
#define USER_GCODE_5 "G28\nM503"
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

View File

@ -1263,6 +1263,13 @@
#define USER_GCODE_5 "G28\nM503"
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

View File

@ -1263,6 +1263,13 @@
#define USER_GCODE_5 "G28\nM503"
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

View File

@ -1268,6 +1268,13 @@
#define USER_GCODE_5 "G28\nM503"
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

View File

@ -1263,6 +1263,13 @@
//#define USER_GCODE_5 "G28\nM503"
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

View File

@ -1270,6 +1270,13 @@
//#define USER_GCODE_5 "G28\nM503"
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

View File

@ -1261,6 +1261,13 @@
//#define USER_GCODE_5 "G28\nM503"
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

View File

@ -1261,6 +1261,13 @@
//#define USER_GCODE_5 "G28\nM503"
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

View File

@ -1351,6 +1351,13 @@
#endif
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================