Apply int32_t to stepper

This commit is contained in:
Scott Lahteine
2018-05-03 20:30:13 -05:00
parent 42180e25a3
commit 1682036533
2 changed files with 26 additions and 26 deletions

View File

@@ -119,7 +119,7 @@ class Stepper {
#endif
// Counter variables for the Bresenham line tracer
static long counter_X, counter_Y, counter_Z, counter_E;
static int32_t counter_X, counter_Y, counter_Z, counter_E;
static volatile uint32_t step_events_completed; // The number of step events executed in the current block
#if ENABLED(LIN_ADVANCE)
@@ -142,19 +142,19 @@ class Stepper {
#endif // !LIN_ADVANCE
static long acceleration_time, deceleration_time;
static int32_t acceleration_time, deceleration_time;
static uint8_t step_loops, step_loops_nominal;
static uint16_t OCR1A_nominal,
acc_step_rate; // needed for deceleration start point
static volatile long endstops_trigsteps[XYZ];
static volatile long endstops_stepsTotal, endstops_stepsDone;
static volatile int32_t endstops_trigsteps[XYZ];
static volatile int32_t endstops_stepsTotal, endstops_stepsDone;
//
// Positions of stepper motors, in step units
//
static volatile long count_position[NUM_AXIS];
static volatile int32_t count_position[NUM_AXIS];
//
// Current direction of stepper motors (+1 or -1)
@@ -165,7 +165,7 @@ class Stepper {
// Mixing extruder mix counters
//
#if ENABLED(MIXING_EXTRUDER)
static long counter_m[MIXING_STEPPERS];
static int32_t counter_m[MIXING_STEPPERS];
#define MIXING_STEPPERS_LOOP(VAR) \
for (uint8_t VAR = 0; VAR < MIXING_STEPPERS; VAR++) \
if (current_block->mix_event_count[VAR])
@@ -202,9 +202,9 @@ class Stepper {
//
// Set the current position in steps
//
static void set_position(const long &a, const long &b, const long &c, const long &e);
static void set_position(const AxisEnum &a, const long &v);
static void set_e_position(const long &e);
static void set_position(const int32_t &a, const int32_t &b, const int32_t &c, const int32_t &e);
static void set_position(const AxisEnum &a, const int32_t &v);
static void set_e_position(const int32_t &e);
//
// Set direction bits for all steppers
@@ -214,7 +214,7 @@ class Stepper {
//
// Get the position of a stepper, in steps
//
static long position(const AxisEnum axis);
static int32_t position(const AxisEnum axis);
//
// Report the positions of the steppers, in steps