Make sure we turn off the heat for extruders if we will turn of the heat at the end of the print
issue: MatterHackers/MCCentral#5547 heat not shut off for unused extruder after last switch
This commit is contained in:
parent
d6d19d0c57
commit
f7235051bd
4 changed files with 10 additions and 5 deletions
|
|
@ -51,6 +51,11 @@ namespace MatterControl.Printing
|
|||
private double parsingLastZ;
|
||||
private readonly List<int> toolChanges = new List<int>();
|
||||
|
||||
/// <summary>
|
||||
/// Gets total print time that will leave the heaters on at the conclusion of the print.
|
||||
/// </summary>
|
||||
public static int PrintTimeToLeaveHeatersOn => 60 * 10;
|
||||
|
||||
public GCodeMemoryFile(bool gcodeHasExplicitLayerChangeInfo = false)
|
||||
{
|
||||
this.gcodeHasExplicitLayerChangeInfo = gcodeHasExplicitLayerChangeInfo;
|
||||
|
|
@ -441,9 +446,9 @@ namespace MatterControl.Printing
|
|||
{
|
||||
// don't turn of extruders if we will end the print within 10 minutes
|
||||
if (instructionIndex < gCodeCommandQueue.Count
|
||||
&& gCodeCommandQueue[instructionIndex].SecondsToEndFromHere < 60 * 10)
|
||||
&& gCodeCommandQueue[0].SecondsToEndFromHere < PrintTimeToLeaveHeatersOn)
|
||||
{
|
||||
return (toolToLookFor, 60 * 10);
|
||||
return (toolToLookFor, gCodeCommandQueue[instructionIndex].SecondsToEndFromHere);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -280,7 +280,6 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
{
|
||||
// get the time to the next tool switch
|
||||
var timeToNextToolChange = NextToolChange().time;
|
||||
var timeToReheat = printer.Settings.GetValue<double>(SettingsKey.seconds_to_reheat);
|
||||
|
||||
// if we do not switch again
|
||||
if (timeToNextToolChange == double.PositiveInfinity)
|
||||
|
|
|
|||
|
|
@ -2608,7 +2608,7 @@ 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)
|
||||
if (SecondsPrinted < GCodeMemoryFile.PrintTimeToLeaveHeatersOn)
|
||||
{
|
||||
// The user may still be sitting at the machine, leave it heated for a period of time
|
||||
TurnOffBedAndExtruders(TurnOff.AfterDelay);
|
||||
|
|
@ -2697,6 +2697,7 @@ You will then need to logout and log back in to the computer for the changes to
|
|||
|
||||
public PrintTask ActivePrintTask { get; set; }
|
||||
|
||||
|
||||
public void TurnOffBedAndExtruders(TurnOff turnOffTime)
|
||||
{
|
||||
if (turnOffTime == TurnOff.Now)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit ffa0e8917960d7be3752de85e83fed78805abefa
|
||||
Subproject commit 724c87220b2777bfbac7f8156c116404431d9dc6
|
||||
Loading…
Add table
Add a link
Reference in a new issue