mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[docs] Add missing JavaDocs (#6146)
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user