Skip to content

Commit

Permalink
Allow more *_AUTO_FAN_PIN and CONTROLLER_FAN_PIN overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
thisiskeithb committed Jun 27, 2024
1 parent 1275fc9 commit dc6e3c3
Show file tree
Hide file tree
Showing 22 changed files with 64 additions and 32 deletions.
9 changes: 7 additions & 2 deletions Marlin/src/pins/esp32/pins_MKS_TINYBEE.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,13 @@
#define FAN1_PIN 148 // FAN2
#define HEATER_BED_PIN 144 // H-BED

//#define CONTROLLER_FAN_PIN 148 // FAN2
//#define E0_AUTO_FAN_PIN 148 // FAN2
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN FAN1_PIN // FAN2
#endif

#ifndef CONTROLLER_FAN_PIN
#define CONTROLLER_FAN_PIN FAN1_PIN // FAN2
#endif

//
// ADC Reference Voltage
Expand Down
6 changes: 1 addition & 5 deletions Marlin/src/pins/esp32/pins_MM_JOKER.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,7 @@
#define FAN0_PIN 143

#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN 142 // Enabled in Configuration_adv.h
#endif

#ifndef CONTROLLER_FAN_PIN
//#define CONTROLLER_FAN_PIN -1
#define E0_AUTO_FAN_PIN 142
#endif

#if ENABLED(JOKER_PLUS_2)
Expand Down
16 changes: 12 additions & 4 deletions Marlin/src/pins/esp32/pins_MRR_ESPE.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,20 @@
//
#define HEATER_0_PIN 145 // 2
#define FAN0_PIN 146 // 15
#define FAN1_PIN 149
#define HEATER_BED_PIN 144 // 4

#define CONTROLLER_FAN_PIN 147
//#define E0_AUTO_FAN_PIN 148 // need to update Configuration_adv.h @section extruder
//#define E1_AUTO_FAN_PIN 149 // need to update Configuration_adv.h @section extruder
#define FAN1_PIN 149
#ifndef CONTROLLER_FAN_PIN
#define CONTROLLER_FAN_PIN 147
#endif

#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN 148
#endif

#ifndef E1_AUTO_FAN_PIN
#define E1_AUTO_FAN_PIN FAN1_PIN
#endif

//
// MicroSD card
Expand Down
5 changes: 4 additions & 1 deletion Marlin/src/pins/gd32f1/pins_TRIGORILLA_V006.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@
#define FAN0_PIN PA0 // FAN
#define FAN1_PIN PA14 // Connected to +24V
#define FAN2_PIN -1 // PB1, auto fan for E0
#define CONTROLLER_FAN_PIN FAN1_PIN

#ifndef CONTROLLER_FAN_PIN
#define CONTROLLER_FAN_PIN FAN1_PIN
#endif

//
// Misc
Expand Down
5 changes: 4 additions & 1 deletion Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@
#define HEATER_BED_PIN P1_19 // Not a PWM pin, software PWM required
#define HEATER_0_PIN P3_26 // PWM1[3]
#define FAN0_PIN P3_25 // Part cooling fan - connected to PWM1[2]
#define E0_AUTO_FAN_PIN P0_27 // Extruder cooling fan

#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN P0_27 // Extruder cooling fan
#endif

//
// Misc. Functions
Expand Down
3 changes: 1 addition & 2 deletions Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,8 @@
//
// Auto fans
//
#define AUTO_FAN_PIN P1_22 // FET 3
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN P1_22 // FET 3
#endif

//
Expand Down
4 changes: 3 additions & 1 deletion Marlin/src/pins/mega/pins_SILVER_GATE.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@
#define E0_AUTO_FAN_PIN 3
#endif

#define CONTROLLER_FAN_PIN 2
#ifndef CONTROLLER_FAN_PIN
#define CONTROLLER_FAN_PIN 2
#endif

#define TEMP_0_PIN 7 // Analog Input

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
#define HEATER_7_PIN 11

#ifndef CONTROLLER_FAN_PIN
#define CONTROLLER_FAN_PIN 4 // Pin used for the fan to cool motherboard (-1 to disable)
#define CONTROLLER_FAN_PIN 4
#endif

//
Expand Down
5 changes: 4 additions & 1 deletion Marlin/src/pins/ramps/pins_K8800.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@
//
#define HEATER_0_PIN 10
#define FAN0_PIN 8
#define CONTROLLER_FAN_PIN 9

#ifndef CONTROLLER_FAN_PIN
#define CONTROLLER_FAN_PIN 9
#endif

//
// Misc. Functions
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/ramps/pins_TRIGORILLA_13.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#define FAN2_PIN 9

