Explorar el Código

ExtUI: Fix fan wrapping around from 0 to 100 (#12987)

Marcio Teixeira hace 5 años
padre
commit
54fdf57b8c
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1
    1
      Marlin/src/lcd/extensible_ui/ui_api.cpp

+ 1
- 1
Marlin/src/lcd/extensible_ui/ui_api.cpp Ver fichero

@@ -572,7 +572,7 @@ namespace ExtUI {
572 572
 
573 573
   void setTargetFan_percent(const float value, const fan_t fan) {
574 574
     if (fan < FAN_COUNT)
575
-      thermalManager.set_fan_speed(fan - FAN0, map(value, 0, 100, 0, 255));
575
+      thermalManager.set_fan_speed(fan - FAN0, map(clamp(value, 0, 100), 0, 100, 0, 255));
576 576
   }
577 577
 
578 578
   void setFeedrate_percent(const float value) {

Loading…
Cancelar
Guardar