diff --git a/nuts_bolts.h b/nuts_bolts.h index b93ffcc..ca4ecf5 100644 --- a/nuts_bolts.h +++ b/nuts_bolts.h @@ -22,22 +22,14 @@ #define nuts_bolts_h #include -#define ONE_MINUTE_OF_MICROSECONDS 60000000.0 -#define TICKS_PER_MICROSECOND (F_CPU/1000000) - -#define max(a,b) (((a) > (b)) ? (a) : (b)) -#define min(a,b) (((a) < (b)) ? (a) : (b)) - #define FALSE 0 #define TRUE 1 -// Decide the sign of a value -#define signof(a) (((a)>0) ? 1 : (((a)<0) ? -1 : 0)) - -#define clear_vector(a) memset(a, 0, sizeof(a)) - #define X_AXIS 0 #define Y_AXIS 1 #define Z_AXIS 2 +#define clear_vector(a) memset(a, 0, sizeof(a)) +#define max(a,b) (((a) > (b)) ? (a) : (b)) + #endif diff --git a/planner.c b/planner.c index 4a2011c..8102eec 100644 --- a/planner.c +++ b/planner.c @@ -75,6 +75,8 @@ int32_t position[3]; static uint8_t acceleration_manager_enabled; // Acceleration management active? +#define ONE_MINUTE_OF_MICROSECONDS 60000000.0 + // Calculates the distance (not time) it takes to accelerate from initial_rate to target_rate using the // given acceleration: inline double estimate_acceleration_distance(double initial_rate, double target_rate, double acceleration) { diff --git a/stepper.c b/stepper.c index 92091a5..d0828eb 100644 --- a/stepper.c +++ b/stepper.c @@ -39,6 +39,7 @@ #define STEPPING_MASK (STEP_MASK | DIRECTION_MASK) // All stepping-related bits (step/direction) #define LIMIT_MASK ((1<