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

@@ -124,17 +124,7 @@ int32_t HAL_GetJoystickButtons(int32_t joystickNum,
SimDriverStationData->GetJoystickButtons(joystickNum, buttons);
return 0;
}
/**
* Retrieve the Joystick Descriptor for particular slot
* @param desc [out] descriptor (data transfer object) to fill in. desc is
* filled in regardless of success. In other words, if descriptor is not
* available, desc is filled in with default values matching the init-values in
* Java and C++ Driverstation for when caller requests a too-large joystick
* index.
*
* @return error code reported from Network Comm back-end. Zero is good,
* nonzero is bad.
*/
int32_t HAL_GetJoystickDescriptor(int32_t joystickNum,
HAL_JoystickDescriptor* desc) {
SimDriverStationData->GetJoystickDescriptor(joystickNum, desc);
@@ -241,16 +231,8 @@ bool HAL_IsNewControlData(void) {
return true;
}
/**
* Waits for the newest DS packet to arrive. Note that this is a blocking call.
*/
void HAL_WaitForDSData(void) { HAL_WaitForDSDataTimeout(0); }
/**
* Waits for the newest DS packet to arrive. If timeout is <= 0, this will wait
* forever. Otherwise, it will wait until either a new packet, or the timeout
* time has passed. Returns true on new data, false on timeout.
*/
HAL_Bool HAL_WaitForDSDataTimeout(double timeout) {
auto timeoutTime =
std::chrono::steady_clock::now() + std::chrono::duration<double>(timeout);
@@ -284,11 +266,6 @@ static int32_t newDataOccur(uint32_t refNum) {
return 0;
}
/*
* Call this to initialize the driver station communication. This will properly
* handle multiple calls. However note that this CANNOT be called from a library
* that interfaces with LabVIEW.
*/
void HAL_InitializeDriverStation(void) {
hal::init::CheckInit();
static std::atomic_bool initialized{false};
@@ -305,10 +282,6 @@ void HAL_InitializeDriverStation(void) {
initialized = true;
}
/*
* Releases the DS Mutex to allow proper shutdown of any threads that are
* waiting on it.
*/
void HAL_ReleaseDSMutex(void) { newDataOccur(refNumber); }
} // extern "C"