Added
clockwork::TrapezoidalProfile— a speed-up / cruise / slow-down motion profile. Give it a distance, top speed, and acceleration; get target velocity and position at any time. Triangle fallback when the distance is too short, plus reverse support.clockwork::FlywheelController— feedforward + P velocity control for a flywheel. Clamped to one direction, recovers after a shot drags the speed down.Motion::turnToHeading(heading, ...)— turn to an absolute field heading on the tuned turn PID.Motion::moveToPoint(x, y, ...)— blocking drive to a field point via lemlib's motion profiling, with an optional backwards mode.geometry.hppsignedForwardDistance— the forward-progress projectiondriveDistanceuses, pulled out and unit-tested;driveDistancenow calls it.
Stress tested
- Host suite expanded to a real stress pass: integral windup limits, output clamps under extreme input, convergence from both directions, the slew limiter never overshooting a jumping target, curve bounds and deadband edges, the geometry conventions, and every profile/flywheel invariant. 747 checks, all green (
make test).
Install
pros c add-depot clockwork https://raw.githubusercontent.com/AkshobyaRaoSWE/clockwork-lib/main/depot.json
pros c apply clockworkDocs: https://akshobyaraoswe.github.io/clockwork-lib/ · Full changelog: CHANGELOG.md