Browse Source

Merge pull request #5072 from thinkyhead/rc_preset_auto_fans

Add predefined AUTO_FAN_PINs to pins files
Scott Lahteine 8 years ago
parent
commit
c34dbfb248
30 changed files with 426 additions and 243 deletions
  1. 12
    12
      Marlin/Conditionals_post.h
  2. 16
    9
      Marlin/Configuration_adv.h
  3. 8
    2
      Marlin/Marlin_main.cpp
  4. 38
    19
      Marlin/SanityCheck.h
  5. 16
    9
      Marlin/example_configurations/Cartesio/Configuration_adv.h
  6. 16
    9
      Marlin/example_configurations/Felix/Configuration_adv.h
  7. 16
    9
      Marlin/example_configurations/Hephestos/Configuration_adv.h
  8. 16
    9
      Marlin/example_configurations/Hephestos_2/Configuration_adv.h
  9. 16
    9
      Marlin/example_configurations/K8200/Configuration_adv.h
  10. 16
    9
      Marlin/example_configurations/K8400/Configuration_adv.h
  11. 16
    9
      Marlin/example_configurations/RigidBot/Configuration_adv.h
  12. 16
    9
      Marlin/example_configurations/SCARA/Configuration_adv.h
  13. 16
    9
      Marlin/example_configurations/TAZ4/Configuration_adv.h
  14. 16
    9
      Marlin/example_configurations/WITBOX/Configuration_adv.h
  15. 16
    9
      Marlin/example_configurations/delta/biv2.5/Configuration_adv.h
  16. 16
    9
      Marlin/example_configurations/delta/generic/Configuration_adv.h
  17. 16
    9
      Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h
  18. 16
    9
      Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h
  19. 16
    9
      Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h
  20. 16
    9
      Marlin/example_configurations/makibox/Configuration_adv.h
  21. 16
    9
      Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h
  22. 3
    1
      Marlin/fastio.h
  23. 20
    4
      Marlin/pins.h
  24. 8
    8
      Marlin/pinsDebug.h
  25. 4
    4
      Marlin/pins_AZTEEG_X3_PRO.h
  26. 8
    0
      Marlin/pins_BQ_ZUM_MEGA_3D.h
  27. 5
    0
      Marlin/pins_CNCONTROLS_11.h
  28. 5
    0
      Marlin/pins_CNCONTROLS_12.h
  29. 17
    17
      Marlin/temperature.cpp
  30. 10
    14
      Marlin/ultralcd.cpp

+ 12
- 12
Marlin/Conditionals_post.h View File

428
   #define HAS_HEATER_2 (PIN_EXISTS(HEATER_2))
428
   #define HAS_HEATER_2 (PIN_EXISTS(HEATER_2))
429
   #define HAS_HEATER_3 (PIN_EXISTS(HEATER_3))
429
   #define HAS_HEATER_3 (PIN_EXISTS(HEATER_3))
430
   #define HAS_HEATER_BED (PIN_EXISTS(HEATER_BED))
430
   #define HAS_HEATER_BED (PIN_EXISTS(HEATER_BED))
431
-  #define HAS_AUTO_FAN_0 (PIN_EXISTS(EXTRUDER_0_AUTO_FAN))
432
-  #define HAS_AUTO_FAN_1 (PIN_EXISTS(EXTRUDER_1_AUTO_FAN))
433
-  #define HAS_AUTO_FAN_2 (PIN_EXISTS(EXTRUDER_2_AUTO_FAN))
434
-  #define HAS_AUTO_FAN_3 (PIN_EXISTS(EXTRUDER_3_AUTO_FAN))
435
-  #define AUTO_1_IS_0 (EXTRUDER_1_AUTO_FAN_PIN == EXTRUDER_0_AUTO_FAN_PIN)
436
-  #define AUTO_2_IS_0 (EXTRUDER_2_AUTO_FAN_PIN == EXTRUDER_0_AUTO_FAN_PIN)
437
-  #define AUTO_2_IS_1 (EXTRUDER_2_AUTO_FAN_PIN == EXTRUDER_1_AUTO_FAN_PIN)
438
-  #define AUTO_3_IS_0 (EXTRUDER_3_AUTO_FAN_PIN == EXTRUDER_0_AUTO_FAN_PIN)
439
-  #define AUTO_3_IS_1 (EXTRUDER_3_AUTO_FAN_PIN == EXTRUDER_1_AUTO_FAN_PIN)
440
-  #define AUTO_3_IS_2 (EXTRUDER_3_AUTO_FAN_PIN == EXTRUDER_2_AUTO_FAN_PIN)
431
+  #define HAS_AUTO_FAN_0 (PIN_EXISTS(E0_AUTO_FAN))
432
+  #define HAS_AUTO_FAN_1 (HOTENDS > 1 && PIN_EXISTS(E1_AUTO_FAN))
433
+  #define HAS_AUTO_FAN_2 (HOTENDS > 2 && PIN_EXISTS(E2_AUTO_FAN))
434
+  #define HAS_AUTO_FAN_3 (HOTENDS > 3 && PIN_EXISTS(E3_AUTO_FAN))
441
   #define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3)
435
   #define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3)
436
+  #define AUTO_1_IS_0 (E1_AUTO_FAN_PIN == E0_AUTO_FAN_PIN)
437
+  #define AUTO_2_IS_0 (E2_AUTO_FAN_PIN == E0_AUTO_FAN_PIN)
438
+  #define AUTO_2_IS_1 (E2_AUTO_FAN_PIN == E1_AUTO_FAN_PIN)
439
+  #define AUTO_3_IS_0 (E3_AUTO_FAN_PIN == E0_AUTO_FAN_PIN)
440
+  #define AUTO_3_IS_1 (E3_AUTO_FAN_PIN == E1_AUTO_FAN_PIN)
441
+  #define AUTO_3_IS_2 (E3_AUTO_FAN_PIN == E2_AUTO_FAN_PIN)
442
   #define HAS_FAN0 (PIN_EXISTS(FAN))
442
   #define HAS_FAN0 (PIN_EXISTS(FAN))
443
-  #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)
444
-  #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)
443
+  #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)
444
+  #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)
445
   #define HAS_CONTROLLERFAN (PIN_EXISTS(CONTROLLERFAN))
445
   #define HAS_CONTROLLERFAN (PIN_EXISTS(CONTROLLERFAN))
446
   #define HAS_SERVOS (defined(NUM_SERVOS) && NUM_SERVOS > 0)
446
   #define HAS_SERVOS (defined(NUM_SERVOS) && NUM_SERVOS > 0)
447
   #define HAS_SERVO_0 (PIN_EXISTS(SERVO0))
447
   #define HAS_SERVO_0 (PIN_EXISTS(SERVO0))

+ 16
- 9
Marlin/Configuration_adv.h View File

205
 
205
 
206
 // @section extruder
206
 // @section extruder
207
 
207
 
208
-// Extruder cooling fans
209
-// Configure fan pin outputs to automatically turn on/off when the associated
210
-// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
211
-// Multiple extruders can be assigned to the same pin in which case
212
-// the fan will turn on when any selected extruder is above the threshold.
213
-#define EXTRUDER_0_AUTO_FAN_PIN -1
214
-#define EXTRUDER_1_AUTO_FAN_PIN -1
215
-#define EXTRUDER_2_AUTO_FAN_PIN -1
216
-#define EXTRUDER_3_AUTO_FAN_PIN -1
208
+/**
209
+ * Extruder cooling fans
210
+ *
211
+ * Extruder auto fans automatically turn on when their extruders'
212
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
213
+ *
214
+ * Your board's pins file specifies the recommended pins. Override those here
215
+ * or set to -1 to disable completely.
216
+ *
217
+ * Multiple extruders can be assigned to the same pin in which case
218
+ * the fan will turn on when any selected extruder is above the threshold.
219
+ */
220
+#define E0_AUTO_FAN_PIN -1
221
+#define E1_AUTO_FAN_PIN -1
222
+#define E2_AUTO_FAN_PIN -1
223
+#define E3_AUTO_FAN_PIN -1
217
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
224
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
218
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
225
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
219
 
