Tweaked dry run and check g-code switches. Now resets when toggled off.

- To make managing the code easier and to help ensure a user starts
with a fresh reset, the functionality of check g-code and dry run has
been changed to automatically perform a soft reset when toggled off.
Position will not be lost, unless there is a cycle active. Feed hold
before toggling off it needed.

This is mainly a safety issue. If a user dry runs a program and kills
it mid-program, and then restarts it thinking to run it as normal, the
g-code modes that we're set may not be what they expect, and very bad
things can happen.

- NOTE: Grbl is at 83.5% of flash capacity. Not a lot of room left, but
I think we can squeeze in some more!
This commit is contained in:
Sonny Jeon
2012-11-05 13:32:29 -07:00
parent 9cabc915ef
commit c2b31a06ff
3 changed files with 35 additions and 16 deletions

View File

@ -83,6 +83,7 @@ typedef struct {
int8_t spindle_direction; // 1 = CW, -1 = CCW, 0 = Stop {M3, M4, M5}
uint8_t coolant_mode; // 0 = Disable, 1 = Flood Enable {M8, M9}
float feed_rate; // Millimeters/min
float seek_rate; // Millimeters/min - Can change depending on switches and such.
float position[3]; // Where the interpreter considers the tool to be at this point in the code
uint8_t tool;
// uint16_t spindle_speed; // RPM/100