Skip to content

Commit

Permalink
fix issue with jogging
Browse files Browse the repository at this point in the history
  • Loading branch information
arkypita committed Jul 5, 2024
1 parent 01909dc commit 37b5307
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 17 deletions.
2 changes: 1 addition & 1 deletion LaserGRBL/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
// utilizzando l'asterisco (*) come descritto di seguito:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion ("7.10.0")]
[assembly: AssemblyVersion ("7.11.0")]
[assembly: NeutralResourcesLanguage("en")]
38 changes: 23 additions & 15 deletions LaserGRBL/Core/GrblCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1753,22 +1753,30 @@ private void EnqueueJogV11(PointF target, float speed)

private void EnqueueJogV11(JogDirection dir, decimal step, float speed)
{
string cmd = "$J=G91";
if (dir == JogDirection.NE || dir == JogDirection.E || dir == JogDirection.SE)
cmd += $"X{step.ToString("0.0", NumberFormatInfo.InvariantInfo)}";
if (dir == JogDirection.NW || dir == JogDirection.W || dir == JogDirection.SW)
cmd += $"X-{step.ToString("0.0", NumberFormatInfo.InvariantInfo)}";
if (dir == JogDirection.NW || dir == JogDirection.N || dir == JogDirection.NE)
cmd += $"Y{step.ToString("0.0", NumberFormatInfo.InvariantInfo)}";
if (dir == JogDirection.SW || dir == JogDirection.S || dir == JogDirection.SE)
cmd += $"Y-{step.ToString("0.0", NumberFormatInfo.InvariantInfo)}";
if (dir == JogDirection.Zdown)
cmd += $"Z-{step.ToString("0.0", NumberFormatInfo.InvariantInfo)}";
if (dir == JogDirection.Zup)
cmd += $"Z{step.ToString("0.0", NumberFormatInfo.InvariantInfo)}";
if (dir == JogDirection.Home)
{
EnqueueCommand(new GrblCommand(string.Format("$J=G90X0Y0F{0}", speed)));
}
else
{
string cmd = "$J=G91";
if (dir == JogDirection.NE || dir == JogDirection.E || dir == JogDirection.SE)
cmd += $"X{step.ToString("0.0", NumberFormatInfo.InvariantInfo)}";
if (dir == JogDirection.NW || dir == JogDirection.W || dir == JogDirection.SW)
cmd += $"X-{step.ToString("0.0", NumberFormatInfo.InvariantInfo)}";
if (dir == JogDirection.NW || dir == JogDirection.N || dir == JogDirection.NE)
cmd += $"Y{step.ToString("0.0", NumberFormatInfo.InvariantInfo)}";
if (dir == JogDirection.SW || dir == JogDirection.S || dir == JogDirection.SE)
cmd += $"Y-{step.ToString("0.0", NumberFormatInfo.InvariantInfo)}";
if (dir == JogDirection.Zdown)
cmd += $"Z-{step.ToString("0.0", NumberFormatInfo.InvariantInfo)}";
if (dir == JogDirection.Zup)
cmd += $"Z{step.ToString("0.0", NumberFormatInfo.InvariantInfo)}";

cmd += $"F{speed}";
EnqueueCommand(new GrblCommand(cmd));
}

cmd += $"F{speed}";
EnqueueCommand(new GrblCommand(cmd));
}

//private void DoJogV11(JogDirection dir, decimal step)
Expand Down
2 changes: 1 addition & 1 deletion setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "LaserGRBL"
#define MyAppVersion "7.10.0"
#define MyAppVersion "7.11.0"
#define MyAppVersionName "Rhydon"
#define MyAppPublisher "LaserGRBL"
#define MyAppURL "https://lasergrbl.com"
Expand Down

0 comments on commit 37b5307

Please sign in to comment.