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

Commit

Permalink
Release 1.0.9.14
Browse files Browse the repository at this point in the history
Fix #Issue 106
Fix #Issue 108
Fix #Issue 109
  • Loading branch information
gerritv committed May 1, 2017
1 parent edd083d commit c9ee442
Show file tree
Hide file tree
Showing 14 changed files with 3,287 additions and 6,573 deletions.
12 changes: 2 additions & 10 deletions Grbl-Panel.sln
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.26228.10
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Grbl-Panel", "Grbl-Panel\Grbl-Panel.vbproj", "{5C3844BF-7FD8-41F5-A6D7-B5C3B2084450}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B899C98E-A15D-4E65-BBAE-BEAD08CC07D2}"
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 @@ -35,12 +33,6 @@ 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
4 changes: 4 additions & 0 deletions Grbl-Panel/CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
This file documents changes made:
V1.0.9.14 - 2017 Apr 30
- Fix licence.rtf, deleted the file, Issue #106
- Fix missing error texts, Issue #108
- Add feature to track Grbl setting $13 (Inch/Metric display) to Jogging configuration. Issue #109
V1.0.9.13 - 2017 Jan 27
- Fix more things in Issue #84
- Add F2 as key to run Macro 1 if it exists, Issue #84
Expand Down
4 changes: 1 addition & 3 deletions Grbl-Panel/Grbl-Panel.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,11 @@
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
</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
69 changes: 36 additions & 33 deletions Grbl-Panel/GrblErrorsSingleton.vb
Original file line number Diff line number Diff line change
Expand Up @@ -33,39 +33,42 @@ Public Class GrblErrorsSingleton
''' </summary>
''' <returns></returns>
Public Function GetErrorsDct() As Dictionary(Of String, String)
_errors = New Dictionary(Of String, String) From {
{"0", "ok"},
{"1", GrblGcodeView_ExpectedCommandLetter},
{"2", GrblGcodeView_BadNumberFormat},
{"3", GrblGcodeView_InvalidStatement},
{"4", GrblGcodeView_Value0},
{"5", Resources.GrblGcodeView_SettingDisabled},
{"6", Resources.GrblGcodeView_Value3Usec},
{"7", Resources.GrblGcodeView_EEPROMReadFailUsingDefaults},
{"8", Resources.GrblGcodeView_NotIdle},
{"9", Resources.GrblGcodeView_AlarmLock},
{"10", Resources.GrblGcodeView_HomingIsNotEnabled},
{"11", Resources.GrblGcodeView_LineOverflow},
{"12", Resources.GrblGcodeView_StepRate30kHz},
{"13", Resources.GrblGcodeView_CheckDoor},
{"20", Resources.GrblGcodeView_UnsupportedCommand},
{"21", Resources.GrblGcodeView_ModalGroupViolation},
{"22", Resources.GrblGcodeView_UndefinedFeedRate},
{"23", Resources.GrblGcodeView_CommandValueIsNotInteger},
{"24", Resources.GrblGcodeView_AxisCommandConflict},
{"25", Resources.GrblGcodeView_WordRepeated},
{"26", Resources.GrblGcodeView_NoAxisWords},
{"27", Resources.GrblGcodeView_InvalidLineNumber},
{"28", Resources.GrblGcodeView_ValueWordMissing},
{"29", Resources.GrblGcodeView_UnsupportedCoordinateSystem},
{"30", Resources.GrblGcodeView_G53InvalidMotionMode},
{"31", Resources.GrblGcodeView_AxisWordsExist},
{"32", Resources.GrblGcodeView_NoAxisWordsInPlane},
{"33", Resources.GrblGcodeView_InvalidTarget},
{"34", Resources.GrblGcodeView_ArcRadiusError},
{"35", Resources.GrblGcodeView_NoOffsetsInPlane},
{"36", Resources.GrblGcodeView_UnusedWords},
{"37", Resources.GrblGcodeView_G43DynamicAxisError}
_errors = New Dictionary(Of String, String) From {
{"0", "ok"},
{"1", GrblGcodeView_ExpectedCommandLetter},
{"2", GrblGcodeView_BadNumberFormat},
{"3", GrblGcodeView_InvalidStatement},
{"4", GrblGcodeView_Value0},
{"5", Resources.GrblGcodeView_SettingDisabled},
{"6", Resources.GrblGcodeView_Value3Usec},
{"7", Resources.GrblGcodeView_EEPROMReadFailUsingDefaults},
{"8", Resources.GrblGcodeView_NotIdle},
{"9", Resources.GrblGcodeView_AlarmLock},
{"10", Resources.GrblGcodeView_HomingIsNotEnabled},
{"11", Resources.GrblGcodeView_LineOverflow},
{"12", Resources.GrblGcodeView_StepRate30kHz},
{"13", Resources.GrblGcodeView_CheckDoor},
{"14", Resources.GrblGcodeView_BuildInfoLength},
{"15", Resources.GrblGcodeView_JogTravel},
{"16", Resources.GrblGcodeView_JogFormat},
{"20", Resources.GrblGcodeView_UnsupportedCommand},
{"21", Resources.GrblGcodeView_ModalGroupViolation},
{"22", Resources.GrblGcodeView_UndefinedFeedRate},
{"23", Resources.GrblGcodeView_CommandValueIsNotInteger},
{"24", Resources.GrblGcodeView_AxisCommandConflict},
{"25", Resources.GrblGcodeView_WordRepeated},
{"26", Resources.GrblGcodeView_NoAxisWords},
{"27", Resources.GrblGcodeView_InvalidLineNumber},
{"28", Resources.GrblGcodeView_ValueWordMissing},
{"29", Resources.GrblGcodeView_UnsupportedCoordinateSystem},
{"30", Resources.GrblGcodeView_G53InvalidMotionMode},
{"31", Resources.GrblGcodeView_AxisWordsExist},
{"32", Resources.GrblGcodeView_NoAxisWordsInPlane},
{"33", Resources.GrblGcodeView_InvalidTarget},
{"34", Resources.GrblGcodeView_ArcRadiusError},
{"35", Resources.GrblGcodeView_NoOffsetsInPlane},
{"36", Resources.GrblGcodeView_UnusedWords},
{"37", Resources.GrblGcodeView_G43DynamicAxisError}
}
Return _errors
End Function
Expand Down
5 changes: 4 additions & 1 deletion Grbl-Panel/GrblGui.vb
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Public Class GrblGui
''' <summary>
''' Handle key press overrides and keyboard mapping
''' </summary>
''' <param name="msg"><DebuggerStepThrough()></param>
''' <param name="msg"></param>
''' <returns>True if key msg was handled</returns>
Private Function PreFilterMessage(ByRef msg As Message) As Boolean Implements IMessageFilter.PreFilterMessage
Dim handled As Boolean = False
Expand Down Expand Up @@ -561,6 +561,8 @@ Public Class GrblGui

' Raised when we succesfully connected to Grbl
Public Event Connected(ByVal msg As String)
' Event template for Settings Retrieved indication
Public Event GrblSettingsRetrieved()


'Private Sub MacroButtonEditorToolStripMenuItem_Click(sender As Object, e As EventArgs)
Expand Down Expand Up @@ -620,4 +622,5 @@ Public Class GrblGui
gcode.sendGCodeLine(aData(iCounter))
Next
End Sub

End Class
6 changes: 6 additions & 0 deletions Grbl-Panel/GrblJogging.vb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Partial Class GrblGui

_gui = gui

AddHandler(_gui.settings.GrblSettingsRetrievedEvent), AddressOf GrblSettingsRetrieved
' Do set up things

With My.Settings
Expand Down Expand Up @@ -52,6 +53,11 @@ Partial Class GrblGui
enableJogging(False)
End Sub

Private Sub GrblSettingsRetrieved() ' Handles the named event

_gui.cbUnits.Checked = _gui.settings.IsGrblMetric

End Sub
End Class

Private Sub btnJogArray_Click(sender As Object, e As EventArgs) Handles btnXPlus.Click, btnXMinus.Click, btnYPlus.Click, btnYMinus.Click, _
Expand Down
2 changes: 1 addition & 1 deletion Grbl-Panel/GrblOverrides.vb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Partial Class grblgui
_gui = gui

' We wait to enable Overrides panel until we know if Grbl supports it (V1.0 and later)
AddHandler(_gui.settings.GrblSettingsRetrieved), AddressOf GrblSettingsRetrieved
AddHandler(_gui.settings.GrblSettingsRetrievedEvent), AddressOf GrblSettingsRetrieved

' For Connected events
AddHandler(GrblGui.Connected), AddressOf GrblConnected
Expand Down
80 changes: 41 additions & 39 deletions Grbl-Panel/GrblPosition.vb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Partial Class GrblGui
_gui = gui
' For Connected events
AddHandler (GrblGui.Connected), AddressOf GrblConnected
AddHandler (_gui.settings.GrblSettingsRetrieved), AddressOf GrblSettingsRetrieved
AddHandler(_gui.settings.GrblSettingsRetrievedEvent), AddressOf GrblSettingsRetrieved
End Sub

Public Sub enablePosition(ByVal action As Boolean)
Expand Down Expand Up @@ -40,10 +40,12 @@ Partial Class GrblGui
_gui.btnHome.Visible = True
End If

_gui.cbUnits.Checked = _gui.settings.IsGrblMetric

End Sub

Private _wcoX As Decimal
Public Property wcoX() As Decimal
Public Property WcoX() As Decimal
Get
Return _wcoX
End Get
Expand All @@ -52,7 +54,7 @@ Partial Class GrblGui
End Set
End Property
Private _wcoY As Decimal
Public Property wcoY() As Decimal
Public Property WcoY() As Decimal
Get
Return _wcoY
End Get
Expand All @@ -62,7 +64,7 @@ Partial Class GrblGui
End Property

Private _wcoZ As Decimal
Public Property wcoZ() As Decimal
Public Property WcoZ() As Decimal
Get
Return _wcoZ
End Get
Expand All @@ -74,41 +76,41 @@ Partial Class GrblGui


Public Sub showGrblPositions(ByVal data As String)
dim positions() as String
Dim positions() As String

' Show data in the Positions group (from our own thread)
If data = vbCrLf Then Return

If GrblVersion = 0 Then
' Grbl versions 0.x, assume/expect $10=3 or equivalent
data = data.Remove(data.Length - 3, 3) ' Remove the "> " at end
data = data.Remove(data.Length - 3, 3) ' Remove the "> " at end
If (data.Contains("MPos:")) Then
' Lets display the values
positions = Split(data, ":")
' MPos will always be first
Dim machPos = Split(positions(1), ",")

tbMachX.Text = machPos(0).ToString
tbMachY.Text = machPos(1).ToString
tbMachZ.Text = machPos(2).ToString
'Set same values into the repeater view on Offsets page
tbOffSetsMachX.Text = machPos(0).ToString
tbOffSetsMachY.Text = machPos(1).ToString
tbOffSetsMachZ.Text = machPos(2).ToString
positions = Split(data, ":")
' MPos will always be first
Dim machPos = Split(positions(1), ",")

tbMachX.Text = machPos(0).ToString
tbMachY.Text = machPos(1).ToString
tbMachZ.Text = machPos(2).ToString
'Set same values into the repeater view on Offsets page
tbOffSetsMachX.Text = machPos(0).ToString
tbOffSetsMachY.Text = machPos(1).ToString
tbOffSetsMachZ.Text = machPos(2).ToString

End If
if (data.Contains("WPos:")) Then
Dim workPos() As String
positions = Split(data, ":")
' WPos might be first or it might be second (if MPos is also present)
If positions.Count = 2 Then
workPos = Split(positions(1), ",")
Else
workPos = Split(positions(2), ",")
End If
tbWorkX.Text = workPos(0).ToString
tbWorkY.Text = workPos(1).ToString
tbWorkZ.Text = workPos(2).ToString
If (data.Contains("WPos:")) Then
Dim workPos() As String
positions = Split(data, ":")
' WPos might be first or it might be second (if MPos is also present)
If positions.Count = 2 Then
workPos = Split(positions(1), ",")
Else
workPos = Split(positions(2), ",")
End If
tbWorkX.Text = workPos(0).ToString
tbWorkY.Text = workPos(1).ToString
tbWorkZ.Text = workPos(2).ToString
End If

End If
Expand All @@ -125,19 +127,19 @@ Partial Class GrblGui
Case "WCO"
' WCO appears now and then or if it changes
Dim wco = Split(portion(1), ",")
position.wcoX = wco(0)
position.wcoY = wco(1)
position.wcoZ = wco(2)
position.WcoX = wco(0)
position.WcoY = wco(1)
position.WcoZ = wco(2)
Case "MPos"
' We get Mpos but no WPos depending on $10
Dim machPos = Split(portion(1), ",")
tbMachX.Text = machPos(0).ToString
tbMachY.Text = machPos(1).ToString
tbMachZ.Text = machPos(2).ToString

tbWorkX.Text = (machPos(0) - position.wcoX).ToString("0.000")
tbWorkY.Text = (machPos(1) - position.wcoY).ToString("0.000")
tbWorkZ.Text = (machPos(2) - position.wcoZ).ToString("0.000")
tbWorkX.Text = (machPos(0) - position.WcoX).ToString("0.000")
tbWorkY.Text = (machPos(1) - position.WcoY).ToString("0.000")
tbWorkZ.Text = (machPos(2) - position.WcoZ).ToString("0.000")

'Set same values into the repeater view on Offsets page
tbOffSetsMachX.Text = tbMachX.Text
Expand All @@ -150,9 +152,9 @@ Partial Class GrblGui
tbWorkY.Text = workPos(1).ToString
tbWorkZ.Text = workPos(2).ToString

tbMachX.Text = (workPos(0) + position.wcoX).ToString("0.000")
tbMachY.Text = (workPos(1) + position.wcoY).ToString("0.000")
tbMachZ.Text = (workPos(2) + position.wcoZ).ToString("0.000")
tbMachX.Text = (workPos(0) + position.WcoX).ToString("0.000")
tbMachY.Text = (workPos(1) + position.WcoY).ToString("0.000")
tbMachZ.Text = (workPos(2) + position.WcoZ).ToString("0.000")

End Select
Next
Expand Down
21 changes: 18 additions & 3 deletions Grbl-Panel/GrblSettings.vb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,22 @@ Partial Class GrblGui
Return False
End Get
End Property

''' <summary>
'''
''' </summary>
''' <returns></returns>
ReadOnly Property IsGrblMetric As Boolean
Get
Dim row As DataRow
row = _paramTable.Rows.Find("$13")
If Not IsNothing(row) Then
If (row.Item(1).ToString(0) = "0") Then
Return True
End If
End If
Return False
End Get
End Property
#End Region

Public Sub New(ByRef gui As GrblGui)
Expand Down Expand Up @@ -151,12 +166,12 @@ Partial Class GrblGui
.Refresh()
End With
' Tell everyone we have the params
RaiseEvent GrblSettingsRetrieved()
RaiseEvent GrblSettingsRetrievedEvent()
End If
End Sub

' Event template for Settings Retrieved indication
Public Event GrblSettingsRetrieved()
Public Event GrblSettingsRetrievedEvent()

Public Sub RefreshSettings()
_nextParam = 0
Expand Down
4 changes: 2 additions & 2 deletions Grbl-Panel/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("1.0.9.13")>
<Assembly: AssemblyFileVersion("1.0.9.13")>
<Assembly: AssemblyVersion("1.0.9.14")>
<Assembly: AssemblyFileVersion("1.0.9.14")>

<Assembly: NeutralResourcesLanguageAttribute("en-CA")>
Loading

0 comments on commit c9ee442

Please sign in to comment.