Fix Fan 0 responding to all fan speeds (#13444)
This commit is contained in:
parent
5eeffab5e5
commit
a8fa275dc6
2 changed files with 3 additions and 3 deletions
|
@ -58,8 +58,8 @@ void GcodeSuite::M106() {
|
||||||
const uint16_t t = parser.intval('T');
|
const uint16_t t = parser.intval('T');
|
||||||
if (t > 0) return thermalManager.set_temp_fan_speed(p, t);
|
if (t > 0) return thermalManager.set_temp_fan_speed(p, t);
|
||||||
#endif
|
#endif
|
||||||
|
uint16_t d = parser.seen('A') ? thermalManager.fan_speed[active_extruder] : 255;
|
||||||
uint16_t s = parser.ushortval('S', 255);
|
uint16_t s = parser.ushortval('S', d);
|
||||||
NOMORE(s, 255U);
|
NOMORE(s, 255U);
|
||||||
|
|
||||||
thermalManager.set_fan_speed(p, s);
|
thermalManager.set_fan_speed(p, s);
|
||||||
|
|
|
@ -2379,7 +2379,7 @@ void Temperature::isr() {
|
||||||
#if ENABLED(FAN_SOFT_PWM)
|
#if ENABLED(FAN_SOFT_PWM)
|
||||||
#define _FAN_PWM(N) do{ \
|
#define _FAN_PWM(N) do{ \
|
||||||
soft_pwm_count_fan[N] = (soft_pwm_count_fan[N] & pwm_mask) + (soft_pwm_amount_fan[N] >> 1); \
|
soft_pwm_count_fan[N] = (soft_pwm_count_fan[N] & pwm_mask) + (soft_pwm_amount_fan[N] >> 1); \
|
||||||
WRITE_FAN(soft_pwm_count_fan[N] > pwm_mask ? HIGH : LOW); \
|
WRITE_FAN_N(N, soft_pwm_count_fan[N] > pwm_mask ? HIGH : LOW); \
|
||||||
}while(0)
|
}while(0)
|
||||||
#if HAS_FAN0
|
#if HAS_FAN0
|
||||||
_FAN_PWM(0);
|
_FAN_PWM(0);
|
||||||
|
|
Reference in a new issue