mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
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:
committed by
Peter Johnson
parent
d9971a705a
commit
8c680a26f8
@@ -26,12 +26,6 @@
|
||||
|
||||
using namespace frc;
|
||||
|
||||
/**
|
||||
* Assert implementation.
|
||||
*
|
||||
* This allows breakpoints to be set on an assert. The users don't call this,
|
||||
* but instead use the wpi_assert macros in Utility.h.
|
||||
*/
|
||||
bool wpi_assert_impl(bool conditionValue, const wpi::Twine& conditionText,
|
||||
const wpi::Twine& message, wpi::StringRef fileName,
|
||||
int lineNumber, wpi::StringRef funcName) {
|
||||
@@ -98,13 +92,6 @@ void wpi_assertEqual_common_impl(const wpi::Twine& valueA,
|
||||
HAL_SendError(1, 1, 0, errorBuf.c_str(), locBuf.c_str(), trace.c_str(), 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Assert equal implementation.
|
||||
*
|
||||
* This determines whether the two given integers are equal. If not, the value
|
||||
* of each is printed along with an optional message string. The users don't
|
||||
* call this, but instead use the wpi_assertEqual macros in Utility.h.
|
||||
*/
|
||||
bool wpi_assertEqual_impl(int valueA, int valueB,
|
||||
const wpi::Twine& valueAString,
|
||||
const wpi::Twine& valueBString,
|
||||
@@ -117,13 +104,6 @@ bool wpi_assertEqual_impl(int valueA, int valueB,
|
||||
return valueA == valueB;
|
||||
}
|
||||
|
||||
/**
|
||||
* Assert not equal implementation.
|
||||
*
|
||||
* This determines whether the two given integers are equal. If so, the value of
|
||||
* each is printed along with an optional message string. The users don't call
|
||||
* this, but instead use the wpi_assertNotEqual macros in Utility.h.
|
||||
*/
|
||||
bool wpi_assertNotEqual_impl(int valueA, int valueB,
|
||||
const wpi::Twine& valueAString,
|
||||
const wpi::Twine& valueBString,
|
||||
@@ -138,14 +118,6 @@ bool wpi_assertNotEqual_impl(int valueA, int valueB,
|
||||
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* Return the FPGA Version number.
|
||||
*
|
||||
* For now, expect this to be competition year.
|
||||
*
|
||||
* @return FPGA Version number.
|
||||
* @deprecated Use RobotController static class method
|
||||
*/
|
||||
int GetFPGAVersion() {
|
||||
int32_t status = 0;
|
||||
int version = HAL_GetFPGAVersion(&status);
|
||||
@@ -153,16 +125,6 @@ int GetFPGAVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the FPGA Revision number.
|
||||
*
|
||||
* The format of the revision is 3 numbers. The 12 most significant bits are the
|
||||
* Major Revision. The next 8 bits are the Minor Revision. The 12 least
|
||||
* significant bits are the Build Number.
|
||||
*
|
||||
* @return FPGA Revision number.
|
||||
* @deprecated Use RobotController static class method
|
||||
*/
|
||||
int64_t GetFPGARevision() {
|
||||
int32_t status = 0;
|
||||
int64_t revision = HAL_GetFPGARevision(&status);
|
||||
@@ -170,13 +132,6 @@ int64_t GetFPGARevision() {
|
||||
return revision;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read the microsecond-resolution timer on the FPGA.
|
||||
*
|
||||
* @return The current time in microseconds according to the FPGA (since FPGA
|
||||
* reset).
|
||||
* @deprecated Use RobotController static class method
|
||||
*/
|
||||
uint64_t GetFPGATime() {
|
||||
int32_t status = 0;
|
||||
uint64_t time = HAL_GetFPGATime(&status);
|
||||
@@ -184,12 +139,6 @@ uint64_t GetFPGATime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the state of the "USER" button on the roboRIO.
|
||||
*
|
||||
* @return True if the button is currently pressed down
|
||||
* @deprecated Use RobotController static class method
|
||||
*/
|
||||
bool GetUserButton() {
|
||||
int32_t status = 0;
|
||||
|
||||
@@ -224,11 +173,6 @@ static std::string demangle(char const* mangledSymbol) {
|
||||
return mangledSymbol;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a stack trace, ignoring the first "offset" symbols.
|
||||
*
|
||||
* @param offset The number of symbols at the top of the stack to ignore
|
||||
*/
|
||||
std::string GetStackTrace(int offset) {
|
||||
void* stackTrace[128];
|
||||
int stackSize = backtrace(stackTrace, 128);
|
||||
|
||||
Reference in New Issue
Block a user