226
 

+ 8
- 2
Marlin/Marlin_main.cpp View File

9248
       bool new_led = (max_temp > 55.0) ? true : (max_temp < 54.0) ? false : red_led;
9248
       bool new_led = (max_temp > 55.0) ? true : (max_temp < 54.0) ? false : red_led;
9249
       if (new_led != red_led) {
9249
       if (new_led != red_led) {
9250
         red_led = new_led;
9250
         red_led = new_led;
9251
-        WRITE(STAT_LED_RED_PIN, new_led ? HIGH : LOW);
9252
-        WRITE(STAT_LED_BLUE_PIN, new_led ? LOW : HIGH);
9251
+        #if PIN_EXISTS(STAT_LED_RED)
9252
+          WRITE(STAT_LED_RED_PIN, new_led ? HIGH : LOW);
9253
+          #if PIN_EXISTS(STAT_LED_BLUE)
9254
+            WRITE(STAT_LED_BLUE_PIN, new_led ? LOW : HIGH);
9255
+          #endif
9256
+        #else
9257
+          WRITE(STAT_LED_BLUE_PIN, new_led ? HIGH : LOW);
9258
+        #endif
9253
       }
9259
       }
9254
     }
9260
     }
9255
   }
9261
   }

+ 38
- 19
Marlin/SanityCheck.h View File

153
   #error "LCD_PIN_BL is now LCD_BACKLIGHT_PIN. Please update your pins definitions."
153
   #error "LCD_PIN_BL is now LCD_BACKLIGHT_PIN. Please update your pins definitions."
154
 #elif defined(LCD_PIN_RESET)
154
 #elif defined(LCD_PIN_RESET)
155
   #error "LCD_PIN_RESET is now LCD_RESET_PIN. Please update your pins definitions."
155
   #error "LCD_PIN_RESET is now LCD_RESET_PIN. Please update your pins definitions."
156
+#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)
157
+  #error "EXTRUDER_[0123]_AUTO_FAN_PIN is now E[0123]_AUTO_FAN_PIN. Please update your Configuration_adv.h."
156
 #endif
158
 #endif
157
 
159
 
158
 /**
160
 /**
678
  */
680
  */
679
 #if HAS_AUTO_FAN
681
 #if HAS_AUTO_FAN
680
   #if HAS_FAN0
682
   #if HAS_FAN0
681
-    #if EXTRUDER_0_AUTO_FAN_PIN == FAN_PIN
682
-      #error "You cannot set EXTRUDER_0_AUTO_FAN_PIN equal to FAN_PIN."
683
-    #elif EXTRUDER_1_AUTO_FAN_PIN == FAN_PIN
684
-      #error "You cannot set EXTRUDER_1_AUTO_FAN_PIN equal to FAN_PIN."
685
-    #elif EXTRUDER_2_AUTO_FAN_PIN == FAN_PIN
686
-      #error "You cannot set EXTRUDER_2_AUTO_FAN_PIN equal to FAN_PIN."
687
-    #elif EXTRUDER_3_AUTO_FAN_PIN == FAN_PIN
688
-      #error "You cannot set EXTRUDER_3_AUTO_FAN_PIN equal to FAN_PIN."
683
+    #if E0_AUTO_FAN_PIN == FAN_PIN
684
+      #error "You cannot set E0_AUTO_FAN_PIN equal to FAN_PIN."
685
+    #elif E1_AUTO_FAN_PIN == FAN_PIN
686
+      #error "You cannot set E1_AUTO_FAN_PIN equal to FAN_PIN."
687
+    #elif E2_AUTO_FAN_PIN == FAN_PIN
688
+      #error "You cannot set E2_AUTO_FAN_PIN equal to FAN_PIN."
689
+    #elif E3_AUTO_FAN_PIN == FAN_PIN
690
+      #error "You cannot set E3_AUTO_FAN_PIN equal to FAN_PIN."
689
     #endif
691
     #endif
690
   #endif
692
   #endif
691
 #endif
693
 #endif
695
 #endif
697
 #endif
696
 
698
 
697
 #if HAS_CONTROLLERFAN
699
 #if HAS_CONTROLLERFAN
698
-  #if EXTRUDER_0_AUTO_FAN_PIN == CONTROLLERFAN_PIN
699
-    #error "You cannot set EXTRUDER_0_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN."
700
-  #elif EXTRUDER_1_AUTO_FAN_PIN == CONTROLLERFAN_PIN
701
-    #error "You cannot set EXTRUDER_1_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN."
702
-  #elif EXTRUDER_2_AUTO_FAN_PIN == CONTROLLERFAN_PIN
703
-    #error "You cannot set EXTRUDER_2_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN."
704
-  #elif EXTRUDER_3_AUTO_FAN_PIN == CONTROLLERFAN_PIN
705
-    #error "You cannot set EXTRUDER_3_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN."
700
+  #if E0_AUTO_FAN_PIN == CONTROLLERFAN_PIN
701
+    #error "You cannot set E0_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN."
702
+  #elif E1_AUTO_FAN_PIN == CONTROLLERFAN_PIN
703
+    #error "You cannot set E1_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN."
704
+  #elif E2_AUTO_FAN_PIN == CONTROLLERFAN_PIN
705
+    #error "You cannot set E2_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN."
706
+  #elif E3_AUTO_FAN_PIN == CONTROLLERFAN_PIN
707
+    #error "You cannot set E3_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN."
706
   #endif
708
   #endif
707
 #endif
709
 #endif
708
 
710
 
770
 /**
772
 /**
771
  * Temperature status LEDs
773
  * Temperature status LEDs
772
  */
774
  */
773
-#if ENABLED(TEMP_STAT_LEDS) && !(PIN_EXISTS(STAT_LED_RED) && PIN_EXISTS(STAT_LED_BLUE))
774
-  #error "TEMP_STAT_LEDS requires STAT_LED_RED_PIN and STAT_LED_BLUE_PIN."
775
+#if ENABLED(TEMP_STAT_LEDS) && !PIN_EXISTS(STAT_LED_RED) && !PIN_EXISTS(STAT_LED_BLUE)
776
+  #error "TEMP_STAT_LEDS requires STAT_LED_RED_PIN or STAT_LED_BLUE_PIN, preferably both."
775
 #endif
777
 #endif
776
 
778
 
