Browse Source

Add CONTROLLER_FAN_IGNORE_Z (#18735)

InsanityAutomation 4 years ago
parent
commit
2c61e6ba28
No account linked to committer's email address

+ 1
- 0
Marlin/Configuration_adv.h View File

375
 #if ENABLED(USE_CONTROLLER_FAN)
375
 #if ENABLED(USE_CONTROLLER_FAN)
376
   //#define CONTROLLER_FAN_PIN -1        // Set a custom pin for the controller fan
376
   //#define CONTROLLER_FAN_PIN -1        // Set a custom pin for the controller fan
377
   //#define CONTROLLER_FAN_USE_Z_ONLY    // With this option only the Z axis is considered
377
   //#define CONTROLLER_FAN_USE_Z_ONLY    // With this option only the Z axis is considered
378
+  //#define CONTROLLER_FAN_IGNORE_Z      // Ignore Z stepper. Useful when stepper timeout is disabled.
378
   #define CONTROLLERFAN_SPEED_MIN      0 // (0-255) Minimum speed. (If set below this value the fan is turned off.)
379
   #define CONTROLLERFAN_SPEED_MIN      0 // (0-255) Minimum speed. (If set below this value the fan is turned off.)
379
   #define CONTROLLERFAN_SPEED_ACTIVE 255 // (0-255) Active speed, used when any motor is enabled
380
   #define CONTROLLERFAN_SPEED_ACTIVE 255 // (0-255) Active speed, used when any motor is enabled
380
   #define CONTROLLERFAN_SPEED_IDLE     0 // (0-255) Idle speed, used when motors are disabled
381
   #define CONTROLLERFAN_SPEED_IDLE     0 // (0-255) Idle speed, used when motors are disabled

+ 13
- 19
Marlin/src/feature/controllerfan.cpp View File

55
     #define MOTOR_IS_ON(A,B) (A##_ENABLE_READ() == bool(B##_ENABLE_ON))
55
     #define MOTOR_IS_ON(A,B) (A##_ENABLE_READ() == bool(B##_ENABLE_ON))
56
     #define _OR_ENABLED_E(N) || MOTOR_IS_ON(E##N,E)
56
     #define _OR_ENABLED_E(N) || MOTOR_IS_ON(E##N,E)
57
 
57
 
58
-    const bool motor_on = MOTOR_IS_ON(Z,Z)
59
-      #if HAS_Z2_ENABLE
60
-        || MOTOR_IS_ON(Z2,Z)
61
-      #endif
62
-      #if HAS_Z3_ENABLE
63
-        || MOTOR_IS_ON(Z3,Z)
64
-      #endif
65
-      #if HAS_Z4_ENABLE
66
-        || MOTOR_IS_ON(Z4,Z)
67
-      #endif
68
-      || (DISABLED(CONTROLLER_FAN_USE_Z_ONLY) && (
69
-          MOTOR_IS_ON(X,X) || MOTOR_IS_ON(Y,Y)
70
-          #if HAS_X2_ENABLE
71
-            || MOTOR_IS_ON(X2,X)
72
-          #endif
73
-          #if HAS_Y2_ENABLE
74
-            || MOTOR_IS_ON(Y2,Y)
75
-          #endif
58
+    const bool motor_on = (
59
+      ( DISABLED(CONTROLLER_FAN_IGNORE_Z) &&
60
+        (    MOTOR_IS_ON(Z,Z)
61
+          || TERN0(HAS_Z2_ENABLE, MOTOR_IS_ON(Z2,Z))
62
+          || TERN0(HAS_Z3_ENABLE, MOTOR_IS_ON(Z3,Z))
63
+          || TERN0(HAS_Z4_ENABLE, MOTOR_IS_ON(Z4,Z))
64
+        )
65
+      ) || (
66
+        DISABLED(CONTROLLER_FAN_USE_Z_ONLY) &&
67
+        (    MOTOR_IS_ON(X,X) || MOTOR_IS_ON(Y,Y)
68
+          || TERN0(HAS_X2_ENABLE, MOTOR_IS_ON(X2,X))
69
+          || TERN0(HAS_Y2_ENABLE, MOTOR_IS_ON(Y2,Y))
76
           #if E_STEPPERS
70
           #if E_STEPPERS
77
             REPEAT(E_STEPPERS, _OR_ENABLED_E)
71
             REPEAT(E_STEPPERS, _OR_ENABLED_E)
78
           #endif
72
           #endif
79
         )
73
         )
80
       )
74
       )
81
-    ;
75
+    );
82
 
76
 
83
     // If any of the drivers or the heated bed are enabled...
77
     // If any of the drivers or the heated bed are enabled...
84
     if (motor_on || TERN0(HAS_HEATED_BED, thermalManager.temp_bed.soft_pwm_amount > 0))
78
     if (motor_on || TERN0(HAS_HEATED_BED, thermalManager.temp_bed.soft_pwm_amount > 0))

+ 1
- 1
Marlin/src/feature/mmu2/mmu2.cpp View File

466
   }
466
   }
467
 }
467
 }
468
 
468
 
469
-static bool mmu2_not_responding() {
469
+static void mmu2_not_responding() {
470
   LCD_MESSAGEPGM(MSG_MMU2_NOT_RESPONDING);
470
   LCD_MESSAGEPGM(MSG_MMU2_NOT_RESPONDING);
471
   BUZZ(100, 659);
471
   BUZZ(100, 659);
472
   BUZZ(200, 698);
472
   BUZZ(200, 698);

+ 4
- 0
Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h View File

197
   #endif
197
   #endif
198
 #endif
198
 #endif
199
 
199
 
200
+#ifndef CONTROLLER_FAN_PIN
201
+  #define CONTROLLER_FAN_PIN         EX2_FAN_PIN
202
+#endif
203
+
200
 //
204
 //
201
 // Misc. Functions
205
 // Misc. Functions
202
 //
206
 //

+ 4
- 2
buildroot/tests/mega2560-tests View File

103
 restore_configs
103
 restore_configs
104
 opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO
104
 opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO
105
 opt_set LCD_LANGUAGE el_gr
105
 opt_set LCD_LANGUAGE el_gr
106
-opt_enable MIXING_EXTRUDER GRADIENT_MIX GRADIENT_VTOOL CR10_STOCKDISPLAY
106
+opt_enable MIXING_EXTRUDER GRADIENT_MIX GRADIENT_VTOOL CR10_STOCKDISPLAY \
107
+           USE_CONTROLLER_FAN CONTROLLER_FAN_EDITABLE CONTROLLER_FAN_IGNORE_Z
107
 opt_set MIXING_STEPPERS 5
108
 opt_set MIXING_STEPPERS 5
108
 opt_set LCD_LANGUAGE ru
109
 opt_set LCD_LANGUAGE ru
109
 exec_test $1 $2 "Azteeg X3 | Mixing Extruder (x5) | Gradient Mix | Greek"
110
 exec_test $1 $2 "Azteeg X3 | Mixing Extruder (x5) | Gradient Mix | Greek"
141
            FIX_MOUNTED_PROBE AUTO_BED_LEVELING_LINEAR DEBUG_LEVELING_FEATURE FILAMENT_WIDTH_SENSOR \
142
            FIX_MOUNTED_PROBE AUTO_BED_LEVELING_LINEAR DEBUG_LEVELING_FEATURE FILAMENT_WIDTH_SENSOR \
142
            Z_SAFE_HOMING SHOW_TEMP_ADC_VALUES HOME_Y_BEFORE_X EMERGENCY_PARSER \
143
            Z_SAFE_HOMING SHOW_TEMP_ADC_VALUES HOME_Y_BEFORE_X EMERGENCY_PARSER \
143
            SD_ABORT_ON_ENDSTOP_HIT HOST_ACTION_COMMANDS HOST_PROMPT_SUPPORT ADVANCED_OK M114_DETAIL \
144
            SD_ABORT_ON_ENDSTOP_HIT HOST_ACTION_COMMANDS HOST_PROMPT_SUPPORT ADVANCED_OK M114_DETAIL \
144
-           VOLUMETRIC_DEFAULT_ON NO_WORKSPACE_OFFSETS EXTRA_FAN_SPEED FWRETRACT
145
+           VOLUMETRIC_DEFAULT_ON NO_WORKSPACE_OFFSETS EXTRA_FAN_SPEED FWRETRACT \
146
+           USE_CONTROLLER_FAN CONTROLLER_FAN_EDITABLE CONTROLLER_FAN_USE_Z_ONLY
145
 opt_set FAN_MIN_PWM 50
147
 opt_set FAN_MIN_PWM 50
146
 opt_set FAN_KICKSTART_TIME 100
148
 opt_set FAN_KICKSTART_TIME 100
147
 opt_set XY_FREQUENCY_LIMIT 15
149
 opt_set XY_FREQUENCY_LIMIT 15

Loading…
Cancel
Save