Skip to content

Commit

Permalink
📌 Pins updates for Longer LK5, etc. (#25012)
Browse files Browse the repository at this point in the history
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
  • Loading branch information
ellensp and thinkyhead authored Dec 10, 2022
1 parent c16d365 commit 9949672
Show file tree
Hide file tree
Showing 15 changed files with 194 additions and 186 deletions.
2 changes: 2 additions & 0 deletions Marlin/src/pins/pins_postprocess.h
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,8 @@
#undef FIL_RUNOUT2_PIN
#endif

#undef LCD_PINS_DEFINED

#ifndef LCD_PINS_D4
#define LCD_PINS_D4 -1
#endif
Expand Down
27 changes: 8 additions & 19 deletions Marlin/src/pins/ramps/pins_3DRAG.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
#define MOSFET_C_PIN 9
#define MOSFET_D_PIN 12

#define HEATER_2_PIN 6

//
// Misc. Functions
//
Expand Down Expand Up @@ -122,29 +124,13 @@
#endif
#endif

#include "pins_RAMPS.h"

//
// Heaters / Fans
//
#define HEATER_2_PIN 6

#undef SD_DETECT_PIN
#define SD_DETECT_PIN 53

//
// LCD / Controller
//
#if HAS_WIRED_LCD && IS_NEWPANEL
#undef BEEPER_PIN

// TODO: Remap EXP1/2 based on adapter
#undef LCD_PINS_RS
#undef LCD_PINS_ENABLE
#undef LCD_PINS_D4
#undef LCD_PINS_D5
#undef LCD_PINS_D6
#undef LCD_PINS_D7
#define LCD_PINS_RS 27
#define LCD_PINS_ENABLE 29
#define LCD_PINS_D4 37
Expand All @@ -153,13 +139,12 @@
#define LCD_PINS_D7 31

// Buttons
#undef BTN_EN1
#undef BTN_EN2
#undef BTN_ENC
#define BTN_EN1 16
#define BTN_EN2 17
#define BTN_ENC 23

#define LCD_PINS_DEFINED

#else

#define BEEPER_PIN 33
Expand All @@ -171,3 +156,7 @@
#define BOARD_ST7920_DELAY_2 188
#define BOARD_ST7920_DELAY_3 0
#endif

#define SD_DETECT_PIN 53

#include "pins_RAMPS.h"
31 changes: 9 additions & 22 deletions Marlin/src/pins/ramps/pins_K8600.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
//
#define X_MIN_PIN 3
#define Y_MAX_PIN 14
#define Z_MAX_PIN 18
#define Z_MIN_PIN -1
#define Z_STOP_PIN 18

//
// Steppers
Expand All @@ -48,6 +47,7 @@
//
// Heaters / Fans
//
#define HEATER_BED_PIN -1
#define FAN_PIN 8

//
Expand All @@ -56,28 +56,11 @@
#define SDSS 25
#define CASE_LIGHT_PIN 7

//
// Other RAMPS pins
//
#include "pins_RAMPS.h"

//
// Heaters / Fans
//
#undef HEATER_BED_PIN

//
// LCD / Controller
//
#if HAS_WIRED_LCD && IS_NEWPANEL
#undef BEEPER_PIN

#undef LCD_PINS_RS
#undef LCD_PINS_ENABLE
#undef LCD_PINS_D4
#undef LCD_PINS_D5
#undef LCD_PINS_D6
#undef LCD_PINS_D7
#define LCD_PINS_RS 27
#define LCD_PINS_ENABLE 29
#define LCD_PINS_D4 37
Expand All @@ -86,15 +69,19 @@
#define LCD_PINS_D7 31

// Buttons
#undef BTN_EN1
#undef BTN_EN2
#undef BTN_ENC
#define BTN_EN1 17
#define BTN_EN2 16
#define BTN_ENC 23

#define LCD_PINS_DEFINED

#else

#define BEEPER_PIN 33

#endif

//
// Other RAMPS pins
//
#include "pins_RAMPS.h"
94 changes: 65 additions & 29 deletions Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,56 +33,68 @@
#endif

#if SERIAL_PORT == 1 || SERIAL_PORT_2 == 1 || SERIAL_PORT_3 == 1
#warning "Serial 1 is originally reserved to DGUS LCD."
#warning "Serial 1 is originally reserved for DGUS LCD."
#endif
#if SERIAL_PORT == 2 || SERIAL_PORT_2 == 2 || SERIAL_PORT_3 == 2 || LCD_SERIAL_PORT == 2
#warning "Serial 2 has no connector. Hardware changes may be required to use it."
#endif
#if SERIAL_PORT == 3 || SERIAL_PORT_2 == 3 || SERIAL_PORT_3 == 3 || LCD_SERIAL_PORT == 3
#define CHANGE_Y_LIMIT_PINS
#warning "Serial 3 is originally reserved to Y limit switches. Hardware changes are required to use it."
#warning "Serial 3 is originally reserved for Y limit switches. Hardware changes are required to use it."
#define Y_STOP_PIN 37
#if MB(LONGER3D_LKx_PRO)
#define Z_STOP_PIN 35
#endif
#endif

// Custom flags and defines for the build
//#define BOARD_CUSTOM_BUILD_FLAGS -D__FOO__

#define BOARD_INFO_NAME "LGT KIT V1.0"
#if ENABLED(LONGER_LK5)
#define DEFAULT_MACHINE_NAME "LONGER LK5"
#else
#define DEFAULT_MACHINE_NAME "LONGER 3D Printer"
#endif

//
// Servos
//
#if !MB(LONGER3D_LK1_PRO)
#if MB(LONGER3D_LKx_PRO)
#define SERVO0_PIN 7
#endif
#define SERVO1_PIN -1
#define SERVO2_PIN -1
#define SERVO3_PIN -1
#define SERVO1_PIN -1
#define SERVO2_PIN -1
#define SERVO3_PIN -1

//
// Limit Switches
//
#define X_STOP_PIN 3

#ifdef CHANGE_Y_LIMIT_PINS
#define Y_STOP_PIN 37
#if ENABLED(LONGER_LK5)
#define X_MIN_PIN 3
#define X_MAX_PIN 2
#else
#define Y_MIN_PIN 14
#define Y_MAX_PIN 15
#define X_STOP_PIN 3
#endif

#if !MB(LONGER3D_LK1_PRO)
#ifdef CHANGE_Y_LIMIT_PINS
#define Z_STOP_PIN 35
#if !ANY_PIN(Y_MIN, Y_MAX, Y_STOP)
#if ENABLED(LONGER_LK5)
#define Y_STOP_PIN 14
#else
#define Y_MIN_PIN 14
#define Y_MAX_PIN 15
#endif
#endif

#if !ANY_PIN(Z_MIN, Z_MAX, Z_STOP)
#if MB(LONGER3D_LKx_PRO)
#define Z_MIN_PIN 35
#define Z_MAX_PIN 37
#else
#define Z_MIN_PIN 11
#endif
#else
#define Z_MIN_PIN 11
#define Z_MAX_PIN 37
#endif

#undef CHANGE_Y_LIMIT_PINS
//
// Z Probe (when not Z_MIN_PIN)
//
#define Z_MIN_PROBE_PIN -1

//
// Steppers - No E1 pins
Expand All @@ -92,11 +104,6 @@
#define E1_ENABLE_PIN -1
#define E1_CS_PIN -1

//
// Z Probe (when not Z_MIN_PIN)
//
#define Z_MIN_PROBE_PIN -1

//
// Temperature Sensors
//
Expand All @@ -115,7 +122,36 @@
#define SD_DETECT_PIN 49
#define FIL_RUNOUT_PIN 2

// ------------------ ---------------- --------------- -------------
// Aux-1 | D19 D18 GND 5V | J21 | D4 D5 D6 GND | J17 | D11 GND 24V | J18 | D7 GND 5V |
// ------------------ ---------------- --------------- -------------

#if BOTH(CR10_STOCKDISPLAY, LONGER_LK5)
/** CR-10 Stock Display
* ------
* GND | 9 10 | 5V
* LCD_PINS_RS D5 | 7 8 | D4 LCD_PINS_ENABLE
* BTN_EN2 D19 | 5 6 D6 LCD_PINS_D4
* BTN_EN1 D18 | 3 4 | GND
* BEEPER_PIN D11 | 1 2 | D15 BTN_ENC
* ------
* Connected via provided custom cable to:
* Aux-1, J21, J17 and Y-Max.
*/
#define LCD_PINS_RS 5
#define LCD_PINS_ENABLE 4
#define LCD_PINS_D4 6
#define BTN_EN1 18
#define BTN_EN2 19
#define BTN_ENC 15
#define BEEPER_PIN 11

#define SDCARD_CONNECTION ONBOARD

#define LCD_PINS_DEFINED
#endif

//
// Other RAMPS 1.3 pins
//
#include "pins_RAMPS_13.h" // ... RAMPS
#include "pins_RAMPS_13.h" // ... pins_RAMPS.h
16 changes: 5 additions & 11 deletions Marlin/src/pins/ramps/pins_ORTUR_4.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,31 +75,25 @@
#define E0_SERIAL_RX_PIN 65
#endif

#include "pins_RAMPS.h"

//
// LCD / Controller
//
#if IS_RRD_FG_SC
#undef BEEPER_PIN
#define BEEPER_PIN 35

#undef LCD_PINS_RS
#undef LCD_PINS_ENABLE
#undef LCD_PINS_D4
#define LCD_PINS_RS 27
#define LCD_PINS_ENABLE 23
#define LCD_PINS_D4 37

#undef LCD_SDSS
#undef SD_DETECT_PIN
#define LCD_SDSS 53
#define SD_DETECT_PIN 49

#undef BTN_EN1
#undef BTN_EN2
#undef BTN_ENC
#define BTN_EN1 29
#define BTN_EN2 25
#define BTN_ENC 16

#define LCD_PINS_DEFINED

#endif

#include "pins_RAMPS.h"
Loading

1 comment on commit 9949672

@plampix
Copy link
Contributor

@plampix plampix commented on 9949672 Dec 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes seem to have disabled the rotary encoder on a Creality v1.1.4 board. The previous commit still worked fine. Neither the rotation, nor the click action is registered.

Just reverting this commit makes it work, so it is indeed in here, somewhere. Unfortunately I'm sick at the moment, and my brain just can't figure out where the error is.

Please sign in to comment.