Skip to content

Commit dd9d6e1

Browse files
committed
Changes documentation for removeMotorIfFaulty/removeFaultyMotor
1 parent 549e78a commit dd9d6e1

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/software/embedded/services/motor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ void MotorService::MotorFaultIndicator::update(
114114
}
115115
}
116116

117-
void MotorService::MotorFaultIndicator::removeFaultyMotor(std::set<uint8_t>& motors)
117+
void MotorService::MotorFaultIndicator::removeMotorIfFaulty(std::set<uint8_t>& motors)
118118
{
119119
if (num_critical_faults > MOTOR_FAULT_THRESHOLD_COUNT)
120120
{
@@ -359,7 +359,7 @@ void MotorService::checkDriverFault(uint8_t motor)
359359
}
360360

361361
cached_motor_faults_.at(motor).update(drive_enabled, motor_faults);
362-
cached_motor_faults_.at(motor).removeFaultyMotor(enabled_motors);
362+
cached_motor_faults_.at(motor).removeMotorIfFaulty(enabled_motors);
363363
}
364364

365365
TbotsProto::MotorStatus MotorService::updateMotorStatus(double front_left_velocity_mps,

src/software/embedded/services/motor.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,12 @@ class MotorService
153153
std::unordered_set<TbotsProto::MotorFault>& motor_faults);
154154

155155
/**
156-
* Remove motor_id from enabled_motors and log the removal, if it has failed too
157-
* much.
156+
* If a motor has failed repeatedly, remove the associated motor_id
157+
* from enabled_motors and log the removal.
158158
*
159-
* @param motors a set of motors that are currently enabled
159+
* @param motors a set of motors that are currently enabled. May be modified by this function.
160160
*/
161-
void removeFaultyMotor(std::set<uint8_t>& motors);
161+
void removeMotorIfFaulty(std::set<uint8_t>& motors);
162162
};
163163

164164
/**

0 commit comments

Comments
 (0)