Include bed heating to recover consideration
This commit is contained in:
parent
a1b474756d
commit
84c0032b05
1 changed files with 24 additions and 6 deletions
|
|
@ -93,8 +93,24 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
queuedCommands.Add("G90; use absolute coordinates");
|
||||
queuedCommands.Add("G92 E0; reset the expected extruder position");
|
||||
queuedCommands.Add("M82; use absolute distance for extrusion");
|
||||
|
||||
bool hasHeatedBed = ActiveSliceSettings.Instance.GetValue<bool>(SettingsKey.has_heated_bed);
|
||||
double bedTemp = ActiveSliceSettings.Instance.GetValue<double>(SettingsKey.bed_temperature);
|
||||
if (hasHeatedBed && bedTemp > 0)
|
||||
{
|
||||
// start heating the bed
|
||||
queuedCommands.Add($"M140 S{bedTemp}");
|
||||
}
|
||||
|
||||
// heat up the extruder
|
||||
queuedCommands.Add("M109 S{0}".FormatWith(ActiveSliceSettings.Instance.Helpers.ExtruderTemperature(0)));
|
||||
|
||||
if (hasHeatedBed && bedTemp > 0)
|
||||
{
|
||||
// finish heating the bed
|
||||
queuedCommands.Add($"M190 S{bedTemp}");
|
||||
}
|
||||
|
||||
recoveryState = RecoveryState.Raising;
|
||||
return "";
|
||||
|
||||
|
|
@ -179,12 +195,14 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
}
|
||||
|
||||
// check if the line is something we want to send to the printer (like a temp)
|
||||
if (line.StartsWith("M109")
|
||||
|| line.StartsWith("M104")
|
||||
|| line.StartsWith("T")
|
||||
|| line.StartsWith("M106")
|
||||
|| line.StartsWith("M107")
|
||||
|| line.StartsWith("G92"))
|
||||
if (line.StartsWith("M109") // heat and wait extruder
|
||||
|| line.StartsWith("M104") // heat extruder
|
||||
|| line.StartsWith("M190") // heat and wait bed
|
||||
|| line.StartsWith("M140") // heat bed
|
||||
|| line.StartsWith("T") // switch extruder
|
||||
|| line.StartsWith("M106") // fan on
|
||||
|| line.StartsWith("M107") // fan off
|
||||
|| line.StartsWith("G92")) // set position
|
||||
{
|
||||
return line;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue