mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Prepends all HAL functions with HAL_ (#146)
This commit is contained in:
committed by
Peter Johnson
parent
5ad28d58ec
commit
b637b9ee4c
@@ -45,7 +45,7 @@ bool wpi_assert_impl(bool conditionValue, const char* conditionText,
|
||||
std::string error = errorStream.str();
|
||||
|
||||
// Print the error and send it to the DriverStation
|
||||
HALSendError(1, 1, 0, error.c_str(), location.c_str(), stack.c_str(), 1);
|
||||
HAL_SendError(1, 1, 0, error.c_str(), location.c_str(), stack.c_str(), 1);
|
||||
}
|
||||
|
||||
return conditionValue;
|
||||
@@ -80,7 +80,7 @@ void wpi_assertEqual_common_impl(const char* valueA, const char* valueB,
|
||||
std::string error = errorStream.str();
|
||||
|
||||
// Print the error and send it to the DriverStation
|
||||
HALSendError(1, 1, 0, error.c_str(), location.c_str(), trace.c_str(), 1);
|
||||
HAL_SendError(1, 1, 0, error.c_str(), location.c_str(), trace.c_str(), 1);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -127,8 +127,8 @@ bool wpi_assertNotEqual_impl(int valueA, int valueB, const char* valueAString,
|
||||
*/
|
||||
uint16_t GetFPGAVersion() {
|
||||
int32_t status = 0;
|
||||
uint16_t version = getFPGAVersion(&status);
|
||||
wpi_setGlobalErrorWithContext(status, getHALErrorMessage(status));
|
||||
uint16_t version = HAL_GetFPGAVersion(&status);
|
||||
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
|
||||
return version;
|
||||
}
|
||||
|
||||
@@ -142,8 +142,8 @@ uint16_t GetFPGAVersion() {
|
||||
*/
|
||||
uint32_t GetFPGARevision() {
|
||||
int32_t status = 0;
|
||||
uint32_t revision = getFPGARevision(&status);
|
||||
wpi_setGlobalErrorWithContext(status, getHALErrorMessage(status));
|
||||
uint32_t revision = HAL_GetFPGARevision(&status);
|
||||
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
|
||||
return revision;
|
||||
}
|
||||
|
||||
@@ -155,8 +155,8 @@ uint32_t GetFPGARevision() {
|
||||
*/
|
||||
uint64_t GetFPGATime() {
|
||||
int32_t status = 0;
|
||||
uint64_t time = getFPGATime(&status);
|
||||
wpi_setGlobalErrorWithContext(status, getHALErrorMessage(status));
|
||||
uint64_t time = HAL_GetFPGATime(&status);
|
||||
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
|
||||
return time;
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ uint64_t GetFPGATime() {
|
||||
bool GetUserButton() {
|
||||
int32_t status = 0;
|
||||
|
||||
bool value = getFPGAButton(&status);
|
||||
bool value = HAL_GetFPGAButton(&status);
|
||||
wpi_setGlobalError(status);
|
||||
|
||||
return value;
|
||||
|
||||
Reference in New Issue
Block a user