Adding M851 to the emulator (Set XYZ Probe Offset)

This commit is contained in:
Lars Brubaker 2020-11-13 17:18:04 -08:00
parent 6bd35c0260
commit 93c4aa3c0c

View file

@ -94,6 +94,7 @@ namespace MatterHackers.PrinterEmulator
{ "M20", ListSdCard },
{ "M21", InitSdCard },
{ "M306", SetHomeOffset },
{ "M851", SetXYZProbeOffset },
{ "N", ParseChecksumLine },
{ "T0", SetExtruderIndex },
{ "T1", SetExtruderIndex },
@ -242,7 +243,7 @@ namespace MatterHackers.PrinterEmulator
Console.WriteLine(command);
}
if(command.StartsWith("T"))
if (command.StartsWith("T"))
{
int a = 0;
}
@ -418,6 +419,13 @@ ok
return "ok\n";
}
private string SetXYZProbeOffset(string command)
{
XYZProbeOffset = Destination;
return "ok\n";
}
private readonly Random rand = new Random();
private string ProbePosition(string command)
@ -709,6 +717,8 @@ ok
public Vector3 HomePosition { get; set; } = default(Vector3);
public Vector3 XYZProbeOffset { get; set; } = default(Vector3);
public void Close()
{
this.ShutDown();