Skip to content

Commit

Permalink
Hot fix for rare lowering feed override bug.
Browse files Browse the repository at this point in the history
[fix] Squashed a very rare bug when lowering the feedrate (or rapid) override. When in the very strict set of circumstances with acceleration settings, override step size, and current speed, an internal calculation would cause Grbl to crash. The fix was an overlooked equality statement that should have been a less than or equal, not a less than.
  • Loading branch information
chamnit committed Jul 31, 2017
1 parent 921e5a9 commit 477a94c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions doc/log/commit_log_v1.1.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
----------------
Date: 2017-07-17
Author: Sonny Jeon
Subject: Clean up and new streaming script check-mode feature.

[new] The stream.py streaming script now has a check-mode option, where it will place Grbl in $C check mode automatically and then stream the g-code program. It's a very fast way to check if the g-code program has any errors.

[fix] The debug variable was not initialized if the debug option was enabled in config.h

[fix] Updated error_codes CSV file to the same format as the others.


----------------
Date: 2017-05-31
Author: chamnit
Expand Down
2 changes: 1 addition & 1 deletion grbl/grbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

// Grbl versioning system
#define GRBL_VERSION "1.1f"
#define GRBL_VERSION_BUILD "20170717"
#define GRBL_VERSION_BUILD "20170731"

// Define standard libraries used by Grbl.
#include <avr/io.h>
Expand Down
2 changes: 1 addition & 1 deletion grbl/stepper.c
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ void st_prep_buffer()
speed_var = pl_block->acceleration*time_var;
mm_var = time_var*(prep.current_speed - 0.5*speed_var);
mm_remaining -= mm_var;
if ((mm_remaining < prep.accelerate_until) || (mm_var <= 0)) {
if ((mm_remaining <= prep.accelerate_until) || (mm_var <= 0.0)) {
// Cruise or cruise-deceleration types only for deceleration override.
mm_remaining = prep.accelerate_until; // NOTE: 0.0 at EOB
time_var = 2.0*(pl_block->millimeters-mm_remaining)/(prep.current_speed+prep.maximum_speed);
Expand Down

0 comments on commit 477a94c

Please sign in to comment.