Merge pull request #5072 from thinkyhead/rc_preset_auto_fans

Add predefined AUTO_FAN_PINs to pins files
master
Scott Lahteine 8 years ago committed by GitHub
commit c34dbfb248

@ -428,20 +428,20 @@
#define HAS_HEATER_2 (PIN_EXISTS(HEATER_2)) #define HAS_HEATER_2 (PIN_EXISTS(HEATER_2))
#define HAS_HEATER_3 (PIN_EXISTS(HEATER_3)) #define HAS_HEATER_3 (PIN_EXISTS(HEATER_3))
#define HAS_HEATER_BED (PIN_EXISTS(HEATER_BED)) #define HAS_HEATER_BED (PIN_EXISTS(HEATER_BED))
#define HAS_AUTO_FAN_0 (PIN_EXISTS(EXTRUDER_0_AUTO_FAN)) #define HAS_AUTO_FAN_0 (PIN_EXISTS(E0_AUTO_FAN))
#define HAS_AUTO_FAN_1 (PIN_EXISTS(EXTRUDER_1_AUTO_FAN)) #define HAS_AUTO_FAN_1 (HOTENDS > 1 && PIN_EXISTS(E1_AUTO_FAN))
#define HAS_AUTO_FAN_2 (PIN_EXISTS(EXTRUDER_2_AUTO_FAN)) #define HAS_AUTO_FAN_2 (HOTENDS > 2 && PIN_EXISTS(E2_AUTO_FAN))
#define HAS_AUTO_FAN_3 (PIN_EXISTS(EXTRUDER_3_AUTO_FAN)) #define HAS_AUTO_FAN_3 (HOTENDS > 3 && PIN_EXISTS(E3_AUTO_FAN))
#define AUTO_1_IS_0 (EXTRUDER_1_AUTO_FAN_PIN == EXTRUDER_0_AUTO_FAN_PIN)
#define AUTO_2_IS_0 (EXTRUDER_2_AUTO_FAN_PIN == EXTRUDER_0_AUTO_FAN_PIN)
#define AUTO_2_IS_1 (EXTRUDER_2_AUTO_FAN_PIN == EXTRUDER_1_AUTO_FAN_PIN)
#define AUTO_3_IS_0 (EXTRUDER_3_AUTO_FAN_PIN == EXTRUDER_0_AUTO_FAN_PIN)
#define AUTO_3_IS_1 (EXTRUDER_3_AUTO_FAN_PIN == EXTRUDER_1_AUTO_FAN_PIN)
#define AUTO_3_IS_2 (EXTRUDER_3_AUTO_FAN_PIN == EXTRUDER_2_AUTO_FAN_PIN)
#define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3) #define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3)
#define AUTO_1_IS_0 (E1_AUTO_FAN_PIN == E0_AUTO_FAN_PIN)
#define AUTO_2_IS_0 (E2_AUTO_FAN_PIN == E0_AUTO_FAN_PIN)
#define AUTO_2_IS_1 (E2_AUTO_FAN_PIN == E1_AUTO_FAN_PIN)
#define AUTO_3_IS_0 (E3_AUTO_FAN_PIN == E0_AUTO_FAN_PIN)
#define AUTO_3_IS_1 (E3_AUTO_FAN_PIN == E1_AUTO_FAN_PIN)
#define AUTO_3_IS_2 (E3_AUTO_FAN_PIN == E2_AUTO_FAN_PIN)
#define HAS_FAN0 (PIN_EXISTS(FAN)) #define HAS_FAN0 (PIN_EXISTS(FAN))
#define HAS_FAN1 (PIN_EXISTS(FAN1) && CONTROLLERFAN_PIN != FAN1_PIN && EXTRUDER_0_AUTO_FAN_PIN != FAN1_PIN && EXTRUDER_1_AUTO_FAN_PIN != FAN1_PIN && EXTRUDER_2_AUTO_FAN_PIN != FAN1_PIN && EXTRUDER_3_AUTO_FAN_PIN != FAN1_PIN) #define HAS_FAN1 (PIN_EXISTS(FAN1) && CONTROLLERFAN_PIN != FAN1_PIN && E0_AUTO_FAN_PIN != FAN1_PIN && E1_AUTO_FAN_PIN != FAN1_PIN && E2_AUTO_FAN_PIN != FAN1_PIN && E3_AUTO_FAN_PIN != FAN1_PIN)
#define HAS_FAN2 (PIN_EXISTS(FAN2) && CONTROLLERFAN_PIN != FAN2_PIN && EXTRUDER_0_AUTO_FAN_PIN != FAN2_PIN && EXTRUDER_1_AUTO_FAN_PIN != FAN2_PIN && EXTRUDER_2_AUTO_FAN_PIN != FAN2_PIN && EXTRUDER_3_AUTO_FAN_PIN != FAN2_PIN) #define HAS_FAN2 (PIN_EXISTS(FAN2) && CONTROLLERFAN_PIN != FAN2_PIN && E0_AUTO_FAN_PIN != FAN2_PIN && E1_AUTO_FAN_PIN != FAN2_PIN && E2_AUTO_FAN_PIN != FAN2_PIN && E3_AUTO_FAN_PIN != FAN2_PIN)
#define HAS_CONTROLLERFAN (PIN_EXISTS(CONTROLLERFAN)) #define HAS_CONTROLLERFAN (PIN_EXISTS(CONTROLLERFAN))
#define HAS_SERVOS (defined(NUM_SERVOS) && NUM_SERVOS > 0) #define HAS_SERVOS (defined(NUM_SERVOS) && NUM_SERVOS > 0)
#define HAS_SERVO_0 (PIN_EXISTS(SERVO0)) #define HAS_SERVO_0 (PIN_EXISTS(SERVO0))

