public void Jog(JogDirection dir, decimal size, decimal speed) { if (JogEnabled) { string cmd = SupportJogging ? "$J=G91X{1}Y{0}F{2}" : "G0X{1}Y{0}F{2}"; if (dir == JogDirection.N) { cmd = string.Format(cmd, size, 0, speed); } else if (dir == JogDirection.S) { cmd = string.Format(cmd, -size, 0, speed); } else if (dir == JogDirection.W) { cmd = string.Format(cmd, 0, -size, speed); } else if (dir == JogDirection.E) { cmd = string.Format(cmd, 0, size, speed); } else if (dir == JogDirection.NE) { cmd = string.Format(cmd, size, size, speed); } else if (dir == JogDirection.NW) { cmd = string.Format(cmd, size, -size, speed); } else if (dir == JogDirection.SE) { cmd = string.Format(cmd, -size, size, speed); } else if (dir == JogDirection.SW) { cmd = string.Format(cmd, -size, -size, speed); } if (!SupportJogging) { EnqueueCommand(new GrblCommand("G91")); } EnqueueCommand(new GrblCommand(cmd)); if (!SupportJogging) { EnqueueCommand(new GrblCommand("G90")); } } }
public JogEventArgs(JogDirection direction, DeviceType device, DeviceNo deviceNo) { Direction = direction; Device = device; DeviceNumber = deviceNo; }
private void RequestJog(JogDirection dir) { mJogKeyRequested = true; mCore.BeginJog(dir); }