mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Reflowed comments and removed commented out code (#735)
This commit is contained in:
committed by
Peter Johnson
parent
1e8d18b328
commit
c663d7cd16
@@ -49,6 +49,7 @@ MotorSafetyHelper::~MotorSafetyHelper() {
|
||||
|
||||
/**
|
||||
* Feed the motor safety object.
|
||||
*
|
||||
* Resets the timer on this object that is used to do the timeouts.
|
||||
*/
|
||||
void MotorSafetyHelper::Feed() {
|
||||
@@ -58,6 +59,7 @@ void MotorSafetyHelper::Feed() {
|
||||
|
||||
/**
|
||||
* Set the expiration time for the corresponding motor safety object.
|
||||
*
|
||||
* @param expirationTime The timeout value in seconds.
|
||||
*/
|
||||
void MotorSafetyHelper::SetExpiration(double expirationTime) {
|
||||
@@ -67,6 +69,7 @@ void MotorSafetyHelper::SetExpiration(double expirationTime) {
|
||||
|
||||
/**
|
||||
* Retrieve the timeout value for the corresponding motor safety object.
|
||||
*
|
||||
* @return the timeout value in seconds.
|
||||
*/
|
||||
double MotorSafetyHelper::GetExpiration() const {
|
||||
@@ -76,6 +79,7 @@ double MotorSafetyHelper::GetExpiration() const {
|
||||
|
||||
/**
|
||||
* Determine if the motor is still operating or has timed out.
|
||||
*
|
||||
* @return a true value if the motor is still operating normally and hasn't
|
||||
* timed out.
|
||||
*/
|
||||
@@ -86,6 +90,7 @@ bool MotorSafetyHelper::IsAlive() const {
|
||||
|
||||
/**
|
||||
* Check if this motor has exceeded its timeout.
|
||||
*
|
||||
* This method is called periodically to determine if this motor has exceeded
|
||||
* its timeout value. If it has, the stop method is called, and the motor is
|
||||
* shut down until its value is updated again.
|
||||
@@ -107,7 +112,9 @@ void MotorSafetyHelper::Check() {
|
||||
|
||||
/**
|
||||
* Enable/disable motor safety for this device
|
||||
*
|
||||
* Turn on and off the motor safety option for this PWM object.
|
||||
*
|
||||
* @param enabled True if motor safety is enforced for this object
|
||||
*/
|
||||
void MotorSafetyHelper::SetSafetyEnabled(bool enabled) {
|
||||
@@ -117,7 +124,9 @@ void MotorSafetyHelper::SetSafetyEnabled(bool enabled) {
|
||||
|
||||
/**
|
||||
* Return the state of the motor safety enabled flag
|
||||
*
|
||||
* Return if the motor safety is currently enabled for this devicce.
|
||||
*
|
||||
* @return True if motor safety is enforced for this device
|
||||
*/
|
||||
bool MotorSafetyHelper::IsSafetyEnabled() const {
|
||||
@@ -127,8 +136,9 @@ bool MotorSafetyHelper::IsSafetyEnabled() const {
|
||||
|
||||
/**
|
||||
* Check the motors to see if any have timed out.
|
||||
* This static method is called periodically to poll all the motors and stop
|
||||
* any that have timed out.
|
||||
*
|
||||
* This static method is called periodically to poll all the motors and stop any
|
||||
* that have timed out.
|
||||
*/
|
||||
void MotorSafetyHelper::CheckMotors() {
|
||||
std::lock_guard<wpi::mutex> sync(m_listMutex);
|
||||
|
||||
Reference in New Issue
Block a user