From 0140d66d41c041bdfb77d1542af37cdfe9f37b3a Mon Sep 17 00:00:00 2001 From: Sonny Jeon Date: Fri, 18 Dec 2015 14:09:03 -0700 Subject: [PATCH] Minor bug fixes. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Planner was under-estimating maximum speeds through straight junctions in certain cases. The calculations have been updated to be more accurate. - Type declaration fix in probe.c. - Commit log for v0.9j generated separately from v0.9i’s. - Incremented version and updated pre-built firmware link. --- README.md | 5 +---- doc/log/commit_log_v0.9i.txt | 24 ----------------------- doc/log/commit_log_v0.9j.txt | 38 ++++++++++++++++++++++++++++++++++++ grbl/grbl.h | 2 +- grbl/planner.c | 4 ++-- grbl/probe.c | 2 +- 6 files changed, 43 insertions(+), 32 deletions(-) create mode 100644 doc/log/commit_log_v0.9j.txt diff --git a/README.md b/README.md index 7facb9a..3b8c5bb 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,7 @@ Grbl includes full acceleration management with look ahead. That means the contr *** _**Master Branch:**_ -* [Grbl v0.9j Atmega328p 16mhz 115200baud with generic defaults](http://bit.ly/1I8Ey4S) _(2015-09-30)_ -* [Grbl v0.9j Atmega328p 16mhz 115200baud with ShapeOko2 defaults](http://bit.ly/1OjUSia) _(2015-09-30)_ +* [Grbl v0.9j Atmega328p 16mhz 115200baud with generic defaults](http://bit.ly/1I8Ey4S) _(2015-12-18)_ - **IMPORTANT INFO WHEN UPGRADING TO GRBL v0.9 :** - Baudrate is now **115200** (Up from 9600). - Homing cycle updated. Located based on switch trigger, rather than release point. @@ -36,9 +35,7 @@ _**Master Branch:**_ _**Archives:**_ * [Grbl v0.9i Atmega328p 16mhz 115200baud with generic defaults](http://bit.ly/1EiviDk) -* [Grbl v0.9i Atmega328p 16mhz 115200baud with ShapeOko2 defaults](http://bit.ly/1NYIfKl) * [Grbl v0.9g Atmega328p 16mhz 115200baud with generic defaults](http://bit.ly/1m8E1Qa) -* [Grbl v0.9g Atmega328p 16mhz 115200baud with ShapeOko2 defaults](http://bit.ly/1kOAzig) * [Grbl v0.8c Atmega328p 16mhz 9600baud](http://bit.ly/SSdCJE) * [Grbl v0.7d Atmega328p 16mhz 9600baud](http://bit.ly/ZhL15G) * [Grbl v0.6b Atmega328p 16mhz 9600baud](http://bit.ly/VD04A5) diff --git a/doc/log/commit_log_v0.9i.txt b/doc/log/commit_log_v0.9i.txt index a3401c2..49d67a7 100644 --- a/doc/log/commit_log_v0.9i.txt +++ b/doc/log/commit_log_v0.9i.txt @@ -1,27 +1,3 @@ ----------------- -Date: 2015-08-16 -Author: Sonny Jeon -Subject: Update README.md - ----------------- -Date: 2015-08-14 -Author: Sonny Jeon -Subject: Individual control pin invert compile-option. - -- Control pins may be individually inverted through a -CONTROL_INVERT_MASK macro. This mask is define in the cpu_map.h file. - - ----------------- -Date: 2015-07-17 -Author: Sonny Jeon -Subject: Version bump to v0.9j - -- Version bump requested by OEMs to easily determine whether the -firmware supports the new EEPROM reset feature. Other than that, no -significant changes. - - ---------------- Date: 2015-06-25 Author: Sonny Jeon diff --git a/doc/log/commit_log_v0.9j.txt b/doc/log/commit_log_v0.9j.txt new file mode 100644 index 0000000..3bf71bb --- /dev/null +++ b/doc/log/commit_log_v0.9j.txt @@ -0,0 +1,38 @@ +---------------- +Date: 2015-09-30 +Author: Sonny Jeon +Subject: Minor bug fixes. + +- G38.x was not printing correctly in the $G g-code state reports. Now +fixed. + +- Potential bug regarding volatile variables inside a struct. It has +never been a problem in v0.9, but ran into this during v1.0 +development. Just to be safe, the fixes are applied here. + +- Updated pre-built firmwares with these two bug fixes. + + +---------------- +Date: 2015-08-16 +Author: Sonny Jeon +Subject: Update README.md + +---------------- +Date: 2015-08-14 +Author: Sonny Jeon +Subject: Individual control pin invert compile-option. + +- Control pins may be individually inverted through a +CONTROL_INVERT_MASK macro. This mask is define in the cpu_map.h file. + + +---------------- +Date: 2015-07-17 +Author: Sonny Jeon +Subject: Version bump to v0.9j + +- Version bump requested by OEMs to easily determine whether the +firmware supports the new EEPROM reset feature. Other than that, no +significant changes. + diff --git a/grbl/grbl.h b/grbl/grbl.h index 85e94e5..52f2525 100644 --- a/grbl/grbl.h +++ b/grbl/grbl.h @@ -23,7 +23,7 @@ // Grbl versioning system #define GRBL_VERSION "0.9j" -#define GRBL_VERSION_BUILD "20150930" +#define GRBL_VERSION_BUILD "20151218" // Define standard libraries used by Grbl. #include diff --git a/grbl/planner.c b/grbl/planner.c index 1e0bd35..271fcf4 100644 --- a/grbl/planner.c +++ b/grbl/planner.c @@ -378,11 +378,11 @@ uint8_t plan_check_full_buffer() change the overall maximum entry speed conditions of all blocks. */ // NOTE: Computed without any expensive trig, sin() or acos(), by trig half angle identity of cos(theta). - if (junction_cos_theta > 0.99) { + if (junction_cos_theta > 0.999999) { // For a 0 degree acute junction, just set minimum junction speed. block->max_junction_speed_sqr = MINIMUM_JUNCTION_SPEED*MINIMUM_JUNCTION_SPEED; } else { - junction_cos_theta = max(junction_cos_theta,-0.99); // Check for numerical round-off to avoid divide by zero. + junction_cos_theta = max(junction_cos_theta,-0.999999); // Check for numerical round-off to avoid divide by zero. float sin_theta_d2 = sqrt(0.5*(1.0-junction_cos_theta)); // Trig half angle identity. Always positive. // TODO: Technically, the acceleration used in calculation needs to be limited by the minimum of the diff --git a/grbl/probe.c b/grbl/probe.c index fc95756..37816bf 100644 --- a/grbl/probe.c +++ b/grbl/probe.c @@ -61,7 +61,7 @@ void probe_state_monitor() if (sys_probe_state == PROBE_ACTIVE) { if (probe_get_state()) { sys_probe_state = PROBE_OFF; - memcpy(sys.probe_position, sys.position, sizeof(float)*N_AXIS); + memcpy(sys.probe_position, sys.position, sizeof(sys.position)); bit_true(sys_rt_exec_state, EXEC_MOTION_CANCEL); } }