Fixed an issue with the fan speed no displaying correctly in the gcode preview
Fixed an issue with writing '; Software Leveling Applied' more than once into gocde files if double exported. The gcode file was output correctly before but had multiple lines describing '; Software Leveling Applied'
This commit is contained in:
parent
e3d7289058
commit
2eacc07781
5 changed files with 26 additions and 15 deletions
|
|
@ -232,9 +232,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
else if (line.StartsWith("M106")) // fan on
|
||||
{
|
||||
double speed = 0;
|
||||
if (GCodeFile.GetFirstNumberAfter("M106", line, ref speed, 0, ""))
|
||||
if (GCodeFile.GetFirstNumberAfter("S", line, ref speed, 0, ""))
|
||||
{
|
||||
fanSpeeds += separator + $"{speed / 255 * 100:0}%";
|
||||
fanSpeeds += separator + $"{speed * 100 / 255:0}%";
|
||||
separator = ", ";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue