Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modern jog Control #592

Merged
merged 3 commits into from
Feb 28, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Modern jog Control
Adding a modern looking jog custom Usercontrol.

It replace the direction and home button. It also replace the distance trackbar.
  • Loading branch information
Sardau committed Feb 28, 2019
commit 95864c36a75a8ad90b6a08caf2350c0ca8a7fb4c
20 changes: 20 additions & 0 deletions LaserGRBL/GrblCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,26 @@ public bool JogEnabled
}
}

public void Move(Point move)
{
if (JogEnabled)
{
decimal speed = JogSpeed;

string cmd = SupportJogging ? "$J=G91X{0}Y{1}F{2}" : "G0X{0}Y{1}F{2}";
cmd = string.Format(cmd, move.X, move.Y, speed);

if (!SupportJogging)
EnqueueCommand(new GrblCommand("G91"));

EnqueueCommand(new GrblCommand(cmd));

if (!SupportJogging)
EnqueueCommand(new GrblCommand("G90"));

}

}
public void Jog(JogDirection dir)
{
if (JogEnabled)
Expand Down
Loading