777
 /**
779
 /**
869
 #endif
871
 #endif
870
 
872
 
871
 /**
873
 /**
874
+ * Auto Fan check for PWM pins
875
+ */
876
+#if HAS_AUTO_FAN && EXTRUDER_AUTO_FAN_SPEED != 255
877
+  #define AF_ERR_SUFF "_AUTO_FAN_PIN is not a PWM pin. Set EXTRUDER_AUTO_FAN_SPEED to 255."
878
+  #if HAS_AUTO_FAN_0
879
+    static_assert(GET_TIMER(E0_AUTO_FAN_PIN), "E0" AF_ERR_SUFF);
880
+  #elif HAS_AUTO_FAN_1
881
+    static_assert(GET_TIMER(E1_AUTO_FAN_PIN), "E1" AF_ERR_SUFF);
882
+  #elif HAS_AUTO_FAN_2
883
+    static_assert(GET_TIMER(E2_AUTO_FAN_PIN), "E2" AF_ERR_SUFF);
884
+  #elif HAS_AUTO_FAN_3
885
+    static_assert(GET_TIMER(E3_AUTO_FAN_PIN), "E3" AF_ERR_SUFF);
886
+  #endif
887
+#endif
888
+
889
+
890
+/**
872
  * Make sure only one display is enabled
891
  * Make sure only one display is enabled
873
  *
892
  *
874
  * Note: BQ_LCD_SMART_CONTROLLER => REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
893
  * Note: BQ_LCD_SMART_CONTROLLER => REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
942
 #else
961
 #else
943
   #define COUNT_LCD_13 COUNT_LCD_12
962
   #define COUNT_LCD_13 COUNT_LCD_12
944
 #endif
963
 #endif
945
-#if ENABLED(REPRAPWORLD_KEYPAD)
964
+#if ENABLED(REPRAPWORLD_KEYPAD) && DISABLED(CARTESIO_UI)
946
   #define COUNT_LCD_14 INCREMENT(COUNT_LCD_13)
965
   #define COUNT_LCD_14 INCREMENT(COUNT_LCD_13)
947
 #else
966
 #else
948
   #define COUNT_LCD_14 COUNT_LCD_13
967
   #define COUNT_LCD_14 COUNT_LCD_13

+ 16
- 9
Marlin/example_configurations/Cartesio/Configuration_adv.h View File

205
 
205
 
206
 // @section extruder
206
 // @section extruder
207
 
207
 
208
-// Extruder cooling fans
209
-// Configure fan pin outputs to automatically turn on/off when the associated
210
-// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
211
-// Multiple extruders can be assigned to the same pin in which case
212
-// the fan will turn on when any selected extruder is above the threshold.
213
-#define EXTRUDER_0_AUTO_FAN_PIN 7
214
-#define EXTRUDER_1_AUTO_FAN_PIN 7
215
-#define EXTRUDER_2_AUTO_FAN_PIN -1
216
-#define EXTRUDER_3_AUTO_FAN_PIN -1
208
+/**
209
+ * Extruder cooling fans
210
+ *
211
+ * Extruder auto fans automatically turn on when their extruders'
212
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
213
+ *
214
+ * Your board's pins file specifies the recommended pins. Override those here
215
+ * or set to -1 to disable completely.
216
+ *
217
+ * Multiple extruders can be assigned to the same pin in which case
218
+ * the fan will turn on when any selected extruder is above the threshold.
219
+ */
220
+//#define E0_AUTO_FAN_PIN -1
221
+//#define E1_AUTO_FAN_PIN -1
222
+#define E2_AUTO_FAN_PIN -1
223
+#define E3_AUTO_FAN_PIN -1
217
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 35
224
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 35
218
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
225
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
219
 
226
 

+ 16
- 9
Marlin/example_configurations/Felix/Configuration_adv.h View File

205
 
205
 
206
 // @section extruder
206
 // @section extruder
207
 
207
 
208
-// Extruder cooling fans
209
-// Configure fan pin outputs to automatically turn on/off when the associated
210
-// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
211
-// Multiple extruders can be assigned to the same pin in which case
212
-// the fan will turn on when any selected extruder is above the threshold.
213
-#define EXTRUDER_0_AUTO_FAN_PIN -1
214
-#define EXTRUDER_1_AUTO_FAN_PIN -1
215
-#define EXTRUDER_2_AUTO_FAN_PIN -1
216
-#define EXTRUDER_3_AUTO_FAN_PIN -1
208
+/**
209
+ * Extruder cooling fans
210
+ *
211
+ * Extruder auto fans automatically turn on when their extruders'
212
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
213
+ *
214
+ * Your board's pins file specifies the recommended pins. Override those here
215
+ * or set to -1 to disable completely.
216
+ *
217
+ * Multiple extruders can be assigned to the same pin in which case
218
+ * the fan will turn on when any selected extruder is above the threshold.
219
+ */
220
+#define E0_AUTO_FAN_PIN -1
221
+#define E1_AUTO_FAN_PIN -1
222
+#define E2_AUTO_FAN_PIN -1
223
+#define E3_AUTO_FAN_PIN -1
217
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
224
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
218
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
225
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
219
 
226
 

+ 16
- 9
Marlin/example_configurations/Hephestos/Configuration_adv.h View File

205
 
205
 
206
 // @section extruder
206
 // @section extruder
207
 
207
 
208
-// Extruder cooling fans
209
-// Configure fan pin outputs to automatically turn on/off when the associated
210
-// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
211
-// Multiple extruders can be assigned to the same pin in which case
212
-// the fan will turn on when any selected extruder is above the threshold.
213
-#define EXTRUDER_0_AUTO_FAN_PIN -1
214
-#define EXTRUDER_1_AUTO_FAN_PIN -1
215
-#define EXTRUDER_2_AUTO_FAN_PIN -1
216
-#define EXTRUDER_3_AUTO_FAN_PIN -1
208
+/**
209
+ * Extruder cooling fans
210
+ *
211
+ * Extruder auto fans automatically turn on when their extruders'
212
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
213
+ *
214
+ * Your board's pins file specifies the recommended pins. Override those here
215
+ * or set to -1 to disable completely.
216
+ *
217
+ * Multiple extruders can be assigned to the same pin in which case
218
+ * the fan will turn on when any selected extruder is above the threshold.
219
+ */
220
+#define E0_AUTO_FAN_PIN -1
221
+#define E1_AUTO_FAN_PIN -1
222
+#define E2_AUTO_FAN_PIN -1
223
+#define E3_AUTO_FAN_PIN -1
217
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
224
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
218
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
225
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
219
 
226
 

+ 16
- 9
Marlin/example_configurations/Hephestos_2/Configuration_adv.h View File

205
 
205
 
206
 // @section extruder
206
 // @section extruder
207
 
207
 
208
-// Extruder cooling fans
209
-// Configure fan pin outputs to automatically turn on/off when the associated
210
-// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
211
-// Multiple extruders can be assigned to the same pin in which case
212
-// the fan will turn on when any selected extruder is above the threshold.
213
-#define EXTRUDER_0_AUTO_FAN_PIN 11
214
-#define EXTRUDER_1_AUTO_FAN_PIN  6
215
-#define EXTRUDER_2_AUTO_FAN_PIN -1
216
-#define EXTRUDER_3_AUTO_FAN_PIN -1
208
+/**
209
+ * Extruder cooling fans
210
+ *
211
+ * Extruder auto fans automatically turn on when their extruders'
212
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
213
+ *
214
+ * Your board's pins file specifies the recommended pins. Override those here
215
+ * or set to -1 to disable completely.
216
+ *
217
+ * Multiple extruders can be assigned to the same pin in which case
218
+ * the fan will turn on when any selected extruder is above the threshold.
219
+ */
220
+//#define E0_AUTO_FAN_PIN -1
221
+//#define E1_AUTO_FAN_PIN -1
222
+#define E2_AUTO_FAN_PIN -1
223
+#define E3_AUTO_FAN_PIN -1
217
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
224
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
218
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
225
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
219
 
226
 

+ 16
- 9
Marlin/example_configurations/K8200/Configuration_adv.h View File

211
 
211
 
212
 // @section extruder
212
 // @section extruder
213
 
213
 
