Made it so we write the config file contents to the gcode we are outputting.
This commit is contained in:
parent
61536cb01b
commit
e445042d88
1 changed files with 28 additions and 0 deletions
|
|
@ -39,6 +39,7 @@ using MatterHackers.MatterControl.DataStorage;
|
|||
using MatterHackers.MatterControl.PrinterCommunication;
|
||||
using MatterHackers.MatterControl.PrintQueue;
|
||||
using MatterHackers.Agg.PlatformAbstract;
|
||||
using MatterHackers.MatterControl.SettingsManagement;
|
||||
using MatterHackers.PolygonMesh;
|
||||
using MatterHackers.PolygonMesh.Processors;
|
||||
|
||||
|
|
@ -343,6 +344,33 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (File.Exists(gcodePathAndFileName)
|
||||
&& File.Exists(currentConfigurationFileAndPath))
|
||||
{
|
||||
using (StreamWriter gcodeWirter = File.AppendText(gcodePathAndFileName))
|
||||
{
|
||||
string oemName = "MatterControl";
|
||||
if (OemSettings.Instance.WindowTitleExtra != null && OemSettings.Instance.WindowTitleExtra.Trim().Length > 0)
|
||||
{
|
||||
oemName = oemName + " - {0}".FormatWith(OemSettings.Instance.WindowTitleExtra);
|
||||
}
|
||||
|
||||
gcodeWirter.WriteLine("; {0} Version {1} Build {2} : GCode settings used".FormatWith(oemName, VersionInfo.Instance.ReleaseVersion, VersionInfo.Instance.BuildVersion));
|
||||
gcodeWirter.WriteLine("; Date {0} Time {1}:{2:00}".FormatWith(DateTime.Now.Date, DateTime.Now.Hour, DateTime.Now.Minute));
|
||||
|
||||
foreach (string line in File.ReadLines(currentConfigurationFileAndPath))
|
||||
{
|
||||
gcodeWirter.WriteLine("; {0}".FormatWith(line));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
UiThread.RunOnIdle((state) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue