Put a try catch around the printer on idle call
Refactor / renaming
This commit is contained in:
parent
fd699981ec
commit
53ded760e9
8 changed files with 66 additions and 53 deletions
|
|
@ -289,9 +289,9 @@ namespace MatterHackers.MatterControl
|
|||
PrintLevelingData levelingData = PrintLevelingData.GetForPrinter(ActivePrinterProfile.Instance.ActivePrinter);
|
||||
if (levelingData != null)
|
||||
{
|
||||
for (int i = 0; i < unleveledGCode.Count; i++)
|
||||
for (int lineIndex = 0; lineIndex < unleveledGCode.LineCount; lineIndex++)
|
||||
{
|
||||
PrinterMachineInstruction instruction = unleveledGCode.Instruction(i);
|
||||
PrinterMachineInstruction instruction = unleveledGCode.Instruction(lineIndex);
|
||||
|
||||
List<string> linesToWrite = null;
|
||||
switch (levelingData.levelingSystem)
|
||||
|
|
@ -312,7 +312,7 @@ namespace MatterHackers.MatterControl
|
|||
foreach(string line in linesToWrite)
|
||||
{
|
||||
PrinterMachineInstruction newInstruction = new PrinterMachineInstruction(line);
|
||||
unleveledGCode.Insert(++i, newInstruction);
|
||||
unleveledGCode.Insert(++lineIndex, newInstruction);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue