Have the temp changing working and passing tests

This commit is contained in:
Lars Brubaker 2019-03-08 13:48:00 -08:00
parent 58e9732267
commit a4811285c3
4 changed files with 176 additions and 229 deletions

View file

@ -402,6 +402,15 @@ namespace MatterControl.Printing
var time = GCodeCommandQueue[instructionIndex].SecondsToEndFromHere - GCodeCommandQueue[toolChanges[nextToolChange]].SecondsToEndFromHere;
return (toolIndex, time);
}
else
{
// don't turn of extruders if we will end the print within 10 minutes
if (instructionIndex < GCodeCommandQueue.Count
&& GCodeCommandQueue[instructionIndex].SecondsToEndFromHere < 60 * 10)
{
return (toolToLookFor, 60 * 10);
}
}
}
// there are no more tool changes