Browse Source

Add CONTROLLER_FAN_IGNORE_Z (#18735)

vanilla_fb_2.0.x
InsanityAutomation 4 years ago
committed by GitHub
parent
commit
2c61e6ba28
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      Marlin/Configuration_adv.h
  2. 32
      Marlin/src/feature/controllerfan.cpp
  3. 2
      Marlin/src/feature/mmu2/mmu2.cpp
  4. 4
      Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h
  5. 6
      buildroot/tests/mega2560-tests

1
Marlin/Configuration_adv.h

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

32
Marlin/src/feature/controllerfan.cpp

@ -55,30 +55,24 @@ void ControllerFan::update() {
#define MOTOR_IS_ON(A,B) (A##_ENABLE_READ() == bool(B##_ENABLE_ON)) #define MOTOR_IS_ON(A,B) (A##_ENABLE_READ() == bool(B##_ENABLE_ON))
#define _OR_ENABLED_E(N) || MOTOR_IS_ON(E##N,E) #define _OR_ENABLED_E(N) || MOTOR_IS_ON(E##N,E)
const bool motor_on = MOTOR_IS_ON(Z,Z) const bool motor_on = (
#if HAS_Z2_ENABLE ( DISABLED(CONTROLLER_FAN_IGNORE_Z) &&
|| MOTOR_IS_ON(Z2,Z) ( MOTOR_IS_ON(Z,Z)
#endif || TERN0(HAS_Z2_ENABLE, MOTOR_IS_ON(Z2,Z))
#if HAS_Z3_ENABLE || TERN0(HAS_Z3_ENABLE, MOTOR_IS_ON(Z3,Z))
|| MOTOR_IS_ON(Z3,Z) || TERN0(HAS_Z4_ENABLE, MOTOR_IS_ON(Z4,Z))
#endif )
#if HAS_Z4_ENABLE ) || (
|| MOTOR_IS_ON(Z4,Z) DISABLED(CONTROLLER_FAN_USE_Z_ONLY) &&
#endif ( MOTOR_IS_ON(X,X) || MOTOR_IS_ON(Y,Y)
|| (DISABLED(CONTROLLER_FAN_USE_Z_ONLY) && ( || TERN0(HAS_X2_ENABLE, MOTOR_IS_ON(X2,X))
MOTOR_IS_ON(X,X) || MOTOR_IS_ON(Y,Y) || TERN0(HAS_Y2_ENABLE, MOTOR_IS_ON(Y2,Y))
#if HAS_X2_ENABLE
|| MOTOR_IS_ON(X2,X)
#endif
#if HAS_Y2_ENABLE
|| MOTOR_IS_ON(Y2,Y)
#endif
#if E_STEPPERS #if E_STEPPERS
REPEAT(E_STEPPERS, _OR_ENABLED_E) REPEAT(E_STEPPERS, _OR_ENABLED_E)
#endif #endif
) )
) )
; );
// If any of the drivers or the heated bed are enabled... // If any of the drivers or the heated bed are enabled...
if (motor_on || TERN0(HAS_HEATED_BED, thermalManager.temp_bed.soft_pwm_amount > 0)) if (motor_on || TERN0(HAS_HEATED_BED, thermalManager.temp_bed.soft_pwm_amount > 0))

2
Marlin/src/feature/mmu2/mmu2.cpp

@ -466,7 +466,7 @@ void MMU2::check_version() {
} }
} }
static bool mmu2_not_responding() { static void mmu2_not_responding() {
LCD_MESSAGEPGM(MSG_MMU2_NOT_RESPONDING); LCD_MESSAGEPGM(MSG_MMU2_NOT_RESPONDING);
BUZZ(100, 659); BUZZ(100, 659);
BUZZ(200, 698); BUZZ(200, 698);

4
Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h

@ -197,6 +197,10 @@
#endif #endif
#endif #endif
#ifndef CONTROLLER_FAN_PIN
#define CONTROLLER_FAN_PIN EX2_FAN_PIN
#endif
// //
// Misc. Functions // Misc. Functions
// //

6
buildroot/tests/mega2560-tests

@ -103,7 +103,8 @@ exec_test $1 $2 "MEGACONTROLLER | Minipanel | M100 | PWM_MOTOR_CURRENT | PRINTCO
restore_configs restore_configs
opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO
opt_set LCD_LANGUAGE el_gr opt_set LCD_LANGUAGE el_gr
opt_enable MIXING_EXTRUDER GRADIENT_MIX GRADIENT_VTOOL CR10_STOCKDISPLAY opt_enable MIXING_EXTRUDER GRADIENT_MIX GRADIENT_VTOOL CR10_STOCKDISPLAY \
USE_CONTROLLER_FAN CONTROLLER_FAN_EDITABLE CONTROLLER_FAN_IGNORE_Z
opt_set MIXING_STEPPERS 5 opt_set MIXING_STEPPERS 5
opt_set LCD_LANGUAGE ru opt_set LCD_LANGUAGE ru
exec_test $1 $2 "Azteeg X3 | Mixing Extruder (x5) | Gradient Mix | Greek" exec_test $1 $2 "Azteeg X3 | Mixing Extruder (x5) | Gradient Mix | Greek"
@ -141,7 +142,8 @@ opt_enable COREYX USE_XMAX_PLUG MIXING_EXTRUDER GRADIENT_MIX \
FIX_MOUNTED_PROBE AUTO_BED_LEVELING_LINEAR DEBUG_LEVELING_FEATURE FILAMENT_WIDTH_SENSOR \ FIX_MOUNTED_PROBE AUTO_BED_LEVELING_LINEAR DEBUG_LEVELING_FEATURE FILAMENT_WIDTH_SENSOR \
Z_SAFE_HOMING SHOW_TEMP_ADC_VALUES HOME_Y_BEFORE_X EMERGENCY_PARSER \ Z_SAFE_HOMING SHOW_TEMP_ADC_VALUES HOME_Y_BEFORE_X EMERGENCY_PARSER \
SD_ABORT_ON_ENDSTOP_HIT HOST_ACTION_COMMANDS HOST_PROMPT_SUPPORT ADVANCED_OK M114_DETAIL \ SD_ABORT_ON_ENDSTOP_HIT HOST_ACTION_COMMANDS HOST_PROMPT_SUPPORT ADVANCED_OK M114_DETAIL \
VOLUMETRIC_DEFAULT_ON NO_WORKSPACE_OFFSETS EXTRA_FAN_SPEED FWRETRACT VOLUMETRIC_DEFAULT_ON NO_WORKSPACE_OFFSETS EXTRA_FAN_SPEED FWRETRACT \
USE_CONTROLLER_FAN CONTROLLER_FAN_EDITABLE CONTROLLER_FAN_USE_Z_ONLY
opt_set FAN_MIN_PWM 50 opt_set FAN_MIN_PWM 50
opt_set FAN_KICKSTART_TIME 100 opt_set FAN_KICKSTART_TIME 100
opt_set XY_FREQUENCY_LIMIT 15 opt_set XY_FREQUENCY_LIMIT 15

Loading…
Cancel
Save