1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-26 13:25:54 +00:00

Handle special case of speed = 0

This commit is contained in:
David Buezas 2024-07-07 22:52:13 +02:00
parent df9234a68b
commit bd607b0ed1
2 changed files with 4 additions and 2 deletions

View File

@ -291,7 +291,9 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED);
} }
uint8_t Temperature::compute_multiplied_fan(uint8_t speed){ uint8_t Temperature::compute_multiplied_fan(uint8_t speed){
return constrain(speed * fan_multiplier, 1, 255); if (!speed) return 0;
float new_speed = speed * fan_multiplier;
return constrain(new_speed, 1, 255);
} }
float Temperature::get_fan_multiplier(){ float Temperature::get_fan_multiplier(){