214
-// Extruder cooling fans
215
-// Configure fan pin outputs to automatically turn on/off when the associated
216
-// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
217
-// Multiple extruders can be assigned to the same pin in which case
218
-// the fan will turn on when any selected extruder is above the threshold.
219
-#define EXTRUDER_0_AUTO_FAN_PIN -1
220
-#define EXTRUDER_1_AUTO_FAN_PIN -1
221
-#define EXTRUDER_2_AUTO_FAN_PIN -1
222
-#define EXTRUDER_3_AUTO_FAN_PIN -1
214
+/**
215
+ * Extruder cooling fans
216
+ *
217
+ * Extruder auto fans automatically turn on when their extruders'
218
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
219
+ *
220
+ * Your board's pins file specifies the recommended pins. Override those here
221
+ * or set to -1 to disable completely.
222
+ *
223
+ * Multiple extruders can be assigned to the same pin in which case
224
+ * the fan will turn on when any selected extruder is above the threshold.
225
+ */
226
+#define E0_AUTO_FAN_PIN -1
227
+#define E1_AUTO_FAN_PIN -1
228
+#define E2_AUTO_FAN_PIN -1
229
+#define E3_AUTO_FAN_PIN -1
223
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
230
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
224
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
231
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
225
 
232
 

+ 16
- 9
Marlin/example_configurations/K8400/Configuration_adv.h View File

205
 
205
 
206
 // @section extruder
206
 // @section extruder
207
 
207
 
208
-// Extruder cooling fans
209
-// Configure fan pin outputs to automatically turn on/off when the associated
210
-// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
211
-// Multiple extruders can be assigned to the same pin in which case
212
-// the fan will turn on when any selected extruder is above the threshold.
213
-#define EXTRUDER_0_AUTO_FAN_PIN -1
214
-#define EXTRUDER_1_AUTO_FAN_PIN -1
215
-#define EXTRUDER_2_AUTO_FAN_PIN -1
216
-#define EXTRUDER_3_AUTO_FAN_PIN -1
208
+/**
209
+ * Extruder cooling fans
210
+ *
211
+ * Extruder auto fans automatically turn on when their extruders'
212
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
213
+ *
214
+ * Your board's pins file specifies the recommended pins. Override those here
215
+ * or set to -1 to disable completely.
216
+ *
217
+ * Multiple extruders can be assigned to the same pin in which case
218
+ * the fan will turn on when any selected extruder is above the threshold.
219
+ */
220
+#define E0_AUTO_FAN_PIN -1
221
+#define E1_AUTO_FAN_PIN -1
222
+#define E2_AUTO_FAN_PIN -1
223
+#define E3_AUTO_FAN_PIN -1
217
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
224
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
218
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
225
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
219
 
226
 

+ 16
- 9
Marlin/example_configurations/RigidBot/Configuration_adv.h View File

205
 
205
 
206
 // @section extruder
206
 // @section extruder
207
 
207
 
208
-// Extruder cooling fans
209
-// Configure fan pin outputs to automatically turn on/off when the associated
210
-// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
211
-// Multiple extruders can be assigned to the same pin in which case
212
-// the fan will turn on when any selected extruder is above the threshold.
213
-#define EXTRUDER_0_AUTO_FAN_PIN -1
214
-#define EXTRUDER_1_AUTO_FAN_PIN -1
215
-#define EXTRUDER_2_AUTO_FAN_PIN -1
216
-#define EXTRUDER_3_AUTO_FAN_PIN -1
208
+/**
209
+ * Extruder cooling fans
210
+ *
211
+ * Extruder auto fans automatically turn on when their extruders'
212
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
213
+ *
214
+ * Your board's pins file specifies the recommended pins. Override those here
215
+ * or set to -1 to disable completely.
216
+ *
217
+ * Multiple extruders can be assigned to the same pin in which case
218
+ * the fan will turn on when any selected extruder is above the threshold.
219
+ */
220
+#define E0_AUTO_FAN_PIN -1
221
+#define E1_AUTO_FAN_PIN -1
222
+#define E2_AUTO_FAN_PIN -1
223
+#define E3_AUTO_FAN_PIN -1
217
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
224
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
218
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
225
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
219
 
226
 

+ 16
- 9
Marlin/example_configurations/SCARA/Configuration_adv.h View File

205
 
205
 
206
 // @section extruder
206
 // @section extruder
207
 
207
 
208
-// Extruder cooling fans
209
-// Configure fan pin outputs to automatically turn on/off when the associated
210
-// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
211
-// Multiple extruders can be assigned to the same pin in which case
212
-// the fan will turn on when any selected extruder is above the threshold.
213
-#define EXTRUDER_0_AUTO_FAN_PIN -1
214
-#define EXTRUDER_1_AUTO_FAN_PIN -1
215
-#define EXTRUDER_2_AUTO_FAN_PIN -1
216
-#define EXTRUDER_3_AUTO_FAN_PIN -1
208
+/**
209
+ * Extruder cooling fans
210
+ *
211
+ * Extruder auto fans automatically turn on when their extruders'
212
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
213
+ *
214
+ * Your board's pins file specifies the recommended pins. Override those here
215
+ * or set to -1 to disable completely.
216
+ *
217
+ * Multiple extruders can be assigned to the same pin in which case
218
+ * the fan will turn on when any selected extruder is above the threshold.
219
+ */
220
+#define E0_AUTO_FAN_PIN -1
221
+#define E1_AUTO_FAN_PIN -1
222
+#define E2_AUTO_FAN_PIN -1
223
+#define E3_AUTO_FAN_PIN -1
217
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
224
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
218
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
225
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
219
 
226
 

+ 16
- 9
Marlin/example_configurations/TAZ4/Configuration_adv.h View File

213
 
213
 
214
 // @section extruder
214
 // @section extruder
215
 
215
 
216
-// Extruder cooling fans
217
-// Configure fan pin outputs to automatically turn on/off when the associated
218
-// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
219
-// Multiple extruders can be assigned to the same pin in which case
220
-// the fan will turn on when any selected extruder is above the threshold.
221
-#define EXTRUDER_0_AUTO_FAN_PIN -1
222
-#define EXTRUDER_1_AUTO_FAN_PIN -1
223
-#define EXTRUDER_2_AUTO_FAN_PIN -1
224
-#define EXTRUDER_3_AUTO_FAN_PIN -1
216
+/**
217
+ * Extruder cooling fans
218
+ *
219
+ * Extruder auto fans automatically turn on when their extruders'
220
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
221
+ *
222
+ * Your board's pins file specifies the recommended pins. Override those here
223
+ * or set to -1 to disable completely.
224
+ *
225
+ * Multiple extruders can be assigned to the same pin in which case
226
+ * the fan will turn on when any selected extruder is above the threshold.
227
+ */
228
+#define E0_AUTO_FAN_PIN -1
229
+#define E1_AUTO_FAN_PIN -1
230
+#define E2_AUTO_FAN_PIN -1
231
+#define E3_AUTO_FAN_PIN -1
225
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
232
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
226
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
233
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
227
 
234
 

+ 16
- 9
Marlin/example_configurations/WITBOX/Configuration_adv.h View File

205
 
205
 
206
 // @section extruder
206
 // @section extruder
207
 
207
 
208
-// Extruder cooling fans
209
-// Configure fan pin outputs to automatically turn on/off when the associated
210
-// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
211
-// Multiple extruders can be assigned to the same pin in which case
212
-// the fan will turn on when any selected extruder is above the threshold.
213
-#define EXTRUDER_0_AUTO_FAN_PIN -1
214
-#define EXTRUDER_1_AUTO_FAN_PIN -1
215
-#define EXTRUDER_2_AUTO_FAN_PIN -1
216
-#define EXTRUDER_3_AUTO_FAN_PIN -1
208
+/**
209
+ * Extruder cooling fans
210
+ *
211
+ * Extruder auto fans automatically turn on when their extruders'
212
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
213
+ *
214
+ * Your board's pins file specifies the recommended pins. Override those here
215
+ * or set to -1 to disable completely.
216
+ *
217
+ * Multiple extruders can be assigned to the same pin in which case
218
+ * the fan will turn on when any selected extruder is above the threshold.
219
+ */
220
+#define E0_AUTO_FAN_PIN -1
221
+#define E1_AUTO_FAN_PIN -1
222
+#define E2_AUTO_FAN_PIN -1
223
+#define E3_AUTO_FAN_PIN -1
217
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
224
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
218
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
225
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
219
 
226
 

+ 16
- 9
Marlin/example_configurations/delta/biv2.5/Configuration_adv.h View File

205
 
205
 
206
 // @section extruder
206
 // @section extruder
207
 
207
 
208
-// Extruder cooling fans
209
-// Configure fan pin outputs to automatically turn on/off when the associated
210
-// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
211
-// Multiple extruders can be assigned to the same pin in which case
212
-// the fan will turn on when any selected extruder is above the threshold.
213
-#define EXTRUDER_0_AUTO_FAN_PIN -1
214
-#define EXTRUDER_1_AUTO_FAN_PIN -1
215
-#define EXTRUDER_2_AUTO_FAN_PIN -1
216
-#define EXTRUDER_3_AUTO_FAN_PIN -1
208
+/**
209
+ * Extruder cooling fans
210
+ *
211
+ * Extruder auto fans automatically turn on when their extruders'
212
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
213
+ *
214
+ * Your board's pins file specifies the recommended pins.
215
+ * Override those here. Set to -1 to disable unused fans.
216
+ *
217
+ * Multiple extruders can be assigned to the same pin in which case
218
+ * the fan will turn on when any selected extruder is above the threshold.
219
+ */
220
+#define E0_AUTO_FAN_PIN -1
221
+#define E1_AUTO_FAN_PIN -1
222
+#define E2_AUTO_FAN_PIN -1
223
+#define E3_AUTO_FAN_PIN -1
217
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
224
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
218
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
225
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
219
 
226
 

+ 16
- 9
Marlin/example_configurations/delta/generic/Configuration_adv.h View File

205
 
205
 
206
 // @section extruder
206
 // @section extruder
207
 
207
 
208
-// Extruder cooling fans
209
-// Configure fan pin outputs to automatically turn on/off when the associated
210
-// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
211
-// Multiple extruders can be assigned to the same pin in which case
212
-// the fan will turn on when any selected extruder is above the threshold.
213
-#define EXTRUDER_0_AUTO_FAN_PIN -1
214
-#define EXTRUDER_1_AUTO_FAN_PIN -1
215
-#define EXTRUDER_2_AUTO_FAN_PIN -1
216
-#define EXTRUDER_3_AUTO_FAN_PIN -1
208
+/**
209
+ * Extruder cooling fans
210
+ *
211
+ * Extruder auto fans automatically turn on when their extruders'
212
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
213
+ *
214
+ * Your board's pins file specifies the recommended pins. Override those here
215
+ * or set to -1 to disable completely.
216
+ *
217
+ * Multiple extruders can be assigned to the same pin in which case
218
+ * the fan will turn on when any selected extruder is above the threshold.
219
+ */
220
+#define E0_AUTO_FAN_PIN -1
221
+#define E1_AUTO_FAN_PIN -1
222
+#define E2_AUTO_FAN_PIN -1
223
+#define E3_AUTO_FAN_PIN -1
217
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
224
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
218
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
225
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
219
 
226
 

+ 16
- 9
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h View File

205
 
205
 
206
 // @section extruder
206
 // @section extruder
207
 
207
 
208
-// Extruder cooling fans
209
-// Configure fan pin outputs to automatically turn on/off when the associated
210
-// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
211
-// Multiple extruders can be assigned to the same pin in which case
212
-// the fan will turn on when any selected extruder is above the threshold.
213
-#define EXTRUDER_0_AUTO_FAN_PIN -1
214
-#define EXTRUDER_1_AUTO_FAN_PIN -1
215
-#define EXTRUDER_2_AUTO_FAN_PIN -1
216
-#define EXTRUDER_3_AUTO_FAN_PIN -1
208
+/**
209
+ * Extruder cooling fans
210
+ *
211
+ * Extruder auto fans automatically turn on when their extruders'
212
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
213
+ *
214
+ * Your board's pins file specifies the recommended pins. Override those here
215
+ * or set to -1 to disable completely.
216
+ *
217
+ * Multiple extruders can be assigned to the same pin in which case
218
+ * the fan will turn on when any selected extruder is above the threshold.
219
+ */
220
+#define E0_AUTO_FAN_PIN -1
221
+#define E1_AUTO_FAN_PIN -1
222
+#define E2_AUTO_FAN_PIN -1
223
+#define E3_AUTO_FAN_PIN -1
217
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
224
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
218
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
225
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
219
 
226
 

+ 16
- 9
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h View File

210
 
210
 
211
 // @section extruder
211
 // @section extruder
212
 
212
 
213
-// Extruder cooling fans
214
-// Configure fan pin outputs to automatically turn on/off when the associated
215
-// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
216
-// Multiple extruders can be assigned to the same pin in which case
217
-// the fan will turn on when any selected extruder is above the threshold.
218
-#define EXTRUDER_0_AUTO_FAN_PIN -1
219
-#define EXTRUDER_1_AUTO_FAN_PIN -1
220
-#define EXTRUDER_2_AUTO_FAN_PIN -1
221
-#define EXTRUDER_3_AUTO_FAN_PIN -1
213
+/**
214
+ * Extruder cooling fans
215
+ *
216
+ * Extruder auto fans automatically turn on when their extruders'
217
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
218
+ *
219
+ * Your board's pins file specifies the recommended pins. Override those here
220
+ * or set to -1 to disable completely.
221
+ *
222
+ * Multiple extruders can be assigned to the same pin in which case
223
+ * the fan will turn on when any selected extruder is above the threshold.
224
+ */
225
+#define E0_AUTO_FAN_PIN -1
226
+#define E1_AUTO_FAN_PIN -1
227
+#define E2_AUTO_FAN_PIN -1
228
+#define E3_AUTO_FAN_PIN -1
222
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
229
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
223
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
230
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
224
 
231
 

+ 16
- 9
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h View File

205
 
205
 
206
 // @section extruder
206
 // @section extruder
207
 
207
 
208
-// Extruder cooling fans
209
-// Configure fan pin outputs to automatically turn on/off when the associated
210
-// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
211
-// Multiple extruders can be assigned to the same pin in which case
212
-// the fan will turn on when any selected extruder is above the threshold.
213
-#define EXTRUDER_0_AUTO_FAN_PIN -1
214
-#define EXTRUDER_1_AUTO_FAN_PIN -1
215
-#define EXTRUDER_2_AUTO_FAN_PIN -1
216
-#define EXTRUDER_3_AUTO_FAN_PIN -1
208
+/**
209
+ * Extruder cooling fans
210
+ *
211
+ * Extruder auto fans automatically turn on when their extruders'
212
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
213
+ *
214
+ * Your board's pins file specifies the recommended pins. Override those here
215
+ * or set to -1 to disable completely.
216
+ *
217
+ * Multiple extruders can be assigned to the same pin in which case
218
+ * the fan will turn on when any selected extruder is above the threshold.
219
+ */
220
+#define E0_AUTO_FAN_PIN -1
221
+#define E1_AUTO_FAN_PIN -1
222
+#define E2_AUTO_FAN_PIN -1
223
+#define E3_AUTO_FAN_PIN -1
217
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
224
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
218
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
225
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
219
 
226
 

+ 16
- 9
Marlin/example_configurations/makibox/Configuration_adv.h View File

205
 
205
 
206
 // @section extruder
206
 // @section extruder
207
 
207
 
208
-// Extruder cooling fans
209
-// Configure fan pin outputs to automatically turn on/off when the associated
210
-// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
211
-// Multiple extruders can be assigned to the same pin in which case
212
-// the fan will turn on when any selected extruder is above the threshold.
213
-#define EXTRUDER_0_AUTO_FAN_PIN -1
214
-#define EXTRUDER_1_AUTO_FAN_PIN -1
215
-#define EXTRUDER_2_AUTO_FAN_PIN -1
216
-#define EXTRUDER_3_AUTO_FAN_PIN -1
208
+/**
209
+ * Extruder cooling fans
210
+ *
211
+ * Extruder auto fans automatically turn on when their extruders'
212
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
213
+ *
214
+ * Your board's pins file specifies the recommended pins. Override those here
215
+ * or set to -1 to disable completely.
216
+ *
217
+ * Multiple extruders can be assigned to the same pin in which case
218
+ * the fan will turn on when any selected extruder is above the threshold.
219
+ */
220
+#define E0_AUTO_FAN_PIN -1
221
+#define E1_AUTO_FAN_PIN -1
222
+#define E2_AUTO_FAN_PIN -1
223
+#define E3_AUTO_FAN_PIN -1
217
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
224
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
218
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
225
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
219
 
226
 

+ 16
- 9
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h View File

205
 
205
 
206
 // @section extruder
206
 // @section extruder
207
 
207
 
208
-// Extruder cooling fans
209
-// Configure fan pin outputs to automatically turn on/off when the associated
210
-// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
211
-// Multiple extruders can be assigned to the same pin in which case
212
-// the fan will turn on when any selected extruder is above the threshold.
213
-#define EXTRUDER_0_AUTO_FAN_PIN -1
214
-#define EXTRUDER_1_AUTO_FAN_PIN -1
215
-#define EXTRUDER_2_AUTO_FAN_PIN -1
216
-#define EXTRUDER_3_AUTO_FAN_PIN -1
208
+/**
209
+ * Extruder cooling fans
210
+ *
211
+ * Extruder auto fans automatically turn on when their extruders'
212
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
213
+ *
214
+ * Your board's pins file specifies the recommended pins. Override those here
215
+ * or set to -1 to disable completely.
216
+ *
217
+ * Multiple extruders can be assigned to the same pin in which case
218
+ * the fan will turn on when any selected extruder is above the threshold.
219
+ */
220
+#define E0_AUTO_FAN_PIN -1
221
+#define E1_AUTO_FAN_PIN -1
222
+#define E2_AUTO_FAN_PIN -1
223
+#define E3_AUTO_FAN_PIN -1
217
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
224
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
218
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
225
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
219
 
226
 

+ 3
- 1
Marlin/fastio.h View File

79
 #define _GET_OUTPUT(IO)  ((DIO ## IO ## _DDR & MASK(DIO ## IO ## _PIN)) != 0)
79
 #define _GET_OUTPUT(IO)  ((DIO ## IO ## _DDR & MASK(DIO ## IO ## _PIN)) != 0)
80
 
80
 
81
 /// check if pin is an timer
81
 /// check if pin is an timer
82
-#define _GET_TIMER(IO)  ((DIO ## IO ## _PWM)
82
+#define _GET_TIMER(IO)  (DIO ## IO ## _PWM)
83
 
83
 
84
 //  why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
84
 //  why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
85
 
85
 
93
 
93
 
94
 /// set pin as input wrapper
94
 /// set pin as input wrapper
95
 #define SET_INPUT(IO)  _SET_INPUT(IO)
95
 #define SET_INPUT(IO)  _SET_INPUT(IO)
96
+/// set pin as input with pullup wrapper
97
+#define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _WRITE(IO, HIGH); }while(0)
96
 /// set pin as output wrapper
98
 /// set pin as output wrapper
97
 #define SET_OUTPUT(IO)  _SET_OUTPUT(IO)
99
 #define SET_OUTPUT(IO)  _SET_OUTPUT(IO)
98
 
100
 

+ 20
- 4
Marlin/pins.h View File

282
 // Marlin needs to account for pins that equal -1
282
 // Marlin needs to account for pins that equal -1
283
 #define marlinAnalogInputToDigitalPin(p) ((p) == -1 ? -1 : analogInputToDigitalPin(p))
283
 #define marlinAnalogInputToDigitalPin(p) ((p) == -1 ? -1 : analogInputToDigitalPin(p))
284
 
284
 
285
+//
286
+// Assign auto fan pins if needed
287
+//
288
+#if !defined(E0_AUTO_FAN_PIN) && defined(ORIG_E0_AUTO_FAN_PIN)
289
+  #define E0_AUTO_FAN_PIN ORIG_E0_AUTO_FAN_PIN
290
+#endif
291
+#if !defined(E1_AUTO_FAN_PIN) && defined(ORIG_E1_AUTO_FAN_PIN)
292
+  #define E1_AUTO_FAN_PIN ORIG_E1_AUTO_FAN_PIN
293
+#endif
294
+#if !defined(E2_AUTO_FAN_PIN) && defined(ORIG_E2_AUTO_FAN_PIN)
295
+  #define E2_AUTO_FAN_PIN ORIG_E2_AUTO_FAN_PIN
296
+#endif
297
+#if !defined(E3_AUTO_FAN_PIN) && defined(ORIG_E3_AUTO_FAN_PIN)
298
+  #define E3_AUTO_FAN_PIN ORIG_E3_AUTO_FAN_PIN
299
+#endif
300
+
285
 // List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
301
 // List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
286
 #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, E0_MS1_PIN, E0_MS2_PIN,
302
 #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, E0_MS1_PIN, E0_MS2_PIN,
287
 #define _E1_PINS
303
 #define _E1_PINS
306
   #endif
322
   #endif
307
 #endif
323
 #endif
308
 
324
 
309
-#define _H0_PINS HEATER_0_PIN, EXTRUDER_0_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_0_PIN),
325
+#define _H0_PINS HEATER_0_PIN, E0_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_0_PIN),
310
 #define _H1_PINS
326
 #define _H1_PINS
311
 #define _H2_PINS
327
 #define _H2_PINS
312
 #define _H3_PINS
328
 #define _H3_PINS
314
 
330
 
315
 #if HOTENDS > 1
331
 #if HOTENDS > 1
316
   #undef _H1_PINS
332
   #undef _H1_PINS
317
-  #define _H1_PINS HEATER_1_PIN, EXTRUDER_1_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_1_PIN),
333
+  #define _H1_PINS HEATER_1_PIN, E1_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_1_PIN),
318
   #if HOTENDS > 2
334
   #if HOTENDS > 2
319
     #undef _H2_PINS
335
     #undef _H2_PINS
320
-    #define _H2_PINS HEATER_2_PIN, EXTRUDER_2_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_2_PIN),
336
+    #define _H2_PINS HEATER_2_PIN, E2_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_2_PIN),
321
     #if HOTENDS > 3
337
     #if HOTENDS > 3
