Moved C++ comments from source files to headers (#1111)

Also sorted functions in C++ sources to match order in related headers.
This commit is contained in:
Tyler Veness
2018-05-31 20:47:15 -07:00
committed by Peter Johnson
parent d9971a705a
commit 8c680a26f8
234 changed files with 9936 additions and 9309 deletions

View File

@@ -16,12 +16,6 @@
using namespace frc;
/**
* Get the input voltage to the robot controller.
*
* @return The controller input voltage value in Volts
* @deprecated Use RobotController static class method
*/
double ControllerPower::GetInputVoltage() {
int32_t status = 0;
double retVal = HAL_GetVinVoltage(&status);
@@ -29,12 +23,6 @@ double ControllerPower::GetInputVoltage() {
return retVal;
}
/**
* Get the input current to the robot controller.
*
* @return The controller input current value in Amps
* @deprecated Use RobotController static class method
*/
double ControllerPower::GetInputCurrent() {
int32_t status = 0;
double retVal = HAL_GetVinCurrent(&status);
@@ -42,120 +30,6 @@ double ControllerPower::GetInputCurrent() {
return retVal;
}
/**
* Get the voltage of the 6V rail.
*
* @return The controller 6V rail voltage value in Volts
* @deprecated Use RobotController static class method
*/
double ControllerPower::GetVoltage6V() {
int32_t status = 0;
double retVal = HAL_GetUserVoltage6V(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
/**
* Get the current output of the 6V rail.
*
* @return The controller 6V rail output current value in Amps
* @deprecated Use RobotController static class method
*/
double ControllerPower::GetCurrent6V() {
int32_t status = 0;
double retVal = HAL_GetUserCurrent6V(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
/**
* Get the enabled state of the 6V rail. The rail may be disabled due to a
* controller brownout, a short circuit on the rail, or controller over-voltage.
*
* @return The controller 6V rail enabled value. True for enabled.
* @deprecated Use RobotController static class method
*/
bool ControllerPower::GetEnabled6V() {
int32_t status = 0;
bool retVal = HAL_GetUserActive6V(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
/**
* Get the count of the total current faults on the 6V rail since the controller
* has booted.
*
* @return The number of faults.
* @deprecated Use RobotController static class method
*/
int ControllerPower::GetFaultCount6V() {
int32_t status = 0;
int retVal = HAL_GetUserCurrentFaults6V(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
/**
* Get the voltage of the 5V rail.
*
* @return The controller 5V rail voltage value in Volts
* @deprecated Use RobotController static class method
*/
double ControllerPower::GetVoltage5V() {
int32_t status = 0;
double retVal = HAL_GetUserVoltage5V(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
/**
* Get the current output of the 5V rail.
*
* @return The controller 5V rail output current value in Amps
* @deprecated Use RobotController static class method
*/
double ControllerPower::GetCurrent5V() {
int32_t status = 0;
double retVal = HAL_GetUserCurrent5V(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
/**
* Get the enabled state of the 5V rail. The rail may be disabled due to a
* controller brownout, a short circuit on the rail, or controller over-voltage.
*
* @return The controller 5V rail enabled value. True for enabled.
* @deprecated Use RobotController static class method
*/
bool ControllerPower::GetEnabled5V() {
int32_t status = 0;
bool retVal = HAL_GetUserActive5V(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
/**
* Get the count of the total current faults on the 5V rail since the controller
* has booted.
*
* @return The number of faults
* @deprecated Use RobotController static class method
*/
int ControllerPower::GetFaultCount5V() {
int32_t status = 0;
int retVal = HAL_GetUserCurrentFaults5V(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
/**
* Get the voltage of the 3.3V rail.
*
* @return The controller 3.3V rail voltage value in Volts
* @deprecated Use RobotController static class method
*/
double ControllerPower::GetVoltage3V3() {
int32_t status = 0;
double retVal = HAL_GetUserVoltage3V3(&status);
@@ -163,12 +37,6 @@ double ControllerPower::GetVoltage3V3() {
return retVal;
}
/**
* Get the current output of the 3.3V rail.
*
* @return The controller 3.3V rail output current value in Amps
* @deprecated Use RobotController static class method
*/
double ControllerPower::GetCurrent3V3() {
int32_t status = 0;
double retVal = HAL_GetUserCurrent3V3(&status);
@@ -176,13 +44,6 @@ double ControllerPower::GetCurrent3V3() {
return retVal;
}
/**
* Get the enabled state of the 3.3V rail. The rail may be disabled due to a
* controller brownout, a short circuit on the rail, or controller over-voltage.
*
* @return The controller 3.3V rail enabled value. True for enabled.
* @deprecated Use RobotController static class method
*/
bool ControllerPower::GetEnabled3V3() {
int32_t status = 0;
bool retVal = HAL_GetUserActive3V3(&status);
@@ -190,16 +51,65 @@ bool ControllerPower::GetEnabled3V3() {
return retVal;
}
/**
* Get the count of the total current faults on the 3.3V rail since the
* controller has booted.
*
* @return The number of faults
* @deprecated Use RobotController static class method
*/
int ControllerPower::GetFaultCount3V3() {
int32_t status = 0;
int retVal = HAL_GetUserCurrentFaults3V3(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
double ControllerPower::GetVoltage5V() {
int32_t status = 0;
double retVal = HAL_GetUserVoltage5V(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
double ControllerPower::GetCurrent5V() {
int32_t status = 0;
double retVal = HAL_GetUserCurrent5V(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
bool ControllerPower::GetEnabled5V() {
int32_t status = 0;
bool retVal = HAL_GetUserActive5V(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
int ControllerPower::GetFaultCount5V() {
int32_t status = 0;
int retVal = HAL_GetUserCurrentFaults5V(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
double ControllerPower::GetVoltage6V() {
int32_t status = 0;
double retVal = HAL_GetUserVoltage6V(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
double ControllerPower::GetCurrent6V() {
int32_t status = 0;
double retVal = HAL_GetUserCurrent6V(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
bool ControllerPower::GetEnabled6V() {
int32_t status = 0;
bool retVal = HAL_GetUserActive6V(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}
int ControllerPower::GetFaultCount6V() {
int32_t status = 0;
int retVal = HAL_GetUserCurrentFaults6V(&status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return retVal;
}