We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a744e9b commit be54a68Copy full SHA for be54a68
Marlin/src/gcode/temp/M106_M107.cpp
@@ -76,7 +76,7 @@ void GcodeSuite::M106() {
76
if (t > 0) return thermalManager.set_temp_fan_speed(pfan, t);
77
#endif
78
79
- const uint16_t dspeed = parser.seen_test('A') ? thermalManager.fan_speed[active_extruder] : 255;
+ const uint16_t dspeed = parser.seen_test('A') ? thermalManager.fan_speed[active_extruder] : 255U;
80
81
uint16_t speed = dspeed;
82
@@ -91,7 +91,7 @@ void GcodeSuite::M106() {
91
if (!got_preset && parser.seenval('S'))
92
speed = parser.value_ushort();
93
94
- speed = min(speed, (uint16_t) thermalManager.max_fan_speed);
+ TERN_(FOAMCUTTER_XYUV, speed = (speed * 255U) / 100U); // Get command in % of max heat
95
96
#if ENABLED(EDITABLE_MAX_FAN_SPEED) || MAX_FAN_SPEED < 255
97
// Set speed, with constraint < max_fan_speed
0 commit comments