322
       #undef _H3_PINS
338
       #undef _H3_PINS
323
-      #define _H3_PINS HEATER_3_PIN, EXTRUDER_3_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_3_PIN),
339
+      #define _H3_PINS HEATER_3_PIN, E3_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_3_PIN),
324
       #if HOTENDS > 4
340
       #if HOTENDS > 4
325
         #undef _H4_PINS
341
         #undef _H4_PINS
326
         #define _H4_PINS HEATER_4_PIN, marlinAnalogInputToDigitalPin(TEMP_4_PIN),
342
         #define _H4_PINS HEATER_4_PIN, marlinAnalogInputToDigitalPin(TEMP_4_PIN),

+ 8
- 8
Marlin/pinsDebug.h View File

234
   #if PIN_EXISTS(CONTROLLERFAN)
234
   #if PIN_EXISTS(CONTROLLERFAN)
235
     PIN_SAY(CONTROLLERFAN_PIN);
235
     PIN_SAY(CONTROLLERFAN_PIN);
236
   #endif
236
   #endif
237
-  #if PIN_EXISTS(EXTRUDER_0_AUTO_FAN)
238
-    PIN_SAY(EXTRUDER_0_AUTO_FAN_PIN);
237
+  #if PIN_EXISTS(E0_AUTO_FAN)
238
+    PIN_SAY(E0_AUTO_FAN_PIN);
239
   #endif
239
   #endif
240
-  #if PIN_EXISTS(EXTRUDER_1_AUTO_FAN)
241
-    PIN_SAY(EXTRUDER_1_AUTO_FAN_PIN);
240
+  #if PIN_EXISTS(E1_AUTO_FAN)
241
+    PIN_SAY(E1_AUTO_FAN_PIN);
242
   #endif
242
   #endif
243
-  #if PIN_EXISTS(EXTRUDER_2_AUTO_FAN)
244
-    PIN_SAY(EXTRUDER_2_AUTO_FAN_PIN);
243
+  #if PIN_EXISTS(E2_AUTO_FAN)
244
+    PIN_SAY(E2_AUTO_FAN_PIN);
245
   #endif
245
   #endif
246
-  #if PIN_EXISTS(EXTRUDER_3_AUTO_FAN)
247
-    PIN_SAY(EXTRUDER_3_AUTO_FAN_PIN);
246
+  #if PIN_EXISTS(E3_AUTO_FAN)
247
+    PIN_SAY(E3_AUTO_FAN_PIN);
248
   #endif
248
   #endif
249
   #if PIN_EXISTS(HEATER_0)
249
   #if PIN_EXISTS(HEATER_0)
250
     PIN_SAY(HEATER_0_PIN);
250
     PIN_SAY(HEATER_0_PIN);

+ 4
- 4
Marlin/pins_AZTEEG_X3_PRO.h View File

106
 #define CONTROLLERFAN_PIN   4 // Pin used for the fan to cool motherboard (-1 to disable)
106
 #define CONTROLLERFAN_PIN   4 // Pin used for the fan to cool motherboard (-1 to disable)
107
 
107
 
108
 // Fans/Water Pump to cool the hotend cool side.
108
 // Fans/Water Pump to cool the hotend cool side.
109
-#define EXTRUDER_0_AUTO_FAN_PIN   5
110
-#define EXTRUDER_1_AUTO_FAN_PIN   5
111
-#define EXTRUDER_2_AUTO_FAN_PIN   5
112
-#define EXTRUDER_3_AUTO_FAN_PIN   5
109
+#define ORIG_E0_AUTO_FAN_PIN 5
110
+#define ORIG_E1_AUTO_FAN_PIN 5
111
+#define ORIG_E2_AUTO_FAN_PIN 5
112
+#define ORIG_E3_AUTO_FAN_PIN 5
113
 
113
 
114
 //
114
 //
115
 // LCD / Controller
115
 // LCD / Controller

+ 8
- 0
Marlin/pins_BQ_ZUM_MEGA_3D.h View File

38
 #define RAMPS_D10_PIN  9
38
 #define RAMPS_D10_PIN  9
39
 #define MOSFET_D_PIN   7
39
 #define MOSFET_D_PIN   7
40
 
40
 
41
+//
42
+// Auto fans
43
+//
44
+#define ORIG_E0_AUTO_FAN_PIN 11
45
+#define ORIG_E1_AUTO_FAN_PIN  6
46
+#define ORIG_E2_AUTO_FAN_PIN  6 
47
+#define ORIG_E3_AUTO_FAN_PIN  6
48
+
41
 #include "pins_RAMPS_13.h"
49
 #include "pins_RAMPS_13.h"
42
 
50
 
43
 //
51
 //

+ 5
- 0
Marlin/pins_CNCONTROLS_11.h View File

69
 
69
 
70
 //#define FAN_PIN           7  // common PWM pin for all tools
70
 //#define FAN_PIN           7  // common PWM pin for all tools
71
 
71
 
72
+#define ORIG_E0_AUTO_FAN_PIN 7
73
+#define ORIG_E1_AUTO_FAN_PIN 7
74
+#define ORIG_E2_AUTO_FAN_PIN 7
75
+#define ORIG_E3_AUTO_FAN_PIN 7
76
+
72
 //
77
 //
73
 // Misc. Functions
78
 // Misc. Functions
74
 //
79
 //

+ 5
- 0
Marlin/pins_CNCONTROLS_12.h View File

69
 
69
 
70
 #define FAN_PIN             5  // 5 is PWMtool3 -> 7 is common PWM pin for all tools
70
 #define FAN_PIN             5  // 5 is PWMtool3 -> 7 is common PWM pin for all tools
71
 
71
 
72
+#define ORIG_E0_AUTO_FAN_PIN 7
73
+#define ORIG_E1_AUTO_FAN_PIN 7
74
+#define ORIG_E2_AUTO_FAN_PIN 7
75
+#define ORIG_E3_AUTO_FAN_PIN 7
76
+
72
 //
77
 //
73
 // Misc. Functions
78
 // Misc. Functions
74
 //
79
 //

+ 17
- 17
Marlin/temperature.cpp View File

454
 #if HAS_AUTO_FAN
454
 #if HAS_AUTO_FAN
455
 
455
 
