From 477a94cd4965a3442e88cd0b69d95ced7452d2c8 Mon Sep 17 00:00:00 2001 From: Sonny Jeon Date: Mon, 31 Jul 2017 17:48:07 -0600 Subject: [PATCH] Hot fix for rare lowering feed override bug. [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. --- doc/log/commit_log_v1.1.txt | 12 ++++++++++++ grbl/grbl.h | 2 +- grbl/stepper.c | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/doc/log/commit_log_v1.1.txt b/doc/log/commit_log_v1.1.txt index ebd0197..b4d13b4 100644 --- a/doc/log/commit_log_v1.1.txt +++ b/doc/log/commit_log_v1.1.txt @@ -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 diff --git a/grbl/grbl.h b/grbl/grbl.h index 15b529e..f4eb0dd 100644 --- a/grbl/grbl.h +++ b/grbl/grbl.h @@ -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 diff --git a/grbl/stepper.c b/grbl/stepper.c index 09e83fd..2f6b18b 100644 --- a/grbl/stepper.c +++ b/grbl/stepper.c @@ -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);