diff --git a/Grbl_Esp32/grbl.h b/Grbl_Esp32/grbl.h index 5fd7ed4a..6a694fdf 100644 --- a/Grbl_Esp32/grbl.h +++ b/Grbl_Esp32/grbl.h @@ -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 0bdd8be1..a431ca3e 100644 --- a/Grbl_Esp32/grbl_trinamic.cpp +++ b/Grbl_Esp32/grbl_trinamic.cpp @@ -19,17 +19,13 @@ You should have received a copy of the GNU General Public License along with Grbl. If not, see . */ +#include "grbl.h" #ifdef USE_TRINAMIC -#include "grbl.h" - - // 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); - - #ifdef X_TRINAMIC #ifdef X_DRIVER_TMC2130 TMC2130Stepper TRINAMIC_X = TMC2130Stepper(X_CS_PIN, X_RSENSE); 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