From 1e96293957e3844ad043904b67dcc7a24fa30379 Mon Sep 17 00:00:00 2001 From: gabrielburnworth Date: Tue, 18 Feb 2020 14:23:20 -0800 Subject: [PATCH] specify axis in stall detection error --- src/CurrentState.h | 3 +++ src/Movement.cpp | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/CurrentState.h b/src/CurrentState.h index 89ecd26..7ee1123 100644 --- a/src/CurrentState.h +++ b/src/CurrentState.h @@ -21,6 +21,9 @@ enum ErrorListEnum ERR_INVALID_COMMAND = 14, ERR_PARAMS_NOT_OK = 15, + ERR_STALL_DETECTED_X = 31, + ERR_STALL_DETECTED_Y = 32, + ERR_STALL_DETECTED_Z = 33, }; class CurrentState diff --git a/src/Movement.cpp b/src/Movement.cpp index 71b9d89..f422138 100644 --- a/src/Movement.cpp +++ b/src/Movement.cpp @@ -587,7 +587,7 @@ int Movement::moveToCoords(double xDestScaled, double yDestScaled, double zDestS } else { - error = ERR_STALL_DETECTED; + error = ERR_STALL_DETECTED_X; } } @@ -605,7 +605,7 @@ int Movement::moveToCoords(double xDestScaled, double yDestScaled, double zDestS } else { - error = ERR_STALL_DETECTED; + error = ERR_STALL_DETECTED_Y; } } @@ -624,7 +624,7 @@ int Movement::moveToCoords(double xDestScaled, double yDestScaled, double zDestS } else { - error = ERR_STALL_DETECTED; + error = ERR_STALL_DETECTED_Z; } }