@ -205,15 +205,22 @@
// @section extruder // @section extruder
// Extruder cooling fans /**
// Configure fan pin outputs to automatically turn on/off when the associated * Extruder cooling fans
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. *
// Multiple extruders can be assigned to the same pin in which case * Extruder auto fans automatically turn on when their extruders'
// the fan will turn on when any selected extruder is above the threshold. * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
#define EXTRUDER_0_AUTO_FAN_PIN -1 *
#define EXTRUDER_1_AUTO_FAN_PIN -1 * Your board's pins file specifies the recommended pins. Override those here
#define EXTRUDER_2_AUTO_FAN_PIN -1 * or set to -1 to disable completely.
#define EXTRUDER_3_AUTO_FAN_PIN -1 *
* Multiple extruders can be assigned to the same pin in which case
* the fan will turn on when any selected extruder is above the threshold.
*/
#define E0_AUTO_FAN_PIN -1
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed

@ -9248,8 +9248,14 @@ void prepare_move_to_destination() {
bool new_led = (max_temp > 55.0) ? true : (max_temp < 54.0) ? false : red_led; bool new_led = (max_temp > 55.0) ? true : (max_temp < 54.0) ? false : red_led;
if (new_led != red_led) { if (new_led != red_led) {
red_led = new_led; red_led = new_led;
WRITE(STAT_LED_RED_PIN, new_led ? HIGH : LOW); #if PIN_EXISTS(STAT_LED_RED)
WRITE(STAT_LED_BLUE_PIN, new_led ? LOW : HIGH); WRITE(STAT_LED_RED_PIN, new_led ? HIGH : LOW);
#if PIN_EXISTS(STAT_LED_BLUE)
WRITE(STAT_LED_BLUE_PIN, new_led ? LOW : HIGH);
#endif
#else
WRITE(STAT_LED_BLUE_PIN, new_led ? HIGH : LOW);
#endif
} }
} }
} }

@ -153,6 +153,8 @@
#error "LCD_PIN_BL is now LCD_BACKLIGHT_PIN. Please update your pins definitions." #error "LCD_PIN_BL is now LCD_BACKLIGHT_PIN. Please update your pins definitions."
#elif defined(LCD_PIN_RESET) #elif defined(LCD_PIN_RESET)
#error "LCD_PIN_RESET is now LCD_RESET_PIN. Please update your pins definitions." #error "LCD_PIN_RESET is now LCD_RESET_PIN. Please update your pins definitions."
#elif defined(EXTRUDER_0_AUTO_FAN_PIN) || defined(EXTRUDER_1_AUTO_FAN_PIN) || defined(EXTRUDER_2_AUTO_FAN_PIN) || defined(EXTRUDER_3_AUTO_FAN_PIN)
#error "EXTRUDER_[0123]_AUTO_FAN_PIN is now E[0123]_AUTO_FAN_PIN. Please update your Configuration_adv.h."
#endif #endif
/** /**
@ -678,14 +680,14 @@
*/ */
#if HAS_AUTO_FAN #if HAS_AUTO_FAN
#if HAS_FAN0 #if HAS_FAN0
#if EXTRUDER_0_AUTO_FAN_PIN == FAN_PIN #if E0_AUTO_FAN_PIN == FAN_PIN
#error "You cannot set EXTRUDER_0_AUTO_FAN_PIN equal to FAN_PIN." #error "You cannot set E0_AUTO_FAN_PIN equal to FAN_PIN."
#elif EXTRUDER_1_AUTO_FAN_PIN == FAN_PIN #elif E1_AUTO_FAN_PIN == FAN_PIN
#error "You cannot set EXTRUDER_1_AUTO_FAN_PIN equal to FAN_PIN." #error "You cannot set E1_AUTO_FAN_PIN equal to FAN_PIN."
#elif EXTRUDER_2_AUTO_FAN_PIN == FAN_PIN #elif E2_AUTO_FAN_PIN == FAN_PIN
#error "You cannot set EXTRUDER_2_AUTO_FAN_PIN equal to FAN_PIN." #error "You cannot set E2_AUTO_FAN_PIN equal to FAN_PIN."
#elif EXTRUDER_3_AUTO_FAN_PIN == FAN_PIN #elif E3_AUTO_FAN_PIN == FAN_PIN
#error "You cannot set EXTRUDER_3_AUTO_FAN_PIN equal to FAN_PIN." #error "You cannot set E3_AUTO_FAN_PIN equal to FAN_PIN."
#endif #endif
#endif #endif
#endif #endif
@ -695,14 +697,14 @@
#endif #endif
#if HAS_CONTROLLERFAN #if HAS_CONTROLLERFAN
#if EXTRUDER_0_AUTO_FAN_PIN == CONTROLLERFAN_PIN #if E0_AUTO_FAN_PIN == CONTROLLERFAN_PIN
#error "You cannot set EXTRUDER_0_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN." #error "You cannot set E0_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN."
#elif EXTRUDER_1_AUTO_FAN_PIN == CONTROLLERFAN_PIN #elif E1_AUTO_FAN_PIN == CONTROLLERFAN_PIN
#error "You cannot set EXTRUDER_1_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN." #error "You cannot set E1_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN."
#elif EXTRUDER_2_AUTO_FAN_PIN == CONTROLLERFAN_PIN #elif E2_AUTO_FAN_PIN == CONTROLLERFAN_PIN
#error "You cannot set EXTRUDER_2_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN." #error "You cannot set E2_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN."
#elif EXTRUDER_3_AUTO_FAN_PIN == CONTROLLERFAN_PIN #elif E3_AUTO_FAN_PIN == CONTROLLERFAN_PIN
#error "You cannot set EXTRUDER_3_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN." #error "You cannot set E3_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN."
#endif #endif
#endif #endif
@ -770,8 +772,8 @@
/** /**
* Temperature status LEDs * Temperature status LEDs
*/ */
#if ENABLED(TEMP_STAT_LEDS) && !(PIN_EXISTS(STAT_LED_RED) && PIN_EXISTS(STAT_LED_BLUE)) #if ENABLED(TEMP_STAT_LEDS) && !PIN_EXISTS(STAT_LED_RED) && !PIN_EXISTS(STAT_LED_BLUE)
#error "TEMP_STAT_LEDS requires STAT_LED_RED_PIN and STAT_LED_BLUE_PIN." #error "TEMP_STAT_LEDS requires STAT_LED_RED_PIN or STAT_LED_BLUE_PIN, preferably both."
#endif #endif
/** /**
@ -868,6 +870,23 @@
#endif #endif
#endif #endif
/**
* Auto Fan check for PWM pins
*/
#if HAS_AUTO_FAN && EXTRUDER_AUTO_FAN_SPEED != 255
#define AF_ERR_SUFF "_AUTO_FAN_PIN is not a PWM pin. Set EXTRUDER_AUTO_FAN_SPEED to 255."
#if HAS_AUTO_FAN_0
static_assert(GET_TIMER(E0_AUTO_FAN_PIN), "E0" AF_ERR_SUFF);
#elif HAS_AUTO_FAN_1
static_assert(GET_TIMER(E1_AUTO_FAN_PIN), "E1" AF_ERR_SUFF);
#elif HAS_AUTO_FAN_2
static_assert(GET_TIMER(E2_AUTO_FAN_PIN), "E2" AF_ERR_SUFF);
#elif HAS_AUTO_FAN_3
static_assert(GET_TIMER(E3_AUTO_FAN_PIN), "E3" AF_ERR_SUFF);
#endif
#endif
/** /**
* Make sure only one display is enabled * Make sure only one display is enabled
* *
@ -942,7 +961,7 @@
#else #else
#define COUNT_LCD_13 COUNT_LCD_12 #define COUNT_LCD_13 COUNT_LCD_12
#endif #endif
#if ENABLED(REPRAPWORLD_KEYPAD) #if ENABLED(REPRAPWORLD_KEYPAD) && DISABLED(CARTESIO_UI)
#define COUNT_LCD_14 INCREMENT(COUNT_LCD_13) #define COUNT_LCD_14 INCREMENT(COUNT_LCD_13)
#else #else
#define COUNT_LCD_14 COUNT_LCD_13 #define COUNT_LCD_14 COUNT_LCD_13

@ -205,15 +205,22 @@
// @section extruder // @section extruder
// Extruder cooling fans /**
// Configure fan pin outputs to automatically turn on/off when the associated * Extruder cooling fans
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. *
// Multiple extruders can be assigned to the same pin in which case * Extruder auto fans automatically turn on when their extruders'
// the fan will turn on when any selected extruder is above the threshold. * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
#define EXTRUDER_0_AUTO_FAN_PIN 7 *
#define EXTRUDER_1_AUTO_FAN_PIN 7 * Your board's pins file specifies the recommended pins. Override those here
#define EXTRUDER_2_AUTO_FAN_PIN -1 * or set to -1 to disable completely.
#define EXTRUDER_3_AUTO_FAN_PIN -1 *
* Multiple extruders can be assigned to the same pin in which case
* the fan will turn on when any selected extruder is above the threshold.
*/
//#define E0_AUTO_FAN_PIN -1
//#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 35 #define EXTRUDER_AUTO_FAN_TEMPERATURE 35
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed

@ -205,15 +205,22 @@
// @section extruder // @section extruder
// Extruder cooling fans /**
// Configure fan pin outputs to automatically turn on/off when the associated * Extruder cooling fans
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. *
// Multiple extruders can be assigned to the same pin in which case * Extruder auto fans automatically turn on when their extruders'
// the fan will turn on when any selected extruder is above the threshold. * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
#define EXTRUDER_0_AUTO_FAN_PIN -1 *
#define EXTRUDER_1_AUTO_FAN_PIN -1 * Your board's pins file specifies the recommended pins. Override those here
#define EXTRUDER_2_AUTO_FAN_PIN -1 * or set to -1 to disable completely.
#define EXTRUDER_3_AUTO_FAN_PIN -1 *
* Multiple extruders can be assigned to the same pin in which case
* the fan will turn on when any selected extruder is above the threshold.
*/
#define E0_AUTO_FAN_PIN -1
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed

@ -205,15 +205,22 @@
// @section extruder // @section extruder
// Extruder cooling fans /**
// Configure fan pin outputs to automatically turn on/off when the associated * Extruder cooling fans
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. *
// Multiple extruders can be assigned to the same pin in which case * Extruder auto fans automatically turn on when their extruders'
// the fan will turn on when any selected extruder is above the threshold. * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
#define EXTRUDER_0_AUTO_FAN_PIN -1 *
#define EXTRUDER_1_AUTO_FAN_PIN -1 * Your board's pins file specifies the recommended pins. Override those here
#define EXTRUDER_2_AUTO_FAN_PIN -1 * or set to -1 to disable completely.
#define EXTRUDER_3_AUTO_FAN_PIN -1 *
* Multiple extruders can be assigned to the same pin in which case
* the fan will turn on when any selected extruder is above the threshold.
*/
#define E0_AUTO_FAN_PIN -1
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed

@ -205,15 +205,22 @@
// @section extruder // @section extruder
// Extruder cooling fans /**
// Configure fan pin outputs to automatically turn on/off when the associated * Extruder cooling fans
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. *
// Multiple extruders can be assigned to the same pin in which case * Extruder auto fans automatically turn on when their extruders'
// the fan will turn on when any selected extruder is above the threshold. * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
#define EXTRUDER_0_AUTO_FAN_PIN 11 *
#define EXTRUDER_1_AUTO_FAN_PIN 6 * Your board's pins file specifies the recommended pins. Override those here
#define EXTRUDER_2_AUTO_FAN_PIN -1 * or set to -1 to disable completely.
#define EXTRUDER_3_AUTO_FAN_PIN -1 *
* Multiple extruders can be assigned to the same pin in which case
* the fan will turn on when any selected extruder is above the threshold.
*/
//#define E0_AUTO_FAN_PIN -1
//#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed

@ -211,15 +211,22 @@
// @section extruder // @section extruder
// Extruder cooling fans /**
// Configure fan pin outputs to automatically turn on/off when the associated * Extruder cooling fans
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. *
// Multiple extruders can be assigned to the same pin in which case * Extruder auto fans automatically turn on when their extruders'
// the fan will turn on when any selected extruder is above the threshold. * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
#define EXTRUDER_0_AUTO_FAN_PIN -1 *
#define EXTRUDER_1_AUTO_FAN_PIN -1 * Your board's pins file specifies the recommended pins. Override those here
#define EXTRUDER_2_AUTO_FAN_PIN -1 * or set to -1 to disable completely.
#define EXTRUDER_3_AUTO_FAN_PIN -1 *
* Multiple extruders can be assigned to the same pin in which case
* the fan will turn on when any selected extruder is above the threshold.
*/
#define E0_AUTO_FAN_PIN -1
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed

@ -205,15 +205,22 @@
// @section extruder // @section extruder
// Extruder cooling fans /**
// Configure fan pin outputs to automatically turn on/off when the associated * Extruder cooling fans
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. *
// Multiple extruders can be assigned to the same pin in which case * Extruder auto fans automatically turn on when their extruders'
// the fan will turn on when any selected extruder is above the threshold. * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
#define EXTRUDER_0_AUTO_FAN_PIN -1 *
#define EXTRUDER_1_AUTO_FAN_PIN -1 * Your board's pins file specifies the recommended pins. Override those here
#define EXTRUDER_2_AUTO_FAN_PIN -1 * or set to -1 to disable completely.
#define EXTRUDER_3_AUTO_FAN_PIN -1 *
* Multiple extruders can be assigned to the same pin in which case
* the fan will turn on when any selected extruder is above the threshold.
*/
#define E0_AUTO_FAN_PIN -1
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed

@ -205,15 +205,22 @@
// @section extruder // @section extruder
// Extruder cooling fans /**
// Configure fan pin outputs to automatically turn on/off when the associated * Extruder cooling fans
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. *
// Multiple extruders can be assigned to the same pin in which case * Extruder auto fans automatically turn on when their extruders'
// the fan will turn on when any selected extruder is above the threshold. * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
#define EXTRUDER_0_AUTO_FAN_PIN -1 *
#define EXTRUDER_1_AUTO_FAN_PIN -1 * Your board's pins file specifies the recommended pins. Override those here
#define EXTRUDER_2_AUTO_FAN_PIN -1 * or set to -1 to disable completely.
#define EXTRUDER_3_AUTO_FAN_PIN -1 *
* Multiple extruders can be assigned to the same pin in which case
* the fan will turn on when any selected extruder is above the threshold.
*/
#define E0_AUTO_FAN_PIN -1
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed

@ -205,15 +205,22 @@
// @section extruder // @section extruder
// Extruder cooling fans /**
// Configure fan pin outputs to automatically turn on/off when the associated * Extruder cooling fans
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. *
// Multiple extruders can be assigned to the same pin in which case * Extruder auto fans automatically turn on when their extruders'
// the fan will turn on when any selected extruder is above the threshold. * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
#define EXTRUDER_0_AUTO_FAN_PIN -1 *
#define EXTRUDER_1_AUTO_FAN_PIN -1 * Your board's pins file specifies the recommended pins. Override those here
#define EXTRUDER_2_AUTO_FAN_PIN -1 * or set to -1 to disable completely.
#define EXTRUDER_3_AUTO_FAN_PIN -1 *
* Multiple extruders can be assigned to the same pin in which case
* the fan will turn on when any selected extruder is above the threshold.
*/
#define E0_AUTO_FAN_PIN -1
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed

@ -213,15 +213,22 @@
// @section extruder // @section extruder
// Extruder cooling fans /**
// Configure fan pin outputs to automatically turn on/off when the associated * Extruder cooling fans
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. *
// Multiple extruders can be assigned to the same pin in which case * Extruder auto fans automatically turn on when their extruders'
// the fan will turn on when any selected extruder is above the threshold. * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
#define EXTRUDER_0_AUTO_FAN_PIN -1 *
#define EXTRUDER_1_AUTO_FAN_PIN -1 * Your board's pins file specifies the recommended pins. Override those here
#define EXTRUDER_2_AUTO_FAN_PIN -1 * or set to -1 to disable completely.
#define EXTRUDER_3_AUTO_FAN_PIN -1 *
* Multiple extruders can be assigned to the same pin in which case
* the fan will turn on when any selected extruder is above the threshold.
*/
#define E0_AUTO_FAN_PIN -1
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed

@ -205,15 +205,22 @@
// @section extruder // @section extruder
// Extruder cooling fans /**
// Configure fan pin outputs to automatically turn on/off when the associated * Extruder cooling fans
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. *
// Multiple extruders can be assigned to the same pin in which case * Extruder auto fans automatically turn on when their extruders'
// the fan will turn on when any selected extruder is above the threshold. * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
#define EXTRUDER_0_AUTO_FAN_PIN -1 *
#define EXTRUDER_1_AUTO_FAN_PIN -1 * Your board's pins file specifies the recommended pins. Override those here
#define EXTRUDER_2_AUTO_FAN_PIN -1 * or set to -1 to disable completely.
#define EXTRUDER_3_AUTO_FAN_PIN -1 *
* Multiple extruders can be assigned to the same pin in which case
* the fan will turn on when any selected extruder is above the threshold.
*/
#define E0_AUTO_FAN_PIN -1
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed

@ -205,15 +205,22 @@
// @section extruder // @section extruder
// Extruder cooling fans /**
// Configure fan pin outputs to automatically turn on/off when the associated * Extruder cooling fans
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. *
// Multiple extruders can be assigned to the same pin in which case * Extruder auto fans automatically turn on when their extruders'
// the fan will turn on when any selected extruder is above the threshold. * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
#define EXTRUDER_0_AUTO_FAN_PIN -1 *
#define EXTRUDER_1_AUTO_FAN_PIN -1 * Your board's pins file specifies the recommended pins.
#define EXTRUDER_2_AUTO_FAN_PIN -1 * Override those here. Set to -1 to disable unused fans.
#define EXTRUDER_3_AUTO_FAN_PIN -1 *
* Multiple extruders can be assigned to the same pin in which case
* the fan will turn on when any selected extruder is above the threshold.
*/
#define E0_AUTO_FAN_PIN -1
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed

@ -205,15 +205,22 @@
// @section extruder // @section extruder
// Extruder cooling fans /**
// Configure fan pin outputs to automatically turn on/off when the associated * Extruder cooling fans
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. *
// Multiple extruders can be assigned to the same pin in which case * Extruder auto fans automatically turn on when their extruders'
// the fan will turn on when any selected extruder is above the threshold. * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
#define EXTRUDER_0_AUTO_FAN_PIN -1 *
#define EXTRUDER_1_AUTO_FAN_PIN -1 * Your board's pins file specifies the recommended pins. Override those here
#define EXTRUDER_2_AUTO_FAN_PIN -1 * or set to -1 to disable completely.
#define EXTRUDER_3_AUTO_FAN_PIN -1 *
* Multiple extruders can be assigned to the same pin in which case
* the fan will turn on when any selected extruder is above the threshold.
*/
#define E0_AUTO_FAN_PIN -1
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed

@ -205,15 +205,22 @@
// @section extruder // @section extruder
// Extruder cooling fans /**
// Configure fan pin outputs to automatically turn on/off when the associated * Extruder cooling fans
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. *
// Multiple extruders can be assigned to the same pin in which case * Extruder auto fans automatically turn on when their extruders'
// the fan will turn on when any selected extruder is above the threshold. * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
#define EXTRUDER_0_AUTO_FAN_PIN -1 *
#define EXTRUDER_1_AUTO_FAN_PIN -1 * Your board's pins file specifies the recommended pins. Override those here
#define EXTRUDER_2_AUTO_FAN_PIN -1 * or set to -1 to disable completely.
#define EXTRUDER_3_AUTO_FAN_PIN -1 *
* Multiple extruders can be assigned to the same pin in which case
* the fan will turn on when any selected extruder is above the threshold.
*/
#define E0_AUTO_FAN_PIN -1
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed

@ -210,15 +210,22 @@
// @section extruder // @section extruder
// Extruder cooling fans /**
// Configure fan pin outputs to automatically turn on/off when the associated * Extruder cooling fans
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. *
// Multiple extruders can be assigned to the same pin in which case * Extruder auto fans automatically turn on when their extruders'
// the fan will turn on when any selected extruder is above the threshold. * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
#define EXTRUDER_0_AUTO_FAN_PIN -1 *
#define EXTRUDER_1_AUTO_FAN_PIN -1 * Your board's pins file specifies the recommended pins. Override those here
#define EXTRUDER_2_AUTO_FAN_PIN -1 * or set to -1 to disable completely.
#define EXTRUDER_3_AUTO_FAN_PIN -1 *
* Multiple extruders can be assigned to the same pin in which case
* the fan will turn on when any selected extruder is above the threshold.
*/
#define E0_AUTO_FAN_PIN -1
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed

@ -205,15 +205,22 @@
// @section extruder // @section extruder
// Extruder cooling fans /**
// Configure fan pin outputs to automatically turn on/off when the associated * Extruder cooling fans
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. *
// Multiple extruders can be assigned to the same pin in which case * Extruder auto fans automatically turn on when their extruders'
// the fan will turn on when any selected extruder is above the threshold. * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
#define EXTRUDER_0_AUTO_FAN_PIN -1 *
#define EXTRUDER_1_AUTO_FAN_PIN -1 * Your board's pins file specifies the recommended pins. Override those here
#define EXTRUDER_2_AUTO_FAN_PIN -1 * or set to -1 to disable completely.
#define EXTRUDER_3_AUTO_FAN_PIN -1 *
* Multiple extruders can be assigned to the same pin in which case
* the fan will turn on when any selected extruder is above the threshold.
*/
#define E0_AUTO_FAN_PIN -1
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed

@ -205,15 +205,22 @@
// @section extruder // @section extruder
// Extruder cooling fans /**
// Configure fan pin outputs to automatically turn on/off when the associated * Extruder cooling fans
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. *
// Multiple extruders can be assigned to the same pin in which case * Extruder auto fans automatically turn on when their extruders'
// the fan will turn on when any selected extruder is above the threshold. * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
#define EXTRUDER_0_AUTO_FAN_PIN -1 *
#define EXTRUDER_1_AUTO_FAN_PIN -1 * Your board's pins file specifies the recommended pins. Override those here
#define EXTRUDER_2_AUTO_FAN_PIN -1 * or set to -1 to disable completely.
#define EXTRUDER_3_AUTO_FAN_PIN -1 *
* Multiple extruders can be assigned to the same pin in which case
* the fan will turn on when any selected extruder is above the threshold.
*/
#define E0_AUTO_FAN_PIN -1
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed

@ -205,15 +205,22 @@
// @section extruder // @section extruder
// Extruder cooling fans /**
// Configure fan pin outputs to automatically turn on/off when the associated * Extruder cooling fans
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. *
// Multiple extruders can be assigned to the same pin in which case * Extruder auto fans automatically turn on when their extruders'
// the fan will turn on when any selected extruder is above the threshold. * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
#define EXTRUDER_0_AUTO_FAN_PIN -1 *
#define EXTRUDER_1_AUTO_FAN_PIN -1 * Your board's pins file specifies the recommended pins. Override those here
#define EXTRUDER_2_AUTO_FAN_PIN -1 * or set to -1 to disable completely.
#define EXTRUDER_3_AUTO_FAN_PIN -1 *
* Multiple extruders can be assigned to the same pin in which case
* the fan will turn on when any selected extruder is above the threshold.
*/
#define E0_AUTO_FAN_PIN -1
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed

@ -79,7 +79,7 @@
#define _GET_OUTPUT(IO) ((DIO ## IO ## _DDR & MASK(DIO ## IO ## _PIN)) != 0) #define _GET_OUTPUT(IO) ((DIO ## IO ## _DDR & MASK(DIO ## IO ## _PIN)) != 0)
/// check if pin is an timer /// check if pin is an timer
#define _GET_TIMER(IO) ((DIO ## IO ## _PWM) #define _GET_TIMER(IO) (DIO ## IO ## _PWM)
// why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html // why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
@ -93,6 +93,8 @@
/// set pin as input wrapper /// set pin as input wrapper
#define SET_INPUT(IO) _SET_INPUT(IO) #define SET_INPUT(IO) _SET_INPUT(IO)
/// set pin as input with pullup wrapper
#define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _WRITE(IO, HIGH); }while(0)
/// set pin as output wrapper /// set pin as output wrapper
#define SET_OUTPUT(IO) _SET_OUTPUT(IO) #define SET_OUTPUT(IO) _SET_OUTPUT(IO)

@ -282,6 +282,22 @@
// Marlin needs to account for pins that equal -1 // Marlin needs to account for pins that equal -1
#define marlinAnalogInputToDigitalPin(p) ((p) == -1 ? -1 : analogInputToDigitalPin(p)) #define marlinAnalogInputToDigitalPin(p) ((p) == -1 ? -1 : analogInputToDigitalPin(p))
//
// Assign auto fan pins if needed
//
#if !defined(E0_AUTO_FAN_PIN) && defined(ORIG_E0_AUTO_FAN_PIN)
#define E0_AUTO_FAN_PIN ORIG_E0_AUTO_FAN_PIN
#endif
#if !defined(E1_AUTO_FAN_PIN) && defined(ORIG_E1_AUTO_FAN_PIN)
#define E1_AUTO_FAN_PIN ORIG_E1_AUTO_FAN_PIN
#endif
#if !defined(E2_AUTO_FAN_PIN) && defined(ORIG_E2_AUTO_FAN_PIN)
#define E2_AUTO_FAN_PIN ORIG_E2_AUTO_FAN_PIN
#endif
#if !defined(E3_AUTO_FAN_PIN) && defined(ORIG_E3_AUTO_FAN_PIN)
#define E3_AUTO_FAN_PIN ORIG_E3_AUTO_FAN_PIN
#endif
// List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those! // List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
#define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, E0_MS1_PIN, E0_MS2_PIN, #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, E0_MS1_PIN, E0_MS2_PIN,
#define _E1_PINS #define _E1_PINS
@ -306,7 +322,7 @@
#endif #endif
#endif #endif
#define _H0_PINS HEATER_0_PIN, EXTRUDER_0_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_0_PIN), #define _H0_PINS HEATER_0_PIN, E0_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_0_PIN),
#define _H1_PINS #define _H1_PINS
#define _H2_PINS #define _H2_PINS
#define _H3_PINS #define _H3_PINS
@ -314,13 +330,13 @@
#if HOTENDS > 1 #if HOTENDS > 1
#undef _H1_PINS #undef _H1_PINS
#define _H1_PINS HEATER_1_PIN, EXTRUDER_1_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_1_PIN), #define _H1_PINS HEATER_1_PIN, E1_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_1_PIN),
#if HOTENDS > 2 #if HOTENDS > 2
#undef _H2_PINS #undef _H2_PINS
#define _H2_PINS HEATER_2_PIN, EXTRUDER_2_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_2_PIN), #define _H2_PINS HEATER_2_PIN, E2_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_2_PIN),
#if HOTENDS > 3 #if HOTENDS > 3
#undef _H3_PINS #undef _H3_PINS
#define _H3_PINS HEATER_3_PIN, EXTRUDER_3_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_3_PIN), #define _H3_PINS HEATER_3_PIN, E3_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_3_PIN),
#if HOTENDS > 4 #if HOTENDS > 4
#undef _H4_PINS #undef _H4_PINS
#define _H4_PINS HEATER_4_PIN, marlinAnalogInputToDigitalPin(TEMP_4_PIN), #define _H4_PINS HEATER_4_PIN, marlinAnalogInputToDigitalPin(TEMP_4_PIN),