456
   void Temperature::checkExtruderAutoFans() {
456
   void Temperature::checkExtruderAutoFans() {
457
-    const int8_t fanPin[] = { EXTRUDER_0_AUTO_FAN_PIN, EXTRUDER_1_AUTO_FAN_PIN, EXTRUDER_2_AUTO_FAN_PIN, EXTRUDER_3_AUTO_FAN_PIN };
457
+    const int8_t fanPin[] = { E0_AUTO_FAN_PIN, E1_AUTO_FAN_PIN, E2_AUTO_FAN_PIN, E3_AUTO_FAN_PIN };
458
     const int fanBit[] = {
458
     const int fanBit[] = {
459
                     0,
459
                     0,
460
       AUTO_1_IS_0 ? 0 :               1,
460
       AUTO_1_IS_0 ? 0 :               1,
1043
   #endif
1043
   #endif
1044
 
1044
 
1045
   #if HAS_AUTO_FAN_0
1045
   #if HAS_AUTO_FAN_0
1046
-    #if EXTRUDER_0_AUTO_FAN_PIN == FAN1_PIN
1047
-      SET_OUTPUT(EXTRUDER_0_AUTO_FAN_PIN);
1046
+    #if E0_AUTO_FAN_PIN == FAN1_PIN
1047
+      SET_OUTPUT(E0_AUTO_FAN_PIN);
1048
       #if ENABLED(FAST_PWM_FAN)
1048
       #if ENABLED(FAST_PWM_FAN)
1049
-        setPwmFrequency(EXTRUDER_0_AUTO_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
1049
+        setPwmFrequency(E0_AUTO_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
1050
       #endif
1050
       #endif
1051
     #else
1051
     #else
1052
-      pinMode(EXTRUDER_0_AUTO_FAN_PIN, OUTPUT);
1052
+      SET_OUTPUT(E0_AUTO_FAN_PIN);
1053
     #endif
1053
     #endif
1054
   #endif
1054
   #endif
1055
   #if HAS_AUTO_FAN_1 && !AUTO_1_IS_0
1055
   #if HAS_AUTO_FAN_1 && !AUTO_1_IS_0
1056
-    #if EXTRUDER_1_AUTO_FAN_PIN == FAN1_PIN
1057
-      SET_OUTPUT(EXTRUDER_1_AUTO_FAN_PIN);
1056
+    #if E1_AUTO_FAN_PIN == FAN1_PIN
1057
+      SET_OUTPUT(E1_AUTO_FAN_PIN);
1058
       #if ENABLED(FAST_PWM_FAN)
1058
       #if ENABLED(FAST_PWM_FAN)
1059
-        setPwmFrequency(EXTRUDER_1_AUTO_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
1059
+        setPwmFrequency(E1_AUTO_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
1060
       #endif
1060
       #endif
1061
     #else
1061
     #else
1062
-      pinMode(EXTRUDER_1_AUTO_FAN_PIN, OUTPUT);
1062
+      SET_OUTPUT(E1_AUTO_FAN_PIN);
1063
     #endif
1063
     #endif
1064
   #endif
1064
   #endif
1065
   #if HAS_AUTO_FAN_2 && !AUTO_2_IS_0 && !AUTO_2_IS_1
1065
   #if HAS_AUTO_FAN_2 && !AUTO_2_IS_0 && !AUTO_2_IS_1
1066
-    #if EXTRUDER_2_AUTO_FAN_PIN == FAN1_PIN
1067
-      SET_OUTPUT(EXTRUDER_2_AUTO_FAN_PIN);
1066
+    #if E2_AUTO_FAN_PIN == FAN1_PIN
1067
+      SET_OUTPUT(E2_AUTO_FAN_PIN);
1068
       #if ENABLED(FAST_PWM_FAN)
1068
       #if ENABLED(FAST_PWM_FAN)
1069
-        setPwmFrequency(EXTRUDER_2_AUTO_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
1069
+        setPwmFrequency(E2_AUTO_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
1070
       #endif
1070
       #endif
1071
     #else
1071
     #else
1072
-      pinMode(EXTRUDER_2_AUTO_FAN_PIN, OUTPUT);
1072
+      SET_OUTPUT(E2_AUTO_FAN_PIN);
1073
     #endif
1073
     #endif
1074
   #endif
1074
   #endif
1075
   #if HAS_AUTO_FAN_3 && !AUTO_3_IS_0 && !AUTO_3_IS_1 && !AUTO_3_IS_2
1075
   #if HAS_AUTO_FAN_3 && !AUTO_3_IS_0 && !AUTO_3_IS_1 && !AUTO_3_IS_2
1076
-    #if EXTRUDER_3_AUTO_FAN_PIN == FAN1_PIN
1077
-      SET_OUTPUT(EXTRUDER_3_AUTO_FAN_PIN);
1076
+    #if E3_AUTO_FAN_PIN == FAN1_PIN
1077
+      SET_OUTPUT(E3_AUTO_FAN_PIN);
1078
       #if ENABLED(FAST_PWM_FAN)
1078
       #if ENABLED(FAST_PWM_FAN)
1079
-        setPwmFrequency(EXTRUDER_3_AUTO_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
1079
+        setPwmFrequency(E3_AUTO_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
1080
       #endif
1080
       #endif
1081
     #else
1081
     #else
1082
-      pinMode(EXTRUDER_3_AUTO_FAN_PIN, OUTPUT);
1082
+      SET_OUTPUT(E3_AUTO_FAN_PIN);
1083
     #endif
1083
     #endif
1084
   #endif
1084
   #endif
1085
 
1085
 

+ 10
- 14
Marlin/ultralcd.cpp View File

2390
         case X_AXIS: lcd_move_x(); break;
2390
         case X_AXIS: lcd_move_x(); break;
2391
         case Y_AXIS: lcd_move_y(); break;
2391
         case Y_AXIS: lcd_move_y(); break;
2392
         case Z_AXIS: lcd_move_z();
2392
         case Z_AXIS: lcd_move_z();
2393
+        default: break;
2393
       }
2394
       }
2394
     }
2395
     }
2395
     static void reprapworld_keypad_move_z_up()    { _reprapworld_keypad_move(Z_AXIS,  1); }
2396
     static void reprapworld_keypad_move_z_up()    { _reprapworld_keypad_move(Z_AXIS,  1); }
2490
     #endif
2491
     #endif
2491
 
2492
 
2492
     #if ENABLED(REPRAPWORLD_KEYPAD)
2493
     #if ENABLED(REPRAPWORLD_KEYPAD)
2493
-      pinMode(SHIFT_CLK, OUTPUT);
2494
-      pinMode(SHIFT_LD, OUTPUT);
2495
-      pinMode(SHIFT_OUT, INPUT);
2496
-      WRITE(SHIFT_OUT, HIGH);
2497
-      WRITE(SHIFT_LD, HIGH);
2494
+      SET_OUTPUT(SHIFT_CLK);
2495
+      OUT_WRITE(SHIFT_LD, HIGH);
2496
+      SET_INPUT_PULLUP(SHIFT_OUT);
2498
     #endif
2497
     #endif
2499
 
2498
 
2500
     #if BUTTON_EXISTS(UP)
2499
     #if BUTTON_EXISTS(UP)
2513
   #else // !NEWPANEL
2512
   #else // !NEWPANEL
2514
 
2513
 
2515
     #if ENABLED(SR_LCD_2W_NL) // Non latching 2 wire shift register
2514
     #if ENABLED(SR_LCD_2W_NL) // Non latching 2 wire shift register
2516
-      pinMode(SR_DATA_PIN, OUTPUT);
2517
-      pinMode(SR_CLK_PIN, OUTPUT);
2515
+      SET_OUTPUT(SR_DATA_PIN);
2516
+      SET_OUTPUT(SR_CLK_PIN);
2518
     #elif defined(SHIFT_CLK)
2517
     #elif defined(SHIFT_CLK)
2519
-      pinMode(SHIFT_CLK, OUTPUT);
2520
-      pinMode(SHIFT_LD, OUTPUT);
2521
-      pinMode(SHIFT_EN, OUTPUT);
2522
-      pinMode(SHIFT_OUT, INPUT);
2523
-      WRITE(SHIFT_OUT, HIGH);
2524
-      WRITE(SHIFT_LD, HIGH);
2525
-      WRITE(SHIFT_EN, LOW);
2518
+      SET_OUTPUT(SHIFT_CLK);
2519
+      OUT_WRITE(SHIFT_LD, HIGH);
2520
+      OUT_WRITE(SHIFT_EN, LOW);
2521
+      SET_INPUT_PULLUP(SHIFT_OUT);
2526
     #endif // SR_LCD_2W_NL
2522
     #endif // SR_LCD_2W_NL
2527
 
2523
 
2528
   #endif // !NEWPANEL
2524
   #endif // !NEWPANEL

Loading…
Cancel
Save