Skip to content

Commit

Permalink
V3.4 z axis control improvements, selectable baud rate, dwell/coolant…
Browse files Browse the repository at this point in the history
… fix, decimal precision reduction to fit grbl line buffer and many other changes
  • Loading branch information
zapmaker committed Jun 2, 2013
1 parent 1f5b507 commit 9a52bab
Show file tree
Hide file tree
Showing 19 changed files with 834 additions and 171 deletions.
6 changes: 4 additions & 2 deletions GcodeSenderGUIthreads.pro
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ SOURCES += main.cpp\
lineitem.cpp \
itemtobase.cpp \
arcitem.cpp \
pointitem.cpp
pointitem.cpp \
controlparams.cpp

HEADERS += mainwindow.h \
rs232.h \
Expand All @@ -50,7 +51,8 @@ HEADERS += mainwindow.h \
itemtobase.h \
arcitem.h \
pointitem.h \
termiosext.h
termiosext.h \
controlparams.h

FORMS += mainwindow.ui \
options.ui \
Expand Down
4 changes: 2 additions & 2 deletions GrblController.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 "Grbl Controller"
#define MyAppVersion "3.3.9"
#define MyAppVersion "3.4"
#define MyAppPublisher "Zapmaker"
#define MyAppURL "http://zapmaker.org"
#define MyAppExeName "GrblController.exe"
Expand All @@ -25,7 +25,7 @@ AllowNoIcons=yes
LicenseFile=C:\dev\github\GrblHoming\winlicense.txt
InfoBeforeFile=C:\dev\github\GrblHoming\wininfobefore.txt
InfoAfterFile=C:\dev\github\GrblHoming\wininfoafter.txt
OutputBaseFilename=GrblController339Setup
OutputBaseFilename=GrblController34Setup
Compression=lzma
SolidCompression=yes

Expand Down
34 changes: 34 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,40 @@ build from source.
Details on how to do this can be found here:
http://zapmaker.org/

V3.4
Enhancements
- Z-axis slider now allows rapid control of Z-axis positioning. This feature is still
being evaluated for proper behavior due to some user-interface issues.
If you run into trouble, please report a bug.
- All axis control buttons have been permanently enabled regardless of whether or not an
axis command is in progress - this allows more rapid updating. Note - there is no error
checking for the case of entering too many commands for the Grbl buffer. This is unlikely
but possible.
- Now supports setting of baud rates from 9600 to 115200
- Aggressive preload enabled is now the default. If the user upgraded from an older
Grbl Controller and had it disabled, a popup will warn them that it is being enabled.
They still have the option to disable, if desired
- Logging is turned on by default (only for new installs)
- All detected errors are collected and displayed after a file is run in the status view
- If filtering unsupported commands, all commands filtered out are listed after the file
is run.
- Logging now gives the line number of each command sent from the file and the corresponding
ok or error also contains the line number.
- An option has been provided to reduce the precision of lines that exceed Grbl's line buffer,
which by default is 50 characters. The code removes the arguments with the greatest precision
first and ending with at least one decimal place of precision. Errors are generated if it
cannot remove sufficient precision for the available buffer space. The buffer size on Grbl
is configurable in the options, as older Grbls have 50 characters and newer have 70.

Bug Fixes
- If Grbl stops responding (waiting for an ok), Soft Reset Grbl now functions correctly
(so you can soft reset without having to restart Grbl Controller). This affects aggressive
preload mode only.
- Commands to start/stop coolant coupled with dwell commands and aggressive preload cause
Grbl's modal logic to stop sending OK responses (on purpose). This was solved by waiting
for the OK of the coolant off before sending additional commands. It is not clear whether
this fixes all possible such modal problems, so use carefully and report any anomalies.

V3.3.9
Enhancement
- We now are able to remember and restore ports that are not visible to QextSerialEnumerator
Expand Down
20 changes: 8 additions & 12 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
This file contains enhancements the developer and user community would like to see:

Planned for 3.4:
- Detect machine state at end of run and display it properly (i.e. "transitioning" when it is still moving)
- Make aggressive preload default. Tell user if not using it to offer to switch over.

