Skip to content
This repository has been archived by the owner on Apr 7, 2019. It is now read-only.

Commit

Permalink
V1.0.9.11
Browse files Browse the repository at this point in the history
- Handle exception for port in use, Issue #73
- Fix Reset behaviour to prevent sending more data, Issue #83
- Add Hold, Reset and Unlock keyboard shortcuts, Issue #84
- Fix handling of Alarm report, Issue #85
- Re-enable Minimize button as well as Resize handles, Issue #86
  • Loading branch information
gerritv committed Jan 17, 2017
1 parent 41ab58c commit b8dbb53
Show file tree
Hide file tree
Showing 17 changed files with 4,458 additions and 4,069 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ _ReSharper*/
[Tt]est[Rr]esult*
.vs/

/Grbl-Panel/*.user
6 changes: 6 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
This file documents changes made:
V1.0.9.11 - 2017 Jan 15
- Handle exception for port in use, Issue #73
- Fix Reset behaviour to prevent sending more data, Issue #83
- Add Hold, Reset and Unlock keyboard shortcuts, Issue #84
- Fix handling of Alarm report, Issue #85
- Re-enable Minimize button as well as Resize handles, Issue #86
V1.0.9.10 - 2016 Dec 15
- Fix send of tool offset setting, Issue #79
- Expand Macro editing box, Issue #80
Expand Down
8 changes: 8 additions & 0 deletions Grbl-Panel.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Custom", "RepeatButton\Custom.vbproj", "{CF82893A-4C6B-4D08-B8AD-A17EF45DE6F2}"
EndProject
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "GrblPanelSetup", "GrblPanelSetup\GrblPanelSetup.wixproj", "{8A91965D-5D4D-4828-BD99-9977996C633E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -33,6 +35,12 @@ Global
{CF82893A-4C6B-4D08-B8AD-A17EF45DE6F2}.Release|Any CPU.Build.0 = Release|Any CPU
{CF82893A-4C6B-4D08-B8AD-A17EF45DE6F2}.Release|x86.ActiveCfg = Release|Any CPU
{CF82893A-4C6B-4D08-B8AD-A17EF45DE6F2}.Release|x86.Build.0 = Release|Any CPU
{8A91965D-5D4D-4828-BD99-9977996C633E}.Debug|Any CPU.ActiveCfg = Debug|x86
{8A91965D-5D4D-4828-BD99-9977996C633E}.Debug|x86.ActiveCfg = Debug|x86
{8A91965D-5D4D-4828-BD99-9977996C633E}.Debug|x86.Build.0 = Debug|x86
{8A91965D-5D4D-4828-BD99-9977996C633E}.Release|Any CPU.ActiveCfg = Release|x86
{8A91965D-5D4D-4828-BD99-9977996C633E}.Release|x86.ActiveCfg = Release|x86
{8A91965D-5D4D-4828-BD99-9977996C633E}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 1 addition & 1 deletion Grbl-Panel/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<value>0</value>
</setting>
<setting name="Macro1" serializeAs="String">
<value>Probe,G38.2 Z-30 F10</value>
<value />
</setting>
<setting name="Macro2" serializeAs="String">
<value />
Expand Down
6 changes: 6 additions & 0 deletions Grbl-Panel/CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
This file documents changes made:
V1.0.9.11 - 2017 Jan 15
- Handle exception for port in use, Issue #73
- Fix Reset behaviour to prevent sending more data, Issue #83
- Add Hold, Reset and Unlock keyboard shortcuts, Issue #84
- Fix handling of Alarm report, Issue #85
- Re-enable Minimize button as well as Resize handles, Issue #86
V1.0.9.10 - 2016 Dec 15
- Fix send of tool offset setting, Issue #79
- Expand Macro editing box, Issue #80
Expand Down
7 changes: 6 additions & 1 deletion Grbl-Panel/Grbl-Panel.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="LICENSE.rtf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="My Project\app.manifest" />
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
Expand Down Expand Up @@ -277,7 +280,9 @@
<Content Include="CHANGES.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="cnc-icon.ico" />
<None Include="cnc-icon.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Content Include="CREDITS.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Expand Down
48 changes: 24 additions & 24 deletions Grbl-Panel/GrblGcode.vb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Partial Class GrblGui
Public Function loadGCodeFile(ByVal file As String) As Boolean
Dim data As String
' Start from clean slate
resetGcode(True)
ResetGcode(True)
' Load the file, count lines
_inputfh = My.Computer.FileSystem.OpenTextFileReader(file)
' count the lines while loading up
Expand Down Expand Up @@ -151,7 +151,7 @@ Partial Class GrblGui
_sendAnotherLine = True
_runMode = False
_stepMode = True
_gui.gcodeview.fileMode = True
gcodeview.fileMode = True
_gui.processLineEvent("") ' Prime the pump again

End Sub
Expand Down Expand Up @@ -203,7 +203,7 @@ Partial Class GrblGui

Public Sub shutdown()
' Close up shop
resetGcode(True)
ResetGcode(True)
End Sub

Public Sub ResetGcode(ByVal fullstop As Boolean)
Expand Down Expand Up @@ -306,24 +306,24 @@ Partial Class GrblGui

' are we waiting for Ack?
If gcode.wtgForAck Then
' is recvData ok or error?

If data.StartsWith("ok") Or data.StartsWith("error") Then
' Mark gcode item as ok/error
gcodeview.UpdateGCodeStatus(data, gcode.linesDone - 1)
' No longer waiting for Ack
gcode.wtgForAck = False
' Handle rewind of gcode if this ack/ok was for an M30
If gcode.m30Flag = True Then
gcode.m30Flag = False
gcode.sendGCodeFileRewind() ' reset to beginning
End If
If gcode.runMode Then ' if not paused or stopped
' Mark sendAnotherLine
gcode.sendAnotherLine = True
End If
' is recvData ok or error?

If data.StartsWith("ok") Or data.StartsWith("error") Then
' Mark gcode item as ok/error
gcodeview.UpdateGCodeStatus(data, gcode.linesDone - 1)
' No longer waiting for Ack
gcode.wtgForAck = False
' Handle rewind of gcode if this ack/ok was for an M30
If gcode.m30Flag = True Then
gcode.m30Flag = False
gcode.sendGCodeFileRewind() ' reset to beginning
End If
If gcode.runMode Then ' if not paused or stopped
' Mark sendAnotherLine
gcode.sendAnotherLine = True
End If
End If
End If
' Do we have another line to send?
If gcode.runMode = True Or gcode.stepMode = True Then ' if not paused or stopped
If gcode.sendAnotherLine Then
Expand Down Expand Up @@ -368,11 +368,11 @@ Partial Class GrblGui
' Check for status responses that we need to handle here
' Extract status
Dim status = Split(data, ",")
If status(0) = "<Alarm" Or status(0).StartsWith("ALARM") Then
' Major problem so cancel the file
' GrblStatus has set the Alarm indicator etc
gcode.sendGCodeFileStop()
End If
If status(0) = "<Alarm" Or status(0).StartsWith("ALARM") Then
' Major problem so cancel the file
' GrblStatus has set the Alarm indicator etc
gcode.sendGCodeFileStop()
End If
If status(0).StartsWith("error") Then
' We pause file send to allow operator to determine proceed or not
If cbSettingsPauseOnError.Checked Then
Expand Down
11 changes: 10 additions & 1 deletion Grbl-Panel/GrblGui.vb
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,15 @@ Public Class GrblGui
End If
handled = True

' Grbl State
Case Keys.H And Keys.ControlKey
_gui.btnHold.PerformClick()
handled = True
Case Keys.U And Keys.ControlKey
_gui.btnUnlock.PerformClick()
Case Keys.R And Keys.ControlKey
_gui.btnReset.PerformClick()

' Overrides
Case Keys.F And My.Computer.Keyboard.ShiftKeyDown
_gui.btnFeedPlus.PerformClick()
Expand Down Expand Up @@ -593,5 +602,5 @@ Public Class GrblGui
For iCounter = 0 To aData.Count - 1
gcode.sendGCodeLine(aData(iCounter))
Next
End Sub
End Sub
End Class
2 changes: 2 additions & 0 deletions Grbl-Panel/GrblIF.vb
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ Public Class GrblIF
_port.Open()
Catch ex As System.IO.IOException
Return False
Catch ex As System.UnauthorizedAccessException
Return False
End Try
' Reset the board
_port.DtrEnable = True
Expand Down
1 change: 1 addition & 0 deletions Grbl-Panel/GrblJogging.vb
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ Partial Class GrblGui
If GrblVersion = 1 Then
Return "$J=G91" + whichUnits() + axis + whichDistance() + " F" + whichFeedRate()
End If
Return ""
End Function
''' <summary>
''' Return value of current Distance Increment
Expand Down
16 changes: 10 additions & 6 deletions Grbl-Panel/GrblStatus.vb
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ Partial Class GrblGui

Private Sub btnReset_Click(sender As Object, e As EventArgs) Handles btnReset.Click
' Send Reset command to Grbl
gcode.ResetGcode(False)
grblPort.sendData(Chr(24)) ' ctl-X
End Sub

Expand Down Expand Up @@ -293,14 +294,17 @@ Partial Class GrblGui
' TODO Figure out where to display Grbl's actual feedrate, if at all
End Select
Next

End If
End If
' A bit messy but it doesn't really fit anywhere else
If data.StartsWith("ALARM") Then
statusSetIndicators(data.Substring(0, 6))
End If

' TODO Move to Settings handler
If data(0) = "$" And IsNumeric(data(1)) Then
' we have a Grbl Settings response
settings.FillSettings(data)
' TODO Move to Settings handler
If data(0) = "$" And IsNumeric(data(1)) Then
' we have a Grbl Settings response
settings.FillSettings(data)
End If
End If


Expand Down
2 changes: 1 addition & 1 deletion Grbl-Panel/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
' The MIT License (MIT)
'
' Copyright (c) 2014 Gerrit Visser
' Copyright (c) 2014-2016 Gerrit Visser
'
' Permission is hereby granted, free of charge, to any person obtaining a copy
' of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions Grbl-Panel/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyDescription("A control panel for Grbl")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("Grbl Panel")>
<Assembly: AssemblyCopyright("Copyright © 2014-2016")>
<Assembly: AssemblyCopyright("Copyright © 2014-2017")>
<Assembly: AssemblyTrademark("(c) Gerrit Visser")>

<Assembly: ComVisible(False)>
Expand All @@ -33,7 +33,7 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("1.0.9.10")>
<Assembly: AssemblyFileVersion("1.0.9.10")>
<Assembly: AssemblyVersion("1.0.9.11")>
<Assembly: AssemblyFileVersion("1.0.9.11")>

<Assembly: NeutralResourcesLanguageAttribute("en-CA")>
2 changes: 1 addition & 1 deletion Grbl-Panel/My Project/Settings.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Grbl-Panel/My Project/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="Macro1" Type="System.String" Scope="User">
<Value Profile="(Default)">Probe,G38.2 Z-30 F10</Value>
<Value Profile="(Default)" />
</Setting>
<Setting Name="Macro2" Type="System.String" Scope="User">
<Value Profile="(Default)" />
Expand Down
Loading

0 comments on commit b8dbb53

Please sign in to comment.