浏览代码

Merge pull request #10754 from comps/fan-max-pwm-scaling

[2.0.x] Add FAN_MAX_PWM
Scott Lahteine 7 年前
父节点
当前提交
b9079aa1b5
没有帐户链接到提交者的电子邮件
共有 51 个文件被更改,包括 656 次插入149 次删除
  1. 13
    3
      Marlin/Configuration_adv.h
  2. 13
    3
      Marlin/src/config/default/Configuration_adv.h
  3. 13
    3
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
  4. 13
    3
      Marlin/src/config/examples/Anet/A6/Configuration_adv.h
  5. 13
    3
      Marlin/src/config/examples/Anet/A8/Configuration_adv.h
  6. 13
    3
      Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h
  7. 13
    3
      Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
  8. 13
    3
      Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h
  9. 13
    3
      Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
  10. 13
    3
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
  11. 13
    3
      Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
  12. 13
    3
      Marlin/src/config/examples/Cartesio/Configuration_adv.h
  13. 13
    3
      Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
  14. 13
    3
      Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h
  15. 13
    3
      Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h
  16. 13
    3
      Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h
  17. 13
    3
      Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h
  18. 13
    3
      Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h
  19. 13
    3
      Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h
  20. 13
    3
      Marlin/src/config/examples/Felix/Configuration_adv.h
  21. 13
    3
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h
  22. 13
    3
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
  23. 13
    3
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
  24. 13
    3
      Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
  25. 13
    3
      Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h
  26. 13
    3
      Marlin/src/config/examples/MakerParts/Configuration_adv.h
  27. 13
    3
      Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
  28. 13
    3
      Marlin/src/config/examples/Malyan/M200/Configuration_adv.h
  29. 13
    3
      Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h
  30. 13
    3
      Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
  31. 13
    3
      Marlin/src/config/examples/RigidBot/Configuration_adv.h
  32. 13
    3
      Marlin/src/config/examples/SCARA/Configuration_adv.h
  33. 13
    3
      Marlin/src/config/examples/Sanguinololu/Configuration_adv.h
  34. 13
    3
      Marlin/src/config/examples/TheBorg/Configuration_adv.h
  35. 13
    3
      Marlin/src/config/examples/TinyBoy2/Configuration_adv.h
  36. 13
    3
      Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h
  37. 13
    3
      Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h
  38. 13
    3
      Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h
  39. 13
    3
      Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
  40. 13
    3
      Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h
  41. 13
    3
      Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
  42. 13
    3
      Marlin/src/config/examples/delta/generic/Configuration_adv.h
  43. 13
    3
      Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h
  44. 13
    3
      Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h
  45. 13
    3
      Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h
  46. 13
    3
      Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h
  47. 13
    3
      Marlin/src/config/examples/makibox/Configuration_adv.h
  48. 13
    3
      Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h
  49. 13
    3
      Marlin/src/config/examples/wt150/Configuration_adv.h
  50. 17
    0
      Marlin/src/inc/Conditionals_post.h
  51. 2
    2
      Marlin/src/module/planner.cpp

+ 13
- 3
Marlin/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/default/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/Anet/A6/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/Anet/A8/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/Cartesio/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/Felix/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/MakerParts/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/Malyan/M150/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/Malyan/M200/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/RigidBot/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/SCARA/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/Sanguinololu/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/TheBorg/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/TinyBoy2/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/delta/generic/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h 查看文件

213
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
213
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
214
 //#define FAN_KICKSTART_TIME 100
214
 //#define FAN_KICKSTART_TIME 100
215
 
215
 
216
-// This defines the minimal speed for the main fan, run in PWM mode
217
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
218
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
216
+/**
217
+ * PWM Fan Scaling
218
+ *
219
+ * Define the min/max speeds for PWM fans (as set with M106).
220
+ *
221
+ * With these options the M106 0-255 value range is scaled to a subset
222
+ * to ensure that the fan has enough power to spin, or to run lower
223
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
224
+ * Value 0 always turns off the fan.
225
+ *
226
+ * Define one or both of these to override the default 0-255 range.
227
+ */
219
 //#define FAN_MIN_PWM 50
228
 //#define FAN_MIN_PWM 50
229
+//#define FAN_MAX_PWM 128
220
 
230
 
221
 // @section extruder
231
 // @section extruder
222
 
232
 

+ 13
- 3
Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/makibox/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 13
- 3
Marlin/src/config/examples/wt150/Configuration_adv.h 查看文件

208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
208
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
209
 //#define FAN_KICKSTART_TIME 100
209
 //#define FAN_KICKSTART_TIME 100
210
 
210
 
211
-// This defines the minimal speed for the main fan, run in PWM mode
212
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
213
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
211
+/**
212
+ * PWM Fan Scaling
213
+ *
214
+ * Define the min/max speeds for PWM fans (as set with M106).
215
+ *
216
+ * With these options the M106 0-255 value range is scaled to a subset
217
+ * to ensure that the fan has enough power to spin, or to run lower
218
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
219
+ * Value 0 always turns off the fan.
220
+ *
221
+ * Define one or both of these to override the default 0-255 range.
222
+ */
214
 //#define FAN_MIN_PWM 50
223
 //#define FAN_MIN_PWM 50
224
+//#define FAN_MAX_PWM 128
215
 
225
 
216
 // @section extruder
226
 // @section extruder
217
 
227
 

+ 17
- 0
Marlin/src/inc/Conditionals_post.h 查看文件

980
 #define HAS_FANMUX PIN_EXISTS(FANMUX0)
980
 #define HAS_FANMUX PIN_EXISTS(FANMUX0)
981
 
981
 
982
 /**
982
 /**
983
+ * MIN/MAX fan PWM scaling
984
+ */
985
+#ifndef FAN_MIN_PWM
986
+  #define FAN_MIN_PWM 0
987
+#endif
988
+#ifndef FAN_MAX_PWM
989
+  #define FAN_MAX_PWM 255
990
+#endif
991
+#if FAN_MIN_PWM < 0 || FAN_MIN_PWM > 255
992
+  #error "FAN_MIN_PWM must be a value from 0 to 255."
993
+#elif FAN_MAX_PWM < 0 || FAN_MAX_PWM > 255
994
+  #error "FAN_MAX_PWM must be a value from 0 to 255."
995
+#elif FAN_MIN_PWM > FAN_MAX_PWM
996
+  #error "FAN_MIN_PWM must be less than or equal to FAN_MAX_PWM."
997
+#endif
998
+
999
+/**
983
  * Bed Probe dependencies
1000
  * Bed Probe dependencies
984
  */
1001
  */
985
 #if HAS_BED_PROBE
1002
 #if HAS_BED_PROBE

+ 2
- 2
Marlin/src/module/planner.cpp 查看文件

1108
 
1108
 
1109
     #endif // FAN_KICKSTART_TIME > 0
1109
     #endif // FAN_KICKSTART_TIME > 0
1110
 
1110
 
1111
-    #ifdef FAN_MIN_PWM
1112
-      #define CALC_FAN_SPEED(f) (tail_fan_speed[f] ? ( FAN_MIN_PWM + (tail_fan_speed[f] * (255 - FAN_MIN_PWM)) / 255 ) : 0)
1111
+    #if FAN_MIN_PWM != 0 || FAN_MAX_PWM != 255
1112
+      #define CALC_FAN_SPEED(f) (tail_fan_speed[f] ? map(tail_fan_speed[f], 1, 255, FAN_MIN_PWM, FAN_MAX_PWM) : 0)
1113
     #else
1113
     #else
1114
       #define CALC_FAN_SPEED(f) tail_fan_speed[f]
1114
       #define CALC_FAN_SPEED(f) tail_fan_speed[f]
1115
     #endif
1115
     #endif

正在加载...
取消
保存