From f81441cff32f22db5fb384a85c63abf0ba77fadd Mon Sep 17 00:00:00 2001 From: gavanderhoorn Date: Thu, 3 Aug 2023 11:49:02 +0200 Subject: [PATCH] No need for a new function ErrNo_ToString(..) implements the same functionality. --- src/ErrorHandling.c | 35 ----------------------------------- src/ErrorHandling.h | 1 - 2 files changed, 36 deletions(-) diff --git a/src/ErrorHandling.c b/src/ErrorHandling.c index 94bc7409..ec96da78 100644 --- a/src/ErrorHandling.c +++ b/src/ErrorHandling.c @@ -32,41 +32,6 @@ const char* const Ros_ErrorHandling_ErrNo_ToString(int errNo) } } -const char* const Ros_ErrorHandling_Only_ErrNo_ToString(int errNo) -{ - switch (errNo) - { - case 0x2010: - return "Robot is in operation"; - case 0x2030: - return "In HOLD status (PP)"; - case 0x2040: - return "In HOLD status (External)"; - case 0x2050: - return "In HOLD status (Command)"; - case 0x2060: - return "In ERROR/ALARM status"; - case 0x2070: - return "In SERVO OFF status"; - case 0x2080: - return "Wrong operation mode"; - case 0x3040: - return "The home position is not registered"; - case 0x3050: - return "Out of range (ABSO data)"; - case 0x3400: - return "Cannot operate MASTER JOB"; - case 0x3410: - return "The JOB name is already registered in another task"; - case 0x4040: - return "Specified JOB not found"; - case 0x5200: - return "Over data range"; - default: - return "Unspecified reason"; - } -} - const char* const Ros_ErrorHandling_MotionNotReadyCode_ToString(MotionNotReadyCode code) { //messages defined in motoros2_interfaces/msg/MotionReadyEnum.msg diff --git a/src/ErrorHandling.h b/src/ErrorHandling.h index e2892ffc..364738a7 100644 --- a/src/ErrorHandling.h +++ b/src/ErrorHandling.h @@ -206,7 +206,6 @@ extern void motoRosAssert(BOOL mustBeTrue, ASSERTION_SUBCODE subCodeIfFalse); extern void motoRosAssert_withMsg(BOOL mustBeTrue, ASSERTION_SUBCODE subCodeIfFalse, char* msgFmtIfFalse, ...); extern const char* const Ros_ErrorHandling_ErrNo_ToString(int errNo); -extern const char* const Ros_ErrorHandling_Only_ErrNo_ToString(int errNo); extern const char* const Ros_ErrorHandling_MotionNotReadyCode_ToString(MotionNotReadyCode code); #endif // MOTOROS2_ERROR_HANDLING_H