From b50887d2792e3f4455e795993b40467820946da0 Mon Sep 17 00:00:00 2001 From: Connor Rigby Date: Wed, 18 Dec 2019 06:26:17 -0800 Subject: [PATCH] Fix compiler errors with platformio --- src/G28Handler.cpp | 2 +- src/Movement.cpp | 2 +- src/Movement.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/G28Handler.cpp b/src/G28Handler.cpp index 8b50906..9bc3086 100644 --- a/src/G28Handler.cpp +++ b/src/G28Handler.cpp @@ -31,7 +31,7 @@ int G28Handler::execute(Command *command) stepsPerMm[0] = ParameterList::getInstance()->getValue(MOVEMENT_STEP_PER_MM_X); stepsPerMm[1] = ParameterList::getInstance()->getValue(MOVEMENT_STEP_PER_MM_Y); - long sourcePoint[2] = {0.0, 0.0}; + double sourcePoint[2] = {0.0, 0.0}; sourcePoint[0] = CurrentState::getInstance()->getX(); sourcePoint[1] = CurrentState::getInstance()->getY(); diff --git a/src/Movement.cpp b/src/Movement.cpp index 691a45f..b71c96f 100644 --- a/src/Movement.cpp +++ b/src/Movement.cpp @@ -996,7 +996,7 @@ int Movement::calibrateAxis(int axis) float *encoderStepDecay; bool *encoderEnabled; int *axisStatus; - long *axisStepsPerMm; + double *axisStepsPerMm; // Prepare for movement diff --git a/src/Movement.h b/src/Movement.h index abcf608..6777e08 100644 --- a/src/Movement.h +++ b/src/Movement.h @@ -126,7 +126,7 @@ private: bool endStInv2[3] = { false, false, false }; bool endStEnbl[3] = { false, false, false }; long timeOut[3] = { 0, 0, 0 }; - long stepsPerMm[3] = { 1.0, 1.0, 1.0 }; + double stepsPerMm[3] = { 1.0, 1.0, 1.0 }; float motorConsMissedSteps[3] = { 0, 0, 0 }; int motorConsMissedStepsPrev[3] = { 0, 0, 0 };