[docs] Add missing JavaDocs (#6146)

This commit is contained in:
Tyler Veness
2024-01-04 08:38:06 -08:00
committed by GitHub
parent 6e58db398d
commit f29a7d2e50
145 changed files with 1106 additions and 94 deletions

View File

@@ -52,25 +52,49 @@ class TrapezoidProfile {
units::compound_unit<Velocity, units::inverse<units::seconds>>;
using Acceleration_t = units::unit_t<Acceleration>;
/**
* Profile constraints.
*/
class Constraints {
public:
/// Maximum velocity.
Velocity_t maxVelocity{0};
/// Maximum acceleration.
Acceleration_t maxAcceleration{0};
/**
* Default constructor.
*/
Constraints() {
wpi::math::MathSharedStore::ReportUsage(
wpi::math::MathUsageId::kTrajectory_TrapezoidProfile, 1);
}
Constraints(Velocity_t maxVelocity_, Acceleration_t maxAcceleration_)
: maxVelocity{maxVelocity_}, maxAcceleration{maxAcceleration_} {
/**
* Constructs constraints for a Trapezoid Profile.
*
* @param maxVelocity Maximum velocity.
* @param maxAcceleration Maximum acceleration.
*/
Constraints(Velocity_t maxVelocity, Acceleration_t maxAcceleration)
: maxVelocity{maxVelocity}, maxAcceleration{maxAcceleration} {
wpi::math::MathSharedStore::ReportUsage(
wpi::math::MathUsageId::kTrajectory_TrapezoidProfile, 1);
}
Velocity_t maxVelocity{0};
Acceleration_t maxAcceleration{0};
};
/**
* Profile state.
*/
class State {
public:
/// The position at this state.
Distance_t position{0};
/// The velocity at this state.
Velocity_t velocity{0};
bool operator==(const State&) const = default;
};