Leave heaters on for prints less than 10 minutes

This commit is contained in:
jlewin 2019-03-06 14:55:00 -08:00
parent 7a893817a7
commit e5bd83d6ff
2 changed files with 27 additions and 15 deletions

View file

@ -380,6 +380,8 @@ namespace MatterControl.Printing
}
public (int toolIndex, double time) NextToolChange(int instructionIndex, int currentToolIndex = -1, int toolToLookFor = -1)
{
if (GCodeCommandQueue.Count > 0)
{
int nextToolChange = -1;
// find the first tool change that we are less than
@ -400,6 +402,7 @@ namespace MatterControl.Printing
var time = GCodeCommandQueue[instructionIndex].SecondsToEndFromHere - GCodeCommandQueue[toolChanges[nextToolChange]].SecondsToEndFromHere;
return (toolIndex, time);
}
}
// there are no more tool changes
return (currentToolIndex, double.PositiveInfinity);

View file

@ -2440,11 +2440,20 @@ You will then need to logout and log back in to the computer for the changes to
// never leave the extruder and the bed hot
ReleaseMotors();
if (SecondsPrinted < 60 * 10)
{
// The user may still be sitting at the machine, leave it heated for a period of time
TurnOffBedAndExtruders(TurnOff.AfterDelay);
}
else
{
// Turn off the heaters on long prints as the user is less likely to be around and interacting
TurnOffBedAndExtruders(TurnOff.Now);
}
}
}
}
}
public int TimeToHoldTemperature { get; set; } = 600;