Skip to content

Commit 3652f24

Browse files
committed
INIT_CUSTOM_USER_BUTTON_PINS(N) macro and USER_GCODE_PIN_INIT_n removed; USER_GCODE_PIN_n will always be initiated
1 parent d5899a2 commit 3652f24

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

Marlin/Configuration_adv.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3204,39 +3204,34 @@
32043204
#define USER_GCODE_1 "G28\nG29 W"
32053205
//#define USER_GCODE_PIN_1 -1 // PIN assigned to trigger USER_GCODE_1 execution
32063206
#ifdef USER_GCODE_PIN_1
3207-
#define USER_GCODE_PIN_INIT_1 // Init the PIN state at reboot
32083207
#define USER_GCODE_PIN_STATE_1 LOW // What state should trigger USER_GCODE_1 execution (LOW or HIGH)
32093208
#endif
32103209

32113210
#define USER_DESC_2 "Preheat for " PREHEAT_1_LABEL
32123211
#define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
32133212
//#define USER_GCODE_PIN_2 -1 // PIN assigned to trigger USER_GCODE_2 execution
32143213
#ifdef USER_GCODE_PIN_2
3215-
#define USER_GCODE_PIN_INIT_2 // Init the PIN state at reboot
32163214
#define USER_GCODE_PIN_STATE_2 LOW // What state should trigger USER_GCODE_2 execution (LOW or HIGH)
32173215
#endif
32183216

32193217
#define USER_DESC_3 "Preheat for " PREHEAT_2_LABEL
32203218
#define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
32213219
//#define USER_GCODE_PIN_3 -1 // PIN assigned to trigger USER_GCODE_3 execution
32223220
#ifdef USER_GCODE_PIN_3
3223-
#define USER_GCODE_PIN_INIT_3 // Init the PIN state at reboot
32243221
#define USER_GCODE_PIN_STATE_3 LOW // What state should trigger USER_GCODE_3 execution (LOW or HIGH)
32253222
#endif
32263223

32273224
#define USER_DESC_4 "Heat Bed/Home/Level"
32283225
#define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"
32293226
//#define USER_GCODE_PIN_4 -1 // PIN assigned to trigger USER_GCODE_4 execution
32303227
#ifdef USER_GCODE_PIN_4
3231-
#define USER_GCODE_PIN_INIT_4 // Init the PIN state at reboot
32323228
#define USER_GCODE_PIN_STATE_4 LOW // What state should trigger USER_GCODE_4 execution (LOW or HIGH)
32333229
#endif
32343230

32353231
#define USER_DESC_5 "Home & Info"
32363232
#define USER_GCODE_5 "G28\nM503"
32373233
//#define USER_GCODE_PIN_5 -1 // PIN assigned to trigger USER_GCODE_5 execution
32383234
#ifdef USER_GCODE_PIN_5
3239-
#define USER_GCODE_PIN_INIT_5 // Init the PIN state at reboot
32403235
#define USER_GCODE_PIN_STATE_5 LOW // What state should trigger USER_GCODE_5 execution (LOW or HIGH)
32413236
#endif
32423237
#endif

Marlin/src/MarlinCore.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,6 @@ void setup() {
12441244
#endif
12451245

12461246
#if HAS_CUSTOM_USER_BUTTONS
1247-
#define INIT_CUSTOM_USER_BUTTON_PINS(N) (PIN_EXISTS(USER_GCODE_PIN_##N) && ENABLED(USER_GCODE_PIN_INIT_##N) && defined(USER_GCODE_PIN_STATE_##N))
12481247
#define INIT_CUSTOM_USER_BUTTON_PIN(N) do{ SET_INPUT(USER_GCODE_PIN_##N); WRITE(USER_GCODE_PIN_##N, !USER_GCODE_PIN_STATE_##N); }while(0)
12491248

12501249
#if HAS_CUSTOM_USER_BUTTON(1)

0 commit comments

Comments
 (0)