CUSTOM_USER_BUTTONS

MarlinFirmware/Marlin#18389
This commit is contained in:
Scott Lahteine 2021-03-01 07:48:52 -06:00
parent f5baf9b055
commit fc79e3428f
219 changed files with 6789 additions and 0 deletions

View file

@ -3379,6 +3379,37 @@
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/**
* User-defined buttons to run custom G-code.
* Up to 25 may be defined.
*/
//#define CUSTOM_USER_BUTTONS
#if ENABLED(CUSTOM_USER_BUTTONS)
//#define BUTTON1_PIN -1
#if PIN_EXISTS(BUTTON1_PIN)
#define BUTTON1_HIT_STATE LOW // State of the triggered button. NC=LOW. NO=HIGH.
#define BUTTON1_WHEN_PRINTING false // Button allowed to trigger during printing?
#define BUTTON1_GCODE "G28"
#define BUTTON1_DESC "Homing" // Optional string to set the LCD status
#endif
//#define BUTTON2_PIN -1
#if PIN_EXISTS(BUTTON2_PIN)
#define BUTTON2_HIT_STATE LOW
#define BUTTON2_WHEN_PRINTING false
#define BUTTON2_GCODE "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
#define BUTTON2_DESC "Preheat for " PREHEAT_1_LABEL
#endif
//#define BUTTON3_PIN -1
#if PIN_EXISTS(BUTTON3_PIN)
#define BUTTON3_HIT_STATE LOW
#define BUTTON3_WHEN_PRINTING false
#define BUTTON3_GCODE "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
#define BUTTON3_DESC "Preheat for " PREHEAT_2_LABEL
#endif
#endif
/**
* User-defined menu items to run custom G-code.
* Up to 25 may be defined, but the actual number is LCD-dependent.