Planned for 3.4.1:
- Qt5 builds

Planned for 3.5:
- (What is the problem here? Run is shown, then Idle when stopped) Detect machine state at end of run and display it properly (i.e. "transitioning" when it is still moving)
- Every second or so, if not scrolled to bottom, scroll to bottom of status
- Allow reload of same file from same location
- Collect all detected errors and display them at the end after a file run, including line that caused error
- After a run, suppress $$ output with a single line
- Report system settings at beginning of log file. Include OS.
- Turn log on by default
- Can't see drill holes under axis, move axes under toolpaths?
- Create test plan (i.e. verify all text appears correctly on all platforms)
- Display detected version of Grbl
- Faster jog button-to-motion response
- Allow stacking jog actions
- Support other baud rates
- Speed limit for X and Y like the Z speed limit
- Trim excess precision when line length maxes out at 50 characters (make it an option)
- Allow manual entry of port number

Planned for 3.5:
Planned for 3.6:
- Implement support for Grbl 0.8c "homing" feature (using limit switches)
- UI support for homing limit switches
- Restore "Tool change" feature, including popup dialog
Expand All @@ -29,7 +25,7 @@ Planned for 3.5:
- Analyze file ahead of time and determine if it will go beyond extents
- Update manual since 3.3

Planned for 3.6
Planned for 3.7
- Switch to compiling using Qt 5
- Auto-scale widgets to full screen size
- Localization ready code
Expand Down
10 changes: 10 additions & 0 deletions controlparams.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include "controlparams.h"

ControlParams::ControlParams()
: waitTime(LONG_WAIT_SEC), zJogRate(DEFAULT_Z_JOG_RATE),
useMm(true), zRateLimit(false), zRateLimitAmount(DEFAULT_Z_LIMIT_RATE),
xyRateAmount(DEFAULT_XY_RATE),
useAggressivePreload(false), filterFileCommands(false),
reducePrecision(false), grblLineBufferLen(DEFAULT_GRBL_LINE_BUFFER_LEN)
{
}
27 changes: 27 additions & 0 deletions controlparams.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#ifndef CONTROLPARAMS_H
#define CONTROLPARAMS_H

#include "definitions.h"

#define SHORT_WAIT_SEC 2
#define LONG_WAIT_SEC 100

class ControlParams
{
public:
ControlParams();

public:
int waitTime;
double zJogRate;
bool useMm;
bool zRateLimit;
double zRateLimitAmount;
double xyRateAmount;
bool useAggressivePreload;
bool filterFileCommands;
bool reducePrecision;
int grblLineBufferLen;
};

#endif // CONTROLPARAMS_H
2 changes: 1 addition & 1 deletion coord3d.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "coord3d.h"

Coord3D::Coord3D()
: x(0.0), y(0.0), z(0.0)
: x(0.0), y(0.0), z(0.0), stoppedZ(true), sliderZIndex(0)
{
}

Expand Down
2 changes: 2 additions & 0 deletions coord3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class Coord3D
float x;
float y;
float z;
bool stoppedZ;
int sliderZIndex;
};

Q_DECLARE_METATYPE ( Coord3D )
Expand Down
4 changes: 3 additions & 1 deletion definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#define DEFAULT_Z_LIMIT_RATE 100.0
#define DEFAULT_XY_RATE 2000.0

#define DEFAULT_GRBL_LINE_BUFFER_LEN 50

#define MM_IN_AN_INCH 25.4
#define PRE_HOME_Z_ADJ_MM 5.0

Expand All @@ -35,7 +37,7 @@
#define OPEN_BUTTON_TEXT "Open"
#define CLOSE_BUTTON_TEXT "Close / Reset"

#define GRBL_CONTROLLER_NAME_AND_VERSION "Grbl Controller 3.3.9"
#define GRBL_CONTROLLER_NAME_AND_VERSION "Grbl Controller 3.4"

#define LOG_MSG_TYPE_DIAG "DIAG"
#define LOG_MSG_TYPE_STATUS "STATUS"
Expand Down
Loading

0 comments on commit 9a52bab

Please sign in to comment.