Use the common pattern for auto fan pins

Now that pins.h is guaranteed included after configs.
This commit is contained in:
Scott Lahteine
2020-04-16 03:24:41 -05:00
parent 3a9f8a00bf
commit 03020dd31e
33 changed files with 245 additions and 132 deletions

View File

@ -118,11 +118,22 @@
#define CONTROLLER_FAN_PIN 4 // Pin used for the fan to cool motherboard (-1 to disable)
#endif
// Fans/Water Pump to cool the hotend cool side.
#define ORIG_E0_AUTO_FAN_PIN 5
#define ORIG_E1_AUTO_FAN_PIN 5
#define ORIG_E2_AUTO_FAN_PIN 5
#define ORIG_E3_AUTO_FAN_PIN 5
//
// Auto fans
//
#define AUTO_FAN_PIN 5
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
#ifndef E1_AUTO_FAN_PIN
#define E1_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
#ifndef E2_AUTO_FAN_PIN
#define E2_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
#ifndef E3_AUTO_FAN_PIN
#define E3_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
//
// LCD / Controller

View File

@ -42,10 +42,18 @@
//
// Auto fans
//
#define ORIG_E0_AUTO_FAN_PIN 11
#define ORIG_E1_AUTO_FAN_PIN 6
#define ORIG_E2_AUTO_FAN_PIN 6
#define ORIG_E3_AUTO_FAN_PIN 6
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN 11
#endif
#ifndef E1_AUTO_FAN_PIN
#define E1_AUTO_FAN_PIN 6
#endif
#ifndef E2_AUTO_FAN_PIN
#define E2_AUTO_FAN_PIN 6
#endif
#ifndef E3_AUTO_FAN_PIN
#define E3_AUTO_FAN_PIN 6
#endif
//
// M3/M4/M5 - Spindle/Laser Control

View File

@ -32,7 +32,9 @@
#define Z_STOP_PIN 15
#define FIL_RUNOUT_PIN 39
#define ORIG_E0_AUTO_FAN_PIN 7
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN 7
#endif
//
// Import RAMPS 1.4 pins

View File

@ -30,7 +30,9 @@
#define FAN_PIN 8
#define FAN1_PIN -1
#define ORIG_E0_AUTO_FAN_PIN 7
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN 7
#endif
#ifndef TEMP_0_PIN
#if TEMP_SENSOR_0 == -1

View File

@ -28,9 +28,12 @@
#define BOARD_INFO_NAME "Anycubic RAMPS 1.3"
#define IS_RAMPS_EFB
#define RAMPS_D9_PIN 44
#define FAN2_PIN 9
#define ORIG_E0_AUTO_FAN_PIN 9
#define RAMPS_D9_PIN 44
#define FAN2_PIN 9
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN 9
#endif
#include "pins_RAMPS_13.h"

View File

@ -83,7 +83,10 @@
#define FAN1_PIN TG_FAN1_PIN
#endif
#define FAN2_PIN TG_FAN2_PIN
#define ORIG_E0_AUTO_FAN_PIN TG_FAN2_PIN // Used in Anycubic Kossel example config
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN TG_FAN2_PIN // Used in Anycubic Kossel example config
#endif
#include "pins_RAMPS.h"

View File

@ -98,7 +98,9 @@
#define FAN_PIN 7
#endif
#define ORIG_E0_AUTO_FAN_PIN 77
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN 77
#endif
//
// Misc. Functions

View File

@ -38,8 +38,16 @@
#undef FAN_PIN
#define FAN_PIN 5 // Using the pin for the controller fan since controller fan is always on.
#define CONTROLLER_FAN_PIN 8
#define ORIG_E0_AUTO_FAN_PIN 6 // Servo pin 6 for E3D Fan
#define ORIG_E1_AUTO_FAN_PIN 6 // Servo pin 6 for E3D Fan (same pin for both extruders since it's the same fan)
//
// Auto fans
//
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN 6 // Servo pin 6 for E3D Fan
#endif
#ifndef E1_AUTO_FAN_PIN
#define E1_AUTO_FAN_PIN 6 // Servo pin 6 for E3D Fan (same pin for both extruders since it's the same fan)
#endif
//
// LCDs and Controllers

View File

@ -39,10 +39,21 @@
#define ZRIB_V20_D29_PIN 29
#define ZRIB_V20_D37_PIN 37
#define ORIG_E0_AUTO_FAN_PIN ZRIB_V20_D6_PIN
#define ORIG_E1_AUTO_FAN_PIN ZRIB_V20_D6_PIN
#define ORIG_E2_AUTO_FAN_PIN ZRIB_V20_D6_PIN
#define ORIG_E3_AUTO_FAN_PIN ZRIB_V20_D6_PIN
//
// Auto fans
//
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN ZRIB_V20_D6_PIN
#endif
#ifndef E1_AUTO_FAN_PIN
#define E1_AUTO_FAN_PIN ZRIB_V20_D6_PIN
#endif
#ifndef E2_AUTO_FAN_PIN
#define E2_AUTO_FAN_PIN ZRIB_V20_D6_PIN
#endif
#ifndef E3_AUTO_FAN_PIN
#define E3_AUTO_FAN_PIN ZRIB_V20_D6_PIN
#endif
#ifndef FILWIDTH_PIN
#define FILWIDTH_PIN 11 // Analog Input