mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
Prepends all HAL functions with HAL_ (#146)
This commit is contained in:
committed by
Peter Johnson
parent
5ad28d58ec
commit
b637b9ee4c
@@ -22,7 +22,7 @@ extern "C" {
|
||||
/**
|
||||
* Get the roboRIO input voltage
|
||||
*/
|
||||
float getVinVoltage(int32_t* status) {
|
||||
float HAL_GetVinVoltage(int32_t* status) {
|
||||
initializePower(status);
|
||||
return power->readVinVoltage(status) / 4.096f * 0.025733f - 0.029f;
|
||||
}
|
||||
@@ -30,7 +30,7 @@ float getVinVoltage(int32_t* status) {
|
||||
/**
|
||||
* Get the roboRIO input current
|
||||
*/
|
||||
float getVinCurrent(int32_t* status) {
|
||||
float HAL_GetVinCurrent(int32_t* status) {
|
||||
initializePower(status);
|
||||
return power->readVinCurrent(status) / 4.096f * 0.017042 - 0.071f;
|
||||
}
|
||||
@@ -38,7 +38,7 @@ float getVinCurrent(int32_t* status) {
|
||||
/**
|
||||
* Get the 6V rail voltage
|
||||
*/
|
||||
float getUserVoltage6V(int32_t* status) {
|
||||
float HAL_GetUserVoltage6V(int32_t* status) {
|
||||
initializePower(status);
|
||||
return power->readUserVoltage6V(status) / 4.096f * 0.007019f - 0.014f;
|
||||
}
|
||||
@@ -46,7 +46,7 @@ float getUserVoltage6V(int32_t* status) {
|
||||
/**
|
||||
* Get the 6V rail current
|
||||
*/
|
||||
float getUserCurrent6V(int32_t* status) {
|
||||
float HAL_GetUserCurrent6V(int32_t* status) {
|
||||
initializePower(status);
|
||||
return power->readUserCurrent6V(status) / 4.096f * 0.005566f - 0.009f;
|
||||
}
|
||||
@@ -54,7 +54,7 @@ float getUserCurrent6V(int32_t* status) {
|
||||
/**
|
||||
* Get the active state of the 6V rail
|
||||
*/
|
||||
bool getUserActive6V(int32_t* status) {
|
||||
bool HAL_GetUserActive6V(int32_t* status) {
|
||||
initializePower(status);
|
||||
return power->readStatus_User6V(status) == 4;
|
||||
}
|
||||
@@ -62,7 +62,7 @@ bool getUserActive6V(int32_t* status) {
|
||||
/**
|
||||
* Get the fault count for the 6V rail
|
||||
*/
|
||||
int getUserCurrentFaults6V(int32_t* status) {
|
||||
int HAL_GetUserCurrentFaults6V(int32_t* status) {
|
||||
initializePower(status);
|
||||
return (int)power->readFaultCounts_OverCurrentFaultCount6V(status);
|
||||
}
|
||||
@@ -70,7 +70,7 @@ int getUserCurrentFaults6V(int32_t* status) {
|
||||
/**
|
||||
* Get the 5V rail voltage
|
||||
*/
|
||||
float getUserVoltage5V(int32_t* status) {
|
||||
float HAL_GetUserVoltage5V(int32_t* status) {
|
||||
initializePower(status);
|
||||
return power->readUserVoltage5V(status) / 4.096f * 0.005962f - 0.013f;
|
||||
}
|
||||
@@ -78,7 +78,7 @@ float getUserVoltage5V(int32_t* status) {
|
||||
/**
|
||||
* Get the 5V rail current
|
||||
*/
|
||||
float getUserCurrent5V(int32_t* status) {
|
||||
float HAL_GetUserCurrent5V(int32_t* status) {
|
||||
initializePower(status);
|
||||
return power->readUserCurrent5V(status) / 4.096f * 0.001996f - 0.002f;
|
||||
}
|
||||
@@ -86,7 +86,7 @@ float getUserCurrent5V(int32_t* status) {
|
||||
/**
|
||||
* Get the active state of the 5V rail
|
||||
*/
|
||||
bool getUserActive5V(int32_t* status) {
|
||||
bool HAL_GetUserActive5V(int32_t* status) {
|
||||
initializePower(status);
|
||||
return power->readStatus_User5V(status) == 4;
|
||||
}
|
||||
@@ -94,12 +94,12 @@ bool getUserActive5V(int32_t* status) {
|
||||
/**
|
||||
* Get the fault count for the 5V rail
|
||||
*/
|
||||
int getUserCurrentFaults5V(int32_t* status) {
|
||||
int HAL_GetUserCurrentFaults5V(int32_t* status) {
|
||||
initializePower(status);
|
||||
return (int)power->readFaultCounts_OverCurrentFaultCount5V(status);
|
||||
}
|
||||
|
||||
unsigned char getUserStatus5V(int32_t* status) {
|
||||
unsigned char HAL_GetUserStatus5V(int32_t* status) {
|
||||
initializePower(status);
|
||||
return power->readStatus_User5V(status);
|
||||
}
|
||||
@@ -107,7 +107,7 @@ unsigned char getUserStatus5V(int32_t* status) {
|
||||
/**
|
||||
* Get the 3.3V rail voltage
|
||||
*/
|
||||
float getUserVoltage3V3(int32_t* status) {
|
||||
float HAL_GetUserVoltage3V3(int32_t* status) {
|
||||
initializePower(status);
|
||||
return power->readUserVoltage3V3(status) / 4.096f * 0.004902f - 0.01f;
|
||||
}
|
||||
@@ -115,7 +115,7 @@ float getUserVoltage3V3(int32_t* status) {
|
||||
/**
|
||||
* Get the 3.3V rail current
|
||||
*/
|
||||
float getUserCurrent3V3(int32_t* status) {
|
||||
float HAL_GetUserCurrent3V3(int32_t* status) {
|
||||
initializePower(status);
|
||||
return power->readUserCurrent3V3(status) / 4.096f * 0.002486f - 0.003f;
|
||||
}
|
||||
@@ -123,7 +123,7 @@ float getUserCurrent3V3(int32_t* status) {
|
||||
/**
|
||||
* Get the active state of the 3.3V rail
|
||||
*/
|
||||
bool getUserActive3V3(int32_t* status) {
|
||||
bool HAL_GetUserActive3V3(int32_t* status) {
|
||||
initializePower(status);
|
||||
return power->readStatus_User3V3(status) == 4;
|
||||
}
|
||||
@@ -131,7 +131,7 @@ bool getUserActive3V3(int32_t* status) {
|
||||
/**
|
||||
* Get the fault count for the 3.3V rail
|
||||
*/
|
||||
int getUserCurrentFaults3V3(int32_t* status) {
|
||||
int HAL_GetUserCurrentFaults3V3(int32_t* status) {
|
||||
initializePower(status);
|
||||
return (int)power->readFaultCounts_OverCurrentFaultCount3V3(status);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user