Skip to content

Commit

Permalink
move foamcutter pin changes to top
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jun 18, 2022
1 parent 05979c2 commit 13a4382
Showing 1 changed file with 29 additions and 37 deletions.
66 changes: 29 additions & 37 deletions Marlin/src/pins/ramps/pins_RAMPS.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,31 @@
#define SERVO3_PIN 4
#endif

//
// Foam Cutter requirements
//

#if ENABLED(FOAMCUTTER_XYUV)
#ifndef MOSFET_C_PIN
#define MOSFET_C_PIN -1
#endif
#if HAS_CUTTER && !defined(SPINDLE_LASER_ENA_PIN) && NUM_SERVOS < 2
#define SPINDLE_LASER_PWM_PIN 8 // Hardware PWM
#endif
#ifndef Z_MIN_PIN
#define Z_MIN_PIN -1
#endif
#ifndef Z_MAX_PIN
#define Z_MAX_PIN -1
#endif
#ifndef I_STOP_PIN
#define I_STOP_PIN 42 // or 18
#endif
#ifndef J_STOP_PIN
#define J_STOP_PIN 40 // or 19
#endif
#endif

//
// Limit Switches
//
Expand All @@ -99,37 +124,10 @@
#endif
#ifndef Z_STOP_PIN
#ifndef Z_MIN_PIN
#if ENABLED(FOAMCUTTER_XYUV)
#define Z_MIN_PIN -1
#else
#define Z_MIN_PIN 18
#endif
#define Z_MIN_PIN 18
#endif
#ifndef Z_MAX_PIN
#if ENABLED(FOAMCUTTER_XYUV)
#define Z_MAX_PIN -1
#else
#define Z_MAX_PIN 19
#endif
#endif
#endif

#if ENABLED(FOAMCUTTER_XYUV)
#ifndef I_STOP_PIN
#ifndef I_MIN_PIN
#define I_MIN_PIN 42
#endif
#ifndef I_MAX_PIN
#define I_MAX_PIN 40
#endif
#endif
#ifndef J_STOP_PIN
#ifndef J_MIN_PIN
#define J_MIN_PIN 18
#endif
#ifndef J_MAX_PIN
#define J_MAX_PIN 19
#endif
#define Z_MAX_PIN 19
#endif
#endif

Expand Down Expand Up @@ -226,11 +224,7 @@
#define MOSFET_B_PIN 9
#endif
#ifndef MOSFET_C_PIN
#if ENABLED(FOAMCUTTER_XYUV)
#define MOSFET_C_PIN -1
#else
#define MOSFET_C_PIN 8
#endif
#define MOSFET_C_PIN 8
#endif
#ifndef MOSFET_D_PIN
#define MOSFET_D_PIN -1
Expand Down Expand Up @@ -303,9 +297,7 @@
#if HAS_CUTTER && !defined(SPINDLE_LASER_ENA_PIN)
#if NUM_SERVOS < 2 // Use servo connector if possible
#define SPINDLE_LASER_ENA_PIN 4 // Pullup or pulldown!
#if ENABLED(FOAMCUTTER_XYUV)
#define SPINDLE_LASER_PWM_PIN 8 // Hardware PWM
#else
#ifndef SPINDLE_LASER_PWM_PIN
#define SPINDLE_LASER_PWM_PIN 6 // Hardware PWM
#endif
#define SPINDLE_DIR_PIN 5
Expand Down

0 comments on commit 13a4382

Please sign in to comment.