#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN 9
#define E0_AUTO_FAN_PIN FAN2_PIN
#endif

#include "pins_RAMPS_13.h" // ... RAMPS
4 changes: 3 additions & 1 deletion Marlin/src/pins/ramps/pins_TRIGORILLA_14.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@
#define Z_MIN_PROBE_PIN 2 // X+
#endif

#define CONTROLLER_FAN_PIN FAN1_PIN
#ifndef CONTROLLER_FAN_PIN
#define CONTROLLER_FAN_PIN FAN1_PIN
#endif

#if ENABLED(POWER_LOSS_RECOVERY)
#define OUTAGETEST_PIN 79
Expand Down
5 changes: 4 additions & 1 deletion Marlin/src/pins/ramps/pins_VORON.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
//
#define MOSFET_C_PIN 11
#define FAN0_PIN 5 // Using the pin for the controller fan since controller fan is always on.
#define CONTROLLER_FAN_PIN 8

#ifndef CONTROLLER_FAN_PIN
#define CONTROLLER_FAN_PIN 8
#endif

//
// Auto fans
Expand Down
1 change: 0 additions & 1 deletion Marlin/src/pins/sam/pins_RURAMPS4D_11.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@
#define FAN0_PIN 9
#endif
#define FAN1_PIN 8
#define CONTROLLER_FAN_PIN -1

//
// Temperature Sensors
Expand Down
1 change: 0 additions & 1 deletion Marlin/src/pins/sam/pins_RURAMPS4D_13.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@

#define FAN0_PIN 9
#define FAN1_PIN 8
#define CONTROLLER_FAN_PIN -1

//
// Temperature Sensors
Expand Down
4 changes: 3 additions & 1 deletion Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@
#define FAN0_PIN PC6 // FAN
#define FAN_SOFT_PWM_REQUIRED

#define CONTROLLER_FAN_PIN PC7
#ifndef CONTROLLER_FAN_PIN
#define CONTROLLER_FAN_PIN PC7
#endif

//
// LCD / Controller
Expand Down
4 changes: 3 additions & 1 deletion Marlin/src/pins/stm32f1/pins_CHITU3D_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@
//
// Fans
//
#define CONTROLLER_FAN_PIN PD6 // BOARD FAN
#ifndef CONTROLLER_FAN_PIN
#define CONTROLLER_FAN_PIN PD6 // BOARD FAN
#endif
#define FAN0_PIN PG13 // FAN
#define FAN2_PIN PG14

Expand Down
4 changes: 3 additions & 1 deletion Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@
//
// Fans
//
#define CONTROLLER_FAN_PIN PD6 // FAN
#ifndef CONTROLLER_FAN_PIN
#define CONTROLLER_FAN_PIN PD6 // FAN
#endif
#define FAN0_PIN PG13 // FAN
#define FAN1_PIN PG14 // FAN

Expand Down
4 changes: 3 additions & 1 deletion Marlin/src/pins/stm32f4/pins_LERDGE_K.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@
#define E1_AUTO_FAN_PIN PB0
#endif

#define CONTROLLER_FAN_PIN PF8
#ifndef CONTROLLER_FAN_PIN
#define CONTROLLER_FAN_PIN PF8
#endif

//
// LED / Lighting
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/stm32f4/pins_LERDGE_S.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
#define FAN2_PIN PF5 // heater 0 fan 2 and heater 1 fan 1 (two sockets, switched together)

#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN PF5
#define E0_AUTO_FAN_PIN FAN2_PIN
#endif

//
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/stm32f4/pins_LERDGE_X.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
#define FAN2_PIN PA0

#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN PC15 // FAN1_PIN
#define E0_AUTO_FAN_PIN FAN1_PIN
#endif

//
Expand Down
3 changes: 1 addition & 2 deletions Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,8 @@
//
// Auto fans
//
#define AUTO_FAN_PIN PC7
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN PC7
#endif

//
Expand Down
5 changes: 4 additions & 1 deletion Marlin/src/pins/stm32f4/pins_TRONXY_CXY_446_V10.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@
#define FAN1_PIN PB6 // Part Cooling Fan #2
#define FAN2_PIN PG9 // Extruder/Hotend #1 Heatsink Fan
#define FAN3_PIN PF10 // Extruder/Hotend #2 Heatsink Fan
#define CONTROLLER_FAN_PIN PD7

#ifndef CONTROLLER_FAN_PIN
#define CONTROLLER_FAN_PIN PD7
#endif

//
// Laser / Servos
Expand Down

0 comments on commit dc6e3c3

Please sign in to comment.