Merge pull request #736 from larsbrubaker/1.5.3
Only send G28 when requesting all 3 axis.
This commit is contained in:
commit
6613015ede
1 changed files with 15 additions and 10 deletions
|
|
@ -1189,17 +1189,22 @@ namespace MatterHackers.MatterControl.PrinterCommunication
|
|||
public void HomeAxis(Axis axis)
|
||||
{
|
||||
string command = "G28";
|
||||
if ((axis & Axis.X) == Axis.X)
|
||||
|
||||
// If we are homing everything we don't need to add any details
|
||||
if (!axis.HasFlag(Axis.XYZ))
|
||||
{
|
||||
command += " X0";
|
||||
}
|
||||
if ((axis & Axis.Y) == Axis.Y)
|
||||
{
|
||||
command += " Y0";
|
||||
}
|
||||
if ((axis & Axis.Z) == Axis.Z)
|
||||
{
|
||||
command += " Z0";
|
||||
if ((axis & Axis.X) == Axis.X)
|
||||
{
|
||||
command += " X0";
|
||||
}
|
||||
if ((axis & Axis.Y) == Axis.Y)
|
||||
{
|
||||
command += " Y0";
|
||||
}
|
||||
if ((axis & Axis.Z) == Axis.Z)
|
||||
{
|
||||
command += " Z0";
|
||||
}
|
||||
}
|
||||
|
||||
SendLineToPrinterNow(command);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue