#2922 - Fan speed for gcode visualization modified as proposed by rongith

This commit is contained in:
Enrico Turri 2020-03-13 08:25:48 +01:00
parent 45e0079356
commit 3fd6c8a2ff

View file

@ -470,7 +470,7 @@ void GCodeAnalyzer::_processM106(const GCodeReader::GCodeLine& line)
// The absence of P means the print cooling fan, so ignore anything else.
float new_fan_speed;
if (line.has_value('S', new_fan_speed))
_set_fan_speed((100.0f / 256.0f) * new_fan_speed);
_set_fan_speed((100.0f / 255.0f) * new_fan_speed);
else
_set_fan_speed(100.0f);
}