Browse files

gcode_process and pinio need to include config.h

Signed-off-by: Michael Moon <triffid.hunter@gmail.com>
  • Loading branch information...
1 parent 02e30dc commit aec41c59aaecb704a6b63e785ddc438d3d1ac493 Jacky2k committed with Feb 9, 2011
Showing with 15 additions and 12 deletions.
  1. +13 −12 gcode_process.c
  2. +2 −0 pinio.h
View
25 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
View
2 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

0 comments on commit aec41c5

Please sign in to comment.