public void CalculateOffsets() { _boardManager.SetMeasuredOffset(_positionManager.OffsetPoint, _positionManager.RotationOffset); _machine.PCBManager.Tool1Navigation = true; /* Move to the new origin */ _machine.GotoPoint(_positionManager.OffsetPoint); /* Set the new XY zero of the machine to the current location, note the move must be completed first */ _machine.SendCommand("G10 L20 P0 X0 Y0"); _machine.AddStatusMessage(StatusMessageTypes.Info, $"Board Angle: {Math.Round(_positionManager.RotationOffset.ToDegrees(), 3)}deg"); _machine.AddStatusMessage(StatusMessageTypes.Info, $"Board Offset: {_positionManager.OffsetPoint.X.ToDim()}x{_positionManager.OffsetPoint.Y.ToDim()}"); }