@ -234,17 +234,17 @@ static bool report_pin_name(int8_t pin) {
#if PIN_EXISTS(CONTROLLERFAN) #if PIN_EXISTS(CONTROLLERFAN)
PIN_SAY(CONTROLLERFAN_PIN); PIN_SAY(CONTROLLERFAN_PIN);
#endif #endif
#if PIN_EXISTS(EXTRUDER_0_AUTO_FAN) #if PIN_EXISTS(E0_AUTO_FAN)
PIN_SAY(EXTRUDER_0_AUTO_FAN_PIN); PIN_SAY(E0_AUTO_FAN_PIN);
#endif #endif
#if PIN_EXISTS(EXTRUDER_1_AUTO_FAN) #if PIN_EXISTS(E1_AUTO_FAN)
PIN_SAY(EXTRUDER_1_AUTO_FAN_PIN); PIN_SAY(E1_AUTO_FAN_PIN);
#endif #endif
#if PIN_EXISTS(EXTRUDER_2_AUTO_FAN) #if PIN_EXISTS(E2_AUTO_FAN)
PIN_SAY(EXTRUDER_2_AUTO_FAN_PIN); PIN_SAY(E2_AUTO_FAN_PIN);
#endif #endif
#if PIN_EXISTS(EXTRUDER_3_AUTO_FAN) #if PIN_EXISTS(E3_AUTO_FAN)
PIN_SAY(EXTRUDER_3_AUTO_FAN_PIN); PIN_SAY(E3_AUTO_FAN_PIN);
#endif #endif
#if PIN_EXISTS(HEATER_0) #if PIN_EXISTS(HEATER_0)
PIN_SAY(HEATER_0_PIN); PIN_SAY(HEATER_0_PIN);

@ -106,10 +106,10 @@
#define CONTROLLERFAN_PIN 4 // Pin used for the fan to cool motherboard (-1 to disable) #define CONTROLLERFAN_PIN 4 // Pin used for the fan to cool motherboard (-1 to disable)
// Fans/Water Pump to cool the hotend cool side. // Fans/Water Pump to cool the hotend cool side.
#define EXTRUDER_0_AUTO_FAN_PIN 5 #define ORIG_E0_AUTO_FAN_PIN 5
#define EXTRUDER_1_AUTO_FAN_PIN 5 #define ORIG_E1_AUTO_FAN_PIN 5
#define EXTRUDER_2_AUTO_FAN_PIN 5 #define ORIG_E2_AUTO_FAN_PIN 5
#define EXTRUDER_3_AUTO_FAN_PIN 5 #define ORIG_E3_AUTO_FAN_PIN 5
// //
// LCD / Controller // LCD / Controller

@ -38,6 +38,14 @@
#define RAMPS_D10_PIN 9 #define RAMPS_D10_PIN 9
#define MOSFET_D_PIN 7 #define MOSFET_D_PIN 7
//
// 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
#include "pins_RAMPS_13.h" #include "pins_RAMPS_13.h"
// //

@ -69,6 +69,11 @@
//#define FAN_PIN 7 // common PWM pin for all tools //#define FAN_PIN 7 // common PWM pin for all tools
#define ORIG_E0_AUTO_FAN_PIN 7
#define ORIG_E1_AUTO_FAN_PIN 7
#define ORIG_E2_AUTO_FAN_PIN 7
#define ORIG_E3_AUTO_FAN_PIN 7
// //
// Misc. Functions // Misc. Functions
// //

@ -69,6 +69,11 @@
#define FAN_PIN 5 // 5 is PWMtool3 -> 7 is common PWM pin for all tools #define FAN_PIN 5 // 5 is PWMtool3 -> 7 is common PWM pin for all tools
#define ORIG_E0_AUTO_FAN_PIN 7
#define ORIG_E1_AUTO_FAN_PIN 7
#define ORIG_E2_AUTO_FAN_PIN 7
#define ORIG_E3_AUTO_FAN_PIN 7
// //
// Misc. Functions // Misc. Functions
// //

@ -454,7 +454,7 @@ int Temperature::getHeaterPower(int heater) {
#if HAS_AUTO_FAN #if HAS_AUTO_FAN
void Temperature::checkExtruderAutoFans() { void Temperature::checkExtruderAutoFans() {
const int8_t fanPin[] = { EXTRUDER_0_AUTO_FAN_PIN, EXTRUDER_1_AUTO_FAN_PIN, EXTRUDER_2_AUTO_FAN_PIN, EXTRUDER_3_AUTO_FAN_PIN }; const int8_t fanPin[] = { E0_AUTO_FAN_PIN, E1_AUTO_FAN_PIN, E2_AUTO_FAN_PIN, E3_AUTO_FAN_PIN };
const int fanBit[] = { const int fanBit[] = {
0, 0,
AUTO_1_IS_0 ? 0 : 1, AUTO_1_IS_0 ? 0 : 1,
@ -1043,43 +1043,43 @@ void Temperature::init() {
#endif #endif
#if HAS_AUTO_FAN_0 #if HAS_AUTO_FAN_0
#if EXTRUDER_0_AUTO_FAN_PIN == FAN1_PIN #if E0_AUTO_FAN_PIN == FAN1_PIN
SET_OUTPUT(EXTRUDER_0_AUTO_FAN_PIN); SET_OUTPUT(E0_AUTO_FAN_PIN);
#if ENABLED(FAST_PWM_FAN) #if ENABLED(FAST_PWM_FAN)
setPwmFrequency(EXTRUDER_0_AUTO_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8 setPwmFrequency(E0_AUTO_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
#endif #endif
#else #else
pinMode(EXTRUDER_0_AUTO_FAN_PIN, OUTPUT); SET_OUTPUT(E0_AUTO_FAN_PIN);
#endif #endif
#endif #endif
#if HAS_AUTO_FAN_1 && !AUTO_1_IS_0 #if HAS_AUTO_FAN_1 && !AUTO_1_IS_0
#if EXTRUDER_1_AUTO_FAN_PIN == FAN1_PIN #if E1_AUTO_FAN_PIN == FAN1_PIN
SET_OUTPUT(EXTRUDER_1_AUTO_FAN_PIN); SET_OUTPUT(E1_AUTO_FAN_PIN);
#if ENABLED(FAST_PWM_FAN) #if ENABLED(FAST_PWM_FAN)
setPwmFrequency(EXTRUDER_1_AUTO_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8 setPwmFrequency(E1_AUTO_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
#endif #endif
#else #else
pinMode(EXTRUDER_1_AUTO_FAN_PIN, OUTPUT); SET_OUTPUT(E1_AUTO_FAN_PIN);
#endif #endif
#endif #endif
#if HAS_AUTO_FAN_2 && !AUTO_2_IS_0 && !AUTO_2_IS_1 #if HAS_AUTO_FAN_2 && !AUTO_2_IS_0 && !AUTO_2_IS_1
#if EXTRUDER_2_AUTO_FAN_PIN == FAN1_PIN #if E2_AUTO_FAN_PIN == FAN1_PIN
SET_OUTPUT(EXTRUDER_2_AUTO_FAN_PIN); SET_OUTPUT(E2_AUTO_FAN_PIN);
#if ENABLED(FAST_PWM_FAN) #if ENABLED(FAST_PWM_FAN)
setPwmFrequency(EXTRUDER_2_AUTO_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8 setPwmFrequency(E2_AUTO_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
#endif #endif
#else #else
pinMode(EXTRUDER_2_AUTO_FAN_PIN, OUTPUT); SET_OUTPUT(E2_AUTO_FAN_PIN);
#endif #endif
#endif #endif
#if HAS_AUTO_FAN_3 && !AUTO_3_IS_0 && !AUTO_3_IS_1 && !AUTO_3_IS_2 #if HAS_AUTO_FAN_3 && !AUTO_3_IS_0 && !AUTO_3_IS_1 && !AUTO_3_IS_2
#if EXTRUDER_3_AUTO_FAN_PIN == FAN1_PIN #if E3_AUTO_FAN_PIN == FAN1_PIN
SET_OUTPUT(EXTRUDER_3_AUTO_FAN_PIN); SET_OUTPUT(E3_AUTO_FAN_PIN);
#if ENABLED(FAST_PWM_FAN) #if ENABLED(FAST_PWM_FAN)
setPwmFrequency(EXTRUDER_3_AUTO_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8 setPwmFrequency(E3_AUTO_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
#endif #endif
#else #else
pinMode(EXTRUDER_3_AUTO_FAN_PIN, OUTPUT); SET_OUTPUT(E3_AUTO_FAN_PIN);
#endif #endif
#endif #endif

@ -2390,6 +2390,7 @@ void kill_screen(const char* lcd_msg) {
case X_AXIS: lcd_move_x(); break; case X_AXIS: lcd_move_x(); break;
case Y_AXIS: lcd_move_y(); break; case Y_AXIS: lcd_move_y(); break;
case Z_AXIS: lcd_move_z(); case Z_AXIS: lcd_move_z();
default: break;
} }
} }
static void reprapworld_keypad_move_z_up() { _reprapworld_keypad_move(Z_AXIS, 1); } static void reprapworld_keypad_move_z_up() { _reprapworld_keypad_move(Z_AXIS, 1); }
@ -2490,11 +2491,9 @@ void lcd_init() {
#endif #endif
#if ENABLED(REPRAPWORLD_KEYPAD) #if ENABLED(REPRAPWORLD_KEYPAD)
pinMode(SHIFT_CLK, OUTPUT); SET_OUTPUT(SHIFT_CLK);
pinMode(SHIFT_LD, OUTPUT); OUT_WRITE(SHIFT_LD, HIGH);
pinMode(SHIFT_OUT, INPUT); SET_INPUT_PULLUP(SHIFT_OUT);
WRITE(SHIFT_OUT, HIGH);
WRITE(SHIFT_LD, HIGH);
#endif #endif
#if BUTTON_EXISTS(UP) #if BUTTON_EXISTS(UP)
@ -2513,16 +2512,13 @@ void lcd_init() {
#else // !NEWPANEL #else // !NEWPANEL
#if ENABLED(SR_LCD_2W_NL) // Non latching 2 wire shift register #if ENABLED(SR_LCD_2W_NL) // Non latching 2 wire shift register
pinMode(SR_DATA_PIN, OUTPUT); SET_OUTPUT(SR_DATA_PIN);
pinMode(SR_CLK_PIN, OUTPUT); SET_OUTPUT(SR_CLK_PIN);
#elif defined(SHIFT_CLK) #elif defined(SHIFT_CLK)
pinMode(SHIFT_CLK, OUTPUT); SET_OUTPUT(SHIFT_CLK);
pinMode(SHIFT_LD, OUTPUT); OUT_WRITE(SHIFT_LD, HIGH);
pinMode(SHIFT_EN, OUTPUT); OUT_WRITE(SHIFT_EN, LOW);
pinMode(SHIFT_OUT, INPUT); SET_INPUT_PULLUP(SHIFT_OUT);
WRITE(SHIFT_OUT, HIGH);
WRITE(SHIFT_LD, HIGH);
WRITE(SHIFT_EN, LOW);
#endif // SR_LCD_2W_NL #endif // SR_LCD_2W_NL
#endif // !NEWPANEL #endif // !NEWPANEL

Loading…
Cancel
Save