Merge remote-tracking branch 'upstream/development'
Conflicts: StaticData/Translations/Master.txt
This commit is contained in:
commit
acea4975af
8 changed files with 64 additions and 40 deletions
|
|
@ -231,15 +231,15 @@ namespace MatterHackers.MatterControl.EeProm
|
||||||
string cmdho = "M206 X" + hox + " Y" + hoy + " Z" + hoz;
|
string cmdho = "M206 X" + hox + " Y" + hoy + " Z" + hoz;
|
||||||
string cmdpid = "M301 P" + ppid + " I" + ipid + " D" + dpid;
|
string cmdpid = "M301 P" + ppid + " I" + ipid + " D" + dpid;
|
||||||
|
|
||||||
PrinterCommunication.Instance.QueueLineToPrinter(cmdsteps);
|
PrinterCommunication.Instance.SendLineToPrinterNow(cmdsteps);
|
||||||
PrinterCommunication.Instance.QueueLineToPrinter(cmdfeed);
|
PrinterCommunication.Instance.SendLineToPrinterNow(cmdfeed);
|
||||||
PrinterCommunication.Instance.QueueLineToPrinter(cmdmacc);
|
PrinterCommunication.Instance.SendLineToPrinterNow(cmdmacc);
|
||||||
PrinterCommunication.Instance.QueueLineToPrinter(cmdacc);
|
PrinterCommunication.Instance.SendLineToPrinterNow(cmdacc);
|
||||||
PrinterCommunication.Instance.QueueLineToPrinter(cmdav);
|
PrinterCommunication.Instance.SendLineToPrinterNow(cmdav);
|
||||||
PrinterCommunication.Instance.QueueLineToPrinter(cmdho);
|
PrinterCommunication.Instance.SendLineToPrinterNow(cmdho);
|
||||||
if (hasPID)
|
if (hasPID)
|
||||||
{
|
{
|
||||||
PrinterCommunication.Instance.QueueLineToPrinter(cmdpid);
|
PrinterCommunication.Instance.SendLineToPrinterNow(cmdpid);
|
||||||
}
|
}
|
||||||
|
|
||||||
changed = false;
|
changed = false;
|
||||||
|
|
@ -395,14 +395,14 @@ namespace MatterHackers.MatterControl.EeProm
|
||||||
|
|
||||||
public void SaveToEeProm()
|
public void SaveToEeProm()
|
||||||
{
|
{
|
||||||
PrinterCommunication.Instance.QueueLineToPrinter("M500");
|
PrinterCommunication.Instance.SendLineToPrinterNow("M500");
|
||||||
}
|
}
|
||||||
|
|
||||||
// this does not save them to eeprom
|
// this does not save them to eeprom
|
||||||
public void SetPrinterToFactorySettings()
|
public void SetPrinterToFactorySettings()
|
||||||
{
|
{
|
||||||
hasPID = false;
|
hasPID = false;
|
||||||
PrinterCommunication.Instance.QueueLineToPrinter("M502");
|
PrinterCommunication.Instance.SendLineToPrinterNow("M502");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Add(object sender, EventArgs e)
|
public void Add(object sender, EventArgs e)
|
||||||
|
|
@ -426,7 +426,7 @@ namespace MatterHackers.MatterControl.EeProm
|
||||||
public void Update()
|
public void Update()
|
||||||
{
|
{
|
||||||
hasPID = false;
|
hasPID = false;
|
||||||
PrinterCommunication.Instance.QueueLineToPrinter("M503");
|
PrinterCommunication.Instance.SendLineToPrinterNow("M503");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ namespace MatterHackers.MatterControl.EeProm
|
||||||
string cmd = "M206 T" + type + " P" + position + " ";
|
string cmd = "M206 T" + type + " P" + position + " ";
|
||||||
if (type == 3) cmd += "X" + val;
|
if (type == 3) cmd += "X" + val;
|
||||||
else cmd += "S" + val;
|
else cmd += "S" + val;
|
||||||
PrinterCommunication.Instance.QueueLineToPrinter(cmd);
|
PrinterCommunication.Instance.SendLineToPrinterNow(cmd);
|
||||||
changed = false;
|
changed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ namespace MatterHackers.MatterControl.EeProm
|
||||||
|
|
||||||
public void AskPrinterForSettings()
|
public void AskPrinterForSettings()
|
||||||
{
|
{
|
||||||
PrinterCommunication.Instance.QueueLineToPrinter("M205");
|
PrinterCommunication.Instance.SendLineToPrinterNow("M205");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -660,7 +660,7 @@ namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
if (MonitorPrinterTemperature)
|
if (MonitorPrinterTemperature)
|
||||||
{
|
{
|
||||||
QueueLineToPrinter("M105");
|
SendLineToPrinterNow("M105");
|
||||||
}
|
}
|
||||||
temperatureRequestTimer.Restart();
|
temperatureRequestTimer.Restart();
|
||||||
}
|
}
|
||||||
|
|
@ -701,7 +701,7 @@ namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
targetExtruderTemperature = value;
|
targetExtruderTemperature = value;
|
||||||
OnExtruderTemperatureSet(new TemperatureEventArgs(TargetExtruderTemperature));
|
OnExtruderTemperatureSet(new TemperatureEventArgs(TargetExtruderTemperature));
|
||||||
QueueLineToPrinter("M104 S{0}".FormatWith(targetExtruderTemperature));
|
SendLineToPrinterNow("M104 S{0}".FormatWith(targetExtruderTemperature));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -718,7 +718,9 @@ namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
if (ActivePrinter.DoPrintLeveling)
|
if (ActivePrinter.DoPrintLeveling)
|
||||||
{
|
{
|
||||||
|
ForceImmediateWrites = true;
|
||||||
ReadPosition();
|
ReadPosition();
|
||||||
|
ForceImmediateWrites = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -752,7 +754,7 @@ namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
fanSpeed = Math.Max(0, Math.Min(255, value));
|
fanSpeed = Math.Max(0, Math.Min(255, value));
|
||||||
OnFanSpeedSet(null);
|
OnFanSpeedSet(null);
|
||||||
QueueLineToPrinter("M106 S{0}".FormatWith(fanSpeed));
|
SendLineToPrinterNow("M106 S{0}".FormatWith(fanSpeed));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -768,7 +770,7 @@ namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
targetBedTemperature = value;
|
targetBedTemperature = value;
|
||||||
OnBedTemperatureSet(new TemperatureEventArgs(TargetBedTemperature));
|
OnBedTemperatureSet(new TemperatureEventArgs(TargetBedTemperature));
|
||||||
QueueLineToPrinter("M140 S{0}".FormatWith(targetBedTemperature));
|
SendLineToPrinterNow("M140 S{0}".FormatWith(targetBedTemperature));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1258,8 +1260,8 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
// let's check if the printer will talk to us
|
// let's check if the printer will talk to us
|
||||||
ReadPosition();
|
ReadPosition();
|
||||||
QueueLineToPrinter("M105");
|
SendLineToPrinterNow("M105");
|
||||||
QueueLineToPrinter("M115");
|
SendLineToPrinterNow("M115");
|
||||||
}
|
}
|
||||||
catch (System.ArgumentOutOfRangeException)
|
catch (System.ArgumentOutOfRangeException)
|
||||||
{
|
{
|
||||||
|
|
@ -1422,7 +1424,7 @@ namespace MatterHackers.MatterControl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void QueueLineToPrinter(string lineToWrite)
|
public void SendLineToPrinterNow(string lineToWrite)
|
||||||
{
|
{
|
||||||
using (TimedLock.Lock(this, "QueueLineToPrinter"))
|
using (TimedLock.Lock(this, "QueueLineToPrinter"))
|
||||||
{
|
{
|
||||||
|
|
@ -1430,10 +1432,21 @@ namespace MatterHackers.MatterControl
|
||||||
if (lineToWrite.Contains("\n"))
|
if (lineToWrite.Contains("\n"))
|
||||||
{
|
{
|
||||||
string[] lines = lineToWrite.Split(new string[] { "\n" }, StringSplitOptions.None);
|
string[] lines = lineToWrite.Split(new string[] { "\n" }, StringSplitOptions.None);
|
||||||
for (int i = lines.Length - 1; i >= 0; i--)
|
if (ForceImmediateWrites && !PrinterIsPrinting)
|
||||||
{
|
{
|
||||||
string line = lines[i];
|
for (int i = 0; i < lines.Length; i++)
|
||||||
QueueLineToPrinter(line);
|
{
|
||||||
|
string line = lines[i];
|
||||||
|
SendLineToPrinterNow(line);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (int i = lines.Length - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
string line = lines[i];
|
||||||
|
SendLineToPrinterNow(line);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1441,7 +1454,7 @@ namespace MatterHackers.MatterControl
|
||||||
lineToWrite = lineToWrite.Split(';')[0].Trim();
|
lineToWrite = lineToWrite.Split(';')[0].Trim();
|
||||||
if (PrinterIsPrinting)
|
if (PrinterIsPrinting)
|
||||||
{
|
{
|
||||||
// insert the command into the printing queue
|
// insert the command into the printing queue at the head
|
||||||
if (printerCommandQueueIndex >= 0
|
if (printerCommandQueueIndex >= 0
|
||||||
&& printerCommandQueueIndex < loadedGCode.GCodeCommandQueue.Count - 1)
|
&& printerCommandQueueIndex < loadedGCode.GCodeCommandQueue.Count - 1)
|
||||||
{
|
{
|
||||||
|
|
@ -1460,9 +1473,10 @@ namespace MatterHackers.MatterControl
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// try not to write the exact same command twice (like M105)
|
||||||
if (LinesToWriteQueue.Count == 0 || LinesToWriteQueue[LinesToWriteQueue.Count - 1] != lineToWrite)
|
if (LinesToWriteQueue.Count == 0 || LinesToWriteQueue[LinesToWriteQueue.Count - 1] != lineToWrite)
|
||||||
{
|
{
|
||||||
LinesToWriteQueue.Insert(0, lineToWrite);
|
LinesToWriteQueue.Add(lineToWrite);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2013,7 +2027,7 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
public void ReleaseMotors()
|
public void ReleaseMotors()
|
||||||
{
|
{
|
||||||
QueueLineToPrinter("M84");
|
SendLineToPrinterNow("M84");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Flags]
|
[Flags]
|
||||||
|
|
@ -2034,18 +2048,18 @@ namespace MatterHackers.MatterControl
|
||||||
command += " Z0";
|
command += " Z0";
|
||||||
}
|
}
|
||||||
|
|
||||||
QueueLineToPrinter(command);
|
SendLineToPrinterNow(command);
|
||||||
ReadPosition();
|
ReadPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetMovementToAbsolute()
|
public void SetMovementToAbsolute()
|
||||||
{
|
{
|
||||||
PrinterCommunication.Instance.QueueLineToPrinter("G90");
|
PrinterCommunication.Instance.SendLineToPrinterNow("G90");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetMovementToRelative()
|
public void SetMovementToRelative()
|
||||||
{
|
{
|
||||||
PrinterCommunication.Instance.QueueLineToPrinter("G91");
|
PrinterCommunication.Instance.SendLineToPrinterNow("G91");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void MoveRelative(Axis axis, double moveAmountMm, double feedRateMmPerMinute)
|
public void MoveRelative(Axis axis, double moveAmountMm, double feedRateMmPerMinute)
|
||||||
|
|
@ -2053,8 +2067,8 @@ namespace MatterHackers.MatterControl
|
||||||
if (moveAmountMm != 0)
|
if (moveAmountMm != 0)
|
||||||
{
|
{
|
||||||
SetMovementToRelative();
|
SetMovementToRelative();
|
||||||
PrinterCommunication.Instance.QueueLineToPrinter("G1 F{0}".FormatWith(feedRateMmPerMinute));
|
PrinterCommunication.Instance.SendLineToPrinterNow("G1 F{0}".FormatWith(feedRateMmPerMinute));
|
||||||
PrinterCommunication.Instance.QueueLineToPrinter("G1 {0}{1}".FormatWith(axis, moveAmountMm));
|
PrinterCommunication.Instance.SendLineToPrinterNow("G1 {0}{1}".FormatWith(axis, moveAmountMm));
|
||||||
SetMovementToAbsolute();
|
SetMovementToAbsolute();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2062,20 +2076,20 @@ namespace MatterHackers.MatterControl
|
||||||
public void MoveAbsolute(Axis axis, double axisPositionMm, double feedRateMmPerMinute)
|
public void MoveAbsolute(Axis axis, double axisPositionMm, double feedRateMmPerMinute)
|
||||||
{
|
{
|
||||||
SetMovementToAbsolute();
|
SetMovementToAbsolute();
|
||||||
PrinterCommunication.Instance.QueueLineToPrinter("G1 F{0}".FormatWith(feedRateMmPerMinute));
|
PrinterCommunication.Instance.SendLineToPrinterNow("G1 F{0}".FormatWith(feedRateMmPerMinute));
|
||||||
PrinterCommunication.Instance.QueueLineToPrinter("G1 {0}{1}".FormatWith(axis, axisPositionMm));
|
PrinterCommunication.Instance.SendLineToPrinterNow("G1 {0}{1}".FormatWith(axis, axisPositionMm));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void MoveAbsolute(Vector3 position, double feedRateMmPerMinute)
|
public void MoveAbsolute(Vector3 position, double feedRateMmPerMinute)
|
||||||
{
|
{
|
||||||
SetMovementToAbsolute();
|
SetMovementToAbsolute();
|
||||||
PrinterCommunication.Instance.QueueLineToPrinter("G1 F{0}".FormatWith(feedRateMmPerMinute));
|
PrinterCommunication.Instance.SendLineToPrinterNow("G1 F{0}".FormatWith(feedRateMmPerMinute));
|
||||||
PrinterCommunication.Instance.QueueLineToPrinter("G1 X{0}Y{1}Z{2}".FormatWith(position.x, position.y, position.z));
|
PrinterCommunication.Instance.SendLineToPrinterNow("G1 X{0}Y{1}Z{2}".FormatWith(position.x, position.y, position.z));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ReadPosition()
|
public void ReadPosition()
|
||||||
{
|
{
|
||||||
QueueLineToPrinter("M114");
|
SendLineToPrinterNow("M114");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -173,7 +173,7 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
protected void SentCommandToPrinter(string command)
|
protected void SentCommandToPrinter(string command)
|
||||||
{
|
{
|
||||||
PrinterCommunication.Instance.QueueLineToPrinter(command);
|
PrinterCommunication.Instance.SendLineToPrinterNow(command);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -246,7 +246,7 @@ namespace MatterHackers.MatterControl
|
||||||
}
|
}
|
||||||
commandHistory.Add(textToSend);
|
commandHistory.Add(textToSend);
|
||||||
commandHistoryIndex = commandHistory.Count;
|
commandHistoryIndex = commandHistory.Count;
|
||||||
PrinterCommunication.Instance.QueueLineToPrinter(textToSend);
|
PrinterCommunication.Instance.SendLineToPrinterNow(textToSend);
|
||||||
if (!filterOutput.Checked)
|
if (!filterOutput.Checked)
|
||||||
{
|
{
|
||||||
outputScrollWidget.WriteLine(this, new StringEventArgs(textToSend));
|
outputScrollWidget.WriteLine(this, new StringEventArgs(textToSend));
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,10 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
||||||
ChangeToAddPrinter();
|
ChangeToAddPrinter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
||||||
|
|
||||||
this.ShowAsSystemWindow();
|
this.ShowAsSystemWindow();
|
||||||
MinimumSize = new Vector2(350, 400);
|
MinimumSize = new Vector2(350, 400);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnMouseUp(MouseEventArgs mouseEvent)
|
public override void OnMouseUp(MouseEventArgs mouseEvent)
|
||||||
|
|
|
||||||
|
|
@ -1917,6 +1917,15 @@ Translated:Movement Speeds
|
||||||
English:Extruder
|
English:Extruder
|
||||||
Translated:Extruder
|
Translated:Extruder
|
||||||
|
|
||||||
English:No items to select. Press 'Add' to select a file to print.
|
English:Power on and connect printer
|
||||||
Translated:No items to select. Press 'Add' to select a file to print.
|
Translated:Power on and connect printer
|
||||||
|
|
||||||
|
English:Attempting to connect
|
||||||
|
Translated:Attempting to connect
|
||||||
|
|
||||||
|
English:Connection succeeded
|
||||||
|
Translated:Connection succeeded
|
||||||
|
|
||||||
|
English:You cannot move any lower. This position on your bed is too low for the extruder to reach. You need to raise your bed, or adjust your limits to allow the extruder to go lower.
|
||||||
|
Translated:You cannot move any lower. This position on your bed is too low for the extruder to reach. You need to raise your bed, or adjust your limits to allow the extruder to go lower.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue