Skip to content

Commit

Permalink
gcode_process and pinio need to include config.h
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Moon <triffid.hunter@gmail.com>
  • Loading branch information
Jacky2k authored and triffid committed Feb 8, 2011
1 parent 02e30dc commit aec41c5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
25 changes: 13 additions & 12 deletions gcode_process.c
Expand Up @@ -16,6 +16,7 @@
#include "pinio.h"
#include "debug.h"
#include "clock.h"
#include "config.h"

// the current tool
uint8_t tool;
Expand Down Expand Up @@ -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


Expand Down
2 changes: 2 additions & 0 deletions 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
Expand Down

0 comments on commit aec41c5

Please sign in to comment.