Move mm -> inch conversion macros from config.h(.dist) to gcode.c,
as this isn't meant to be user configurable.
This commit is contained in:
parent
da5194a54e
commit
e0ffa134bf
|
|
@ -180,12 +180,6 @@
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
// you shouldn't need to edit anything below this line
|
// you shouldn't need to edit anything below this line
|
||||||
|
|
||||||
// same as above with 25.4 scale factor
|
|
||||||
#define STEPS_PER_IN_X ((uint32_t) ((25.4 * STEPS_PER_MM_X) + 0.5))
|
|
||||||
#define STEPS_PER_IN_Y ((uint32_t) ((25.4 * STEPS_PER_MM_Y) + 0.5))
|
|
||||||
#define STEPS_PER_IN_Z ((uint32_t) ((25.4 * STEPS_PER_MM_Z) + 0.5))
|
|
||||||
#define STEPS_PER_IN_E ((uint32_t) ((25.4 * STEPS_PER_MM_E) + 0.5))
|
|
||||||
|
|
||||||
// inverse, used in distance calculation during DDA setup
|
// inverse, used in distance calculation during DDA setup
|
||||||
#define UM_PER_STEP_X ((uint32_t) ((1000.0 / STEPS_PER_MM_X) + 0.5))
|
#define UM_PER_STEP_X ((uint32_t) ((1000.0 / STEPS_PER_MM_X) + 0.5))
|
||||||
#define UM_PER_STEP_Y ((uint32_t) ((1000.0 / STEPS_PER_MM_Y) + 0.5))
|
#define UM_PER_STEP_Y ((uint32_t) ((1000.0 / STEPS_PER_MM_Y) + 0.5))
|
||||||
|
|
|
||||||
8
gcode.c
8
gcode.c
|
|
@ -15,6 +15,14 @@
|
||||||
#include "heater.h"
|
#include "heater.h"
|
||||||
#include "sersendf.h"
|
#include "sersendf.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
mm -> inch conversion
|
||||||
|
*/
|
||||||
|
#define STEPS_PER_IN_X ((uint32_t) ((25.4 * STEPS_PER_MM_X) + 0.5))
|
||||||
|
#define STEPS_PER_IN_Y ((uint32_t) ((25.4 * STEPS_PER_MM_Y) + 0.5))
|
||||||
|
#define STEPS_PER_IN_Z ((uint32_t) ((25.4 * STEPS_PER_MM_Z) + 0.5))
|
||||||
|
#define STEPS_PER_IN_E ((uint32_t) ((25.4 * STEPS_PER_MM_E) + 0.5))
|
||||||
|
|
||||||
uint8_t last_field = 0;
|
uint8_t last_field = 0;
|
||||||
|
|
||||||
#define crc(a, b) (a ^ b)
|
#define crc(a, b) (a ^ b)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue