From 0d0492bfccdc9ed74bcf102ef1b99784e68c4a3b Mon Sep 17 00:00:00 2001 From: Dustin Spicuzza Date: Sat, 1 Dec 2018 03:06:30 -0500 Subject: [PATCH] HAL: Add additional error messages to HAL_GetErrorMessage (#965) --- hal/src/main/native/athena/HAL.cpp | 4 ++++ hal/src/main/native/include/hal/Errors.h | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/hal/src/main/native/athena/HAL.cpp b/hal/src/main/native/athena/HAL.cpp index adb22963fe..9e8c11bab1 100644 --- a/hal/src/main/native/athena/HAL.cpp +++ b/hal/src/main/native/athena/HAL.cpp @@ -207,6 +207,10 @@ const char* HAL_GetErrorMessage(int32_t code) { return HAL_SERIAL_PORT_ERROR_MESSAGE; case HAL_CAN_TIMEOUT: return HAL_CAN_TIMEOUT_MESSAGE; + case ERR_FRCSystem_NetCommNotResponding: + return ERR_FRCSystem_NetCommNotResponding_MESSAGE; + case ERR_FRCSystem_NoDSConnection: + return ERR_FRCSystem_NoDSConnection_MESSAGE; default: return "Unknown error status"; } diff --git a/hal/src/main/native/include/hal/Errors.h b/hal/src/main/native/include/hal/Errors.h index 6a40a54fc4..4476ab0318 100644 --- a/hal/src/main/native/include/hal/Errors.h +++ b/hal/src/main/native/include/hal/Errors.h @@ -39,6 +39,11 @@ #define ERR_CANSessionMux_NotAllowed_MESSAGE "CAN: Not allowed" #define ERR_CANSessionMux_NotInitialized_MESSAGE "CAN: Not initialized" +#define ERR_FRCSystem_NetCommNotResponding_MESSAGE \ + "FRCSystem: NetComm not responding" +#define ERR_FRCSystem_NoDSConnection_MESSAGE \ + "FRCSystem: No driver station connected" + #define SAMPLE_RATE_TOO_HIGH 1001 #define SAMPLE_RATE_TOO_HIGH_MESSAGE \ "HAL: Analog module sample rate is too high"