ExtUI: Fix fan wrapping around from 0 to 100 (#12987)
This commit is contained in:
parent
dbe4126e07
commit
54fdf57b8c
@ -572,7 +572,7 @@ namespace ExtUI {
|
|||||||
|
|
||||||
void setTargetFan_percent(const float value, const fan_t fan) {
|
void setTargetFan_percent(const float value, const fan_t fan) {
|
||||||
if (fan < FAN_COUNT)
|
if (fan < FAN_COUNT)
|
||||||
thermalManager.set_fan_speed(fan - FAN0, map(value, 0, 100, 0, 255));
|
thermalManager.set_fan_speed(fan - FAN0, map(clamp(value, 0, 100), 0, 100, 0, 255));
|
||||||
}
|
}
|
||||||
|
|
||||||
void setFeedrate_percent(const float value) {
|
void setFeedrate_percent(const float value) {
|
||||||
|
Loading…
Reference in New Issue
Block a user