Making it easier to start a print that will not ask for feedback
Ability to ask what printer an object is on Starting work on ability to have a button on an object to execute arbitrary code Cleanup and dead code removal
This commit is contained in:
parent
5dbcf8c06c
commit
9fa1061f1e
13 changed files with 100 additions and 38 deletions
|
|
@ -2075,24 +2075,24 @@ Make sure that your printer is turned on. Some printers will appear to be connec
|
|||
}
|
||||
}
|
||||
|
||||
public bool CalibrationPrint { get; private set; }
|
||||
public bool RecordPrintHistory { get; private set; }
|
||||
|
||||
private CancellationTokenSource printingCancellation;
|
||||
|
||||
public async Task StartPrint(string gcodeFilename, PrintTask printTaskToUse = null, bool calibrationPrint = false)
|
||||
public async Task StartPrint(string gcodeFilename, PrintTask printTaskToUse = null, bool recordPrintHistory = true)
|
||||
{
|
||||
var gcodeStream = new StreamReader(gcodeFilename);
|
||||
await StartPrint(gcodeStream.BaseStream, gcodeFilename, printTaskToUse, calibrationPrint);
|
||||
await StartPrint(gcodeStream.BaseStream, gcodeFilename, printTaskToUse, recordPrintHistory);
|
||||
}
|
||||
|
||||
public async Task StartPrint(Stream gcodeStream, string gcodeFileNameForTask = null, PrintTask printTaskToUse = null, bool calibrationPrint = false)
|
||||
public async Task StartPrint(Stream gcodeStream, string gcodeFileNameForTask, PrintTask printTaskToUse, bool recordPrintHistory)
|
||||
{
|
||||
if (!this.IsConnected || Printing)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.CalibrationPrint = calibrationPrint;
|
||||
this.RecordPrintHistory = recordPrintHistory;
|
||||
|
||||
printingCancellation = new CancellationTokenSource();
|
||||
|
||||
|
|
@ -2134,7 +2134,7 @@ Make sure that your printer is turned on. Some printers will appear to be connec
|
|||
|
||||
if (gcodeFileNameForTask != null
|
||||
&& ActivePrintTask == null
|
||||
&& !CalibrationPrint)
|
||||
&& RecordPrintHistory)
|
||||
{
|
||||
// TODO: Fix printerItemID int requirement
|
||||
ActivePrintTask = new PrintTask
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue