Fixed the thumbnail rendering for a gcode sd file
Fixe a bug with sd card printing progress not showing Made the sd gcode progress bar reset on new print.
This commit is contained in:
parent
ef20f2e65a
commit
4ae0116ecf
2 changed files with 8 additions and 5 deletions
|
|
@ -194,8 +194,8 @@ namespace MatterHackers.MatterControl
|
||||||
}
|
}
|
||||||
thumbnailWidget.thumbnailImage.SetRecieveBlender(new BlenderPreMultBGRA());
|
thumbnailWidget.thumbnailImage.SetRecieveBlender(new BlenderPreMultBGRA());
|
||||||
Graphics2D graphics = thumbnailWidget.thumbnailImage.NewGraphics2D();
|
Graphics2D graphics = thumbnailWidget.thumbnailImage.NewGraphics2D();
|
||||||
Ellipse outline = new Ellipse(new Vector2(Width / 2.0, Height / 2.0), Width/2 + Width/12);
|
Ellipse outline = new Ellipse(new Vector2(Width / 2.0, Height / 2.0), Width/2 - Width/12);
|
||||||
graphics.Render(new Stroke(outline, 4), RGBA_Bytes.White);
|
graphics.Render(new Stroke(outline, Width / 12), RGBA_Bytes.White);
|
||||||
|
|
||||||
UiThread.RunOnIdle(thumbnailWidget.EnsureImageUpdated);
|
UiThread.RunOnIdle(thumbnailWidget.EnsureImageUpdated);
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -2271,8 +2271,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication
|
||||||
SendLineToPrinterNow("M25"); // : Pause SD print
|
SendLineToPrinterNow("M25"); // : Pause SD print
|
||||||
SendLineToPrinterNow("M26"); // : Set SD position
|
SendLineToPrinterNow("M26"); // : Set SD position
|
||||||
// never leave the extruder and the bed hot
|
// never leave the extruder and the bed hot
|
||||||
ReleaseMotors();
|
DonePrintingSdFile(this, null);
|
||||||
TurnOffBedAndExtruders();
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -2354,6 +2353,8 @@ namespace MatterHackers.MatterControl.PrinterCommunication
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
currentSdBytes = 0;
|
||||||
|
|
||||||
ClearQueuedGCode();
|
ClearQueuedGCode();
|
||||||
CommunicationState = CommunicationStates.PrintingFromSd;
|
CommunicationState = CommunicationStates.PrintingFromSd;
|
||||||
|
|
||||||
|
|
@ -2458,7 +2459,9 @@ namespace MatterHackers.MatterControl.PrinterCommunication
|
||||||
while (CommunicationState == CommunicationStates.AttemptingToConnect
|
while (CommunicationState == CommunicationStates.AttemptingToConnect
|
||||||
|| (PrinterIsConnected && serialPort.IsOpen && !Disconnecting))
|
|| (PrinterIsConnected && serialPort.IsOpen && !Disconnecting))
|
||||||
{
|
{
|
||||||
if(PrinterIsPrinting && PrinterIsConnected)
|
if(PrinterIsPrinting
|
||||||
|
&& PrinterIsConnected
|
||||||
|
&& CommunicationState != CommunicationStates.PrintingFromSd)
|
||||||
{
|
{
|
||||||
TryWriteNextLineFromGCodeFile();
|
TryWriteNextLineFromGCodeFile();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue