Use some int types in Planner
This commit is contained in:
parent
ab43113f73
commit
d3f8111fe7
@ -133,7 +133,7 @@ float Planner::min_feedrate_mm_s,
|
|||||||
|
|
||||||
// private:
|
// private:
|
||||||
|
|
||||||
long Planner::position[NUM_AXIS] = { 0 };
|
int32_t Planner::position[NUM_AXIS] = { 0 };
|
||||||
|
|
||||||
uint32_t Planner::cutoff_long;
|
uint32_t Planner::cutoff_long;
|
||||||
|
|
||||||
@ -675,7 +675,7 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const long da = target[X_AXIS] - position[X_AXIS],
|
const int32_t da = target[X_AXIS] - position[X_AXIS],
|
||||||
db = target[Y_AXIS] - position[Y_AXIS],
|
db = target[Y_AXIS] - position[Y_AXIS],
|
||||||
dc = target[Z_AXIS] - position[Z_AXIS];
|
dc = target[Z_AXIS] - position[Z_AXIS];
|
||||||
|
|
||||||
@ -706,7 +706,7 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
|
|||||||
if (DEBUGGING(DRYRUN))
|
if (DEBUGGING(DRYRUN))
|
||||||
position[E_AXIS] = target[E_AXIS];
|
position[E_AXIS] = target[E_AXIS];
|
||||||
|
|
||||||
long de = target[E_AXIS] - position[E_AXIS];
|
int32_t de = target[E_AXIS] - position[E_AXIS];
|
||||||
|
|
||||||
#if ENABLED(PREVENT_COLD_EXTRUSION) || ENABLED(PREVENT_LENGTHY_EXTRUDE)
|
#if ENABLED(PREVENT_COLD_EXTRUSION) || ENABLED(PREVENT_LENGTHY_EXTRUDE)
|
||||||
if (de) {
|
if (de) {
|
||||||
@ -1386,7 +1386,7 @@ void Planner::_set_position_mm(const float &a, const float &b, const float &c, c
|
|||||||
#else
|
#else
|
||||||
#define _EINDEX E_AXIS
|
#define _EINDEX E_AXIS
|
||||||
#endif
|
#endif
|
||||||
const long na = position[X_AXIS] = LROUND(a * axis_steps_per_mm[X_AXIS]),
|
const int32_t na = position[X_AXIS] = LROUND(a * axis_steps_per_mm[X_AXIS]),
|
||||||
nb = position[Y_AXIS] = LROUND(b * axis_steps_per_mm[Y_AXIS]),
|
nb = position[Y_AXIS] = LROUND(b * axis_steps_per_mm[Y_AXIS]),
|
||||||
nc = position[Z_AXIS] = LROUND(c * axis_steps_per_mm[Z_AXIS]),
|
nc = position[Z_AXIS] = LROUND(c * axis_steps_per_mm[Z_AXIS]),
|
||||||
ne = position[E_AXIS] = LROUND(e * axis_steps_per_mm[_EINDEX]);
|
ne = position[E_AXIS] = LROUND(e * axis_steps_per_mm[_EINDEX]);
|
||||||
|
@ -182,7 +182,7 @@ class Planner {
|
|||||||
* The current position of the tool in absolute steps
|
* The current position of the tool in absolute steps
|
||||||
* Recalculated if any axis_steps_per_mm are changed by gcode
|
* Recalculated if any axis_steps_per_mm are changed by gcode
|
||||||
*/
|
*/
|
||||||
static long position[NUM_AXIS];
|
static int32_t position[NUM_AXIS];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Speed of previous path line segment
|
* Speed of previous path line segment
|
||||||
|
Loading…
Reference in New Issue
Block a user