File tree Expand file tree Collapse file tree
src/software/embedded/services Expand file tree Collapse file tree Original file line number Diff line number Diff 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
365365TbotsProto::MotorStatus MotorService::updateMotorStatus (double front_left_velocity_mps,
Original file line number Diff line number Diff 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 /* *
You can’t perform that action at this time.
0 commit comments