EZ-Robotics / EZ-Template

Simple plug-and-play PROS template that handles drive base functions for VEX robots.
https://ez-robotics.github.io/EZ-Template/
Mozilla Public License 2.0
69 stars 27 forks source link

Scale Left and Right to slew before main vector scaling happens #110

Closed ssejrog closed 3 months ago

ssejrog commented 3 months ago

With #82 came vector scaling to keep resolution between the left and right side and the imu.

The first step of this is clamping the left and right PID outputs to the max slew output.

  double l_drive_out = util::clamp(leftPID.output, slew_left.output(), -slew_left.output());
  double r_drive_out = util::clamp(rightPID.output, slew_right.output(), -slew_right.output());

This has lost resolution, and should be scaled to the max slew output instead.