Skip to content

Commit

Permalink
Fix cpp implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
icros-personal committed Feb 6, 2025
1 parent 3dbee70 commit 6d2a646
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ void PathPlannerTrajectory::forwardAccelPass(
auto accelStates = config.toSwerveModuleStates(chassisAccel);
for (size_t m = 0; m < config.numModules; m++) {
units::meters_per_second_squared_t moduleAcceleration {
units::math::abs(accelStates[m].speed()) };
units::math::abs(accelStates[m].speed)() };

// Calculate the module velocity at the current state
// vf^2 = v0^2 + 2ad
Expand Down Expand Up @@ -580,7 +580,7 @@ void PathPlannerTrajectory::reverseAccelPass(
auto accelStates = config.toSwerveModuleStates(chassisAccel);
for (size_t m = 0; m < config.numModules; m++) {
units::meters_per_second_squared_t moduleAcceleration {
units::math::abs(accelStates[m].speed()) };
units::math::abs(accelStates[m].speed)() };

// Calculate the module velocity at the current state
// vf^2 = v0^2 + 2ad
Expand Down

0 comments on commit 6d2a646

Please sign in to comment.