Controllerfan PWM scaling, kickstart (#24873)

This commit is contained in:
InsanityAutomation
2022-10-21 14:03:38 -04:00
committed by GitHub
parent 86aac677ac
commit 02c43f44c7
7 changed files with 53 additions and 23 deletions

View File

@@ -1074,3 +1074,14 @@
#if ANY(DISABLE_INACTIVE_X, DISABLE_INACTIVE_Y, DISABLE_INACTIVE_Z, DISABLE_INACTIVE_I, DISABLE_INACTIVE_J, DISABLE_INACTIVE_K, DISABLE_INACTIVE_U, DISABLE_INACTIVE_V, DISABLE_INACTIVE_W, DISABLE_INACTIVE_E)
#define HAS_DISABLE_INACTIVE_AXIS 1
#endif
// Fan Kickstart
#if FAN_KICKSTART_TIME && !defined(FAN_KICKSTART_POWER)
#define FAN_KICKSTART_POWER 180
#endif
#if FAN_MIN_PWM == 0 && FAN_MAX_PWM == 255
#define CALC_FAN_SPEED(f) (f ?: FAN_OFF_PWM)
#else
#define CALC_FAN_SPEED(f) (f ? map(f, 1, 255, FAN_MIN_PWM, FAN_MAX_PWM) : FAN_OFF_PWM)
#endif

View File

@@ -1513,6 +1513,11 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#error "To use BED_LIMIT_SWITCHING you must disable PIDTEMPBED."
#endif
// Fan Kickstart
#if FAN_KICKSTART_TIME && defined(FAN_KICKSTART_POWER) && !WITHIN(FAN_KICKSTART_POWER, 64, 255)
#error "FAN_KICKSTART_POWER must be an integer from 64 to 255."
#endif
/**
* Synchronous M106/M107 checks
*/