This commit is contained in:
OnDYCLaptop
2026-07-09 20:12:25 +08:00
parent 914584b71c
commit 915b1b1af0
10 changed files with 1193 additions and 131 deletions
@@ -244,7 +244,11 @@ public class DriveControls {
// If angle difference is within threshold, don't rotate
if (Math.abs(calDifference) > 1.0) {
return calDifference * Constants.AutoPositioning.autoRotationkP;
double rotationRate = calDifference * Constants.AutoPositioning.autoRotationkP;
if (Math.abs(rotationRate) < 0.24) {
return Math.copySign(0.24, rotationRate);
}
return rotationRate;
} else {
return 0;
}