mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
HAL: Add additional error messages to HAL_GetErrorMessage (#965)
This commit is contained in:
committed by
Peter Johnson
parent
3b33abfc7b
commit
0d0492bfcc
@@ -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";
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user