From aec41c59aaecb704a6b63e785ddc438d3d1ac493 Mon Sep 17 00:00:00 2001 From: Jacky2k Date: Wed, 9 Feb 2011 07:45:06 +1100 Subject: [PATCH] gcode_process and pinio need to include config.h Signed-off-by: Michael Moon --- gcode_process.c | 25 +++++++++++++------------ pinio.h | 2 ++ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/gcode_process.c b/gcode_process.c index cb61c12..e8258f8 100644 --- a/gcode_process.c +++ b/gcode_process.c @@ -16,6 +16,7 @@ #include "pinio.h" #include "debug.h" #include "clock.h" +#include "config.h" // the current tool uint8_t tool; @@ -84,28 +85,28 @@ void process_gcode_command() { // implement axis limits #ifdef X_MIN - if (next_target.X < (X_MIN * STEPS_PER_MM_X)) - next_target.X = X_MIN; + if (next_target.target.X < (X_MIN * STEPS_PER_MM_X)) + next_target.target.X = X_MIN; #endif #ifdef X_MAX - if (next_target.X > (X_MAX * STEPS_PER_MM_X)) - next_target.X = X_MAX; + if (next_target.target.X > (X_MAX * STEPS_PER_MM_X)) + next_target.target.X = X_MAX; #endif #ifdef Y_MIN - if (next_target.Y < (Y_MIN * STEPS_PER_MM_Y)) - next_target.Y = Y_MIN; + if (next_target.target.Y < (Y_MIN * STEPS_PER_MM_Y)) + next_target.target.Y = Y_MIN; #endif #ifdef Y_MAY - if (next_target.Y > (Y_MAX * STEPS_PER_MM_Y)) - next_target.Y = Y_MAX; + if (next_target.target.Y > (Y_MAX * STEPS_PER_MM_Y)) + next_target.target.Y = Y_MAX; #endif #ifdef Z_MIN - if (next_target.Z < (Z_MIN * STEPS_PER_MM_Z)) - next_target.Z = Z_MIN; + if (next_target.target.Z < (Z_MIN * STEPS_PER_MM_Z)) + next_target.target.Z = Z_MIN; #endif #ifdef Z_MAX - if (next_target.Z > (Z_MAX * STEPS_PER_MM_Z)) - next_target.Z = Z_MAX; + if (next_target.target.Z > (Z_MAX * STEPS_PER_MM_Z)) + next_target.target.Z = Z_MAX; #endif diff --git a/pinio.h b/pinio.h index 60afe1c..6eb0ca0 100644 --- a/pinio.h +++ b/pinio.h @@ -1,6 +1,8 @@ #ifndef _PINIO_H #define _PINIO_H +#include "config.h" + #ifndef X_INVERT_DIR #define X_INVERT_DIR 0 #endif