diff --git a/Grbl_Esp32/grbl.h b/Grbl_Esp32/grbl.h index 5dc3e42a..6a694fdf 100644 --- a/Grbl_Esp32/grbl.h +++ b/Grbl_Esp32/grbl.h @@ -20,7 +20,7 @@ // Grbl versioning system #define GRBL_VERSION "1.1f" -#define GRBL_VERSION_BUILD "20190928" +#define GRBL_VERSION_BUILD "20191001" //#include #include @@ -86,7 +86,6 @@ #endif #ifdef USE_TRINAMIC - #include "grbl_trinamic.h" - //#include "TMCStepper.h" // https://github.com/teemuatlut/TMCStepper + #include "grbl_trinamic.h" #endif diff --git a/Grbl_Esp32/grbl_trinamic.cpp b/Grbl_Esp32/grbl_trinamic.cpp index 9f820ad6..a431ca3e 100644 --- a/Grbl_Esp32/grbl_trinamic.cpp +++ b/Grbl_Esp32/grbl_trinamic.cpp @@ -19,9 +19,9 @@ You should have received a copy of the GNU General Public License along with Grbl. If not, see . */ - #include "grbl.h" +#ifdef USE_TRINAMIC // TODO try to use the #define ## method to clean this up //#define DRIVER(driver, axis) driver##Stepper = TRINAMIC_axis## = driver##Stepper(axis##_CS_PIN, axis##_RSENSE); @@ -102,7 +102,7 @@ void Trinamic_Init() { - grbl_send(CLIENT_SERIAL, "[MSG:Using TMCStepper Library]\r\n"); + grbl_sendf(CLIENT_SERIAL, "[MSG:Using TMCStepper Library Ver 0x%06x]\r\n", TMCSTEPPER_VERSION); SPI.begin(); @@ -169,4 +169,6 @@ void Trinamic_Init() #endif // TODO ABC Axes -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/Grbl_Esp32/grbl_trinamic.h b/Grbl_Esp32/grbl_trinamic.h index d5360704..92239f49 100644 --- a/Grbl_Esp32/grbl_trinamic.h +++ b/Grbl_Esp32/grbl_trinamic.h @@ -22,9 +22,9 @@ #define GRBL_TRINAMIC_h #include "grbl.h" -#include // https://github.com/teemuatlut/TMCStepper #ifdef USE_TRINAMIC + #include // https://github.com/teemuatlut/TMCStepper void Trinamic_Init(); #endif diff --git a/Grbl_Esp32/stepper.h b/Grbl_Esp32/stepper.h index aeeb1beb..b1625acf 100644 --- a/Grbl_Esp32/stepper.h +++ b/Grbl_Esp32/stepper.h @@ -82,8 +82,10 @@ extern uint8_t ganged_mode; void IRAM_ATTR onSteppertimer(); void IRAM_ATTR onStepperOffTimer(); +#ifdef USE_RMT_STEPS void initRMT(); inline IRAM_ATTR static void stepperRMT_Outputs(); +#endif void stepper_init();