Prepends all HAL functions with HAL_ (#146)

This commit is contained in:
Thad House
2016-07-09 00:24:26 -07:00
committed by Peter Johnson
parent 5ad28d58ec
commit b637b9ee4c
162 changed files with 2855 additions and 2747 deletions

View File

@@ -20,8 +20,8 @@
*/
double ControllerPower::GetInputVoltage() {
int32_t status = 0;
double retVal = getVinVoltage(&status);
wpi_setGlobalErrorWithContext(status, getHALErrorMessage(status));
double retVal = HAL_GetVinVoltage(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
@@ -32,8 +32,8 @@ double ControllerPower::GetInputVoltage() {
*/
double ControllerPower::GetInputCurrent() {
int32_t status = 0;
double retVal = getVinCurrent(&status);
wpi_setGlobalErrorWithContext(status, getHALErrorMessage(status));
double retVal = HAL_GetVinCurrent(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
@@ -44,8 +44,8 @@ double ControllerPower::GetInputCurrent() {
*/
double ControllerPower::GetVoltage6V() {
int32_t status = 0;
double retVal = getUserVoltage6V(&status);
wpi_setGlobalErrorWithContext(status, getHALErrorMessage(status));
double retVal = HAL_GetUserVoltage6V(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
@@ -56,8 +56,8 @@ double ControllerPower::GetVoltage6V() {
*/
double ControllerPower::GetCurrent6V() {
int32_t status = 0;
double retVal = getUserCurrent6V(&status);
wpi_setGlobalErrorWithContext(status, getHALErrorMessage(status));
double retVal = HAL_GetUserCurrent6V(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
@@ -69,8 +69,8 @@ double ControllerPower::GetCurrent6V() {
*/
bool ControllerPower::GetEnabled6V() {
int32_t status = 0;
bool retVal = getUserActive6V(&status);
wpi_setGlobalErrorWithContext(status, getHALErrorMessage(status));
bool retVal = HAL_GetUserActive6V(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
@@ -82,8 +82,8 @@ bool ControllerPower::GetEnabled6V() {
*/
int ControllerPower::GetFaultCount6V() {
int32_t status = 0;
int retVal = getUserCurrentFaults6V(&status);
wpi_setGlobalErrorWithContext(status, getHALErrorMessage(status));
int retVal = HAL_GetUserCurrentFaults6V(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
@@ -94,8 +94,8 @@ int ControllerPower::GetFaultCount6V() {
*/
double ControllerPower::GetVoltage5V() {
int32_t status = 0;
double retVal = getUserVoltage5V(&status);
wpi_setGlobalErrorWithContext(status, getHALErrorMessage(status));
double retVal = HAL_GetUserVoltage5V(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
@@ -106,8 +106,8 @@ double ControllerPower::GetVoltage5V() {
*/
double ControllerPower::GetCurrent5V() {
int32_t status = 0;
double retVal = getUserCurrent5V(&status);
wpi_setGlobalErrorWithContext(status, getHALErrorMessage(status));
double retVal = HAL_GetUserCurrent5V(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
@@ -119,8 +119,8 @@ double ControllerPower::GetCurrent5V() {
*/
bool ControllerPower::GetEnabled5V() {
int32_t status = 0;
bool retVal = getUserActive5V(&status);
wpi_setGlobalErrorWithContext(status, getHALErrorMessage(status));
bool retVal = HAL_GetUserActive5V(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
@@ -132,8 +132,8 @@ bool ControllerPower::GetEnabled5V() {
*/
int ControllerPower::GetFaultCount5V() {
int32_t status = 0;
int retVal = getUserCurrentFaults5V(&status);
wpi_setGlobalErrorWithContext(status, getHALErrorMessage(status));
int retVal = HAL_GetUserCurrentFaults5V(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
@@ -144,8 +144,8 @@ int ControllerPower::GetFaultCount5V() {
*/
double ControllerPower::GetVoltage3V3() {
int32_t status = 0;
double retVal = getUserVoltage3V3(&status);
wpi_setGlobalErrorWithContext(status, getHALErrorMessage(status));
double retVal = HAL_GetUserVoltage3V3(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
@@ -156,8 +156,8 @@ double ControllerPower::GetVoltage3V3() {
*/
double ControllerPower::GetCurrent3V3() {
int32_t status = 0;
double retVal = getUserCurrent3V3(&status);
wpi_setGlobalErrorWithContext(status, getHALErrorMessage(status));
double retVal = HAL_GetUserCurrent3V3(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
@@ -169,8 +169,8 @@ double ControllerPower::GetCurrent3V3() {
*/
bool ControllerPower::GetEnabled3V3() {
int32_t status = 0;
bool retVal = getUserActive3V3(&status);
wpi_setGlobalErrorWithContext(status, getHALErrorMessage(status));
bool retVal = HAL_GetUserActive3V3(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
@@ -182,7 +182,7 @@ bool ControllerPower::GetEnabled3V3() {
*/
int ControllerPower::GetFaultCount3V3() {
int32_t status = 0;
int retVal = getUserCurrentFaults3V3(&status);
wpi_setGlobalErrorWithContext(status, getHALErrorMessage(status));
int retVal = HAL_GetUserCurrentFaults3V3(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}