From 76730176da0ddee2f31aea3e28e2df54342629c9 Mon Sep 17 00:00:00 2001 From: Sonny Jeon Date: Wed, 4 Mar 2015 06:50:26 -0700 Subject: [PATCH] Arduino IDE compatibility and minor homing fixes - Added an include in the right spot, if a user tries to compile and upload Grbl through the Arduino IDE with the old way. - Fixed a minor bug with homing max travel calculations. It was causing simultaneous axes homing to move slow than it did before. --- README.md | 2 +- grbl/config.h | 1 + grbl/grbl.h | 2 +- grbl/limits.c | 25 +++++++++++++++---------- grbl/protocol.c | 4 ++++ 5 files changed, 22 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 962d932..afad1bb 100644 --- a/README.md +++ b/README.md @@ -82,5 +82,5 @@ List of Supported G-Codes in Grbl v0.9 ------------- Grbl is an open-source project and fueled by the free-time of our intrepid administrators and altruistic users. If you'd like to donate, all proceeds will be used to help fund supporting hardware and testing equipment. Thank you! -[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EBQWAWQAAT878) +[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CUGXJHXA36BYW) diff --git a/grbl/config.h b/grbl/config.h index cde5065..2d6cb7c 100644 --- a/grbl/config.h +++ b/grbl/config.h @@ -27,6 +27,7 @@ #ifndef config_h #define config_h +#include "grbl.h" // For Arduino IDE compatibility. // Default settings. Used when resetting EEPROM. Change to desired name in defaults.h diff --git a/grbl/grbl.h b/grbl/grbl.h index ff92269..2122a50 100644 --- a/grbl/grbl.h +++ b/grbl/grbl.h @@ -23,7 +23,7 @@ // Grbl versioning system #define GRBL_VERSION "0.9i" -#define GRBL_VERSION_BUILD "20150223" +#define GRBL_VERSION_BUILD "20150302" // Define standard libraries used by Grbl. #include diff --git a/grbl/limits.c b/grbl/limits.c index 75b9f82..155aba5 100644 --- a/grbl/limits.c +++ b/grbl/limits.c @@ -134,7 +134,8 @@ void limits_go_home(uint8_t cycle_mask) float target[N_AXIS]; uint8_t limit_pin[N_AXIS], step_pin[N_AXIS]; - float max_travel; + + float max_travel = 0.0; for (idx=0; idx